diff options
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/Kbuild | 2 | ||||
-rw-r--r-- | include/asm-x86/gpio.h | 60 | ||||
-rw-r--r-- | include/asm-x86/hugetlb.h | 10 | ||||
-rw-r--r-- | include/asm-x86/i387.h | 54 | ||||
-rw-r--r-- | include/asm-x86/ide.h | 65 | ||||
-rw-r--r-- | include/asm-x86/io_32.h | 2 | ||||
-rw-r--r-- | include/asm-x86/io_64.h | 2 | ||||
-rw-r--r-- | include/asm-x86/ipi.h | 2 | ||||
-rw-r--r-- | include/asm-x86/page.h | 17 | ||||
-rw-r--r-- | include/asm-x86/paravirt.h | 3 | ||||
-rw-r--r-- | include/asm-x86/pgtable-3level.h | 8 | ||||
-rw-r--r-- | include/asm-x86/pgtable.h | 4 | ||||
-rw-r--r-- | include/asm-x86/pgtable_32.h | 4 | ||||
-rw-r--r-- | include/asm-x86/pgtable_64.h | 10 | ||||
-rw-r--r-- | include/asm-x86/processor-flags.h | 2 | ||||
-rw-r--r-- | include/asm-x86/processor.h | 2 | ||||
-rw-r--r-- | include/asm-x86/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-x86/thread_info.h | 6 | ||||
-rw-r--r-- | include/asm-x86/unistd_32.h | 6 | ||||
-rw-r--r-- | include/asm-x86/unistd_64.h | 14 | ||||
-rw-r--r-- | include/asm-x86/xen/page.h | 2 |
21 files changed, 124 insertions, 152 deletions
diff --git a/include/asm-x86/Kbuild b/include/asm-x86/Kbuild index 1e3554596f72..4a8e80cdcfa5 100644 --- a/include/asm-x86/Kbuild +++ b/include/asm-x86/Kbuild | |||
@@ -3,7 +3,6 @@ include include/asm-generic/Kbuild.asm | |||
3 | header-y += boot.h | 3 | header-y += boot.h |
4 | header-y += bootparam.h | 4 | header-y += bootparam.h |
5 | header-y += debugreg.h | 5 | header-y += debugreg.h |
6 | header-y += kvm.h | ||
7 | header-y += ldt.h | 6 | header-y += ldt.h |
8 | header-y += msr-index.h | 7 | header-y += msr-index.h |
9 | header-y += prctl.h | 8 | header-y += prctl.h |
@@ -19,7 +18,6 @@ unifdef-y += msr.h | |||
19 | unifdef-y += mtrr.h | 18 | unifdef-y += mtrr.h |
20 | unifdef-y += posix_types_32.h | 19 | unifdef-y += posix_types_32.h |
21 | unifdef-y += posix_types_64.h | 20 | unifdef-y += posix_types_64.h |
22 | unifdef-y += ptrace.h | ||
23 | unifdef-y += unistd_32.h | 21 | unifdef-y += unistd_32.h |
24 | unifdef-y += unistd_64.h | 22 | unifdef-y += unistd_64.h |
25 | unifdef-y += vm86.h | 23 | unifdef-y += vm86.h |
diff --git a/include/asm-x86/gpio.h b/include/asm-x86/gpio.h index f269ff9cd40b..f9e8f8918a9d 100644 --- a/include/asm-x86/gpio.h +++ b/include/asm-x86/gpio.h | |||
@@ -1,6 +1,62 @@ | |||
1 | #ifndef ASM_X86__GPIO_H | 1 | /* |
2 | #define ASM_X86__GPIO_H | 2 | * Generic GPIO API implementation for x86. |
3 | * | ||
4 | * Derived from the generic GPIO API for powerpc: | ||
5 | * | ||
6 | * Copyright (c) 2007-2008 MontaVista Software, Inc. | ||
7 | * | ||
8 | * Author: Anton Vorontsov <avorontsov@ru.mvista.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
3 | 15 | ||
16 | #ifndef _ASM_I386_GPIO_H | ||
17 | #define _ASM_I386_GPIO_H | ||
18 | |||
19 | #ifdef CONFIG_X86_RDC321X | ||
4 | #include <gpio.h> | 20 | #include <gpio.h> |
21 | #else /* CONFIG_X86_RDC321X */ | ||
22 | |||
23 | #include <asm-generic/gpio.h> | ||
24 | |||
25 | #ifdef CONFIG_GPIOLIB | ||
26 | |||
27 | /* | ||
28 | * Just call gpiolib. | ||
29 | */ | ||
30 | static inline int gpio_get_value(unsigned int gpio) | ||
31 | { | ||
32 | return __gpio_get_value(gpio); | ||
33 | } | ||
34 | |||
35 | static inline void gpio_set_value(unsigned int gpio, int value) | ||
36 | { | ||
37 | __gpio_set_value(gpio, value); | ||
38 | } | ||
39 | |||
40 | static inline int gpio_cansleep(unsigned int gpio) | ||
41 | { | ||
42 | return __gpio_cansleep(gpio); | ||
43 | } | ||
44 | |||
45 | /* | ||
46 | * Not implemented, yet. | ||
47 | */ | ||
48 | static inline int gpio_to_irq(unsigned int gpio) | ||
49 | { | ||
50 | return -ENOSYS; | ||
51 | } | ||
52 | |||
53 | static inline int irq_to_gpio(unsigned int irq) | ||
54 | { | ||
55 | return -EINVAL; | ||
56 | } | ||
57 | |||
58 | #endif /* CONFIG_GPIOLIB */ | ||
59 | |||
60 | #endif /* CONFIG_X86_RDC321X */ | ||
5 | 61 | ||
6 | #endif /* ASM_X86__GPIO_H */ | 62 | #endif /* ASM_X86__GPIO_H */ |
diff --git a/include/asm-x86/hugetlb.h b/include/asm-x86/hugetlb.h index 0e0a0828182b..0b7ec5dc0884 100644 --- a/include/asm-x86/hugetlb.h +++ b/include/asm-x86/hugetlb.h | |||
@@ -14,11 +14,13 @@ static inline int is_hugepage_only_range(struct mm_struct *mm, | |||
14 | * If the arch doesn't supply something else, assume that hugepage | 14 | * If the arch doesn't supply something else, assume that hugepage |
15 | * size aligned regions are ok without further preparation. | 15 | * size aligned regions are ok without further preparation. |
16 | */ | 16 | */ |
17 | static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) | 17 | static inline int prepare_hugepage_range(struct file *file, |
18 | unsigned long addr, unsigned long len) | ||
18 | { | 19 | { |
19 | if (len & ~HPAGE_MASK) | 20 | struct hstate *h = hstate_file(file); |
21 | if (len & ~huge_page_mask(h)) | ||
20 | return -EINVAL; | 22 | return -EINVAL; |
21 | if (addr & ~HPAGE_MASK) | 23 | if (addr & ~huge_page_mask(h)) |
22 | return -EINVAL; | 24 | return -EINVAL; |
23 | return 0; | 25 | return 0; |
24 | } | 26 | } |
@@ -26,7 +28,7 @@ static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) | |||
26 | static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm) { | 28 | static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm) { |
27 | } | 29 | } |
28 | 30 | ||
29 | static inline void hugetlb_free_pgd_range(struct mmu_gather **tlb, | 31 | static inline void hugetlb_free_pgd_range(struct mmu_gather *tlb, |
30 | unsigned long addr, unsigned long end, | 32 | unsigned long addr, unsigned long end, |
31 | unsigned long floor, | 33 | unsigned long floor, |
32 | unsigned long ceiling) | 34 | unsigned long ceiling) |
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h index 3e83cbb728ae..6f60a6b89973 100644 --- a/include/asm-x86/i387.h +++ b/include/asm-x86/i387.h | |||
@@ -137,60 +137,6 @@ static inline void __save_init_fpu(struct task_struct *tsk) | |||
137 | task_thread_info(tsk)->status &= ~TS_USEDFPU; | 137 | task_thread_info(tsk)->status &= ~TS_USEDFPU; |
138 | } | 138 | } |
139 | 139 | ||
140 | /* | ||
141 | * Signal frame handlers. | ||
142 | */ | ||
143 | |||
144 | static inline int save_i387(struct _fpstate __user *buf) | ||
145 | { | ||
146 | struct task_struct *tsk = current; | ||
147 | int err = 0; | ||
148 | |||
149 | BUILD_BUG_ON(sizeof(struct user_i387_struct) != | ||
150 | sizeof(tsk->thread.xstate->fxsave)); | ||
151 | |||
152 | if ((unsigned long)buf % 16) | ||
153 | printk("save_i387: bad fpstate %p\n", buf); | ||
154 | |||
155 | if (!used_math()) | ||
156 | return 0; | ||
157 | clear_used_math(); /* trigger finit */ | ||
158 | if (task_thread_info(tsk)->status & TS_USEDFPU) { | ||
159 | err = save_i387_checking((struct i387_fxsave_struct __user *) | ||
160 | buf); | ||
161 | if (err) | ||
162 | return err; | ||
163 | task_thread_info(tsk)->status &= ~TS_USEDFPU; | ||
164 | stts(); | ||
165 | } else { | ||
166 | if (__copy_to_user(buf, &tsk->thread.xstate->fxsave, | ||
167 | sizeof(struct i387_fxsave_struct))) | ||
168 | return -1; | ||
169 | } | ||
170 | return 1; | ||
171 | } | ||
172 | |||
173 | /* | ||
174 | * This restores directly out of user space. Exceptions are handled. | ||
175 | */ | ||
176 | static inline int restore_i387(struct _fpstate __user *buf) | ||
177 | { | ||
178 | struct task_struct *tsk = current; | ||
179 | int err; | ||
180 | |||
181 | if (!used_math()) { | ||
182 | err = init_fpu(tsk); | ||
183 | if (err) | ||
184 | return err; | ||
185 | } | ||
186 | |||
187 | if (!(task_thread_info(current)->status & TS_USEDFPU)) { | ||
188 | clts(); | ||
189 | task_thread_info(current)->status |= TS_USEDFPU; | ||
190 | } | ||
191 | return restore_fpu_checking((__force struct i387_fxsave_struct *)buf); | ||
192 | } | ||
193 | |||
194 | #else /* CONFIG_X86_32 */ | 140 | #else /* CONFIG_X86_32 */ |
195 | 141 | ||
196 | extern void finit(void); | 142 | extern void finit(void); |
diff --git a/include/asm-x86/ide.h b/include/asm-x86/ide.h deleted file mode 100644 index 8bf3cdc6bb49..000000000000 --- a/include/asm-x86/ide.h +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1994-1996 Linus Torvalds & authors | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * This file contains the i386 architecture specific IDE code. | ||
7 | */ | ||
8 | |||
9 | #ifndef ASM_X86__IDE_H | ||
10 | #define ASM_X86__IDE_H | ||
11 | |||
12 | #ifdef __KERNEL__ | ||
13 | |||
14 | |||
15 | #ifndef MAX_HWIFS | ||
16 | # ifdef CONFIG_BLK_DEV_IDEPCI | ||
17 | #define MAX_HWIFS 10 | ||
18 | # else | ||
19 | #define MAX_HWIFS 6 | ||
20 | # endif | ||
21 | #endif | ||
22 | |||
23 | static __inline__ int ide_default_irq(unsigned long base) | ||
24 | { | ||
25 | switch (base) { | ||
26 | case 0x1f0: return 14; | ||
27 | case 0x170: return 15; | ||
28 | case 0x1e8: return 11; | ||
29 | case 0x168: return 10; | ||
30 | case 0x1e0: return 8; | ||
31 | case 0x160: return 12; | ||
32 | default: | ||
33 | return 0; | ||
34 | } | ||
35 | } | ||
36 | |||
37 | static __inline__ unsigned long ide_default_io_base(int index) | ||
38 | { | ||
39 | /* | ||
40 | * If PCI is present then it is not safe to poke around | ||
41 | * the other legacy IDE ports. Only 0x1f0 and 0x170 are | ||
42 | * defined compatibility mode ports for PCI. A user can | ||
43 | * override this using ide= but we must default safe. | ||
44 | */ | ||
45 | if (no_pci_devices()) { | ||
46 | switch(index) { | ||
47 | case 2: return 0x1e8; | ||
48 | case 3: return 0x168; | ||
49 | case 4: return 0x1e0; | ||
50 | case 5: return 0x160; | ||
51 | } | ||
52 | } | ||
53 | switch (index) { | ||
54 | case 0: return 0x1f0; | ||
55 | case 1: return 0x170; | ||
56 | default: | ||
57 | return 0; | ||
58 | } | ||
59 | } | ||
60 | |||
61 | #include <asm-generic/ide_iops.h> | ||
62 | |||
63 | #endif /* __KERNEL__ */ | ||
64 | |||
65 | #endif /* ASM_X86__IDE_H */ | ||
diff --git a/include/asm-x86/io_32.h b/include/asm-x86/io_32.h index d9d1e3f269a8..4f7d878bda18 100644 --- a/include/asm-x86/io_32.h +++ b/include/asm-x86/io_32.h | |||
@@ -110,6 +110,8 @@ static inline void *phys_to_virt(unsigned long address) | |||
110 | */ | 110 | */ |
111 | extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); | 111 | extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); |
112 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); | 112 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); |
113 | extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size, | ||
114 | unsigned long prot_val); | ||
113 | 115 | ||
114 | /* | 116 | /* |
115 | * The default ioremap() behavior is non-cached: | 117 | * The default ioremap() behavior is non-cached: |
diff --git a/include/asm-x86/io_64.h b/include/asm-x86/io_64.h index 00ac4729e527..f436532f1935 100644 --- a/include/asm-x86/io_64.h +++ b/include/asm-x86/io_64.h | |||
@@ -175,6 +175,8 @@ extern void early_iounmap(void *addr, unsigned long size); | |||
175 | */ | 175 | */ |
176 | extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); | 176 | extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); |
177 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); | 177 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); |
178 | extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size, | ||
179 | unsigned long prot_val); | ||
178 | 180 | ||
179 | /* | 181 | /* |
180 | * The default ioremap() behavior is non-cached: | 182 | * The default ioremap() behavior is non-cached: |
diff --git a/include/asm-x86/ipi.h b/include/asm-x86/ipi.h index 63390ea87d13..c1b226797518 100644 --- a/include/asm-x86/ipi.h +++ b/include/asm-x86/ipi.h | |||
@@ -122,7 +122,7 @@ static inline void send_IPI_mask_sequence(cpumask_t mask, int vector) | |||
122 | * - mbligh | 122 | * - mbligh |
123 | */ | 123 | */ |
124 | local_irq_save(flags); | 124 | local_irq_save(flags); |
125 | for_each_cpu_mask(query_cpu, mask) { | 125 | for_each_cpu_mask_nr(query_cpu, mask) { |
126 | __send_IPI_dest_field(per_cpu(x86_cpu_to_apicid, query_cpu), | 126 | __send_IPI_dest_field(per_cpu(x86_cpu_to_apicid, query_cpu), |
127 | vector, APIC_DEST_PHYSICAL); | 127 | vector, APIC_DEST_PHYSICAL); |
128 | } | 128 | } |
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h index 068a636e0bb1..79544e6ffb8b 100644 --- a/include/asm-x86/page.h +++ b/include/asm-x86/page.h | |||
@@ -18,8 +18,11 @@ | |||
18 | (ie, 32-bit PAE). */ | 18 | (ie, 32-bit PAE). */ |
19 | #define PHYSICAL_PAGE_MASK (((signed long)PAGE_MASK) & __PHYSICAL_MASK) | 19 | #define PHYSICAL_PAGE_MASK (((signed long)PAGE_MASK) & __PHYSICAL_MASK) |
20 | 20 | ||
21 | /* PTE_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */ | 21 | /* PTE_PFN_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */ |
22 | #define PTE_MASK ((pteval_t)PHYSICAL_PAGE_MASK) | 22 | #define PTE_PFN_MASK ((pteval_t)PHYSICAL_PAGE_MASK) |
23 | |||
24 | /* PTE_FLAGS_MASK extracts the flags from a (pte|pmd|pud|pgd)val_t */ | ||
25 | #define PTE_FLAGS_MASK (~PTE_PFN_MASK) | ||
23 | 26 | ||
24 | #define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT) | 27 | #define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT) |
25 | #define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1)) | 28 | #define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1)) |
@@ -29,8 +32,7 @@ | |||
29 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) | 32 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) |
30 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | 33 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) |
31 | 34 | ||
32 | /* to align the pointer to the (next) page boundary */ | 35 | #define HUGE_MAX_HSTATE 2 |
33 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) | ||
34 | 36 | ||
35 | #ifndef __ASSEMBLY__ | 37 | #ifndef __ASSEMBLY__ |
36 | #include <linux/types.h> | 38 | #include <linux/types.h> |
@@ -144,6 +146,11 @@ static inline pteval_t native_pte_val(pte_t pte) | |||
144 | return pte.pte; | 146 | return pte.pte; |
145 | } | 147 | } |
146 | 148 | ||
149 | static inline pteval_t native_pte_flags(pte_t pte) | ||
150 | { | ||
151 | return native_pte_val(pte) & PTE_FLAGS_MASK; | ||
152 | } | ||
153 | |||
147 | #define pgprot_val(x) ((x).pgprot) | 154 | #define pgprot_val(x) ((x).pgprot) |
148 | #define __pgprot(x) ((pgprot_t) { (x) } ) | 155 | #define __pgprot(x) ((pgprot_t) { (x) } ) |
149 | 156 | ||
@@ -165,7 +172,7 @@ static inline pteval_t native_pte_val(pte_t pte) | |||
165 | #endif | 172 | #endif |
166 | 173 | ||
167 | #define pte_val(x) native_pte_val(x) | 174 | #define pte_val(x) native_pte_val(x) |
168 | #define pte_flags(x) native_pte_val(x) | 175 | #define pte_flags(x) native_pte_flags(x) |
169 | #define __pte(x) native_make_pte(x) | 176 | #define __pte(x) native_make_pte(x) |
170 | 177 | ||
171 | #endif /* CONFIG_PARAVIRT */ | 178 | #endif /* CONFIG_PARAVIRT */ |
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h index 1b7eff0b41be..2e6821a0b6e7 100644 --- a/include/asm-x86/paravirt.h +++ b/include/asm-x86/paravirt.h | |||
@@ -1088,6 +1088,9 @@ static inline pteval_t pte_flags(pte_t pte) | |||
1088 | ret = PVOP_CALL1(pteval_t, pv_mmu_ops.pte_flags, | 1088 | ret = PVOP_CALL1(pteval_t, pv_mmu_ops.pte_flags, |
1089 | pte.pte); | 1089 | pte.pte); |
1090 | 1090 | ||
1091 | #ifdef CONFIG_PARAVIRT_DEBUG | ||
1092 | BUG_ON(ret & PTE_PFN_MASK); | ||
1093 | #endif | ||
1091 | return ret; | 1094 | return ret; |
1092 | } | 1095 | } |
1093 | 1096 | ||
diff --git a/include/asm-x86/pgtable-3level.h b/include/asm-x86/pgtable-3level.h index a9ad971a733d..e713bd5f39a6 100644 --- a/include/asm-x86/pgtable-3level.h +++ b/include/asm-x86/pgtable-3level.h | |||
@@ -25,7 +25,7 @@ static inline int pud_none(pud_t pud) | |||
25 | 25 | ||
26 | static inline int pud_bad(pud_t pud) | 26 | static inline int pud_bad(pud_t pud) |
27 | { | 27 | { |
28 | return (pud_val(pud) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0; | 28 | return (pud_val(pud) & ~(PTE_PFN_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0; |
29 | } | 29 | } |
30 | 30 | ||
31 | static inline int pud_present(pud_t pud) | 31 | static inline int pud_present(pud_t pud) |
@@ -120,9 +120,9 @@ static inline void pud_clear(pud_t *pudp) | |||
120 | write_cr3(pgd); | 120 | write_cr3(pgd); |
121 | } | 121 | } |
122 | 122 | ||
123 | #define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_MASK)) | 123 | #define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_PFN_MASK)) |
124 | 124 | ||
125 | #define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_MASK)) | 125 | #define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_PFN_MASK)) |
126 | 126 | ||
127 | 127 | ||
128 | /* Find an entry in the second-level page table.. */ | 128 | /* Find an entry in the second-level page table.. */ |
@@ -160,7 +160,7 @@ static inline int pte_none(pte_t pte) | |||
160 | 160 | ||
161 | static inline unsigned long pte_pfn(pte_t pte) | 161 | static inline unsigned long pte_pfn(pte_t pte) |
162 | { | 162 | { |
163 | return (pte_val(pte) & PTE_MASK) >> PAGE_SHIFT; | 163 | return (pte_val(pte) & PTE_PFN_MASK) >> PAGE_SHIFT; |
164 | } | 164 | } |
165 | 165 | ||
166 | /* | 166 | /* |
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index b8d7c530054e..3ca03f902e05 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h | |||
@@ -53,7 +53,7 @@ | |||
53 | _PAGE_DIRTY) | 53 | _PAGE_DIRTY) |
54 | 54 | ||
55 | /* Set of bits not changed in pte_modify */ | 55 | /* Set of bits not changed in pte_modify */ |
56 | #define _PAGE_CHG_MASK (PTE_MASK | _PAGE_PCD | _PAGE_PWT | \ | 56 | #define _PAGE_CHG_MASK (PTE_PFN_MASK | _PAGE_PCD | _PAGE_PWT | \ |
57 | _PAGE_ACCESSED | _PAGE_DIRTY) | 57 | _PAGE_ACCESSED | _PAGE_DIRTY) |
58 | 58 | ||
59 | #define _PAGE_CACHE_MASK (_PAGE_PCD | _PAGE_PWT) | 59 | #define _PAGE_CACHE_MASK (_PAGE_PCD | _PAGE_PWT) |
@@ -286,7 +286,7 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot) | |||
286 | return __pgprot(preservebits | addbits); | 286 | return __pgprot(preservebits | addbits); |
287 | } | 287 | } |
288 | 288 | ||
289 | #define pte_pgprot(x) __pgprot(pte_flags(x) & ~PTE_MASK) | 289 | #define pte_pgprot(x) __pgprot(pte_flags(x) & PTE_FLAGS_MASK) |
290 | 290 | ||
291 | #define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask) | 291 | #define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask) |
292 | 292 | ||
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index 4fa3b046e1b1..bbc136f3ac5f 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h | |||
@@ -88,7 +88,7 @@ extern unsigned long pg0[]; | |||
88 | /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ | 88 | /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ |
89 | #define pmd_none(x) (!(unsigned long)pmd_val((x))) | 89 | #define pmd_none(x) (!(unsigned long)pmd_val((x))) |
90 | #define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT) | 90 | #define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT) |
91 | #define pmd_bad(x) ((pmd_val(x) & (~PTE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) | 91 | #define pmd_bad(x) ((pmd_val(x) & (PTE_FLAGS_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) |
92 | 92 | ||
93 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) | 93 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) |
94 | 94 | ||
@@ -139,7 +139,7 @@ static inline int pud_large(pud_t pud) { return 0; } | |||
139 | #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) | 139 | #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) |
140 | 140 | ||
141 | #define pmd_page_vaddr(pmd) \ | 141 | #define pmd_page_vaddr(pmd) \ |
142 | ((unsigned long)__va(pmd_val((pmd)) & PTE_MASK)) | 142 | ((unsigned long)__va(pmd_val((pmd)) & PTE_PFN_MASK)) |
143 | 143 | ||
144 | #if defined(CONFIG_HIGHPTE) | 144 | #if defined(CONFIG_HIGHPTE) |
145 | #define pte_offset_map(dir, address) \ | 145 | #define pte_offset_map(dir, address) \ |
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h index b80c0d7658c3..609c24975c66 100644 --- a/include/asm-x86/pgtable_64.h +++ b/include/asm-x86/pgtable_64.h | |||
@@ -158,17 +158,17 @@ static inline void native_pgd_clear(pgd_t *pgd) | |||
158 | 158 | ||
159 | static inline int pgd_bad(pgd_t pgd) | 159 | static inline int pgd_bad(pgd_t pgd) |
160 | { | 160 | { |
161 | return (pgd_val(pgd) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE; | 161 | return (pgd_val(pgd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE; |
162 | } | 162 | } |
163 | 163 | ||
164 | static inline int pud_bad(pud_t pud) | 164 | static inline int pud_bad(pud_t pud) |
165 | { | 165 | { |
166 | return (pud_val(pud) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE; | 166 | return (pud_val(pud) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE; |
167 | } | 167 | } |
168 | 168 | ||
169 | static inline int pmd_bad(pmd_t pmd) | 169 | static inline int pmd_bad(pmd_t pmd) |
170 | { | 170 | { |
171 | return (pmd_val(pmd) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE; | 171 | return (pmd_val(pmd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE; |
172 | } | 172 | } |
173 | 173 | ||
174 | #define pte_none(x) (!pte_val((x))) | 174 | #define pte_none(x) (!pte_val((x))) |
@@ -193,7 +193,7 @@ static inline int pmd_bad(pmd_t pmd) | |||
193 | * Level 4 access. | 193 | * Level 4 access. |
194 | */ | 194 | */ |
195 | #define pgd_page_vaddr(pgd) \ | 195 | #define pgd_page_vaddr(pgd) \ |
196 | ((unsigned long)__va((unsigned long)pgd_val((pgd)) & PTE_MASK)) | 196 | ((unsigned long)__va((unsigned long)pgd_val((pgd)) & PTE_PFN_MASK)) |
197 | #define pgd_page(pgd) (pfn_to_page(pgd_val((pgd)) >> PAGE_SHIFT)) | 197 | #define pgd_page(pgd) (pfn_to_page(pgd_val((pgd)) >> PAGE_SHIFT)) |
198 | #define pgd_present(pgd) (pgd_val(pgd) & _PAGE_PRESENT) | 198 | #define pgd_present(pgd) (pgd_val(pgd) & _PAGE_PRESENT) |
199 | static inline int pgd_large(pgd_t pgd) { return 0; } | 199 | static inline int pgd_large(pgd_t pgd) { return 0; } |
@@ -216,7 +216,7 @@ static inline int pud_large(pud_t pte) | |||
216 | } | 216 | } |
217 | 217 | ||
218 | /* PMD - Level 2 access */ | 218 | /* PMD - Level 2 access */ |
219 | #define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val((pmd)) & PTE_MASK)) | 219 | #define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val((pmd)) & PTE_PFN_MASK)) |
220 | #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) | 220 | #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) |
221 | 221 | ||
222 | #define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)) | 222 | #define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)) |
diff --git a/include/asm-x86/processor-flags.h b/include/asm-x86/processor-flags.h index ae1d434f1972..5dd79774f693 100644 --- a/include/asm-x86/processor-flags.h +++ b/include/asm-x86/processor-flags.h | |||
@@ -88,10 +88,12 @@ | |||
88 | #define CX86_ARR_BASE 0xc4 | 88 | #define CX86_ARR_BASE 0xc4 |
89 | #define CX86_RCR_BASE 0xdc | 89 | #define CX86_RCR_BASE 0xdc |
90 | 90 | ||
91 | #ifdef __KERNEL__ | ||
91 | #ifdef CONFIG_VM86 | 92 | #ifdef CONFIG_VM86 |
92 | #define X86_VM_MASK X86_EFLAGS_VM | 93 | #define X86_VM_MASK X86_EFLAGS_VM |
93 | #else | 94 | #else |
94 | #define X86_VM_MASK 0 /* No VM86 support */ | 95 | #define X86_VM_MASK 0 /* No VM86 support */ |
95 | #endif | 96 | #endif |
97 | #endif | ||
96 | 98 | ||
97 | #endif /* ASM_X86__PROCESSOR_FLAGS_H */ | 99 | #endif /* ASM_X86__PROCESSOR_FLAGS_H */ |
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h index a9a28baef69b..d60b4d81febe 100644 --- a/include/asm-x86/processor.h +++ b/include/asm-x86/processor.h | |||
@@ -134,7 +134,7 @@ extern __u32 cleared_cpu_caps[NCAPINTS]; | |||
134 | #ifdef CONFIG_SMP | 134 | #ifdef CONFIG_SMP |
135 | DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info); | 135 | DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info); |
136 | #define cpu_data(cpu) per_cpu(cpu_info, cpu) | 136 | #define cpu_data(cpu) per_cpu(cpu_info, cpu) |
137 | #define current_cpu_data cpu_data(smp_processor_id()) | 137 | #define current_cpu_data __get_cpu_var(cpu_info) |
138 | #else | 138 | #else |
139 | #define cpu_data(cpu) boot_cpu_data | 139 | #define cpu_data(cpu) boot_cpu_data |
140 | #define current_cpu_data boot_cpu_data | 140 | #define current_cpu_data boot_cpu_data |
diff --git a/include/asm-x86/semaphore.h b/include/asm-x86/semaphore.h deleted file mode 100644 index d9b2034ed1d2..000000000000 --- a/include/asm-x86/semaphore.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <linux/semaphore.h> | ||
diff --git a/include/asm-x86/thread_info.h b/include/asm-x86/thread_info.h index 50315a5dd183..e64be8863b76 100644 --- a/include/asm-x86/thread_info.h +++ b/include/asm-x86/thread_info.h | |||
@@ -79,7 +79,6 @@ struct thread_info { | |||
79 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ | 79 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ |
80 | #define TIF_SECCOMP 8 /* secure computing */ | 80 | #define TIF_SECCOMP 8 /* secure computing */ |
81 | #define TIF_MCE_NOTIFY 10 /* notify userspace of an MCE */ | 81 | #define TIF_MCE_NOTIFY 10 /* notify userspace of an MCE */ |
82 | #define TIF_HRTICK_RESCHED 11 /* reprogram hrtick timer */ | ||
83 | #define TIF_NOTSC 16 /* TSC is not accessible in userland */ | 82 | #define TIF_NOTSC 16 /* TSC is not accessible in userland */ |
84 | #define TIF_IA32 17 /* 32bit process */ | 83 | #define TIF_IA32 17 /* 32bit process */ |
85 | #define TIF_FORK 18 /* ret_from_fork */ | 84 | #define TIF_FORK 18 /* ret_from_fork */ |
@@ -102,7 +101,6 @@ struct thread_info { | |||
102 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 101 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
103 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) | 102 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) |
104 | #define _TIF_MCE_NOTIFY (1 << TIF_MCE_NOTIFY) | 103 | #define _TIF_MCE_NOTIFY (1 << TIF_MCE_NOTIFY) |
105 | #define _TIF_HRTICK_RESCHED (1 << TIF_HRTICK_RESCHED) | ||
106 | #define _TIF_NOTSC (1 << TIF_NOTSC) | 104 | #define _TIF_NOTSC (1 << TIF_NOTSC) |
107 | #define _TIF_IA32 (1 << TIF_IA32) | 105 | #define _TIF_IA32 (1 << TIF_IA32) |
108 | #define _TIF_FORK (1 << TIF_FORK) | 106 | #define _TIF_FORK (1 << TIF_FORK) |
@@ -135,7 +133,7 @@ struct thread_info { | |||
135 | 133 | ||
136 | /* Only used for 64 bit */ | 134 | /* Only used for 64 bit */ |
137 | #define _TIF_DO_NOTIFY_MASK \ | 135 | #define _TIF_DO_NOTIFY_MASK \ |
138 | (_TIF_SIGPENDING|_TIF_MCE_NOTIFY|_TIF_HRTICK_RESCHED) | 136 | (_TIF_SIGPENDING|_TIF_MCE_NOTIFY) |
139 | 137 | ||
140 | /* flags to check in __switch_to() */ | 138 | /* flags to check in __switch_to() */ |
141 | #define _TIF_WORK_CTXSW \ | 139 | #define _TIF_WORK_CTXSW \ |
@@ -154,6 +152,8 @@ struct thread_info { | |||
154 | #define THREAD_FLAGS GFP_KERNEL | 152 | #define THREAD_FLAGS GFP_KERNEL |
155 | #endif | 153 | #endif |
156 | 154 | ||
155 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | ||
156 | |||
157 | #define alloc_thread_info(tsk) \ | 157 | #define alloc_thread_info(tsk) \ |
158 | ((struct thread_info *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER)) | 158 | ((struct thread_info *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER)) |
159 | 159 | ||
diff --git a/include/asm-x86/unistd_32.h b/include/asm-x86/unistd_32.h index 602ddd88c683..017f4a87c913 100644 --- a/include/asm-x86/unistd_32.h +++ b/include/asm-x86/unistd_32.h | |||
@@ -332,6 +332,12 @@ | |||
332 | #define __NR_fallocate 324 | 332 | #define __NR_fallocate 324 |
333 | #define __NR_timerfd_settime 325 | 333 | #define __NR_timerfd_settime 325 |
334 | #define __NR_timerfd_gettime 326 | 334 | #define __NR_timerfd_gettime 326 |
335 | #define __NR_signalfd4 327 | ||
336 | #define __NR_eventfd2 328 | ||
337 | #define __NR_epoll_create1 329 | ||
338 | #define __NR_dup3 330 | ||
339 | #define __NR_pipe2 331 | ||
340 | #define __NR_inotify_init1 332 | ||
335 | 341 | ||
336 | #ifdef __KERNEL__ | 342 | #ifdef __KERNEL__ |
337 | 343 | ||
diff --git a/include/asm-x86/unistd_64.h b/include/asm-x86/unistd_64.h index 1e10189ed6b0..ace83f1f6787 100644 --- a/include/asm-x86/unistd_64.h +++ b/include/asm-x86/unistd_64.h | |||
@@ -639,6 +639,20 @@ __SYSCALL(__NR_fallocate, sys_fallocate) | |||
639 | __SYSCALL(__NR_timerfd_settime, sys_timerfd_settime) | 639 | __SYSCALL(__NR_timerfd_settime, sys_timerfd_settime) |
640 | #define __NR_timerfd_gettime 287 | 640 | #define __NR_timerfd_gettime 287 |
641 | __SYSCALL(__NR_timerfd_gettime, sys_timerfd_gettime) | 641 | __SYSCALL(__NR_timerfd_gettime, sys_timerfd_gettime) |
642 | #define __NR_paccept 288 | ||
643 | __SYSCALL(__NR_paccept, sys_paccept) | ||
644 | #define __NR_signalfd4 289 | ||
645 | __SYSCALL(__NR_signalfd4, sys_signalfd4) | ||
646 | #define __NR_eventfd2 290 | ||
647 | __SYSCALL(__NR_eventfd2, sys_eventfd2) | ||
648 | #define __NR_epoll_create1 291 | ||
649 | __SYSCALL(__NR_epoll_create1, sys_epoll_create1) | ||
650 | #define __NR_dup3 292 | ||
651 | __SYSCALL(__NR_dup3, sys_dup3) | ||
652 | #define __NR_pipe2 293 | ||
653 | __SYSCALL(__NR_pipe2, sys_pipe2) | ||
654 | #define __NR_inotify_init1 294 | ||
655 | __SYSCALL(__NR_inotify_init1, sys_inotify_init1) | ||
642 | 656 | ||
643 | 657 | ||
644 | #ifndef __NO_STUBS | 658 | #ifndef __NO_STUBS |
diff --git a/include/asm-x86/xen/page.h b/include/asm-x86/xen/page.h index a17a86433c77..c50185dccec1 100644 --- a/include/asm-x86/xen/page.h +++ b/include/asm-x86/xen/page.h | |||
@@ -124,7 +124,7 @@ static inline unsigned long mfn_to_local_pfn(unsigned long mfn) | |||
124 | 124 | ||
125 | static inline unsigned long pte_mfn(pte_t pte) | 125 | static inline unsigned long pte_mfn(pte_t pte) |
126 | { | 126 | { |
127 | return (pte.pte & PTE_MASK) >> PAGE_SHIFT; | 127 | return (pte.pte & PTE_PFN_MASK) >> PAGE_SHIFT; |
128 | } | 128 | } |
129 | 129 | ||
130 | static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot) | 130 | static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot) |