diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-26 13:13:35 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-26 13:13:35 -0400 |
| commit | 5bb241b325d7d91bc4ec0b394f31dffb17fe7978 (patch) | |
| tree | 1bd68903871185173c47a95fef1bf76c848a1c62 /arch | |
| parent | 76e0134f4154aeadac833c2daea32102c64c0bb0 (diff) | |
| parent | 704daf55c7297e727021063cb5d8ba1c55b84426 (diff) | |
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: Remove redundant non-NUMA topology functions
x86: early_printk: Protect against using the same device twice
x86: Reduce verbosity of "PAT enabled" kernel message
x86: Reduce verbosity of "TSC is reliable" message
x86: mce: Use safer ways to access MCE registers
x86: mce, inject: Use real inject-msg in raise_local
x86: mce: Fix thermal throttling message storm
x86: mce: Clean up thermal throttling state tracking code
x86: split NX setup into separate file to limit unstack-protected code
xen: check EFER for NX before setting up GDT mapping
x86: Cleanup linker script using new linker script macros.
x86: Use section .data.page_aligned for the idt_table.
x86: convert to use __HEAD and HEAD_TEXT macros.
x86: convert compressed loader to use __HEAD and HEAD_TEXT macros.
x86: fix fragile computation of vsyscall address
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/x86/boot/compressed/head_32.S | 3 | ||||
| -rw-r--r-- | arch/x86/boot/compressed/head_64.S | 3 | ||||
| -rw-r--r-- | arch/x86/boot/compressed/vmlinux.lds.S | 6 | ||||
| -rw-r--r-- | arch/x86/include/asm/pgtable_types.h | 1 | ||||
| -rw-r--r-- | arch/x86/include/asm/topology.h | 10 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce-inject.c | 7 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce.c | 23 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/mcheck/therm_throt.c | 67 | ||||
| -rw-r--r-- | arch/x86/kernel/early_printk.c | 5 | ||||
| -rw-r--r-- | arch/x86/kernel/head_32.S | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/head_64.S | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/traps.c | 6 | ||||
| -rw-r--r-- | arch/x86/kernel/tsc_sync.c | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/vmlinux.lds.S | 79 | ||||
| -rw-r--r-- | arch/x86/mm/Makefile | 3 | ||||
| -rw-r--r-- | arch/x86/mm/init.c | 63 | ||||
| -rw-r--r-- | arch/x86/mm/pat.c | 7 | ||||
| -rw-r--r-- | arch/x86/mm/setup_nx.c | 69 | ||||
| -rw-r--r-- | arch/x86/xen/enlighten.c | 10 |
19 files changed, 180 insertions, 188 deletions
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S index 75e4f001e706..f543b70ffae2 100644 --- a/arch/x86/boot/compressed/head_32.S +++ b/arch/x86/boot/compressed/head_32.S | |||
| @@ -23,13 +23,14 @@ | |||
| 23 | */ | 23 | */ |
| 24 | .text | 24 | .text |
| 25 | 25 | ||
| 26 | #include <linux/init.h> | ||
| 26 | #include <linux/linkage.h> | 27 | #include <linux/linkage.h> |
| 27 | #include <asm/segment.h> | 28 | #include <asm/segment.h> |
| 28 | #include <asm/page_types.h> | 29 | #include <asm/page_types.h> |
| 29 | #include <asm/boot.h> | 30 | #include <asm/boot.h> |
| 30 | #include <asm/asm-offsets.h> | 31 | #include <asm/asm-offsets.h> |
| 31 | 32 | ||
| 32 | .section ".text.head","ax",@progbits | 33 | __HEAD |
| 33 | ENTRY(startup_32) | 34 | ENTRY(startup_32) |
| 34 | cld | 35 | cld |
| 35 | /* | 36 | /* |
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S index f62c284db9eb..077e1b69198e 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | .code32 | 24 | .code32 |
| 25 | .text | 25 | .text |
| 26 | 26 | ||
| 27 | #include <linux/init.h> | ||
| 27 | #include <linux/linkage.h> | 28 | #include <linux/linkage.h> |
| 28 | #include <asm/segment.h> | 29 | #include <asm/segment.h> |
| 29 | #include <asm/pgtable_types.h> | 30 | #include <asm/pgtable_types.h> |
| @@ -33,7 +34,7 @@ | |||
| 33 | #include <asm/processor-flags.h> | 34 | #include <asm/processor-flags.h> |
| 34 | #include <asm/asm-offsets.h> | 35 | #include <asm/asm-offsets.h> |
| 35 | 36 | ||
| 36 | .section ".text.head" | 37 | __HEAD |
| 37 | .code32 | 38 | .code32 |
| 38 | ENTRY(startup_32) | 39 | ENTRY(startup_32) |
| 39 | cld | 40 | cld |
diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S index cc353e1b3ffd..f4193bb48782 100644 --- a/arch/x86/boot/compressed/vmlinux.lds.S +++ b/arch/x86/boot/compressed/vmlinux.lds.S | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | #include <asm-generic/vmlinux.lds.h> | ||
| 2 | |||
| 1 | OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT) | 3 | OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT) |
| 2 | 4 | ||
| 3 | #undef i386 | 5 | #undef i386 |
| @@ -18,9 +20,9 @@ SECTIONS | |||
| 18 | * address 0. | 20 | * address 0. |
| 19 | */ | 21 | */ |
| 20 | . = 0; | 22 | . = 0; |
| 21 | .text.head : { | 23 | .head.text : { |
| 22 | _head = . ; | 24 | _head = . ; |
| 23 | *(.text.head) | 25 | HEAD_TEXT |
| 24 | _ehead = . ; | 26 | _ehead = . ; |
| 25 | } | 27 | } |
| 26 | .rodata.compressed : { | 28 | .rodata.compressed : { |
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h index 7b467bf3c680..d1f4a760be23 100644 --- a/arch/x86/include/asm/pgtable_types.h +++ b/arch/x86/include/asm/pgtable_types.h | |||
| @@ -277,6 +277,7 @@ static inline pteval_t pte_flags(pte_t pte) | |||
| 277 | typedef struct page *pgtable_t; | 277 | typedef struct page *pgtable_t; |
| 278 | 278 | ||
| 279 | extern pteval_t __supported_pte_mask; | 279 | extern pteval_t __supported_pte_mask; |
| 280 | extern void set_nx(void); | ||
| 280 | extern int nx_enabled; | 281 | extern int nx_enabled; |
| 281 | 282 | ||
| 282 | #define pgprot_writecombine pgprot_writecombine | 283 | #define pgprot_writecombine pgprot_writecombine |
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index 6f0695d744bf..25a92842dd99 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h | |||
| @@ -165,21 +165,11 @@ static inline int numa_node_id(void) | |||
| 165 | return 0; | 165 | return 0; |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | static inline int cpu_to_node(int cpu) | ||
| 169 | { | ||
| 170 | return 0; | ||
| 171 | } | ||
| 172 | |||
| 173 | static inline int early_cpu_to_node(int cpu) | 168 | static inline int early_cpu_to_node(int cpu) |
| 174 | { | 169 | { |
| 175 | return 0; | 170 | return 0; |
| 176 | } | 171 | } |
| 177 | 172 | ||
| 178 | static inline const struct cpumask *cpumask_of_node(int node) | ||
| 179 | { | ||
| 180 | return cpu_online_mask; | ||
| 181 | } | ||
| 182 | |||
| 183 | static inline void setup_node_to_cpumask_map(void) { } | 173 | static inline void setup_node_to_cpumask_map(void) { } |
| 184 | 174 | ||
| 185 | #endif | 175 | #endif |
diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c index 7029f0e2acad..472763d92098 100644 --- a/arch/x86/kernel/cpu/mcheck/mce-inject.c +++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c | |||
| @@ -98,8 +98,9 @@ static struct notifier_block mce_raise_nb = { | |||
| 98 | }; | 98 | }; |
| 99 | 99 | ||
| 100 | /* Inject mce on current CPU */ | 100 | /* Inject mce on current CPU */ |
| 101 | static int raise_local(struct mce *m) | 101 | static int raise_local(void) |
| 102 | { | 102 | { |
| 103 | struct mce *m = &__get_cpu_var(injectm); | ||
| 103 | int context = MCJ_CTX(m->inject_flags); | 104 | int context = MCJ_CTX(m->inject_flags); |
| 104 | int ret = 0; | 105 | int ret = 0; |
| 105 | int cpu = m->extcpu; | 106 | int cpu = m->extcpu; |
| @@ -167,12 +168,12 @@ static void raise_mce(struct mce *m) | |||
| 167 | } | 168 | } |
| 168 | cpu_relax(); | 169 | cpu_relax(); |
| 169 | } | 170 | } |
| 170 | raise_local(m); | 171 | raise_local(); |
| 171 | put_cpu(); | 172 | put_cpu(); |
| 172 | put_online_cpus(); | 173 | put_online_cpus(); |
| 173 | } else | 174 | } else |
| 174 | #endif | 175 | #endif |
| 175 | raise_local(m); | 176 | raise_local(); |
| 176 | } | 177 | } |
| 177 | 178 | ||
| 178 | /* Error injection interface */ | 179 | /* Error injection interface */ |
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 2f5aab26320e..4b2af86e3e8d 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
| @@ -305,13 +305,25 @@ static int msr_to_offset(u32 msr) | |||
| 305 | static u64 mce_rdmsrl(u32 msr) | 305 | static u64 mce_rdmsrl(u32 msr) |
| 306 | { | 306 | { |
| 307 | u64 v; | 307 | u64 v; |
| 308 | |||
| 308 | if (__get_cpu_var(injectm).finished) { | 309 | if (__get_cpu_var(injectm).finished) { |
| 309 | int offset = msr_to_offset(msr); | 310 | int offset = msr_to_offset(msr); |
| 311 | |||
| 310 | if (offset < 0) | 312 | if (offset < 0) |
