diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-04 07:02:35 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-04 07:02:35 -0400 |
commit | 42390cdec5f6e6e2ee54f308474a6ef7dd16aa5c (patch) | |
tree | e9684c84f53272319a5acd4b9c86503f30274a51 /include/asm-x86 | |
parent | 11c231a962c740b3216eb6565149ae5a7944cba7 (diff) | |
parent | d210baf53b699fc61aa891c177b71d7082d3b957 (diff) |
Merge branch 'linus' into x86/x2apic
Conflicts:
arch/x86/kernel/cpu/cyrix.c
include/asm-x86/cpufeature.h
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/amd_iommu_types.h | 8 | ||||
-rw-r--r-- | include/asm-x86/atomic_64.h | 8 | ||||
-rw-r--r-- | include/asm-x86/cpufeature.h | 2 | ||||
-rw-r--r-- | include/asm-x86/genapic_32.h | 1 | ||||
-rw-r--r-- | include/asm-x86/genapic_64.h | 1 | ||||
-rw-r--r-- | include/asm-x86/geode.h | 3 | ||||
-rw-r--r-- | include/asm-x86/i387.h | 2 | ||||
-rw-r--r-- | include/asm-x86/io.h | 18 | ||||
-rw-r--r-- | include/asm-x86/irq_vectors.h | 1 | ||||
-rw-r--r-- | include/asm-x86/kexec.h | 8 | ||||
-rw-r--r-- | include/asm-x86/kvm_host.h | 2 | ||||
-rw-r--r-- | include/asm-x86/mce.h | 1 | ||||
-rw-r--r-- | include/asm-x86/mman.h | 1 | ||||
-rw-r--r-- | include/asm-x86/mmconfig.h | 2 | ||||
-rw-r--r-- | include/asm-x86/mmzone_32.h | 6 | ||||
-rw-r--r-- | include/asm-x86/msr.h | 27 | ||||
-rw-r--r-- | include/asm-x86/percpu.h | 2 | ||||
-rw-r--r-- | include/asm-x86/pgtable_64.h | 2 | ||||
-rw-r--r-- | include/asm-x86/processor.h | 23 | ||||
-rw-r--r-- | include/asm-x86/spinlock.h | 4 | ||||
-rw-r--r-- | include/asm-x86/uv/uv_bau.h | 5 | ||||
-rw-r--r-- | include/asm-x86/xen/hypervisor.h | 1 |
22 files changed, 82 insertions, 46 deletions
diff --git a/include/asm-x86/amd_iommu_types.h b/include/asm-x86/amd_iommu_types.h index 22aa58ca1991..dcc812067394 100644 --- a/include/asm-x86/amd_iommu_types.h +++ b/include/asm-x86/amd_iommu_types.h | |||
@@ -31,9 +31,6 @@ | |||
31 | #define ALIAS_TABLE_ENTRY_SIZE 2 | 31 | #define ALIAS_TABLE_ENTRY_SIZE 2 |
32 | #define RLOOKUP_TABLE_ENTRY_SIZE (sizeof(void *)) | 32 | #define RLOOKUP_TABLE_ENTRY_SIZE (sizeof(void *)) |
33 | 33 | ||
34 | /* helper macros */ | ||
35 | #define LOW_U32(x) ((x) & ((1ULL << 32)-1)) | ||
36 | |||
37 | /* Length of the MMIO region for the AMD IOMMU */ | 34 | /* Length of the MMIO region for the AMD IOMMU */ |
38 | #define MMIO_REGION_LENGTH 0x4000 | 35 | #define MMIO_REGION_LENGTH 0x4000 |
39 | 36 | ||
@@ -69,6 +66,9 @@ | |||
69 | #define MMIO_EVT_TAIL_OFFSET 0x2018 | 66 | #define MMIO_EVT_TAIL_OFFSET 0x2018 |
70 | #define MMIO_STATUS_OFFSET 0x2020 | 67 | #define MMIO_STATUS_OFFSET 0x2020 |
71 | 68 | ||
69 | /* MMIO status bits */ | ||
70 | #define MMIO_STATUS_COM_WAIT_INT_MASK 0x04 | ||
71 | |||
72 | /* feature control bits */ | 72 | /* feature control bits */ |
73 | #define CONTROL_IOMMU_EN 0x00ULL | 73 | #define CONTROL_IOMMU_EN 0x00ULL |
74 | #define CONTROL_HT_TUN_EN 0x01ULL | 74 | #define CONTROL_HT_TUN_EN 0x01ULL |
@@ -89,6 +89,7 @@ | |||
89 | #define CMD_INV_IOMMU_PAGES 0x03 | 89 | #define CMD_INV_IOMMU_PAGES 0x03 |
90 | 90 | ||
91 | #define CMD_COMPL_WAIT_STORE_MASK 0x01 | 91 | #define CMD_COMPL_WAIT_STORE_MASK 0x01 |
92 | #define CMD_COMPL_WAIT_INT_MASK 0x02 | ||
92 | #define CMD_INV_IOMMU_PAGES_SIZE_MASK 0x01 | 93 | #define CMD_INV_IOMMU_PAGES_SIZE_MASK 0x01 |
93 | #define CMD_INV_IOMMU_PAGES_PDE_MASK 0x02 | 94 | #define CMD_INV_IOMMU_PAGES_PDE_MASK 0x02 |
94 | 95 | ||
@@ -99,6 +100,7 @@ | |||
99 | #define DEV_ENTRY_TRANSLATION 0x01 | 100 | #define DEV_ENTRY_TRANSLATION 0x01 |
100 | #define DEV_ENTRY_IR 0x3d | 101 | #define DEV_ENTRY_IR 0x3d |
101 | #define DEV_ENTRY_IW 0x3e | 102 | #define DEV_ENTRY_IW 0x3e |
103 | #define DEV_ENTRY_NO_PAGE_FAULT 0x62 | ||
102 | #define DEV_ENTRY_EX 0x67 | 104 | #define DEV_ENTRY_EX 0x67 |
103 | #define DEV_ENTRY_SYSMGT1 0x68 | 105 | #define DEV_ENTRY_SYSMGT1 0x68 |
104 | #define DEV_ENTRY_SYSMGT2 0x69 | 106 | #define DEV_ENTRY_SYSMGT2 0x69 |
diff --git a/include/asm-x86/atomic_64.h b/include/asm-x86/atomic_64.h index a0095191c02e..91c7d03e65bc 100644 --- a/include/asm-x86/atomic_64.h +++ b/include/asm-x86/atomic_64.h | |||
@@ -228,7 +228,7 @@ static inline void atomic64_add(long i, atomic64_t *v) | |||
228 | { | 228 | { |
229 | asm volatile(LOCK_PREFIX "addq %1,%0" | 229 | asm volatile(LOCK_PREFIX "addq %1,%0" |
230 | : "=m" (v->counter) | 230 | : "=m" (v->counter) |
231 | : "ir" (i), "m" (v->counter)); | 231 | : "er" (i), "m" (v->counter)); |
232 | } | 232 | } |
233 | 233 | ||
234 | /** | 234 | /** |
@@ -242,7 +242,7 @@ static inline void atomic64_sub(long i, atomic64_t *v) | |||
242 | { | 242 | { |
243 | asm volatile(LOCK_PREFIX "subq %1,%0" | 243 | asm volatile(LOCK_PREFIX "subq %1,%0" |
244 | : "=m" (v->counter) | 244 | : "=m" (v->counter) |
245 | : "ir" (i), "m" (v->counter)); | 245 | : "er" (i), "m" (v->counter)); |
246 | } | 246 | } |
247 | 247 | ||
248 | /** | 248 | /** |
@@ -260,7 +260,7 @@ static inline int atomic64_sub_and_test(long i, atomic64_t *v) | |||
260 | 260 | ||
261 | asm volatile(LOCK_PREFIX "subq %2,%0; sete %1" | 261 | asm volatile(LOCK_PREFIX "subq %2,%0; sete %1" |
262 | : "=m" (v->counter), "=qm" (c) | 262 | : "=m" (v->counter), "=qm" (c) |
263 | : "ir" (i), "m" (v->counter) : "memory"); | 263 | : "er" (i), "m" (v->counter) : "memory"); |
264 | return c; | 264 | return c; |
265 | } | 265 | } |
266 | 266 | ||
@@ -341,7 +341,7 @@ static inline int atomic64_add_negative(long i, atomic64_t *v) | |||
341 | 341 | ||
342 | asm volatile(LOCK_PREFIX "addq %2,%0; sets %1" | 342 | asm volatile(LOCK_PREFIX "addq %2,%0; sets %1" |
343 | : "=m" (v->counter), "=qm" (c) | 343 | : "=m" (v->counter), "=qm" (c) |
344 | : "ir" (i), "m" (v->counter) : "memory"); | 344 | : "er" (i), "m" (v->counter) : "memory"); |
345 | return c; | 345 | return c; |
346 | } | 346 | } |
347 | 347 | ||
diff --git a/include/asm-x86/cpufeature.h b/include/asm-x86/cpufeature.h index 8d842af4cf7a..c6845b94be84 100644 --- a/include/asm-x86/cpufeature.h +++ b/include/asm-x86/cpufeature.h | |||
@@ -93,6 +93,7 @@ | |||
93 | #define X86_FEATURE_CX16 (4*32+13) /* CMPXCHG16B */ | 93 | #define X86_FEATURE_CX16 (4*32+13) /* CMPXCHG16B */ |
94 | #define X86_FEATURE_XTPR (4*32+14) /* Send Task Priority Messages */ | 94 | #define X86_FEATURE_XTPR (4*32+14) /* Send Task Priority Messages */ |
95 | #define X86_FEATURE_DCA (4*32+18) /* Direct Cache Access */ | 95 | #define X86_FEATURE_DCA (4*32+18) /* Direct Cache Access */ |
96 | #define X86_FEATURE_XMM4_2 (4*32+20) /* Streaming SIMD Extensions-4.2 */ | ||
96 | #define X86_FEATURE_X2APIC (4*32+21) /* x2APIC */ | 97 | #define X86_FEATURE_X2APIC (4*32+21) /* x2APIC */ |
97 | 98 | ||
98 | /* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */ | 99 | /* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */ |
@@ -192,6 +193,7 @@ extern const char * const x86_power_flags[32]; | |||
192 | #define cpu_has_gbpages boot_cpu_has(X86_FEATURE_GBPAGES) | 193 | #define cpu_has_gbpages boot_cpu_has(X86_FEATURE_GBPAGES) |
193 | #define cpu_has_arch_perfmon boot_cpu_has(X86_FEATURE_ARCH_PERFMON) | 194 | #define cpu_has_arch_perfmon boot_cpu_has(X86_FEATURE_ARCH_PERFMON) |
194 | #define cpu_has_pat boot_cpu_has(X86_FEATURE_PAT) | 195 | #define cpu_has_pat boot_cpu_has(X86_FEATURE_PAT) |
196 | #define cpu_has_xmm4_2 boot_cpu_has(X86_FEATURE_XMM4_2) | ||
195 | #define cpu_has_x2apic boot_cpu_has(X86_FEATURE_X2APIC) | 197 | #define cpu_has_x2apic boot_cpu_has(X86_FEATURE_X2APIC) |
196 | 198 | ||
197 | #if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64) | 199 | #if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64) |
diff --git a/include/asm-x86/genapic_32.h b/include/asm-x86/genapic_32.h index b02ea6e17de8..754d635f90ff 100644 --- a/include/asm-x86/genapic_32.h +++ b/include/asm-x86/genapic_32.h | |||
@@ -118,6 +118,7 @@ enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC}; | |||
118 | #define get_uv_system_type() UV_NONE | 118 | #define get_uv_system_type() UV_NONE |
119 | #define is_uv_system() 0 | 119 | #define is_uv_system() 0 |
120 | #define uv_wakeup_secondary(a, b) 1 | 120 | #define uv_wakeup_secondary(a, b) 1 |
121 | #define uv_system_init() do {} while (0) | ||
121 | 122 | ||
122 | 123 | ||
123 | #endif | 124 | #endif |
diff --git a/include/asm-x86/genapic_64.h b/include/asm-x86/genapic_64.h index 1e832e49f54e..2e28a2bd5d95 100644 --- a/include/asm-x86/genapic_64.h +++ b/include/asm-x86/genapic_64.h | |||
@@ -50,6 +50,7 @@ extern int is_uv_system(void); | |||
50 | extern struct genapic apic_x2apic_uv_x; | 50 | extern struct genapic apic_x2apic_uv_x; |
51 | DECLARE_PER_CPU(int, x2apic_extra_bits); | 51 | DECLARE_PER_CPU(int, x2apic_extra_bits); |
52 | extern void uv_cpu_init(void); | 52 | extern void uv_cpu_init(void); |
53 | extern void uv_system_init(void); | ||
53 | extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip); | 54 | extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip); |
54 | 55 | ||
55 | extern void setup_apic_routing(void); | 56 | extern void setup_apic_routing(void); |
diff --git a/include/asm-x86/geode.h b/include/asm-x86/geode.h index bb06027fc83e..2c1cda0b8a86 100644 --- a/include/asm-x86/geode.h +++ b/include/asm-x86/geode.h | |||
@@ -50,6 +50,7 @@ extern int geode_get_dev_base(unsigned int dev); | |||
50 | #define MSR_PIC_YSEL_HIGH 0x51400021 | 50 | #define MSR_PIC_YSEL_HIGH 0x51400021 |
51 | #define MSR_PIC_ZSEL_LOW 0x51400022 | 51 | #define MSR_PIC_ZSEL_LOW 0x51400022 |
52 | #define MSR_PIC_ZSEL_HIGH 0x51400023 | 52 | #define MSR_PIC_ZSEL_HIGH 0x51400023 |
53 | #define MSR_PIC_IRQM_LPC 0x51400025 | ||
53 | 54 | ||
54 | #define MSR_MFGPT_IRQ 0x51400028 | 55 | #define MSR_MFGPT_IRQ 0x51400028 |
55 | #define MSR_MFGPT_NR 0x51400029 | 56 | #define MSR_MFGPT_NR 0x51400029 |
@@ -237,7 +238,7 @@ static inline u16 geode_mfgpt_read(int timer, u16 reg) | |||
237 | } | 238 | } |
238 | 239 | ||
239 | extern int geode_mfgpt_toggle_event(int timer, int cmp, int event, int enable); | 240 | extern int geode_mfgpt_toggle_event(int timer, int cmp, int event, int enable); |
240 | extern int geode_mfgpt_set_irq(int timer, int cmp, int irq, int enable); | 241 | extern int geode_mfgpt_set_irq(int timer, int cmp, int *irq, int enable); |
241 | extern int geode_mfgpt_alloc_timer(int timer, int domain); | 242 | extern int geode_mfgpt_alloc_timer(int timer, int domain); |
242 | 243 | ||
243 | #define geode_mfgpt_setup_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 1) | 244 | #define geode_mfgpt_setup_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 1) |
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h index 6d3b21063419..56d00e31aec0 100644 --- a/include/asm-x86/i387.h +++ b/include/asm-x86/i387.h | |||
@@ -63,8 +63,6 @@ static inline int restore_fpu_checking(struct i387_fxsave_struct *fx) | |||
63 | #else | 63 | #else |
64 | : [fx] "cdaSDb" (fx), "m" (*fx), "0" (0)); | 64 | : [fx] "cdaSDb" (fx), "m" (*fx), "0" (0)); |
65 | #endif | 65 | #endif |
66 | if (unlikely(err)) | ||
67 | init_fpu(current); | ||
68 | return err; | 66 | return err; |
69 | } | 67 | } |
70 | 68 | ||
diff --git a/include/asm-x86/io.h b/include/asm-x86/io.h index bf5d629b3a39..0f954dc89cb3 100644 --- a/include/asm-x86/io.h +++ b/include/asm-x86/io.h | |||
@@ -21,7 +21,7 @@ extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); | |||
21 | 21 | ||
22 | #define build_mmio_read(name, size, type, reg, barrier) \ | 22 | #define build_mmio_read(name, size, type, reg, barrier) \ |
23 | static inline type name(const volatile void __iomem *addr) \ | 23 | static inline type name(const volatile void __iomem *addr) \ |
24 | { type ret; asm volatile("mov" size " %1,%0":"=" reg (ret) \ | 24 | { type ret; asm volatile("mov" size " %1,%0":reg (ret) \ |
25 | :"m" (*(volatile type __force *)addr) barrier); return ret; } | 25 | :"m" (*(volatile type __force *)addr) barrier); return ret; } |
26 | 26 | ||
27 | #define build_mmio_write(name, size, type, reg, barrier) \ | 27 | #define build_mmio_write(name, size, type, reg, barrier) \ |
@@ -29,13 +29,13 @@ static inline void name(type val, volatile void __iomem *addr) \ | |||
29 | { asm volatile("mov" size " %0,%1": :reg (val), \ | 29 | { asm volatile("mov" size " %0,%1": :reg (val), \ |
30 | "m" (*(volatile type __force *)addr) barrier); } | 30 | "m" (*(volatile type __force *)addr) barrier); } |
31 | 31 | ||
32 | build_mmio_read(readb, "b", unsigned char, "q", :"memory") | 32 | build_mmio_read(readb, "b", unsigned char, "=q", :"memory") |
33 | build_mmio_read(readw, "w", unsigned short, "r", :"memory") | 33 | build_mmio_read(readw, "w", unsigned short, "=r", :"memory") |
34 | build_mmio_read(readl, "l", unsigned int, "r", :"memory") | 34 | build_mmio_read(readl, "l", unsigned int, "=r", :"memory") |
35 | 35 | ||
36 | build_mmio_read(__readb, "b", unsigned char, "q", ) | 36 | build_mmio_read(__readb, "b", unsigned char, "=q", ) |
37 | build_mmio_read(__readw, "w", unsigned short, "r", ) | 37 | build_mmio_read(__readw, "w", unsigned short, "=r", ) |
38 | build_mmio_read(__readl, "l", unsigned int, "r", ) | 38 | build_mmio_read(__readl, "l", unsigned int, "=r", ) |
39 | 39 | ||
40 | build_mmio_write(writeb, "b", unsigned char, "q", :"memory") | 40 | build_mmio_write(writeb, "b", unsigned char, "q", :"memory") |
41 | build_mmio_write(writew, "w", unsigned short, "r", :"memory") | 41 | build_mmio_write(writew, "w", unsigned short, "r", :"memory") |
@@ -59,8 +59,8 @@ build_mmio_write(__writel, "l", unsigned int, "r", ) | |||
59 | #define mmiowb() barrier() | 59 | #define mmiowb() barrier() |
60 | 60 | ||
61 | #ifdef CONFIG_X86_64 | 61 | #ifdef CONFIG_X86_64 |
62 | build_mmio_read(readq, "q", unsigned long, "r", :"memory") | 62 | build_mmio_read(readq, "q", unsigned long, "=r", :"memory") |
63 | build_mmio_read(__readq, "q", unsigned long, "r", ) | 63 | build_mmio_read(__readq, "q", unsigned long, "=r", ) |
64 | build_mmio_write(writeq, "q", unsigned long, "r", :"memory") | 64 | build_mmio_write(writeq, "q", unsigned long, "r", :"memory") |
65 | build_mmio_write(__writeq, "q", unsigned long, "r", ) | 65 | build_mmio_write(__writeq, "q", unsigned long, "r", ) |
66 | 66 | ||
diff --git a/include/asm-x86/irq_vectors.h b/include/asm-x86/irq_vectors.h index b95d167b7fb2..a48c7f2dbdc0 100644 --- a/include/asm-x86/irq_vectors.h +++ b/include/asm-x86/irq_vectors.h | |||
@@ -76,6 +76,7 @@ | |||
76 | #define CALL_FUNCTION_SINGLE_VECTOR 0xfb | 76 | #define CALL_FUNCTION_SINGLE_VECTOR 0xfb |
77 | #define THERMAL_APIC_VECTOR 0xfa | 77 | #define THERMAL_APIC_VECTOR 0xfa |
78 | #define THRESHOLD_APIC_VECTOR 0xf9 | 78 | #define THRESHOLD_APIC_VECTOR 0xf9 |
79 | #define UV_BAU_MESSAGE 0xf8 | ||
79 | #define INVALIDATE_TLB_VECTOR_END 0xf7 | 80 | #define INVALIDATE_TLB_VECTOR_END 0xf7 |
80 | #define INVALIDATE_TLB_VECTOR_START 0xf0 /* f0-f7 used for TLB flush */ | 81 | #define INVALIDATE_TLB_VECTOR_START 0xf0 /* f0-f7 used for TLB flush */ |
81 | 82 | ||
diff --git a/include/asm-x86/kexec.h b/include/asm-x86/kexec.h index c0e52a14fd4d..4246ab7dc988 100644 --- a/include/asm-x86/kexec.h +++ b/include/asm-x86/kexec.h | |||
@@ -41,6 +41,10 @@ | |||
41 | # define PAGES_NR 17 | 41 | # define PAGES_NR 17 |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | #ifdef CONFIG_X86_32 | ||
45 | # define KEXEC_CONTROL_CODE_MAX_SIZE 2048 | ||
46 | #endif | ||
47 | |||
44 | #ifndef __ASSEMBLY__ | 48 | #ifndef __ASSEMBLY__ |
45 | 49 | ||
46 | #include <linux/string.h> | 50 | #include <linux/string.h> |
@@ -63,7 +67,7 @@ | |||
63 | /* Maximum address we can use for the control code buffer */ | 67 | /* Maximum address we can use for the control code buffer */ |
64 | # define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE | 68 | # define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE |
65 | 69 | ||
66 | # define KEXEC_CONTROL_CODE_SIZE 4096 | 70 | # define KEXEC_CONTROL_PAGE_SIZE 4096 |
67 | 71 | ||
68 | /* The native architecture */ | 72 | /* The native architecture */ |
69 | # define KEXEC_ARCH KEXEC_ARCH_386 | 73 | # define KEXEC_ARCH KEXEC_ARCH_386 |
@@ -79,7 +83,7 @@ | |||
79 | # define KEXEC_CONTROL_MEMORY_LIMIT (0xFFFFFFFFFFUL) | 83 | # define KEXEC_CONTROL_MEMORY_LIMIT (0xFFFFFFFFFFUL) |
80 | 84 | ||
81 | /* Allocate one page for the pdp and the second for the code */ | 85 | /* Allocate one page for the pdp and the second for the code */ |
82 | # define KEXEC_CONTROL_CODE_SIZE (4096UL + 4096UL) | 86 | # define KEXEC_CONTROL_PAGE_SIZE (4096UL + 4096UL) |
83 | 87 | ||
84 | /* The native architecture */ | 88 | /* The native architecture */ |
85 | # define KEXEC_ARCH KEXEC_ARCH_X86_64 | 89 | # define KEXEC_ARCH KEXEC_ARCH_X86_64 |
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h index 0f3c53114614..c2e34c275900 100644 --- a/include/asm-x86/kvm_host.h +++ b/include/asm-x86/kvm_host.h | |||
@@ -722,7 +722,7 @@ asmlinkage void kvm_handle_fault_on_reboot(void); | |||
722 | 722 | ||
723 | #define __kvm_handle_fault_on_reboot(insn) \ | 723 | #define __kvm_handle_fault_on_reboot(insn) \ |
724 | "666: " insn "\n\t" \ | 724 | "666: " insn "\n\t" \ |
725 | ".pushsection .text.fixup, \"ax\" \n" \ | 725 | ".pushsection .fixup, \"ax\" \n" \ |
726 | "667: \n\t" \ | 726 | "667: \n\t" \ |
727 | KVM_EX_PUSH " $666b \n\t" \ | 727 | KVM_EX_PUSH " $666b \n\t" \ |
728 | "jmp kvm_handle_fault_on_reboot \n\t" \ | 728 | "jmp kvm_handle_fault_on_reboot \n\t" \ |
diff --git a/include/asm-x86/mce.h b/include/asm-x86/mce.h index 94f1fd79e22a..531eaa587455 100644 --- a/include/asm-x86/mce.h +++ b/include/asm-x86/mce.h | |||
@@ -92,6 +92,7 @@ extern int mce_disabled; | |||
92 | 92 | ||
93 | void mce_log(struct mce *m); | 93 | void mce_log(struct mce *m); |
94 | DECLARE_PER_CPU(struct sys_device, device_mce); | 94 | DECLARE_PER_CPU(struct sys_device, device_mce); |
95 | extern void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu); | ||
95 | 96 | ||
96 | #ifdef CONFIG_X86_MCE_INTEL | 97 | #ifdef CONFIG_X86_MCE_INTEL |
97 | void mce_intel_feature_init(struct cpuinfo_x86 *c); | 98 | void mce_intel_feature_init(struct cpuinfo_x86 *c); |
diff --git a/include/asm-x86/mman.h b/include/asm-x86/mman.h index c1682b542daf..90bc4108a4fd 100644 --- a/include/asm-x86/mman.h +++ b/include/asm-x86/mman.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ | 12 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ |
13 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 13 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
14 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 14 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
15 | #define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ | ||
15 | 16 | ||
16 | #define MCL_CURRENT 1 /* lock all current mappings */ | 17 | #define MCL_CURRENT 1 /* lock all current mappings */ |
17 | #define MCL_FUTURE 2 /* lock all future mappings */ | 18 | #define MCL_FUTURE 2 /* lock all future mappings */ |
diff --git a/include/asm-x86/mmconfig.h b/include/asm-x86/mmconfig.h index 95beda07c6fa..e293ab81e850 100644 --- a/include/asm-x86/mmconfig.h +++ b/include/asm-x86/mmconfig.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #ifdef CONFIG_PCI_MMCONFIG | 4 | #ifdef CONFIG_PCI_MMCONFIG |
5 | extern void __cpuinit fam10h_check_enable_mmcfg(void); | 5 | extern void __cpuinit fam10h_check_enable_mmcfg(void); |
6 | extern void __init check_enable_amd_mmconf_dmi(void); | 6 | extern void __cpuinit check_enable_amd_mmconf_dmi(void); |
7 | #else | 7 | #else |
8 | static inline void fam10h_check_enable_mmcfg(void) { } | 8 | static inline void fam10h_check_enable_mmcfg(void) { } |
9 | static inline void check_enable_amd_mmconf_dmi(void) { } | 9 | static inline void check_enable_amd_mmconf_dmi(void) { } |
diff --git a/include/asm-x86/mmzone_32.h b/include/asm-x86/mmzone_32.h index b2298a227567..5862e6460658 100644 --- a/include/asm-x86/mmzone_32.h +++ b/include/asm-x86/mmzone_32.h | |||
@@ -97,10 +97,16 @@ static inline int pfn_valid(int pfn) | |||
97 | reserve_bootmem_node(NODE_DATA(0), (addr), (size), (flags)) | 97 | reserve_bootmem_node(NODE_DATA(0), (addr), (size), (flags)) |
98 | #define alloc_bootmem(x) \ | 98 | #define alloc_bootmem(x) \ |
99 | __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 99 | __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
100 | #define alloc_bootmem_nopanic(x) \ | ||
101 | __alloc_bootmem_node_nopanic(NODE_DATA(0), (x), SMP_CACHE_BYTES, \ | ||
102 | __pa(MAX_DMA_ADDRESS)) | ||
100 | #define alloc_bootmem_low(x) \ | 103 | #define alloc_bootmem_low(x) \ |
101 | __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, 0) | 104 | __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, 0) |
102 | #define alloc_bootmem_pages(x) \ | 105 | #define alloc_bootmem_pages(x) \ |
103 | __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 106 | __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
107 | #define alloc_bootmem_pages_nopanic(x) \ | ||
108 | __alloc_bootmem_node_nopanic(NODE_DATA(0), (x), PAGE_SIZE, \ | ||
109 | __pa(MAX_DMA_ADDRESS)) | ||
104 | #define alloc_bootmem_low_pages(x) \ | 110 | #define alloc_bootmem_low_pages(x) \ |
105 | __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0) | 111 | __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0) |
106 | #define alloc_bootmem_node(pgdat, x) \ | 112 | #define alloc_bootmem_node(pgdat, x) \ |
diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h index ca110ee73f07..2362cfda1fbc 100644 --- a/include/asm-x86/msr.h +++ b/include/asm-x86/msr.h | |||
@@ -52,14 +52,14 @@ static inline unsigned long long native_read_msr_safe(unsigned int msr, | |||
52 | { | 52 | { |
53 | DECLARE_ARGS(val, low, high); | 53 | DECLARE_ARGS(val, low, high); |
54 | 54 | ||
55 | asm volatile("2: rdmsr ; xor %0,%0\n" | 55 | asm volatile("2: rdmsr ; xor %[err],%[err]\n" |
56 | "1:\n\t" | 56 | "1:\n\t" |
57 | ".section .fixup,\"ax\"\n\t" | 57 | ".section .fixup,\"ax\"\n\t" |
58 | "3: mov %3,%0 ; jmp 1b\n\t" | 58 | "3: mov %[fault],%[err] ; jmp 1b\n\t" |
59 | ".previous\n\t" | 59 | ".previous\n\t" |
60 | _ASM_EXTABLE(2b, 3b) | 60 | _ASM_EXTABLE(2b, 3b) |
61 | : "=r" (*err), EAX_EDX_RET(val, low, high) | 61 | : [err] "=r" (*err), EAX_EDX_RET(val, low, high) |
62 | : "c" (msr), "i" (-EFAULT)); | 62 | : "c" (msr), [fault] "i" (-EFAULT)); |
63 | return EAX_EDX_VAL(val, low, high); | 63 | return EAX_EDX_VAL(val, low, high); |
64 | } | 64 | } |
65 | 65 | ||
@@ -73,15 +73,15 @@ static inline int native_write_msr_safe(unsigned int msr, | |||
73 | unsigned low, unsigned high) | 73 | unsigned low, unsigned high) |
74 | { | 74 | { |
75 | int err; | 75 | int err; |
76 | asm volatile("2: wrmsr ; xor %0,%0\n" | 76 | asm volatile("2: wrmsr ; xor %[err],%[err]\n" |
77 | "1:\n\t" | 77 | "1:\n\t" |
78 | ".section .fixup,\"ax\"\n\t" | 78 | ".section .fixup,\"ax\"\n\t" |
79 | "3: mov %4,%0 ; jmp 1b\n\t" | 79 | "3: mov %[fault],%[err] ; jmp 1b\n\t" |
80 | ".previous\n\t" | 80 | ".previous\n\t" |
81 | _ASM_EXTABLE(2b, 3b) | 81 | _ASM_EXTABLE(2b, 3b) |
82 | : "=a" (err) | 82 | : [err] "=a" (err) |
83 | : "c" (msr), "0" (low), "d" (high), | 83 | : "c" (msr), "0" (low), "d" (high), |
84 | "i" (-EFAULT) | 84 | [fault] "i" (-EFAULT) |
85 | : "memory"); | 85 | : "memory"); |
86 | return err; | 86 | return err; |
87 | } | 87 | } |
@@ -192,19 +192,20 @@ do { \ | |||
192 | #define write_rdtscp_aux(val) wrmsr(0xc0000103, (val), 0) | 192 | #define write_rdtscp_aux(val) wrmsr(0xc0000103, (val), 0) |
193 | 193 | ||
194 | #ifdef CONFIG_SMP | 194 | #ifdef CONFIG_SMP |
195 | void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); | 195 | int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); |
196 | void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); | 196 | int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); |
197 | int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); | 197 | int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); |
198 | |||
199 | int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); | 198 | int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); |
200 | #else /* CONFIG_SMP */ | 199 | #else /* CONFIG_SMP */ |
201 | static inline void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) | 200 | static inline int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) |
202 | { | 201 | { |
203 | rdmsr(msr_no, *l, *h); | 202 | rdmsr(msr_no, *l, *h); |
203 | return 0; | ||
204 | } | 204 | } |
205 | static inline void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) | 205 | static inline int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) |
206 | { | 206 | { |
207 | wrmsr(msr_no, l, h); | 207 | wrmsr(msr_no, l, h); |
208 | return 0; | ||
208 | } | 209 | } |
209 | static inline int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, | 210 | static inline int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, |
210 | u32 *l, u32 *h) | 211 | u32 *l, u32 *h) |
diff --git a/include/asm-x86/percpu.h b/include/asm-x86/percpu.h index 4e91ee1e37aa..f643a3a92da0 100644 --- a/include/asm-x86/percpu.h +++ b/include/asm-x86/percpu.h | |||
@@ -182,7 +182,7 @@ do { \ | |||
182 | DEFINE_PER_CPU(_type, _name) = _initvalue; \ | 182 | DEFINE_PER_CPU(_type, _name) = _initvalue; \ |
183 | __typeof__(_type) _name##_early_map[NR_CPUS] __initdata = \ | 183 | __typeof__(_type) _name##_early_map[NR_CPUS] __initdata = \ |
184 | { [0 ... NR_CPUS-1] = _initvalue }; \ | 184 | { [0 ... NR_CPUS-1] = _initvalue }; \ |
185 | __typeof__(_type) *_name##_early_ptr = _name##_early_map | 185 | __typeof__(_type) *_name##_early_ptr __refdata = _name##_early_map |
186 | 186 | ||
187 | #define EXPORT_EARLY_PER_CPU_SYMBOL(_name) \ | 187 | #define EXPORT_EARLY_PER_CPU_SYMBOL(_name) \ |
188 | EXPORT_PER_CPU_SYMBOL(_name) | 188 | EXPORT_PER_CPU_SYMBOL(_name) |
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h index ac5fff4cc58a..549144d03d99 100644 --- a/include/asm-x86/pgtable_64.h +++ b/include/asm-x86/pgtable_64.h | |||
@@ -151,7 +151,7 @@ static inline void native_pgd_clear(pgd_t *pgd) | |||
151 | #define VMALLOC_END _AC(0xffffe1ffffffffff, UL) | 151 | #define VMALLOC_END _AC(0xffffe1ffffffffff, UL) |
152 | #define VMEMMAP_START _AC(0xffffe20000000000, UL) | 152 | #define VMEMMAP_START _AC(0xffffe20000000000, UL) |
153 | #define MODULES_VADDR _AC(0xffffffffa0000000, UL) | 153 | #define MODULES_VADDR _AC(0xffffffffa0000000, UL) |
154 | #define MODULES_END _AC(0xfffffffffff00000, UL) | 154 | #define MODULES_END _AC(0xffffffffff000000, UL) |
155 | #define MODULES_LEN (MODULES_END - MODULES_VADDR) | 155 | #define MODULES_LEN (MODULES_END - MODULES_VADDR) |
156 | 156 | ||
157 | #ifndef __ASSEMBLY__ | 157 | #ifndef __ASSEMBLY__ |
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h index 79338fe965d2..d2bf5fe8f4ff 100644 --- a/include/asm-x86/processor.h +++ b/include/asm-x86/processor.h | |||
@@ -729,6 +729,29 @@ extern unsigned long boot_option_idle_override; | |||
729 | extern unsigned long idle_halt; | 729 | extern unsigned long idle_halt; |
730 | extern unsigned long idle_nomwait; | 730 | extern unsigned long idle_nomwait; |
731 | 731 | ||
732 | /* | ||
733 | * on systems with caches, caches must be flashed as the absolute | ||
734 | * last instruction before going into a suspended halt. Otherwise, | ||
735 | * dirty data can linger in the cache and become stale on resume, | ||
736 | * leading to strange errors. | ||
737 | * | ||
738 | * perform a variety of operations to guarantee that the compiler | ||
739 | * will not reorder instructions. wbinvd itself is serializing | ||
740 | * so the processor will not reorder. | ||
741 | * | ||
742 | * Systems without cache can just go into halt. | ||
743 | */ | ||
744 | static inline void wbinvd_halt(void) | ||
745 | { | ||
746 | mb(); | ||
747 | /* check for clflush to determine if wbinvd is legal */ | ||
748 | if (cpu_has_clflush) | ||
749 | asm volatile("cli; wbinvd; 1: hlt; jmp 1b" : : : "memory"); | ||
750 | else | ||
751 | while (1) | ||
752 | halt(); | ||
753 | } | ||
754 | |||
732 | extern void enable_sep_cpu(void); | 755 | extern void enable_sep_cpu(void); |
733 | extern int sysenter_setup(void); | 756 | extern int sysenter_setup(void); |
734 | 757 | ||
diff --git a/include/asm-x86/spinlock.h b/include/asm-x86/spinlock.h index 4f9a9861799a..e39c790dbfd2 100644 --- a/include/asm-x86/spinlock.h +++ b/include/asm-x86/spinlock.h | |||
@@ -65,7 +65,7 @@ static inline int __ticket_spin_is_contended(raw_spinlock_t *lock) | |||
65 | { | 65 | { |
66 | int tmp = ACCESS_ONCE(lock->slock); | 66 | int tmp = ACCESS_ONCE(lock->slock); |
67 | 67 | ||
68 | return (((tmp >> 8) & 0xff) - (tmp & 0xff)) > 1; | 68 | return (((tmp >> 8) - tmp) & 0xff) > 1; |
69 | } | 69 | } |
70 | 70 | ||
71 | static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock) | 71 | static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock) |
@@ -127,7 +127,7 @@ static inline int __ticket_spin_is_contended(raw_spinlock_t *lock) | |||
127 | { | 127 | { |
128 | int tmp = ACCESS_ONCE(lock->slock); | 128 | int tmp = ACCESS_ONCE(lock->slock); |
129 | 129 | ||
130 | return (((tmp >> 16) & 0xffff) - (tmp & 0xffff)) > 1; | 130 | return (((tmp >> 16) - tmp) & 0xffff) > 1; |
131 | } | 131 | } |
132 | 132 | ||
133 | static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock) | 133 | static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock) |
diff --git a/include/asm-x86/uv/uv_bau.h b/include/asm-x86/uv/uv_bau.h index 91ac0dfb7588..610b6b308e93 100644 --- a/include/asm-x86/uv/uv_bau.h +++ b/include/asm-x86/uv/uv_bau.h | |||
@@ -40,11 +40,6 @@ | |||
40 | #define UV_ACTIVATION_DESCRIPTOR_SIZE 32 | 40 | #define UV_ACTIVATION_DESCRIPTOR_SIZE 32 |
41 | #define UV_DISTRIBUTION_SIZE 256 | 41 | #define UV_DISTRIBUTION_SIZE 256 |
42 | #define UV_SW_ACK_NPENDING 8 | 42 | #define UV_SW_ACK_NPENDING 8 |
43 | #define UV_BAU_MESSAGE 200 | ||
44 | /* | ||
45 | * Messaging irq; see irq_64.h and include/asm-x86/hw_irq_64.h | ||
46 | * To be dynamically allocated in the future | ||
47 | */ | ||
48 | #define UV_NET_ENDPOINT_INTD 0x38 | 43 | #define UV_NET_ENDPOINT_INTD 0x38 |
49 | #define UV_DESC_BASE_PNODE_SHIFT 49 | 44 | #define UV_DESC_BASE_PNODE_SHIFT 49 |
50 | #define UV_PAYLOADQ_PNODE_SHIFT 49 | 45 | #define UV_PAYLOADQ_PNODE_SHIFT 49 |
diff --git a/include/asm-x86/xen/hypervisor.h b/include/asm-x86/xen/hypervisor.h index 8e15dd28c91f..04ee0610014a 100644 --- a/include/asm-x86/xen/hypervisor.h +++ b/include/asm-x86/xen/hypervisor.h | |||
@@ -35,7 +35,6 @@ | |||
35 | 35 | ||
36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
37 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
38 | #include <linux/version.h> | ||
39 | 38 | ||
40 | #include <xen/interface/xen.h> | 39 | #include <xen/interface/xen.h> |
41 | #include <xen/interface/version.h> | 40 | #include <xen/interface/version.h> |