diff options
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/Kconfig | 2 | ||||
-rw-r--r-- | arch/i386/Kconfig.cpu | 2 | ||||
-rw-r--r-- | arch/i386/kernel/acpi/wakeup.S | 2 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/mtrr/generic.c | 4 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/mtrr/main.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/pci-dma.c | 27 | ||||
-rw-r--r-- | arch/i386/mm/init.c | 3 | ||||
-rw-r--r-- | arch/i386/mm/pageattr.c | 30 |
8 files changed, 54 insertions, 18 deletions
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 8770a5d0b143..d2f6a247414d 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -541,7 +541,7 @@ config HIGHMEM4G | |||
541 | 541 | ||
542 | config HIGHMEM64G | 542 | config HIGHMEM64G |
543 | bool "64GB" | 543 | bool "64GB" |
544 | depends on X86_CMPXCHG64 | 544 | depends on !M386 && !M486 |
545 | help | 545 | help |
546 | Select this if you have a 32-bit processor and more than 4 | 546 | Select this if you have a 32-bit processor and more than 4 |
547 | gigabytes of physical RAM. | 547 | gigabytes of physical RAM. |
diff --git a/arch/i386/Kconfig.cpu b/arch/i386/Kconfig.cpu index d7f6fb0b30f2..5c95ceb7f122 100644 --- a/arch/i386/Kconfig.cpu +++ b/arch/i386/Kconfig.cpu | |||
@@ -299,7 +299,7 @@ config X86_POPAD_OK | |||
299 | 299 | ||
300 | config X86_CMPXCHG64 | 300 | config X86_CMPXCHG64 |
301 | bool | 301 | bool |
302 | depends on !M386 && !M486 | 302 | depends on X86_PAE |
303 | default y | 303 | default y |
304 | 304 | ||
305 | config X86_ALIGNMENT_16 | 305 | config X86_ALIGNMENT_16 |
diff --git a/arch/i386/kernel/acpi/wakeup.S b/arch/i386/kernel/acpi/wakeup.S index b781b38131c0..a2295a34b2c7 100644 --- a/arch/i386/kernel/acpi/wakeup.S +++ b/arch/i386/kernel/acpi/wakeup.S | |||
@@ -230,6 +230,7 @@ bogus_magic: | |||
230 | # | 230 | # |
231 | ENTRY(acpi_copy_wakeup_routine) | 231 | ENTRY(acpi_copy_wakeup_routine) |
232 | 232 | ||
233 | pushl %ebx | ||
233 | sgdt saved_gdt | 234 | sgdt saved_gdt |
234 | sidt saved_idt | 235 | sidt saved_idt |
235 | sldt saved_ldt | 236 | sldt saved_ldt |
@@ -263,6 +264,7 @@ ENTRY(acpi_copy_wakeup_routine) | |||
263 | movl %edx, video_flags - wakeup_start (%eax) | 264 | movl %edx, video_flags - wakeup_start (%eax) |
264 | movl $0x12345678, real_magic - wakeup_start (%eax) | 265 | movl $0x12345678, real_magic - wakeup_start (%eax) |
265 | movl $0x12345678, saved_magic | 266 | movl $0x12345678, saved_magic |
267 | popl %ebx | ||
266 | ret | 268 | ret |
267 | 269 | ||
268 | save_registers: | 270 | save_registers: |
diff --git a/arch/i386/kernel/cpu/mtrr/generic.c b/arch/i386/kernel/cpu/mtrr/generic.c index c4ebb5126ef7..6d5937891b46 100644 --- a/arch/i386/kernel/cpu/mtrr/generic.c +++ b/arch/i386/kernel/cpu/mtrr/generic.c | |||
@@ -42,7 +42,7 @@ static int mtrr_show; | |||
42 | module_param_named(show, mtrr_show, bool, 0); | 42 | module_param_named(show, mtrr_show, bool, 0); |
43 | 43 | ||
44 | /* Get the MSR pair relating to a var range */ | 44 | /* Get the MSR pair relating to a var range */ |
45 | static void __init | 45 | static void |
46 | get_mtrr_var_range(unsigned int index, struct mtrr_var_range *vr) | 46 | get_mtrr_var_range(unsigned int index, struct mtrr_var_range *vr) |
47 | { | 47 | { |
48 | rdmsr(MTRRphysBase_MSR(index), vr->base_lo, vr->base_hi); | 48 | rdmsr(MTRRphysBase_MSR(index), vr->base_lo, vr->base_hi); |
@@ -68,7 +68,7 @@ void mtrr_save_fixed_ranges(void *info) | |||
68 | get_fixed_ranges(mtrr_state.fixed_ranges); | 68 | get_fixed_ranges(mtrr_state.fixed_ranges); |
69 | } | 69 | } |
70 | 70 | ||
71 | static void __cpuinit print_fixed(unsigned base, unsigned step, const mtrr_type*types) | 71 | static void print_fixed(unsigned base, unsigned step, const mtrr_type*types) |
72 | { | 72 | { |
73 | unsigned i; | 73 | unsigned i; |
74 | 74 | ||
diff --git a/arch/i386/kernel/cpu/mtrr/main.c b/arch/i386/kernel/cpu/mtrr/main.c index 7202b98aac4f..55b005152a11 100644 --- a/arch/i386/kernel/cpu/mtrr/main.c +++ b/arch/i386/kernel/cpu/mtrr/main.c | |||
@@ -639,7 +639,7 @@ static struct sysdev_driver mtrr_sysdev_driver = { | |||
639 | * initialized (i.e. before smp_init()). | 639 | * initialized (i.e. before smp_init()). |
640 | * | 640 | * |
641 | */ | 641 | */ |
642 | void mtrr_bp_init(void) | 642 | __init void mtrr_bp_init(void) |
643 | { | 643 | { |
644 | init_ifs(); | 644 | init_ifs(); |
645 | 645 | ||
diff --git a/arch/i386/kernel/pci-dma.c b/arch/i386/kernel/pci-dma.c index 30b754f7cbec..048f09b62553 100644 --- a/arch/i386/kernel/pci-dma.c +++ b/arch/i386/kernel/pci-dma.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/pci.h> | ||
15 | #include <asm/io.h> | 16 | #include <asm/io.h> |
16 | 17 | ||
17 | struct dma_coherent_mem { | 18 | struct dma_coherent_mem { |
@@ -148,3 +149,29 @@ void *dma_mark_declared_memory_occupied(struct device *dev, | |||
148 | return mem->virt_base + (pos << PAGE_SHIFT); | 149 | return mem->virt_base + (pos << PAGE_SHIFT); |
149 | } | 150 | } |
150 | EXPORT_SYMBOL(dma_mark_declared_memory_occupied); | 151 | EXPORT_SYMBOL(dma_mark_declared_memory_occupied); |
152 | |||
153 | #ifdef CONFIG_PCI | ||
154 | /* Many VIA bridges seem to corrupt data for DAC. Disable it here */ | ||
155 | |||
156 | int forbid_dac; | ||
157 | EXPORT_SYMBOL(forbid_dac); | ||
158 | |||
159 | static __devinit void via_no_dac(struct pci_dev *dev) | ||
160 | { | ||
161 | if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) { | ||
162 | printk(KERN_INFO "PCI: VIA PCI bridge detected. Disabling DAC.\n"); | ||
163 | forbid_dac = 1; | ||
164 | } | ||
165 | } | ||
166 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac); | ||
167 | |||
168 | static int check_iommu(char *s) | ||
169 | { | ||
170 | if (!strcmp(s, "usedac")) { | ||
171 | forbid_dac = -1; | ||
172 | return 1; | ||
173 | } | ||
174 | return 0; | ||
175 | } | ||
176 | __setup("iommu=", check_iommu); | ||
177 | #endif | ||
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index b22ce8d6b1ba..7135946d3663 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c | |||
@@ -799,6 +799,7 @@ void mark_rodata_ro(void) | |||
799 | unsigned long start = PFN_ALIGN(_text); | 799 | unsigned long start = PFN_ALIGN(_text); |
800 | unsigned long size = PFN_ALIGN(_etext) - start; | 800 | unsigned long size = PFN_ALIGN(_etext) - start; |
801 | 801 | ||
802 | #ifndef CONFIG_KPROBES | ||
802 | #ifdef CONFIG_HOTPLUG_CPU | 803 | #ifdef CONFIG_HOTPLUG_CPU |
803 | /* It must still be possible to apply SMP alternatives. */ | 804 | /* It must still be possible to apply SMP alternatives. */ |
804 | if (num_possible_cpus() <= 1) | 805 | if (num_possible_cpus() <= 1) |
@@ -808,7 +809,7 @@ void mark_rodata_ro(void) | |||
808 | size >> PAGE_SHIFT, PAGE_KERNEL_RX); | 809 | size >> PAGE_SHIFT, PAGE_KERNEL_RX); |
809 | printk("Write protecting the kernel text: %luk\n", size >> 10); | 810 | printk("Write protecting the kernel text: %luk\n", size >> 10); |
810 | } | 811 | } |
811 | 812 | #endif | |
812 | start += size; | 813 | start += size; |
813 | size = (unsigned long)__end_rodata - start; | 814 | size = (unsigned long)__end_rodata - start; |
814 | change_page_attr(virt_to_page(start), | 815 | change_page_attr(virt_to_page(start), |
diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c index 47bd477c8ecc..2eb14a73be9c 100644 --- a/arch/i386/mm/pageattr.c +++ b/arch/i386/mm/pageattr.c | |||
@@ -68,14 +68,23 @@ static struct page *split_large_page(unsigned long address, pgprot_t prot, | |||
68 | return base; | 68 | return base; |
69 | } | 69 | } |
70 | 70 | ||
71 | static void flush_kernel_map(void *arg) | 71 | static void cache_flush_page(struct page *p) |
72 | { | 72 | { |
73 | unsigned long adr = (unsigned long)arg; | 73 | unsigned long adr = (unsigned long)page_address(p); |
74 | int i; | ||
75 | for (i = 0; i < PAGE_SIZE; i += boot_cpu_data.x86_clflush_size) | ||
76 | asm volatile("clflush (%0)" :: "r" (adr + i)); | ||
77 | } | ||
78 | |||
79 | static void flush_kernel_map(void *arg) | ||
80 | { | ||
81 | struct list_head *lh = (struct list_head *)arg; | ||
82 | struct page *p; | ||
74 | 83 | ||
75 | if (adr && cpu_has_clflush) { | 84 | /* High level code is not ready for clflush yet */ |
76 | int i; | 85 | if (0 && cpu_has_clflush) { |
77 | for (i = 0; i < PAGE_SIZE; i += boot_cpu_data.x86_clflush_size) | 86 | list_for_each_entry (p, lh, lru) |
78 | asm volatile("clflush (%0)" :: "r" (adr + i)); | 87 | cache_flush_page(p); |
79 | } else if (boot_cpu_data.x86_model >= 4) | 88 | } else if (boot_cpu_data.x86_model >= 4) |
80 | wbinvd(); | 89 | wbinvd(); |
81 | 90 | ||
@@ -181,9 +190,9 @@ __change_page_attr(struct page *page, pgprot_t prot) | |||
181 | return 0; | 190 | return 0; |
182 | } | 191 | } |
183 | 192 | ||
184 | static inline void flush_map(void *adr) | 193 | static inline void flush_map(struct list_head *l) |
185 | { | 194 | { |
186 | on_each_cpu(flush_kernel_map, adr, 1, 1); | 195 | on_each_cpu(flush_kernel_map, l, 1, 1); |
187 | } | 196 | } |
188 | 197 | ||
189 | /* | 198 | /* |
@@ -225,11 +234,8 @@ void global_flush_tlb(void) | |||
225 | spin_lock_irq(&cpa_lock); | 234 | spin_lock_irq(&cpa_lock); |
226 | list_replace_init(&df_list, &l); | 235 | list_replace_init(&df_list, &l); |
227 | spin_unlock_irq(&cpa_lock); | 236 | spin_unlock_irq(&cpa_lock); |
228 | if (!cpu_has_clflush) | 237 | flush_map(&l); |
229 | flush_map(NULL); | ||
230 | list_for_each_entry_safe(pg, next, &l, lru) { | 238 | list_for_each_entry_safe(pg, next, &l, lru) { |
231 | if (cpu_has_clflush) | ||
232 | flush_map(page_address(pg)); | ||
233 | __free_page(pg); | 239 | __free_page(pg); |
234 | } | 240 | } |
235 | } | 241 | } |