diff options
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 21 | ||||
-rw-r--r-- | arch/x86/kernel/mpparse_32.c | 16 | ||||
-rw-r--r-- | arch/x86/kernel/mpparse_64.c | 10 | ||||
-rw-r--r-- | include/asm-x86/mpspec.h | 1 |
4 files changed, 16 insertions, 32 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 9cf575184536..11bd11847b19 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <asm/apic.h> | 39 | #include <asm/apic.h> |
40 | #include <asm/io.h> | 40 | #include <asm/io.h> |
41 | #include <asm/mpspec.h> | 41 | #include <asm/mpspec.h> |
42 | #include <asm/smp.h> | ||
42 | 43 | ||
43 | #ifdef CONFIG_X86_LOCAL_APIC | 44 | #ifdef CONFIG_X86_LOCAL_APIC |
44 | # include <mach_apic.h> | 45 | # include <mach_apic.h> |
@@ -239,6 +240,16 @@ static int __init acpi_parse_madt(struct acpi_table_header *table) | |||
239 | return 0; | 240 | return 0; |
240 | } | 241 | } |
241 | 242 | ||
243 | static void __cpuinit acpi_register_lapic(int id, u8 enabled) | ||
244 | { | ||
245 | if (!enabled) { | ||
246 | ++disabled_cpus; | ||
247 | return; | ||
248 | } | ||
249 | |||
250 | generic_processor_info(id, 0); | ||
251 | } | ||
252 | |||
242 | static int __init | 253 | static int __init |
243 | acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end) | 254 | acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end) |
244 | { | 255 | { |
@@ -258,8 +269,8 @@ acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end) | |||
258 | * to not preallocating memory for all NR_CPUS | 269 | * to not preallocating memory for all NR_CPUS |
259 | * when we use CPU hotplug. | 270 | * when we use CPU hotplug. |
260 | */ | 271 | */ |
261 | mp_register_lapic(processor->id, /* APIC ID */ | 272 | acpi_register_lapic(processor->id, /* APIC ID */ |
262 | processor->lapic_flags & ACPI_MADT_ENABLED); /* Enabled? */ | 273 | processor->lapic_flags & ACPI_MADT_ENABLED); |
263 | 274 | ||
264 | return 0; | 275 | return 0; |
265 | } | 276 | } |
@@ -276,8 +287,8 @@ acpi_parse_sapic(struct acpi_subtable_header *header, const unsigned long end) | |||
276 | 287 | ||
277 | acpi_table_print_madt_entry(header); | 288 | acpi_table_print_madt_entry(header); |
278 | 289 | ||
279 | mp_register_lapic((processor->id << 8) | processor->eid,/* APIC ID */ | 290 | acpi_register_lapic((processor->id << 8) | processor->eid,/* APIC ID */ |
280 | processor->lapic_flags & ACPI_MADT_ENABLED); /* Enabled? */ | 291 | processor->lapic_flags & ACPI_MADT_ENABLED); |
281 | 292 | ||
282 | return 0; | 293 | return 0; |
283 | } | 294 | } |
@@ -554,7 +565,7 @@ static int __cpuinit _acpi_map_lsapic(acpi_handle handle, int *pcpu) | |||
554 | buffer.pointer = NULL; | 565 | buffer.pointer = NULL; |
555 | 566 | ||
556 | tmp_map = cpu_present_map; | 567 | tmp_map = cpu_present_map; |
557 | mp_register_lapic(physid, lapic->lapic_flags & ACPI_MADT_ENABLED); | 568 | acpi_register_lapic(physid, lapic->lapic_flags & ACPI_MADT_ENABLED); |
558 | 569 | ||
559 | /* | 570 | /* |
560 | * If mp_register_lapic successfully generates a new logical cpu | 571 | * If mp_register_lapic successfully generates a new logical cpu |
diff --git a/arch/x86/kernel/mpparse_32.c b/arch/x86/kernel/mpparse_32.c index ed4b3bc0e97a..ebec70a14198 100644 --- a/arch/x86/kernel/mpparse_32.c +++ b/arch/x86/kernel/mpparse_32.c | |||
@@ -797,22 +797,6 @@ void __init mp_register_lapic_address(u64 address) | |||
797 | Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid); | 797 | Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid); |
798 | } | 798 | } |
799 | 799 | ||
800 | void __cpuinit mp_register_lapic (int id, u8 enabled) | ||
801 | { | ||
802 | if (MAX_APICS - id <= 0) { | ||
803 | printk(KERN_WARNING "Processor #%d invalid (max %d)\n", | ||
804 | id, MAX_APICS); | ||
805 | return; | ||
806 | } | ||
807 | |||
808 | if (!enabled) { | ||
809 | ++disabled_cpus; | ||
810 | return; | ||
811 | } | ||
812 | |||
813 | generic_processor_info(id, GET_APIC_VERSION(apic_read(APIC_LVR))); | ||
814 | } | ||
815 | |||
816 | #ifdef CONFIG_X86_IO_APIC | 800 | #ifdef CONFIG_X86_IO_APIC |
817 | 801 | ||
818 | #define MP_ISA_BUS 0 | 802 | #define MP_ISA_BUS 0 |
diff --git a/arch/x86/kernel/mpparse_64.c b/arch/x86/kernel/mpparse_64.c index f860727e9151..03c19a2e6e9e 100644 --- a/arch/x86/kernel/mpparse_64.c +++ b/arch/x86/kernel/mpparse_64.c | |||
@@ -601,16 +601,6 @@ void __init mp_register_lapic_address(u64 address) | |||
601 | if (boot_cpu_physical_apicid == -1U) | 601 | if (boot_cpu_physical_apicid == -1U) |
602 | boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id()); | 602 | boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id()); |
603 | } | 603 | } |
604 | void __cpuinit mp_register_lapic(int id, u8 enabled) | ||
605 | { | ||
606 | if (!enabled) { | ||
607 | ++disabled_cpus; | ||
608 | return; | ||
609 | } | ||
610 | |||
611 | generic_processor_info(id, 0); | ||
612 | } | ||
613 | |||
614 | 604 | ||
615 | #define MP_ISA_BUS 0 | 605 | #define MP_ISA_BUS 0 |
616 | #define MP_MAX_IOAPIC_PIN 127 | 606 | #define MP_MAX_IOAPIC_PIN 127 |
diff --git a/include/asm-x86/mpspec.h b/include/asm-x86/mpspec.h index 08cc5e027958..c614051f4fc9 100644 --- a/include/asm-x86/mpspec.h +++ b/include/asm-x86/mpspec.h | |||
@@ -44,7 +44,6 @@ extern void get_smp_config(void); | |||
44 | 44 | ||
45 | void __cpuinit generic_processor_info(int apicid, int version); | 45 | void __cpuinit generic_processor_info(int apicid, int version); |
46 | #ifdef CONFIG_ACPI | 46 | #ifdef CONFIG_ACPI |
47 | extern void mp_register_lapic(int id, u8 enabled); | ||
48 | extern void mp_register_lapic_address(u64 address); | 47 | extern void mp_register_lapic_address(u64 address); |
49 | extern void mp_register_ioapic(int id, u32 address, u32 gsi_base); | 48 | extern void mp_register_ioapic(int id, u32 address, u32 gsi_base); |
50 | extern void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, | 49 | extern void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, |