diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/apic_32.c | 14 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/bugs.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/io_apic_32.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/io_apic_64.c | 25 | ||||
-rw-r--r-- | arch/x86/kernel/mpparse.c | 11 | ||||
-rw-r--r-- | arch/x86/kernel/pci-calgary_64.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 22 | ||||
-rw-r--r-- | arch/x86/kernel/smpboot.c | 22 | ||||
-rw-r--r-- | arch/x86/kernel/vmi_32.c | 3 |
9 files changed, 66 insertions, 45 deletions
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c index d6c898358371..039a8d4aaf62 100644 --- a/arch/x86/kernel/apic_32.c +++ b/arch/x86/kernel/apic_32.c | |||
@@ -1720,15 +1720,19 @@ static int __init parse_lapic_timer_c2_ok(char *arg) | |||
1720 | } | 1720 | } |
1721 | early_param("lapic_timer_c2_ok", parse_lapic_timer_c2_ok); | 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 | apic_verbosity = APIC_DEBUG; | 1729 | apic_verbosity = APIC_DEBUG; |
1727 | else if (strcmp("verbose", str) == 0) | 1730 | else if (strcmp(arg, "verbose") == 0) |
1728 | apic_verbosity = APIC_VERBOSE; | 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 | static int __init lapic_insert_resource(void) | 1737 | static int __init lapic_insert_resource(void) |
1734 | { | 1738 | { |
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index c9b58a806e85..c8e315f1aa83 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c | |||
@@ -50,6 +50,8 @@ static double __initdata y = 3145727.0; | |||
50 | */ | 50 | */ |
51 | static void __init check_fpu(void) | 51 | static void __init check_fpu(void) |
52 | { | 52 | { |
53 | s32 fdiv_bug; | ||
54 | |||
53 | if (!boot_cpu_data.hard_math) { | 55 | if (!boot_cpu_data.hard_math) { |
54 | #ifndef CONFIG_MATH_EMULATION | 56 | #ifndef CONFIG_MATH_EMULATION |
55 | printk(KERN_EMERG "No coprocessor found and no math emulation present.\n"); | 57 | printk(KERN_EMERG "No coprocessor found and no math emulation present.\n"); |
@@ -74,8 +76,10 @@ static void __init check_fpu(void) | |||
74 | "fistpl %0\n\t" | 76 | "fistpl %0\n\t" |
75 | "fwait\n\t" | 77 | "fwait\n\t" |
76 | "fninit" | 78 | "fninit" |
77 | : "=m" (*&boot_cpu_data.fdiv_bug) | 79 | : "=m" (*&fdiv_bug) |
78 | : "m" (*&x), "m" (*&y)); | 80 | : "m" (*&x), "m" (*&y)); |
81 | |||
82 | boot_cpu_data.fdiv_bug = fdiv_bug; | ||
79 | if (boot_cpu_data.fdiv_bug) | 83 | if (boot_cpu_data.fdiv_bug) |
80 | printk("Hmm, FPU with FDIV bug.\n"); | 84 | printk("Hmm, FPU with FDIV bug.\n"); |
81 | } | 85 | } |
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index de9aa0e3a9c5..09cddb57bec4 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c | |||
@@ -57,7 +57,7 @@ atomic_t irq_mis_count; | |||
57 | static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; | 57 | static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; |
58 | 58 | ||
59 | static DEFINE_SPINLOCK(ioapic_lock); | 59 | static DEFINE_SPINLOCK(ioapic_lock); |
60 | static DEFINE_SPINLOCK(vector_lock); | 60 | DEFINE_SPINLOCK(vector_lock); |
61 | 61 | ||
62 | int timer_through_8259 __initdata; | 62 | int timer_through_8259 __initdata; |
63 | 63 | ||
@@ -1209,10 +1209,6 @@ static int assign_irq_vector(int irq) | |||
1209 | return vector; | 1209 | return vector; |
1210 | } | 1210 | } |
1211 | 1211 | ||
1212 | void setup_vector_irq(int cpu) | ||
1213 | { | ||
1214 | } | ||
1215 | |||
1216 | static struct irq_chip ioapic_chip; | 1212 | static struct irq_chip ioapic_chip; |
1217 | 1213 | ||
1218 | #define IOAPIC_AUTO -1 | 1214 | #define IOAPIC_AUTO -1 |
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c index 8269434d1707..61a83b70c18f 100644 --- a/arch/x86/kernel/io_apic_64.c +++ b/arch/x86/kernel/io_apic_64.c | |||
@@ -101,7 +101,7 @@ int timer_through_8259 __initdata; | |||
101 | static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; | 101 | static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; |
102 | 102 | ||
103 | static DEFINE_SPINLOCK(ioapic_lock); | 103 | static DEFINE_SPINLOCK(ioapic_lock); |
104 | DEFINE_SPINLOCK(vector_lock); | 104 | static DEFINE_SPINLOCK(vector_lock); |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * # of IRQ routing registers | 107 | * # of IRQ routing registers |
@@ -697,6 +697,19 @@ static int pin_2_irq(int idx, int apic, int pin) | |||
697 | return irq; | 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 | static int __assign_irq_vector(int irq, cpumask_t mask) | 713 | static int __assign_irq_vector(int irq, cpumask_t mask) |
701 | { | 714 | { |
702 | /* | 715 | /* |
@@ -802,7 +815,7 @@ static void __clear_irq_vector(int irq) | |||
802 | cpus_clear(cfg->domain); | 815 | cpus_clear(cfg->domain); |
803 | } | 816 | } |
804 | 817 | ||
805 | static void __setup_vector_irq(int cpu) | 818 | void __setup_vector_irq(int cpu) |
806 | { | 819 | { |
807 | /* Initialize vector_irq on a new cpu */ | 820 | /* Initialize vector_irq on a new cpu */ |
808 | /* This function must be called with vector_lock held */ | 821 | /* This function must be called with vector_lock held */ |
@@ -825,14 +838,6 @@ static void __setup_vector_irq(int cpu) | |||
825 | } | 838 | } |
826 | } | 839 | } |
827 | 840 | ||
828 | void setup_vector_irq(int cpu) | ||
829 | { | ||
830 | spin_lock(&vector_lock); | ||
831 | __setup_vector_irq(smp_processor_id()); | ||
832 | spin_unlock(&vector_lock); | ||
833 | } | ||
834 | |||
835 | |||
836 | static struct irq_chip ioapic_chip; | 841 | static struct irq_chip ioapic_chip; |
837 | 842 | ||
838 | static void ioapic_register_intr(int irq, unsigned long trigger) | 843 | static void ioapic_register_intr(int irq, unsigned long trigger) |
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 6ae005ccaed8..678090508a62 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
@@ -83,7 +83,7 @@ static void __init MP_bus_info(struct mpc_config_bus *m) | |||
83 | if (x86_quirks->mpc_oem_bus_info) | 83 | if (x86_quirks->mpc_oem_bus_info) |
84 | x86_quirks->mpc_oem_bus_info(m, str); | 84 | x86_quirks->mpc_oem_bus_info(m, str); |
85 | else | 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 | #if MAX_MP_BUSSES < 256 | 88 | #if MAX_MP_BUSSES < 256 |
89 | if (m->mpc_busid >= MAX_MP_BUSSES) { | 89 | if (m->mpc_busid >= MAX_MP_BUSSES) { |
@@ -154,7 +154,7 @@ static void __init MP_ioapic_info(struct mpc_config_ioapic *m) | |||
154 | 154 | ||
155 | static void print_MP_intsrc_info(struct mpc_config_intsrc *m) | 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 | " IRQ %02x, APIC ID %x, APIC INT %02x\n", | 158 | " IRQ %02x, APIC ID %x, APIC INT %02x\n", |
159 | m->mpc_irqtype, m->mpc_irqflag & 3, | 159 | m->mpc_irqtype, m->mpc_irqflag & 3, |
160 | (m->mpc_irqflag >> 2) & 3, m->mpc_srcbus, | 160 | (m->mpc_irqflag >> 2) & 3, m->mpc_srcbus, |
@@ -163,7 +163,7 @@ static void print_MP_intsrc_info(struct mpc_config_intsrc *m) | |||
163 | 163 | ||
164 | static void __init print_mp_irq_info(struct mp_config_intsrc *mp_irq) | 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 | " IRQ %02x, APIC ID %x, APIC INT %02x\n", | 167 | " IRQ %02x, APIC ID %x, APIC INT %02x\n", |
168 | mp_irq->mp_irqtype, mp_irq->mp_irqflag & 3, | 168 | mp_irq->mp_irqtype, mp_irq->mp_irqflag & 3, |
169 | (mp_irq->mp_irqflag >> 2) & 3, mp_irq->mp_srcbus, | 169 | (mp_irq->mp_irqflag >> 2) & 3, mp_irq->mp_srcbus, |
@@ -235,7 +235,7 @@ static void __init MP_intsrc_info(struct mpc_config_intsrc *m) | |||
235 | 235 | ||
236 | static void __init MP_lintsrc_info(struct mpc_config_lintsrc *m) | 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 | " IRQ %02x, APIC ID %x, APIC LINT %02x\n", | 239 | " IRQ %02x, APIC ID %x, APIC LINT %02x\n", |
240 | m->mpc_irqtype, m->mpc_irqflag & 3, | 240 | m->mpc_irqtype, m->mpc_irqflag & 3, |
241 | (m->mpc_irqflag >> 2) & 3, m->mpc_srcbusid, | 241 | (m->mpc_irqflag >> 2) & 3, m->mpc_srcbusid, |
@@ -695,7 +695,8 @@ static int __init smp_scan_config(unsigned long base, unsigned long length, | |||
695 | unsigned int *bp = phys_to_virt(base); | 695 | unsigned int *bp = phys_to_virt(base); |
696 | struct intel_mp_floating *mpf; | 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 | BUILD_BUG_ON(sizeof(*mpf) != 16); | 700 | BUILD_BUG_ON(sizeof(*mpf) != 16); |
700 | 701 | ||
701 | while (length > 0) { | 702 | while (length > 0) { |
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c index b67a4b1d4eae..02d19328525d 100644 --- a/arch/x86/kernel/pci-calgary_64.c +++ b/arch/x86/kernel/pci-calgary_64.c | |||
@@ -1350,7 +1350,7 @@ static void calgary_init_bitmap_from_tce_table(struct iommu_table *tbl) | |||
1350 | * Function for kdump case. Get the tce tables from first kernel | 1350 | * Function for kdump case. Get the tce tables from first kernel |
1351 | * by reading the contents of the base adress register of calgary iommu | 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 | int bus; | 1355 | int bus; |
1356 | void __iomem *target; | 1356 | void __iomem *target; |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 2d888586385d..68b48e3fbcbd 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -604,6 +604,14 @@ void __init setup_arch(char **cmdline_p) | |||
604 | early_cpu_init(); | 604 | early_cpu_init(); |
605 | early_ioremap_init(); | 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 | ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev); | 615 | ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev); |
608 | screen_info = boot_params.screen_info; | 616 | screen_info = boot_params.screen_info; |
609 | edid_info = boot_params.edid_info; | 617 | edid_info = boot_params.edid_info; |
@@ -817,14 +825,6 @@ void __init setup_arch(char **cmdline_p) | |||
817 | kvmclock_init(); | 825 | kvmclock_init(); |
818 | #endif | 826 | #endif |
819 | 827 | ||
820 | #if defined(CONFIG_VMI) && defined(CONFIG_X86_32) | ||
821 | /* | ||
822 | * Must be after max_low_pfn is determined, and before kernel | ||
823 | * pagetables are setup. | ||
824 | */ | ||
825 | vmi_init(); | ||
826 | #endif | ||
827 | |||
828 | paravirt_pagetable_setup_start(swapper_pg_dir); | 828 | paravirt_pagetable_setup_start(swapper_pg_dir); |
829 | paging_init(); | 829 | paging_init(); |
830 | paravirt_pagetable_setup_done(swapper_pg_dir); | 830 | paravirt_pagetable_setup_done(swapper_pg_dir); |
@@ -861,12 +861,6 @@ void __init setup_arch(char **cmdline_p) | |||
861 | init_apic_mappings(); | 861 | init_apic_mappings(); |
862 | ioapic_init_mappings(); | 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 | kvm_guest_init(); | 864 | kvm_guest_init(); |
871 | 865 | ||
872 | e820_reserve_resources(); | 866 | e820_reserve_resources(); |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 332512767f4f..91055d7fc1b0 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -326,12 +326,16 @@ static void __cpuinit start_secondary(void *unused) | |||
326 | * for which cpus receive the IPI. Holding this | 326 | * for which cpus receive the IPI. Holding this |
327 | * lock helps us to not include this cpu in a currently in progress | 327 | * lock helps us to not include this cpu in a currently in progress |
328 | * smp_call_function(). | 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 | ipi_call_lock_irq(); | 334 | ipi_call_lock_irq(); |
331 | #ifdef CONFIG_X86_IO_APIC | 335 | lock_vector_lock(); |
332 | setup_vector_irq(smp_processor_id()); | 336 | __setup_vector_irq(smp_processor_id()); |
333 | #endif | ||
334 | cpu_set(smp_processor_id(), cpu_online_map); | 337 | cpu_set(smp_processor_id(), cpu_online_map); |
338 | unlock_vector_lock(); | ||
335 | ipi_call_unlock_irq(); | 339 | ipi_call_unlock_irq(); |
336 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; | 340 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; |
337 | 341 | ||
@@ -990,7 +994,17 @@ int __cpuinit native_cpu_up(unsigned int cpu) | |||
990 | flush_tlb_all(); | 994 | flush_tlb_all(); |
991 | low_mappings = 1; | 995 | low_mappings = 1; |
992 | 996 | ||
997 | #ifdef CONFIG_X86_PC | ||
998 | if (def_to_bigsmp && apicid > 8) { | ||
999 | printk(KERN_WARNING | ||
1000 | "More than 8 CPUs detected - skipping them.\n" | ||
1001 | "Use CONFIG_X86_GENERICARCH and CONFIG_X86_BIGSMP.\n"); | ||
1002 | err = -1; | ||
1003 | } else | ||
1004 | err = do_boot_cpu(apicid, cpu); | ||
1005 | #else | ||
993 | err = do_boot_cpu(apicid, cpu); | 1006 | err = do_boot_cpu(apicid, cpu); |
1007 | #endif | ||
994 | 1008 | ||
995 | zap_low_mappings(); | 1009 | zap_low_mappings(); |
996 | low_mappings = 0; | 1010 | low_mappings = 0; |
@@ -1336,7 +1350,9 @@ int __cpu_disable(void) | |||
1336 | remove_siblinginfo(cpu); | 1350 | remove_siblinginfo(cpu); |
1337 | 1351 | ||
1338 | /* It's now safe to remove this processor from the online map */ | 1352 | /* It's now safe to remove this processor from the online map */ |
1353 | lock_vector_lock(); | ||
1339 | remove_cpu_from_maps(cpu); | 1354 | remove_cpu_from_maps(cpu); |
1355 | unlock_vector_lock(); | ||
1340 | fixup_irqs(cpu_online_map); | 1356 | fixup_irqs(cpu_online_map); |
1341 | return 0; | 1357 | return 0; |
1342 | } | 1358 | } |
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c index 0a1b1a9d922d..6ca515d6db54 100644 --- a/arch/x86/kernel/vmi_32.c +++ b/arch/x86/kernel/vmi_32.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <asm/timer.h> | 37 | #include <asm/timer.h> |
38 | #include <asm/vmi_time.h> | 38 | #include <asm/vmi_time.h> |
39 | #include <asm/kmap_types.h> | 39 | #include <asm/kmap_types.h> |
40 | #include <asm/setup.h> | ||
40 | 41 | ||
41 | /* Convenient for calling VMI functions indirectly in the ROM */ | 42 | /* Convenient for calling VMI functions indirectly in the ROM */ |
42 | typedef u32 __attribute__((regparm(1))) (VROMFUNC)(void); | 43 | typedef u32 __attribute__((regparm(1))) (VROMFUNC)(void); |
@@ -683,7 +684,7 @@ void vmi_bringup(void) | |||
683 | { | 684 | { |
684 | /* We must establish the lowmem mapping for MMU ops to work */ | 685 | /* We must establish the lowmem mapping for MMU ops to work */ |
685 | if (vmi_ops.set_linear_mapping) | 686 | if (vmi_ops.set_linear_mapping) |
686 | vmi_ops.set_linear_mapping(0, (void *)__PAGE_OFFSET, max_low_pfn, 0); | 687 | vmi_ops.set_linear_mapping(0, (void *)__PAGE_OFFSET, MAXMEM_PFN, 0); |
687 | } | 688 | } |
688 | 689 | ||
689 | /* | 690 | /* |