Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6

* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6:
[PATCH] i386: Fix some warnings added by earlier patch
[PATCH] x86-64: Always flush all pages in change_page_attr
[PATCH] x86: Remove noreplacement option
[PATCH] x86-64: make GART PTEs uncacheable

+12 -29
-4
Documentation/x86_64/boot-options.txt
··· 293 293 stuck (default) 294 294 295 295 Miscellaneous 296 - 297 - noreplacement Don't replace instructions with more appropriate ones 298 - for the CPU. This may be useful on asymmetric MP systems 299 - where some CPUs have less capabilities than others.
+2 -19
arch/i386/kernel/alternative.c
··· 5 5 #include <asm/alternative.h> 6 6 #include <asm/sections.h> 7 7 8 - static int no_replacement = 0; 9 8 static int smp_alt_once = 0; 10 9 static int debug_alternative = 0; 11 10 12 - static int __init noreplacement_setup(char *s) 13 - { 14 - no_replacement = 1; 15 - return 1; 16 - } 17 11 static int __init bootonly(char *str) 18 12 { 19 13 smp_alt_once = 1; ··· 19 25 return 1; 20 26 } 21 27 22 - __setup("noreplacement", noreplacement_setup); 23 28 __setup("smp-alt-boot", bootonly); 24 29 __setup("debug-alternative", debug_alt); 25 30 ··· 245 252 struct smp_alt_module *smp; 246 253 unsigned long flags; 247 254 248 - if (no_replacement) 249 - return; 250 - 251 255 if (smp_alt_once) { 252 256 if (boot_cpu_has(X86_FEATURE_UP)) 253 257 alternatives_smp_unlock(locks, locks_end, ··· 279 289 struct smp_alt_module *item; 280 290 unsigned long flags; 281 291 282 - if (no_replacement || smp_alt_once) 292 + if (smp_alt_once) 283 293 return; 284 294 285 295 spin_lock_irqsave(&smp_alt, flags); ··· 310 320 return; 311 321 #endif 312 322 313 - if (no_replacement || smp_alt_once) 323 + if (smp_alt_once) 314 324 return; 315 325 BUG_ON(!smp && (num_online_cpus() > 1)); 316 326 ··· 376 386 void __init alternative_instructions(void) 377 387 { 378 388 unsigned long flags; 379 - if (no_replacement) { 380 - printk(KERN_INFO "(SMP-)alternatives turned off\n"); 381 - free_init_pages("SMP alternatives", 382 - (unsigned long)__smp_alt_begin, 383 - (unsigned long)__smp_alt_end); 384 - return; 385 - } 386 389 387 390 local_irq_save(flags); 388 391 apply_alternatives(__alt_instructions, __alt_instructions_end);
+4 -4
arch/i386/kernel/nmi.c
··· 126 126 int cpu; 127 127 BUG_ON(counter > NMI_MAX_COUNTER_BITS); 128 128 for_each_possible_cpu (cpu) { 129 - if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu))) 129 + if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0])) 130 130 return 0; 131 131 } 132 132 return 1; ··· 142 142 BUG_ON(counter > NMI_MAX_COUNTER_BITS); 143 143 144 144 for_each_possible_cpu (cpu) { 145 - if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu))) 145 + if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0])) 146 146 return 0; 147 147 } 148 148 return 1; ··· 157 157 counter = nmi_perfctr_msr_to_bit(msr); 158 158 BUG_ON(counter > NMI_MAX_COUNTER_BITS); 159 159 160 - if (!test_and_set_bit(counter, &per_cpu(perfctr_nmi_owner, cpu))) 160 + if (!test_and_set_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0])) 161 161 return 1; 162 162 return 0; 163 163 } ··· 171 171 counter = nmi_perfctr_msr_to_bit(msr); 172 172 BUG_ON(counter > NMI_MAX_COUNTER_BITS); 173 173 174 - clear_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)); 174 + clear_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0]); 175 175 } 176 176 177 177 int reserve_perfctr_nmi(unsigned int msr)
+5 -1
arch/x86_64/kernel/pci-gart.c
··· 519 519 gatt_size = (aper_size >> PAGE_SHIFT) * sizeof(u32); 520 520 gatt = (void *)__get_free_pages(GFP_KERNEL, get_order(gatt_size)); 521 521 if (!gatt) 522 - panic("Cannot allocate GATT table"); 522 + panic("Cannot allocate GATT table"); 523 + if (change_page_attr_addr((unsigned long)gatt, gatt_size >> PAGE_SHIFT, PAGE_KERNEL_NOCACHE)) 524 + panic("Could not set GART PTEs to uncacheable pages"); 525 + global_flush_tlb(); 526 + 523 527 memset(gatt, 0, gatt_size); 524 528 agp_gatt_table = gatt; 525 529
+1 -1
arch/x86_64/mm/pageattr.c
··· 81 81 void *adr = page_address(pg); 82 82 if (cpu_has_clflush) 83 83 cache_flush_page(adr); 84 - __flush_tlb_one(adr); 85 84 } 85 + __flush_tlb_all(); 86 86 } 87 87 88 88 static inline void flush_map(struct list_head *l)