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

Configure Feed

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

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: fix 2.6.27rc1 cannot boot more than 8CPUs
x86: make "apic" an early_param() on 32-bit, NULL check
EFI, x86: fix function prototype
x86, pci-calgary: fix function declaration
x86: work around gcc 3.4.x bug
x86: make "apic" an early_param() on 32-bit
x86, debug: tone down arch/x86/kernel/mpparse.c debugging printk
x86_64: restore the proper NR_IRQS define so larger systems work.
x86: Restore proper vector locking during cpu hotplug
x86: Fix broken VMI in 2.6.27-rc..
x86: fdiv bug detection fix

+89 -49
+9 -5
arch/x86/kernel/apic_32.c
··· 1720 1720 } 1721 1721 early_param("lapic_timer_c2_ok", parse_lapic_timer_c2_ok); 1722 1722 1723 - static int __init apic_set_verbosity(char *str) 1723 + static int __init apic_set_verbosity(char *arg) 1724 1724 { 1725 - if (strcmp("debug", str) == 0) 1725 + if (!arg) 1726 + return -EINVAL; 1727 + 1728 + if (strcmp(arg, "debug") == 0) 1726 1729 apic_verbosity = APIC_DEBUG; 1727 - else if (strcmp("verbose", str) == 0) 1730 + else if (strcmp(arg, "verbose") == 0) 1728 1731 apic_verbosity = APIC_VERBOSE; 1729 - return 1; 1732 + 1733 + return 0; 1730 1734 } 1731 - __setup("apic=", apic_set_verbosity); 1735 + early_param("apic", apic_set_verbosity); 1732 1736 1733 1737 static int __init lapic_insert_resource(void) 1734 1738 {
+5 -1
arch/x86/kernel/cpu/bugs.c
··· 50 50 */ 51 51 static void __init check_fpu(void) 52 52 { 53 + s32 fdiv_bug; 54 + 53 55 if (!boot_cpu_data.hard_math) { 54 56 #ifndef CONFIG_MATH_EMULATION 55 57 printk(KERN_EMERG "No coprocessor found and no math emulation present.\n"); ··· 76 74 "fistpl %0\n\t" 77 75 "fwait\n\t" 78 76 "fninit" 79 - : "=m" (*&boot_cpu_data.fdiv_bug) 77 + : "=m" (*&fdiv_bug) 80 78 : "m" (*&x), "m" (*&y)); 79 + 80 + boot_cpu_data.fdiv_bug = fdiv_bug; 81 81 if (boot_cpu_data.fdiv_bug) 82 82 printk("Hmm, FPU with FDIV bug.\n"); 83 83 }
+1 -5
arch/x86/kernel/io_apic_32.c
··· 57 57 static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; 58 58 59 59 static DEFINE_SPINLOCK(ioapic_lock); 60 - static DEFINE_SPINLOCK(vector_lock); 60 + DEFINE_SPINLOCK(vector_lock); 61 61 62 62 int timer_through_8259 __initdata; 63 63 ··· 1207 1207 spin_unlock_irqrestore(&vector_lock, flags); 1208 1208 1209 1209 return vector; 1210 - } 1211 - 1212 - void setup_vector_irq(int cpu) 1213 - { 1214 1210 } 1215 1211 1216 1212 static struct irq_chip ioapic_chip;
+15 -10
arch/x86/kernel/io_apic_64.c
··· 101 101 static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; 102 102 103 103 static DEFINE_SPINLOCK(ioapic_lock); 104 - DEFINE_SPINLOCK(vector_lock); 104 + static DEFINE_SPINLOCK(vector_lock); 105 105 106 106 /* 107 107 * # of IRQ routing registers ··· 697 697 return irq; 698 698 } 699 699 700 + void lock_vector_lock(void) 701 + { 702 + /* Used to the online set of cpus does not change 703 + * during assign_irq_vector. 704 + */ 705 + spin_lock(&vector_lock); 706 + } 707 + 708 + void unlock_vector_lock(void) 709 + { 710 + spin_unlock(&vector_lock); 711 + } 712 + 700 713 static int __assign_irq_vector(int irq, cpumask_t mask) 701 714 { 702 715 /* ··· 815 802 cpus_clear(cfg->domain); 816 803 } 817 804 818 - static void __setup_vector_irq(int cpu) 805 + void __setup_vector_irq(int cpu) 819 806 { 820 807 /* Initialize vector_irq on a new cpu */ 821 808 /* This function must be called with vector_lock held */ ··· 837 824 per_cpu(vector_irq, cpu)[vector] = -1; 838 825 } 839 826 } 840 - 841 - void setup_vector_irq(int cpu) 842 - { 843 - spin_lock(&vector_lock); 844 - __setup_vector_irq(smp_processor_id()); 845 - spin_unlock(&vector_lock); 846 - } 847 - 848 827 849 828 static struct irq_chip ioapic_chip; 850 829
+6 -5
arch/x86/kernel/mpparse.c
··· 83 83 if (x86_quirks->mpc_oem_bus_info) 84 84 x86_quirks->mpc_oem_bus_info(m, str); 85 85 else 86 - printk(KERN_INFO "Bus #%d is %s\n", m->mpc_busid, str); 86 + apic_printk(APIC_VERBOSE, "Bus #%d is %s\n", m->mpc_busid, str); 87 87 88 88 #if MAX_MP_BUSSES < 256 89 89 if (m->mpc_busid >= MAX_MP_BUSSES) { ··· 154 154 155 155 static void print_MP_intsrc_info(struct mpc_config_intsrc *m) 156 156 { 157 - printk(KERN_CONT "Int: type %d, pol %d, trig %d, bus %02x," 157 + apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x," 158 158 " IRQ %02x, APIC ID %x, APIC INT %02x\n", 159 159 m->mpc_irqtype, m->mpc_irqflag & 3, 160 160 (m->mpc_irqflag >> 2) & 3, m->mpc_srcbus, ··· 163 163 164 164 static void __init print_mp_irq_info(struct mp_config_intsrc *mp_irq) 165 165 { 166 - printk(KERN_CONT "Int: type %d, pol %d, trig %d, bus %02x," 166 + apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x," 167 167 " IRQ %02x, APIC ID %x, APIC INT %02x\n", 168 168 mp_irq->mp_irqtype, mp_irq->mp_irqflag & 3, 169 169 (mp_irq->mp_irqflag >> 2) & 3, mp_irq->mp_srcbus, ··· 235 235 236 236 static void __init MP_lintsrc_info(struct mpc_config_lintsrc *m) 237 237 { 238 - printk(KERN_INFO "Lint: type %d, pol %d, trig %d, bus %02x," 238 + apic_printk(APIC_VERBOSE, "Lint: type %d, pol %d, trig %d, bus %02x," 239 239 " IRQ %02x, APIC ID %x, APIC LINT %02x\n", 240 240 m->mpc_irqtype, m->mpc_irqflag & 3, 241 241 (m->mpc_irqflag >> 2) & 3, m->mpc_srcbusid, ··· 695 695 unsigned int *bp = phys_to_virt(base); 696 696 struct intel_mp_floating *mpf; 697 697 698 - printk(KERN_DEBUG "Scan SMP from %p for %ld bytes.\n", bp, length); 698 + apic_printk(APIC_VERBOSE, "Scan SMP from %p for %ld bytes.\n", 699 + bp, length); 699 700 BUILD_BUG_ON(sizeof(*mpf) != 16); 700 701 701 702 while (length > 0) {
+1 -1
arch/x86/kernel/pci-calgary_64.c
··· 1350 1350 * Function for kdump case. Get the tce tables from first kernel 1351 1351 * by reading the contents of the base adress register of calgary iommu 1352 1352 */ 1353 - static void get_tce_space_from_tar() 1353 + static void get_tce_space_from_tar(void) 1354 1354 { 1355 1355 int bus; 1356 1356 void __iomem *target;
+8 -14
arch/x86/kernel/setup.c
··· 604 604 early_cpu_init(); 605 605 early_ioremap_init(); 606 606 607 + #if defined(CONFIG_VMI) && defined(CONFIG_X86_32) 608 + /* 609 + * Must be before kernel pagetables are setup 610 + * or fixmap area is touched. 611 + */ 612 + vmi_init(); 613 + #endif 614 + 607 615 ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev); 608 616 screen_info = boot_params.screen_info; 609 617 edid_info = boot_params.edid_info; ··· 825 817 kvmclock_init(); 826 818 #endif 827 819 828 - #if defined(CONFIG_VMI) && defined(CONFIG_X86_32) 829 - /* 830 - * Must be after max_low_pfn is determined, and before kernel 831 - * pagetables are setup. 832 - */ 833 - vmi_init(); 834 - #endif 835 - 836 820 paravirt_pagetable_setup_start(swapper_pg_dir); 837 821 paging_init(); 838 822 paravirt_pagetable_setup_done(swapper_pg_dir); ··· 861 861 init_apic_mappings(); 862 862 ioapic_init_mappings(); 863 863 864 - #if defined(CONFIG_SMP) && defined(CONFIG_X86_PC) && defined(CONFIG_X86_32) 865 - if (def_to_bigsmp) 866 - printk(KERN_WARNING "More than 8 CPUs detected and " 867 - "CONFIG_X86_PC cannot handle it.\nUse " 868 - "CONFIG_X86_GENERICARCH or CONFIG_X86_BIGSMP.\n"); 869 - #endif 870 864 kvm_guest_init(); 871 865 872 866 e820_reserve_resources();
+19 -3
arch/x86/kernel/smpboot.c
··· 326 326 * for which cpus receive the IPI. Holding this 327 327 * lock helps us to not include this cpu in a currently in progress 328 328 * smp_call_function(). 329 + * 330 + * We need to hold vector_lock so there the set of online cpus 331 + * does not change while we are assigning vectors to cpus. Holding 332 + * this lock ensures we don't half assign or remove an irq from a cpu. 329 333 */ 330 334 ipi_call_lock_irq(); 331 - #ifdef CONFIG_X86_IO_APIC 332 - setup_vector_irq(smp_processor_id()); 333 - #endif 335 + lock_vector_lock(); 336 + __setup_vector_irq(smp_processor_id()); 334 337 cpu_set(smp_processor_id(), cpu_online_map); 338 + unlock_vector_lock(); 335 339 ipi_call_unlock_irq(); 336 340 per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; 337 341 ··· 994 990 flush_tlb_all(); 995 991 low_mappings = 1; 996 992 993 + #ifdef CONFIG_X86_PC 994 + if (def_to_bigsmp && apicid > 8) { 995 + printk(KERN_WARNING 996 + "More than 8 CPUs detected - skipping them.\n" 997 + "Use CONFIG_X86_GENERICARCH and CONFIG_X86_BIGSMP.\n"); 998 + err = -1; 999 + } else 1000 + err = do_boot_cpu(apicid, cpu); 1001 + #else 997 1002 err = do_boot_cpu(apicid, cpu); 1003 + #endif 998 1004 999 1005 zap_low_mappings(); 1000 1006 low_mappings = 0; ··· 1350 1336 remove_siblinginfo(cpu); 1351 1337 1352 1338 /* It's now safe to remove this processor from the online map */ 1339 + lock_vector_lock(); 1353 1340 remove_cpu_from_maps(cpu); 1341 + unlock_vector_lock(); 1354 1342 fixup_irqs(cpu_online_map); 1355 1343 return 0; 1356 1344 }
+2 -1
arch/x86/kernel/vmi_32.c
··· 37 37 #include <asm/timer.h> 38 38 #include <asm/vmi_time.h> 39 39 #include <asm/kmap_types.h> 40 + #include <asm/setup.h> 40 41 41 42 /* Convenient for calling VMI functions indirectly in the ROM */ 42 43 typedef u32 __attribute__((regparm(1))) (VROMFUNC)(void); ··· 684 683 { 685 684 /* We must establish the lowmem mapping for MMU ops to work */ 686 685 if (vmi_ops.set_linear_mapping) 687 - vmi_ops.set_linear_mapping(0, (void *)__PAGE_OFFSET, max_low_pfn, 0); 686 + vmi_ops.set_linear_mapping(0, (void *)__PAGE_OFFSET, MAXMEM_PFN, 0); 688 687 } 689 688 690 689 /*
+3
arch/x86/mm/pgtable.c
··· 207 207 unsigned long addr; 208 208 int i; 209 209 210 + if (PREALLOCATED_PMDS == 0) /* Work around gcc-3.4.x bug */ 211 + return; 212 + 210 213 pud = pud_offset(pgd, 0); 211 214 212 215 for (addr = i = 0; i < PREALLOCATED_PMDS;
+1 -1
include/asm-x86/efi.h
··· 86 86 efi_call6((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \ 87 87 (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6)) 88 88 89 - extern void *efi_ioremap(unsigned long addr, unsigned long size); 89 + extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size); 90 90 91 91 #endif /* CONFIG_X86_32 */ 92 92
+10 -2
include/asm-x86/hw_irq.h
··· 98 98 #else 99 99 typedef int vector_irq_t[NR_VECTORS]; 100 100 DECLARE_PER_CPU(vector_irq_t, vector_irq); 101 - extern spinlock_t vector_lock; 102 101 #endif 103 - extern void setup_vector_irq(int cpu); 102 + 103 + #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_X86_64) 104 + extern void lock_vector_lock(void); 105 + extern void unlock_vector_lock(void); 106 + extern void __setup_vector_irq(int cpu); 107 + #else 108 + static inline void lock_vector_lock(void) {} 109 + static inline void unlock_vector_lock(void) {} 110 + static inline void __setup_vector_irq(int cpu) {} 111 + #endif 104 112 105 113 #endif /* !ASSEMBLY_ */ 106 114
+9 -1
include/asm-x86/irq_vectors.h
··· 109 109 #define LAST_VM86_IRQ 15 110 110 #define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15) 111 111 112 - #if !defined(CONFIG_X86_VOYAGER) 112 + #ifdef CONFIG_X86_64 113 + # if NR_CPUS < MAX_IO_APICS 114 + # define NR_IRQS (NR_VECTORS + (32 * NR_CPUS)) 115 + # else 116 + # define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS)) 117 + # endif 118 + # define NR_IRQ_VECTORS NR_IRQS 119 + 120 + #elif !defined(CONFIG_X86_VOYAGER) 113 121 114 122 # if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS) 115 123