diff options
author | Jiri Kosina <jkosina@suse.cz> | 2011-09-15 09:08:05 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-09-15 09:08:18 -0400 |
commit | e060c38434b2caa78efe7cedaff4191040b65a15 (patch) | |
tree | 407361230bf6733f63d8e788e4b5e6566ee04818 /arch/x86/include/asm | |
parent | 10e4ac572eeffe5317019bd7330b6058a400dfc2 (diff) | |
parent | cc39c6a9bbdebfcf1a7dee64d83bf302bc38d941 (diff) |
Merge branch 'master' into for-next
Fast-forward merge with Linus to be able to merge patches
based on more recent version of the tree.
Diffstat (limited to 'arch/x86/include/asm')
25 files changed, 95 insertions, 48 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 4a0b7c7e2cc..7b3ca8324b6 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #include <asm/cpufeature.h> | 8 | #include <asm/cpufeature.h> |
9 | #include <asm/processor.h> | 9 | #include <asm/processor.h> |
10 | #include <asm/apicdef.h> | 10 | #include <asm/apicdef.h> |
11 | #include <asm/atomic.h> | 11 | #include <linux/atomic.h> |
12 | #include <asm/fixmap.h> | 12 | #include <asm/fixmap.h> |
13 | #include <asm/mpspec.h> | 13 | #include <asm/mpspec.h> |
14 | #include <asm/system.h> | 14 | #include <asm/system.h> |
diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h index 952a826ac4e..10572e309ab 100644 --- a/arch/x86/include/asm/atomic.h +++ b/arch/x86/include/asm/atomic.h | |||
@@ -221,15 +221,15 @@ static inline int atomic_xchg(atomic_t *v, int new) | |||
221 | } | 221 | } |
222 | 222 | ||
223 | /** | 223 | /** |
224 | * atomic_add_unless - add unless the number is already a given value | 224 | * __atomic_add_unless - add unless the number is already a given value |
225 | * @v: pointer of type atomic_t | 225 | * @v: pointer of type atomic_t |
226 | * @a: the amount to add to v... | 226 | * @a: the amount to add to v... |
227 | * @u: ...unless v is equal to u. | 227 | * @u: ...unless v is equal to u. |
228 | * | 228 | * |
229 | * Atomically adds @a to @v, so long as @v was not already @u. | 229 | * Atomically adds @a to @v, so long as @v was not already @u. |
230 | * Returns non-zero if @v was not @u, and zero otherwise. | 230 | * Returns the old value of @v. |
231 | */ | 231 | */ |
232 | static inline int atomic_add_unless(atomic_t *v, int a, int u) | 232 | static inline int __atomic_add_unless(atomic_t *v, int a, int u) |
233 | { | 233 | { |
234 | int c, old; | 234 | int c, old; |
235 | c = atomic_read(v); | 235 | c = atomic_read(v); |
@@ -241,10 +241,9 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
241 | break; | 241 | break; |
242 | c = old; | 242 | c = old; |
243 | } | 243 | } |
244 | return c != (u); | 244 | return c; |
245 | } | 245 | } |
246 | 246 | ||
247 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
248 | 247 | ||
249 | /* | 248 | /* |
250 | * atomic_dec_if_positive - decrement by 1 if old value positive | 249 | * atomic_dec_if_positive - decrement by 1 if old value positive |
@@ -319,5 +318,4 @@ static inline void atomic_or_long(unsigned long *v1, unsigned long v2) | |||
319 | # include "atomic64_64.h" | 318 | # include "atomic64_64.h" |
320 | #endif | 319 | #endif |
321 | 320 | ||
322 | #include <asm-generic/atomic-long.h> | ||
323 | #endif /* _ASM_X86_ATOMIC_H */ | 321 | #endif /* _ASM_X86_ATOMIC_H */ |
diff --git a/arch/x86/include/asm/atomic64_32.h b/arch/x86/include/asm/atomic64_32.h index 2a934aa19a4..24098aafce0 100644 --- a/arch/x86/include/asm/atomic64_32.h +++ b/arch/x86/include/asm/atomic64_32.h | |||
@@ -263,7 +263,7 @@ static inline int atomic64_add_negative(long long i, atomic64_t *v) | |||
263 | * @u: ...unless v is equal to u. | 263 | * @u: ...unless v is equal to u. |
264 | * | 264 | * |
265 | * Atomically adds @a to @v, so long as it was not @u. | 265 | * Atomically adds @a to @v, so long as it was not @u. |
266 | * Returns non-zero if @v was not @u, and zero otherwise. | 266 | * Returns the old value of @v. |
267 | */ | 267 | */ |
268 | static inline int atomic64_add_unless(atomic64_t *v, long long a, long long u) | 268 | static inline int atomic64_add_unless(atomic64_t *v, long long a, long long u) |
269 | { | 269 | { |
diff --git a/arch/x86/include/asm/atomic64_64.h b/arch/x86/include/asm/atomic64_64.h index 49fd1ea2295..017594d403f 100644 --- a/arch/x86/include/asm/atomic64_64.h +++ b/arch/x86/include/asm/atomic64_64.h | |||
@@ -202,7 +202,7 @@ static inline long atomic64_xchg(atomic64_t *v, long new) | |||
202 | * @u: ...unless v is equal to u. | 202 | * @u: ...unless v is equal to u. |
203 | * | 203 | * |
204 | * Atomically adds @a to @v, so long as it was not @u. | 204 | * Atomically adds @a to @v, so long as it was not @u. |
205 | * Returns non-zero if @v was not @u, and zero otherwise. | 205 | * Returns the old value of @v. |
206 | */ | 206 | */ |
207 | static inline int atomic64_add_unless(atomic64_t *v, long a, long u) | 207 | static inline int atomic64_add_unless(atomic64_t *v, long a, long u) |
208 | { | 208 | { |
diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h index 69d58131bc8..1775d6e5920 100644 --- a/arch/x86/include/asm/bitops.h +++ b/arch/x86/include/asm/bitops.h | |||
@@ -458,10 +458,7 @@ static inline int fls(int x) | |||
458 | 458 | ||
459 | #include <asm-generic/bitops/le.h> | 459 | #include <asm-generic/bitops/le.h> |
460 | 460 | ||
461 | #define ext2_set_bit_atomic(lock, nr, addr) \ | 461 | #include <asm-generic/bitops/ext2-atomic-setbit.h> |
462 | test_and_set_bit((nr), (unsigned long *)(addr)) | ||
463 | #define ext2_clear_bit_atomic(lock, nr, addr) \ | ||
464 | test_and_clear_bit((nr), (unsigned long *)(addr)) | ||
465 | 462 | ||
466 | #endif /* __KERNEL__ */ | 463 | #endif /* __KERNEL__ */ |
467 | #endif /* _ASM_X86_BITOPS_H */ | 464 | #endif /* _ASM_X86_BITOPS_H */ |
diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h index 7b439d9aea2..41935fadfdf 100644 --- a/arch/x86/include/asm/desc.h +++ b/arch/x86/include/asm/desc.h | |||
@@ -27,8 +27,8 @@ static inline void fill_ldt(struct desc_struct *desc, const struct user_desc *in | |||
27 | 27 | ||
28 | desc->base2 = (info->base_addr & 0xff000000) >> 24; | 28 | desc->base2 = (info->base_addr & 0xff000000) >> 24; |
29 | /* | 29 | /* |
30 | * Don't allow setting of the lm bit. It is useless anyway | 30 | * Don't allow setting of the lm bit. It would confuse |
31 | * because 64bit system calls require __USER_CS: | 31 | * user_64bit_mode and would get overridden by sysret anyway. |
32 | */ | 32 | */ |
33 | desc->l = 0; | 33 | desc->l = 0; |
34 | } | 34 | } |
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h index 13f5504c76c..09199052060 100644 --- a/arch/x86/include/asm/hw_irq.h +++ b/arch/x86/include/asm/hw_irq.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/profile.h> | 21 | #include <linux/profile.h> |
22 | #include <linux/smp.h> | 22 | #include <linux/smp.h> |
23 | 23 | ||
24 | #include <asm/atomic.h> | 24 | #include <linux/atomic.h> |
25 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
26 | #include <asm/sections.h> | 26 | #include <asm/sections.h> |
27 | 27 | ||
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index d02804d650c..d8e8eefbe24 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h | |||
@@ -40,8 +40,6 @@ | |||
40 | #include <linux/compiler.h> | 40 | #include <linux/compiler.h> |
41 | #include <asm/page.h> | 41 | #include <asm/page.h> |
42 | 42 | ||
43 | #include <xen/xen.h> | ||
44 | |||
45 | #define build_mmio_read(name, size, type, reg, barrier) \ | 43 | #define build_mmio_read(name, size, type, reg, barrier) \ |
46 | static inline type name(const volatile void __iomem *addr) \ | 44 | static inline type name(const volatile void __iomem *addr) \ |
47 | { type ret; asm volatile("mov" size " %1,%0":reg (ret) \ | 45 | { type ret; asm volatile("mov" size " %1,%0":reg (ret) \ |
@@ -334,6 +332,7 @@ extern void fixup_early_ioremap(void); | |||
334 | extern bool is_early_ioremap_ptep(pte_t *ptep); | 332 | extern bool is_early_ioremap_ptep(pte_t *ptep); |
335 | 333 | ||
336 | #ifdef CONFIG_XEN | 334 | #ifdef CONFIG_XEN |
335 | #include <xen/xen.h> | ||
337 | struct bio_vec; | 336 | struct bio_vec; |
338 | 337 | ||
339 | extern bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, | 338 | extern bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, |
diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h index f9a320984a1..7e50f06393a 100644 --- a/arch/x86/include/asm/irq_vectors.h +++ b/arch/x86/include/asm/irq_vectors.h | |||
@@ -17,7 +17,6 @@ | |||
17 | * Vectors 0 ... 31 : system traps and exceptions - hardcoded events | 17 | * Vectors 0 ... 31 : system traps and exceptions - hardcoded events |
18 | * Vectors 32 ... 127 : device interrupts | 18 | * Vectors 32 ... 127 : device interrupts |
19 | * Vector 128 : legacy int80 syscall interface | 19 | * Vector 128 : legacy int80 syscall interface |
20 | * Vector 204 : legacy x86_64 vsyscall emulation | ||
21 | * Vectors 129 ... INVALIDATE_TLB_VECTOR_START-1 except 204 : device interrupts | 20 | * Vectors 129 ... INVALIDATE_TLB_VECTOR_START-1 except 204 : device interrupts |
22 | * Vectors INVALIDATE_TLB_VECTOR_START ... 255 : special interrupts | 21 | * Vectors INVALIDATE_TLB_VECTOR_START ... 255 : special interrupts |
23 | * | 22 | * |
@@ -51,9 +50,6 @@ | |||
51 | #ifdef CONFIG_X86_32 | 50 | #ifdef CONFIG_X86_32 |
52 | # define SYSCALL_VECTOR 0x80 | 51 | # define SYSCALL_VECTOR 0x80 |
53 | #endif | 52 | #endif |
54 | #ifdef CONFIG_X86_64 | ||
55 | # define VSYSCALL_EMU_VECTOR 0xcc | ||
56 | #endif | ||
57 | 53 | ||
58 | /* | 54 | /* |
59 | * Vectors 0x30-0x3f are used for ISA interrupts. | 55 | * Vectors 0x30-0x3f are used for ISA interrupts. |
diff --git a/arch/x86/include/asm/kdebug.h b/arch/x86/include/asm/kdebug.h index fe2cc6e105f..d73f1571bde 100644 --- a/arch/x86/include/asm/kdebug.h +++ b/arch/x86/include/asm/kdebug.h | |||
@@ -28,7 +28,6 @@ extern void show_registers(struct pt_regs *regs); | |||
28 | extern void show_trace(struct task_struct *t, struct pt_regs *regs, | 28 | extern void show_trace(struct task_struct *t, struct pt_regs *regs, |
29 | unsigned long *sp, unsigned long bp); | 29 | unsigned long *sp, unsigned long bp); |
30 | extern void __show_regs(struct pt_regs *regs, int all); | 30 | extern void __show_regs(struct pt_regs *regs, int all); |
31 | extern void show_regs(struct pt_regs *regs); | ||
32 | extern unsigned long oops_begin(void); | 31 | extern unsigned long oops_begin(void); |
33 | extern void oops_end(unsigned long, struct pt_regs *, int signr); | 32 | extern void oops_end(unsigned long, struct pt_regs *, int signr); |
34 | #ifdef CONFIG_KEXEC | 33 | #ifdef CONFIG_KEXEC |
diff --git a/arch/x86/include/asm/local.h b/arch/x86/include/asm/local.h index 2e9972468a5..9cdae5d47e8 100644 --- a/arch/x86/include/asm/local.h +++ b/arch/x86/include/asm/local.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #include <linux/percpu.h> | 4 | #include <linux/percpu.h> |
5 | 5 | ||
6 | #include <asm/system.h> | 6 | #include <asm/system.h> |
7 | #include <asm/atomic.h> | 7 | #include <linux/atomic.h> |
8 | #include <asm/asm.h> | 8 | #include <asm/asm.h> |
9 | 9 | ||
10 | typedef struct { | 10 | typedef struct { |
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index 716b48af786..c9321f34e55 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h | |||
@@ -124,7 +124,7 @@ extern struct atomic_notifier_head x86_mce_decoder_chain; | |||
124 | 124 | ||
125 | #include <linux/percpu.h> | 125 | #include <linux/percpu.h> |
126 | #include <linux/init.h> | 126 | #include <linux/init.h> |
127 | #include <asm/atomic.h> | 127 | #include <linux/atomic.h> |
128 | 128 | ||
129 | extern int mce_disabled; | 129 | extern int mce_disabled; |
130 | extern int mce_p5_enabled; | 130 | extern int mce_p5_enabled; |
diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h index 8b5393ec108..69021528b43 100644 --- a/arch/x86/include/asm/mmu_context.h +++ b/arch/x86/include/asm/mmu_context.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _ASM_X86_MMU_CONTEXT_H | 2 | #define _ASM_X86_MMU_CONTEXT_H |
3 | 3 | ||
4 | #include <asm/desc.h> | 4 | #include <asm/desc.h> |
5 | #include <asm/atomic.h> | 5 | #include <linux/atomic.h> |
6 | #include <asm/pgalloc.h> | 6 | #include <asm/pgalloc.h> |
7 | #include <asm/tlbflush.h> | 7 | #include <asm/tlbflush.h> |
8 | #include <asm/paravirt.h> | 8 | #include <asm/paravirt.h> |
diff --git a/arch/x86/include/asm/olpc.h b/arch/x86/include/asm/olpc.h index 5ca6801b75f..87bdbca72f9 100644 --- a/arch/x86/include/asm/olpc.h +++ b/arch/x86/include/asm/olpc.h | |||
@@ -13,6 +13,7 @@ struct olpc_platform_t { | |||
13 | 13 | ||
14 | #define OLPC_F_PRESENT 0x01 | 14 | #define OLPC_F_PRESENT 0x01 |
15 | #define OLPC_F_DCON 0x02 | 15 | #define OLPC_F_DCON 0x02 |
16 | #define OLPC_F_EC_WIDE_SCI 0x04 | ||
16 | 17 | ||
17 | #ifdef CONFIG_OLPC | 18 | #ifdef CONFIG_OLPC |
18 | 19 | ||
@@ -62,6 +63,13 @@ static inline int olpc_board_at_least(uint32_t rev) | |||
62 | return olpc_platform_info.boardrev >= rev; | 63 | return olpc_platform_info.boardrev >= rev; |
63 | } | 64 | } |
64 | 65 | ||
66 | extern void olpc_ec_wakeup_set(u16 value); | ||
67 | extern void olpc_ec_wakeup_clear(u16 value); | ||
68 | extern bool olpc_ec_wakeup_available(void); | ||
69 | |||
70 | extern int olpc_ec_mask_write(u16 bits); | ||
71 | extern int olpc_ec_sci_query(u16 *sci_value); | ||
72 | |||
65 | #else | 73 | #else |
66 | 74 | ||
67 | static inline int machine_is_olpc(void) | 75 | static inline int machine_is_olpc(void) |
@@ -74,6 +82,20 @@ static inline int olpc_has_dcon(void) | |||
74 | return 0; | 82 | return 0; |
75 | } | 83 | } |
76 | 84 | ||
85 | static inline void olpc_ec_wakeup_set(u16 value) { } | ||
86 | static inline void olpc_ec_wakeup_clear(u16 value) { } | ||
87 | |||
88 | static inline bool olpc_ec_wakeup_available(void) | ||
89 | { | ||
90 | return false; | ||
91 | } | ||
92 | |||
93 | #endif | ||
94 | |||
95 | #ifdef CONFIG_OLPC_XO1_PM | ||
96 | extern void do_olpc_suspend_lowlevel(void); | ||
97 | extern void olpc_xo1_pm_wakeup_set(u16 value); | ||
98 | extern void olpc_xo1_pm_wakeup_clear(u16 value); | ||
77 | #endif | 99 | #endif |
78 | 100 | ||
79 | extern int pci_olpc_init(void); | 101 | extern int pci_olpc_init(void); |
@@ -83,14 +105,19 @@ extern int pci_olpc_init(void); | |||
83 | extern int olpc_ec_cmd(unsigned char cmd, unsigned char *inbuf, size_t inlen, | 105 | extern int olpc_ec_cmd(unsigned char cmd, unsigned char *inbuf, size_t inlen, |
84 | unsigned char *outbuf, size_t outlen); | 106 | unsigned char *outbuf, size_t outlen); |
85 | 107 | ||
86 | extern int olpc_ec_mask_set(uint8_t bits); | ||
87 | extern int olpc_ec_mask_unset(uint8_t bits); | ||
88 | |||
89 | /* EC commands */ | 108 | /* EC commands */ |
90 | 109 | ||
91 | #define EC_FIRMWARE_REV 0x08 | 110 | #define EC_FIRMWARE_REV 0x08 |
92 | #define EC_WLAN_ENTER_RESET 0x35 | 111 | #define EC_WRITE_SCI_MASK 0x1b |
93 | #define EC_WLAN_LEAVE_RESET 0x25 | 112 | #define EC_WAKE_UP_WLAN 0x24 |
113 | #define EC_WLAN_LEAVE_RESET 0x25 | ||
114 | #define EC_READ_EB_MODE 0x2a | ||
115 | #define EC_SET_SCI_INHIBIT 0x32 | ||
116 | #define EC_SET_SCI_INHIBIT_RELEASE 0x34 | ||
117 | #define EC_WLAN_ENTER_RESET 0x35 | ||
118 | #define EC_WRITE_EXT_SCI_MASK 0x38 | ||
119 | #define EC_SCI_QUERY 0x84 | ||
120 | #define EC_EXT_SCI_QUERY 0x85 | ||
94 | 121 | ||
95 | /* SCI source values */ | 122 | /* SCI source values */ |
96 | 123 | ||
@@ -99,10 +126,12 @@ extern int olpc_ec_mask_unset(uint8_t bits); | |||
99 | #define EC_SCI_SRC_BATTERY 0x02 | 126 | #define EC_SCI_SRC_BATTERY 0x02 |
100 | #define EC_SCI_SRC_BATSOC 0x04 | 127 | #define EC_SCI_SRC_BATSOC 0x04 |
101 | #define EC_SCI_SRC_BATERR 0x08 | 128 | #define EC_SCI_SRC_BATERR 0x08 |
102 | #define EC_SCI_SRC_EBOOK 0x10 | 129 | #define EC_SCI_SRC_EBOOK 0x10 /* XO-1 only */ |
103 | #define EC_SCI_SRC_WLAN 0x20 | 130 | #define EC_SCI_SRC_WLAN 0x20 /* XO-1 only */ |
104 | #define EC_SCI_SRC_ACPWR 0x40 | 131 | #define EC_SCI_SRC_ACPWR 0x40 |
105 | #define EC_SCI_SRC_ALL 0x7F | 132 | #define EC_SCI_SRC_BATCRIT 0x80 |
133 | #define EC_SCI_SRC_GPWAKE 0x100 /* XO-1.5 only */ | ||
134 | #define EC_SCI_SRC_ALL 0x1FF | ||
106 | 135 | ||
107 | /* GPIO assignments */ | 136 | /* GPIO assignments */ |
108 | 137 | ||
@@ -116,7 +145,7 @@ extern int olpc_ec_mask_unset(uint8_t bits); | |||
116 | #define OLPC_GPIO_SMB_CLK 14 | 145 | #define OLPC_GPIO_SMB_CLK 14 |
117 | #define OLPC_GPIO_SMB_DATA 15 | 146 | #define OLPC_GPIO_SMB_DATA 15 |
118 | #define OLPC_GPIO_WORKAUX geode_gpio(24) | 147 | #define OLPC_GPIO_WORKAUX geode_gpio(24) |
119 | #define OLPC_GPIO_LID geode_gpio(26) | 148 | #define OLPC_GPIO_LID 26 |
120 | #define OLPC_GPIO_ECSCI geode_gpio(27) | 149 | #define OLPC_GPIO_ECSCI 27 |
121 | 150 | ||
122 | #endif /* _ASM_X86_OLPC_H */ | 151 | #endif /* _ASM_X86_OLPC_H */ |
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index 2c765216311..8e8b9a4987e 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h | |||
@@ -41,6 +41,7 @@ | |||
41 | 41 | ||
42 | #include <asm/desc_defs.h> | 42 | #include <asm/desc_defs.h> |
43 | #include <asm/kmap_types.h> | 43 | #include <asm/kmap_types.h> |
44 | #include <asm/pgtable_types.h> | ||
44 | 45 | ||
45 | struct page; | 46 | struct page; |
46 | struct thread_struct; | 47 | struct thread_struct; |
@@ -63,6 +64,11 @@ struct paravirt_callee_save { | |||
63 | struct pv_info { | 64 | struct pv_info { |
64 | unsigned int kernel_rpl; | 65 | unsigned int kernel_rpl; |
65 | int shared_kernel_pmd; | 66 | int shared_kernel_pmd; |
67 | |||
68 | #ifdef CONFIG_X86_64 | ||
69 | u16 extra_user_64bit_cs; /* __USER_CS if none */ | ||
70 | #endif | ||
71 | |||
66 | int paravirt_enabled; | 72 | int paravirt_enabled; |
67 | const char *name; | 73 | const char *name; |
68 | }; | 74 | }; |
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 219371546af..0d1171c9772 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -751,8 +751,6 @@ static inline void __sti_mwait(unsigned long eax, unsigned long ecx) | |||
751 | :: "a" (eax), "c" (ecx)); | 751 | :: "a" (eax), "c" (ecx)); |
752 | } | 752 | } |
753 | 753 | ||
754 | extern void mwait_idle_with_hints(unsigned long eax, unsigned long ecx); | ||
755 | |||
756 | extern void select_idle_routine(const struct cpuinfo_x86 *c); | 754 | extern void select_idle_routine(const struct cpuinfo_x86 *c); |
757 | extern void init_amd_e400_c1e_mask(void); | 755 | extern void init_amd_e400_c1e_mask(void); |
758 | 756 | ||
diff --git a/arch/x86/include/asm/prom.h b/arch/x86/include/asm/prom.h index df1287019e6..644dd885f05 100644 --- a/arch/x86/include/asm/prom.h +++ b/arch/x86/include/asm/prom.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
20 | 20 | ||
21 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
22 | #include <asm/atomic.h> | 22 | #include <linux/atomic.h> |
23 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
24 | #include <asm/irq_controller.h> | 24 | #include <asm/irq_controller.h> |
25 | 25 | ||
diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h index 94e7618fcac..35664547125 100644 --- a/arch/x86/include/asm/ptrace.h +++ b/arch/x86/include/asm/ptrace.h | |||
@@ -131,6 +131,9 @@ struct pt_regs { | |||
131 | #ifdef __KERNEL__ | 131 | #ifdef __KERNEL__ |
132 | 132 | ||
133 | #include <linux/init.h> | 133 | #include <linux/init.h> |
134 | #ifdef CONFIG_PARAVIRT | ||
135 | #include <asm/paravirt_types.h> | ||
136 | #endif | ||
134 | 137 | ||
135 | struct cpuinfo_x86; | 138 | struct cpuinfo_x86; |
136 | struct task_struct; | 139 | struct task_struct; |
@@ -187,6 +190,22 @@ static inline int v8086_mode(struct pt_regs *regs) | |||
187 | #endif | 190 | #endif |
188 | } | 191 | } |
189 | 192 | ||
193 | #ifdef CONFIG_X86_64 | ||
194 | static inline bool user_64bit_mode(struct pt_regs *regs) | ||
195 | { | ||
196 | #ifndef CONFIG_PARAVIRT | ||
197 | /* | ||
198 | * On non-paravirt systems, this is the only long mode CPL 3 | ||
199 | * selector. We do not allow long mode selectors in the LDT. | ||
200 | */ | ||
201 | return regs->cs == __USER_CS; | ||
202 | #else | ||
203 | /* Headers are too twisted for this to go in paravirt.h. */ | ||
204 | return regs->cs == __USER_CS || regs->cs == pv_info.extra_user_64bit_cs; | ||
205 | #endif | ||
206 | } | ||
207 | #endif | ||
208 | |||
190 | /* | 209 | /* |
191 | * X86_32 CPUs don't save ss and esp if the CPU is already in kernel mode | 210 | * X86_32 CPUs don't save ss and esp if the CPU is already in kernel mode |
192 | * when it traps. The previous stack will be directly underneath the saved | 211 | * when it traps. The previous stack will be directly underneath the saved |
diff --git a/arch/x86/include/asm/pvclock.h b/arch/x86/include/asm/pvclock.h index a518c0a4504..c59cc97fe6c 100644 --- a/arch/x86/include/asm/pvclock.h +++ b/arch/x86/include/asm/pvclock.h | |||
@@ -44,7 +44,7 @@ static inline u64 pvclock_scale_delta(u64 delta, u32 mul_frac, int shift) | |||
44 | : "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) ); | 44 | : "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) ); |
45 | #elif defined(__x86_64__) | 45 | #elif defined(__x86_64__) |
46 | __asm__ ( | 46 | __asm__ ( |
47 | "mul %[mul_frac] ; shrd $32, %[hi], %[lo]" | 47 | "mulq %[mul_frac] ; shrd $32, %[hi], %[lo]" |
48 | : [lo]"=a"(product), | 48 | : [lo]"=a"(product), |
49 | [hi]"=d"(tmp) | 49 | [hi]"=d"(tmp) |
50 | : "0"(delta), | 50 | : "0"(delta), |
diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h index e9e51f710e6..ee67edf86fd 100644 --- a/arch/x86/include/asm/spinlock.h +++ b/arch/x86/include/asm/spinlock.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _ASM_X86_SPINLOCK_H | 1 | #ifndef _ASM_X86_SPINLOCK_H |
2 | #define _ASM_X86_SPINLOCK_H | 2 | #define _ASM_X86_SPINLOCK_H |
3 | 3 | ||
4 | #include <asm/atomic.h> | 4 | #include <linux/atomic.h> |
5 | #include <asm/page.h> | 5 | #include <asm/page.h> |
6 | #include <asm/processor.h> | 6 | #include <asm/processor.h> |
7 | #include <linux/compiler.h> | 7 | #include <linux/compiler.h> |
diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index 1f2e61e2898..a1fe5c127b5 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h | |||
@@ -21,7 +21,7 @@ struct task_struct; | |||
21 | struct exec_domain; | 21 | struct exec_domain; |
22 | #include <asm/processor.h> | 22 | #include <asm/processor.h> |
23 | #include <asm/ftrace.h> | 23 | #include <asm/ftrace.h> |
24 | #include <asm/atomic.h> | 24 | #include <linux/atomic.h> |
25 | 25 | ||
26 | struct thread_info { | 26 | struct thread_info { |
27 | struct task_struct *task; /* main task structure */ | 27 | struct task_struct *task; /* main task structure */ |
diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h index 2bae0a513b4..0012d0902c5 100644 --- a/arch/x86/include/asm/traps.h +++ b/arch/x86/include/asm/traps.h | |||
@@ -40,7 +40,6 @@ asmlinkage void alignment_check(void); | |||
40 | asmlinkage void machine_check(void); | 40 | asmlinkage void machine_check(void); |
41 | #endif /* CONFIG_X86_MCE */ | 41 | #endif /* CONFIG_X86_MCE */ |
42 | asmlinkage void simd_coprocessor_error(void); | 42 | asmlinkage void simd_coprocessor_error(void); |
43 | asmlinkage void emulate_vsyscall(void); | ||
44 | 43 | ||
45 | dotraplinkage void do_divide_error(struct pt_regs *, long); | 44 | dotraplinkage void do_divide_error(struct pt_regs *, long); |
46 | dotraplinkage void do_debug(struct pt_regs *, long); | 45 | dotraplinkage void do_debug(struct pt_regs *, long); |
@@ -67,7 +66,6 @@ dotraplinkage void do_alignment_check(struct pt_regs *, long); | |||
67 | dotraplinkage void do_machine_check(struct pt_regs *, long); | 66 | dotraplinkage void do_machine_check(struct pt_regs *, long); |
68 | #endif | 67 | #endif |
69 | dotraplinkage void do_simd_coprocessor_error(struct pt_regs *, long); | 68 | dotraplinkage void do_simd_coprocessor_error(struct pt_regs *, long); |
70 | dotraplinkage void do_emulate_vsyscall(struct pt_regs *, long); | ||
71 | #ifdef CONFIG_X86_32 | 69 | #ifdef CONFIG_X86_32 |
72 | dotraplinkage void do_iret_error(struct pt_regs *, long); | 70 | dotraplinkage void do_iret_error(struct pt_regs *, long); |
73 | #endif | 71 | #endif |
diff --git a/arch/x86/include/asm/unistd_64.h b/arch/x86/include/asm/unistd_64.h index 705bf139288..20104057344 100644 --- a/arch/x86/include/asm/unistd_64.h +++ b/arch/x86/include/asm/unistd_64.h | |||
@@ -414,7 +414,7 @@ __SYSCALL(__NR_query_module, sys_ni_syscall) | |||
414 | __SYSCALL(__NR_quotactl, sys_quotactl) | 414 | __SYSCALL(__NR_quotactl, sys_quotactl) |
415 | 415 | ||
416 | #define __NR_nfsservctl 180 | 416 | #define __NR_nfsservctl 180 |
417 | __SYSCALL(__NR_nfsservctl, sys_nfsservctl) | 417 | __SYSCALL(__NR_nfsservctl, sys_ni_syscall) |
418 | 418 | ||
419 | /* reserved for LiS/STREAMS */ | 419 | /* reserved for LiS/STREAMS */ |
420 | #define __NR_getpmsg 181 | 420 | #define __NR_getpmsg 181 |
@@ -681,6 +681,8 @@ __SYSCALL(__NR_syncfs, sys_syncfs) | |||
681 | __SYSCALL(__NR_sendmmsg, sys_sendmmsg) | 681 | __SYSCALL(__NR_sendmmsg, sys_sendmmsg) |
682 | #define __NR_setns 308 | 682 | #define __NR_setns 308 |
683 | __SYSCALL(__NR_setns, sys_setns) | 683 | __SYSCALL(__NR_setns, sys_setns) |
684 | #define __NR_getcpu 309 | ||
685 | __SYSCALL(__NR_getcpu, sys_getcpu) | ||
684 | 686 | ||
685 | #ifndef __NO_STUBS | 687 | #ifndef __NO_STUBS |
686 | #define __ARCH_WANT_OLD_READDIR | 688 | #define __ARCH_WANT_OLD_READDIR |
diff --git a/arch/x86/include/asm/vsyscall.h b/arch/x86/include/asm/vsyscall.h index 60107072c28..eaea1d31f75 100644 --- a/arch/x86/include/asm/vsyscall.h +++ b/arch/x86/include/asm/vsyscall.h | |||
@@ -27,6 +27,12 @@ extern struct timezone sys_tz; | |||
27 | 27 | ||
28 | extern void map_vsyscall(void); | 28 | extern void map_vsyscall(void); |
29 | 29 | ||
30 | /* | ||
31 | * Called on instruction fetch fault in vsyscall page. | ||
32 | * Returns true if handled. | ||
33 | */ | ||
34 | extern bool emulate_vsyscall(struct pt_regs *regs, unsigned long address); | ||
35 | |||
30 | #endif /* __KERNEL__ */ | 36 | #endif /* __KERNEL__ */ |
31 | 37 | ||
32 | #endif /* _ASM_X86_VSYSCALL_H */ | 38 | #endif /* _ASM_X86_VSYSCALL_H */ |
diff --git a/arch/x86/include/asm/xen/page.h b/arch/x86/include/asm/xen/page.h index 64a619d47d3..7ff4669580c 100644 --- a/arch/x86/include/asm/xen/page.h +++ b/arch/x86/include/asm/xen/page.h | |||
@@ -39,7 +39,7 @@ typedef struct xpaddr { | |||
39 | ((unsigned long)((u64)CONFIG_XEN_MAX_DOMAIN_MEMORY * 1024 * 1024 * 1024 / PAGE_SIZE)) | 39 | ((unsigned long)((u64)CONFIG_XEN_MAX_DOMAIN_MEMORY * 1024 * 1024 * 1024 / PAGE_SIZE)) |
40 | 40 | ||
41 | extern unsigned long *machine_to_phys_mapping; | 41 | extern unsigned long *machine_to_phys_mapping; |
42 | extern unsigned int machine_to_phys_order; | 42 | extern unsigned long machine_to_phys_nr; |
43 | 43 | ||
44 | extern unsigned long get_phys_to_machine(unsigned long pfn); | 44 | extern unsigned long get_phys_to_machine(unsigned long pfn); |
45 | extern bool set_phys_to_machine(unsigned long pfn, unsigned long mfn); | 45 | extern bool set_phys_to_machine(unsigned long pfn, unsigned long mfn); |
@@ -87,7 +87,7 @@ static inline unsigned long mfn_to_pfn(unsigned long mfn) | |||
87 | if (xen_feature(XENFEAT_auto_translated_physmap)) | 87 | if (xen_feature(XENFEAT_auto_translated_physmap)) |
88 | return mfn; | 88 | return mfn; |
89 | 89 | ||
90 | if (unlikely((mfn >> machine_to_phys_order) != 0)) { | 90 | if (unlikely(mfn >= machine_to_phys_nr)) { |
91 | pfn = ~0; | 91 | pfn = ~0; |
92 | goto try_override; | 92 | goto try_override; |
93 | } | 93 | } |