diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-25 18:50:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-25 18:50:32 -0400 |
commit | a0c1af135a93ee25b07cbc61762fb957fd2f3733 (patch) | |
tree | e1a9421514b570d2fbb7138afa618e9a02e582eb /arch | |
parent | 93c32483808c5d82c9bd1eef2208854a6d1326db (diff) | |
parent | 71c9d8b68b299bef614afc7907393564a9f1476f (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 remap percpu allocator for the time being
x86: cpa_flush_array wbinvd should be done on all CPUs
x86: bugfix wbinvd() model check instead of family check
x86: introduce noxsave boot parameter
x86, setup: revert ACPI 3 E820 extended attributes support
x86: DMI match for the Sony VGN-Z540N as it needs BIOS reboot
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/boot/memory.c | 29 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/reboot.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/setup_percpu.c | 4 | ||||
-rw-r--r-- | arch/x86/mm/pageattr.c | 12 |
5 files changed, 40 insertions, 20 deletions
diff --git a/arch/x86/boot/memory.c b/arch/x86/boot/memory.c index 5054c2ddd1a0..74b3d2ba84e9 100644 --- a/arch/x86/boot/memory.c +++ b/arch/x86/boot/memory.c | |||
@@ -17,11 +17,6 @@ | |||
17 | 17 | ||
18 | #define SMAP 0x534d4150 /* ASCII "SMAP" */ | 18 | #define SMAP 0x534d4150 /* ASCII "SMAP" */ |
19 | 19 | ||
20 | struct e820_ext_entry { | ||
21 | struct e820entry std; | ||
22 | u32 ext_flags; | ||
23 | } __attribute__((packed)); | ||
24 | |||
25 | static int detect_memory_e820(void) | 20 | static int detect_memory_e820(void) |
26 | { | 21 | { |
27 | int count = 0; | 22 | int count = 0; |
@@ -29,13 +24,21 @@ static int detect_memory_e820(void) | |||
29 | u32 size, id, edi; | 24 | u32 size, id, edi; |
30 | u8 err; | 25 | u8 err; |
31 | struct e820entry *desc = boot_params.e820_map; | 26 | struct e820entry *desc = boot_params.e820_map; |
32 | static struct e820_ext_entry buf; /* static so it is zeroed */ | 27 | static struct e820entry buf; /* static so it is zeroed */ |
33 | 28 | ||
34 | /* | 29 | /* |
35 | * Set this here so that if the BIOS doesn't change this field | 30 | * Note: at least one BIOS is known which assumes that the |
36 | * but still doesn't change %ecx, we're still okay... | 31 | * buffer pointed to by one e820 call is the same one as |
32 | * the previous call, and only changes modified fields. Therefore, | ||
33 | * we use a temporary buffer and copy the results entry by entry. | ||
34 | * | ||
35 | * This routine deliberately does not try to account for | ||
36 | * ACPI 3+ extended attributes. This is because there are | ||
37 | * BIOSes in the field which report zero for the valid bit for | ||
38 | * all ranges, and we don't currently make any use of the | ||
39 | * other attribute bits. Revisit this if we see the extended | ||
40 | * attribute bits deployed in a meaningful way in the future. | ||
37 | */ | 41 | */ |
38 | buf.ext_flags = 1; | ||
39 | 42 | ||
40 | do { | 43 | do { |
41 | size = sizeof buf; | 44 | size = sizeof buf; |
@@ -66,13 +69,7 @@ static int detect_memory_e820(void) | |||
66 | break; | 69 | break; |
67 | } | 70 | } |
68 | 71 | ||
69 | /* ACPI 3.0 added the extended flags support. If bit 0 | 72 | *desc++ = buf; |
70 | in the extended flags is zero, we're supposed to simply | ||
71 | ignore the entry -- a backwards incompatible change! */ | ||
72 | if (size > 20 && !(buf.ext_flags & 1)) | ||
73 | continue; | ||
74 | |||
75 | *desc++ = buf.std; | ||
76 | count++; | 73 | count++; |
77 | } while (next && count < ARRAY_SIZE(boot_params.e820_map)); | 74 | } while (next && count < ARRAY_SIZE(boot_params.e820_map)); |
78 | 75 | ||
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index c1caefc82e62..77848d9fca68 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -114,6 +114,13 @@ DEFINE_PER_CPU_PAGE_ALIGNED(struct gdt_page, gdt_page) = { .gdt = { | |||
114 | } }; | 114 | } }; |
115 | EXPORT_PER_CPU_SYMBOL_GPL(gdt_page); | 115 | EXPORT_PER_CPU_SYMBOL_GPL(gdt_page); |
116 | 116 | ||
117 | static int __init x86_xsave_setup(char *s) | ||
118 | { | ||
119 | setup_clear_cpu_cap(X86_FEATURE_XSAVE); | ||
120 | return 1; | ||
121 | } | ||
122 | __setup("noxsave", x86_xsave_setup); | ||
123 | |||
117 | #ifdef CONFIG_X86_32 | 124 | #ifdef CONFIG_X86_32 |
118 | static int cachesize_override __cpuinitdata = -1; | 125 | static int cachesize_override __cpuinitdata = -1; |
119 | static int disable_x86_serial_nr __cpuinitdata = 1; | 126 | static int disable_x86_serial_nr __cpuinitdata = 1; |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 1340dad417f4..667188e0b5a0 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -232,6 +232,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { | |||
232 | DMI_MATCH(DMI_PRODUCT_NAME, "Dell DXP061"), | 232 | DMI_MATCH(DMI_PRODUCT_NAME, "Dell DXP061"), |
233 | }, | 233 | }, |
234 | }, | 234 | }, |
235 | { /* Handle problems with rebooting on Sony VGN-Z540N */ | ||
236 | .callback = set_bios_reboot, | ||
237 | .ident = "Sony VGN-Z540N", | ||
238 | .matches = { | ||
239 | DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), | ||
240 | DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z540N"), | ||
241 | }, | ||
242 | }, | ||
235 | { } | 243 | { } |
236 | }; | 244 | }; |
237 | 245 | ||
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c index 3a97a4cf1872..8f0e13be36b3 100644 --- a/arch/x86/kernel/setup_percpu.c +++ b/arch/x86/kernel/setup_percpu.c | |||
@@ -160,8 +160,10 @@ static ssize_t __init setup_pcpu_remap(size_t static_size) | |||
160 | /* | 160 | /* |
161 | * If large page isn't supported, there's no benefit in doing | 161 | * If large page isn't supported, there's no benefit in doing |
162 | * this. Also, on non-NUMA, embedding is better. | 162 | * this. Also, on non-NUMA, embedding is better. |
163 | * | ||
164 | * NOTE: disabled for now. | ||
163 | */ | 165 | */ |
164 | if (!cpu_has_pse || !pcpu_need_numa()) | 166 | if (true || !cpu_has_pse || !pcpu_need_numa()) |
165 | return -EINVAL; | 167 | return -EINVAL; |
166 | 168 | ||
167 | /* | 169 | /* |
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 797f9f107cb6..0f9052bcec4b 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -153,7 +153,7 @@ static void __cpa_flush_all(void *arg) | |||
153 | */ | 153 | */ |
154 | __flush_tlb_all(); | 154 | __flush_tlb_all(); |
155 | 155 | ||
156 | if (cache && boot_cpu_data.x86_model >= 4) | 156 | if (cache && boot_cpu_data.x86 >= 4) |
157 | wbinvd(); | 157 | wbinvd(); |
158 | } | 158 | } |
159 | 159 | ||
@@ -204,6 +204,11 @@ static void cpa_flush_range(unsigned long start, int numpages, int cache) | |||
204 | } | 204 | } |
205 | } | 205 | } |
206 | 206 | ||
207 | static void wbinvd_local(void *unused) | ||
208 | { | ||
209 | wbinvd(); | ||
210 | } | ||
211 | |||
207 | static void cpa_flush_array(unsigned long *start, int numpages, int cache, | 212 | static void cpa_flush_array(unsigned long *start, int numpages, int cache, |
208 | int in_flags, struct page **pages) | 213 | int in_flags, struct page **pages) |
209 | { | 214 | { |
@@ -218,8 +223,9 @@ static void cpa_flush_array(unsigned long *start, int numpages, int cache, | |||
218 | 223 | ||
219 | /* 4M threshold */ | 224 | /* 4M threshold */ |
220 | if (numpages >= 1024) { | 225 | if (numpages >= 1024) { |
221 | if (boot_cpu_data.x86_model >= 4) | 226 | if (boot_cpu_data.x86 >= 4) |
222 | wbinvd(); | 227 | on_each_cpu(wbinvd_local, NULL, 1); |
228 | |||
223 | return; | 229 | return; |
224 | } | 230 | } |
225 | /* | 231 | /* |