diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 16 | ||||
-rw-r--r-- | arch/x86/kernel/apic/apic.c | 12 | ||||
-rw-r--r-- | arch/x86/kernel/mpparse.c | 14 |
3 files changed, 15 insertions, 27 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 71232b941b6c..b3cf01ab0630 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -847,18 +847,6 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table) | |||
847 | * returns 0 on success, < 0 on error | 847 | * returns 0 on success, < 0 on error |
848 | */ | 848 | */ |
849 | 849 | ||
850 | static void __init acpi_register_lapic_address(unsigned long address) | ||
851 | { | ||
852 | mp_lapic_addr = address; | ||
853 | |||
854 | set_fixmap_nocache(FIX_APIC_BASE, address); | ||
855 | if (boot_cpu_physical_apicid == -1U) { | ||
856 | boot_cpu_physical_apicid = read_apic_id(); | ||
857 | apic_version[boot_cpu_physical_apicid] = | ||
858 | GET_APIC_VERSION(apic_read(APIC_LVR)); | ||
859 | } | ||
860 | } | ||
861 | |||
862 | static int __init early_acpi_parse_madt_lapic_addr_ovr(void) | 850 | static int __init early_acpi_parse_madt_lapic_addr_ovr(void) |
863 | { | 851 | { |
864 | int count; | 852 | int count; |
@@ -880,7 +868,7 @@ static int __init early_acpi_parse_madt_lapic_addr_ovr(void) | |||
880 | return count; | 868 | return count; |
881 | } | 869 | } |
882 | 870 | ||
883 | acpi_register_lapic_address(acpi_lapic_addr); | 871 | register_lapic_address(acpi_lapic_addr); |
884 | 872 | ||
885 | return count; | 873 | return count; |
886 | } | 874 | } |
@@ -907,7 +895,7 @@ static int __init acpi_parse_madt_lapic_entries(void) | |||
907 | return count; | 895 | return count; |
908 | } | 896 | } |
909 | 897 | ||
910 | acpi_register_lapic_address(acpi_lapic_addr); | 898 | register_lapic_address(acpi_lapic_addr); |
911 | 899 | ||
912 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC, | 900 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC, |
913 | acpi_parse_sapic, MAX_APICS); | 901 | acpi_parse_sapic, MAX_APICS); |
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index c48a64510844..c02bf135de9d 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -1702,6 +1702,18 @@ void __init init_apic_mappings(void) | |||
1702 | } | 1702 | } |
1703 | } | 1703 | } |
1704 | 1704 | ||
1705 | void __init register_lapic_address(unsigned long address) | ||
1706 | { | ||
1707 | mp_lapic_addr = address; | ||
1708 | |||
1709 | set_fixmap_nocache(FIX_APIC_BASE, address); | ||
1710 | if (boot_cpu_physical_apicid == -1U) { | ||
1711 | boot_cpu_physical_apicid = read_apic_id(); | ||
1712 | apic_version[boot_cpu_physical_apicid] = | ||
1713 | GET_APIC_VERSION(apic_read(APIC_LVR)); | ||
1714 | } | ||
1715 | } | ||
1716 | |||
1705 | /* | 1717 | /* |
1706 | * This initializes the IO-APIC and APIC hardware if this is | 1718 | * This initializes the IO-APIC and APIC hardware if this is |
1707 | * a UP kernel. | 1719 | * a UP kernel. |
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 9af64d9c4b67..db0b70317949 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
@@ -275,18 +275,6 @@ static void __init smp_dump_mptable(struct mpc_table *mpc, unsigned char *mpt) | |||
275 | 275 | ||
276 | void __init default_smp_read_mpc_oem(struct mpc_table *mpc) { } | 276 | void __init default_smp_read_mpc_oem(struct mpc_table *mpc) { } |
277 | 277 | ||
278 | static void __init smp_register_lapic_address(unsigned long address) | ||
279 | { | ||
280 | mp_lapic_addr = address; | ||
281 | |||
282 | set_fixmap_nocache(FIX_APIC_BASE, address); | ||
283 | if (boot_cpu_physical_apicid == -1U) { | ||
284 | boot_cpu_physical_apicid = read_apic_id(); | ||
285 | apic_version[boot_cpu_physical_apicid] = | ||
286 | GET_APIC_VERSION(apic_read(APIC_LVR)); | ||
287 | } | ||
288 | } | ||
289 | |||
290 | static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early) | 278 | static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early) |
291 | { | 279 | { |
292 | char str[16]; | 280 | char str[16]; |
@@ -310,7 +298,7 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early) | |||
310 | 298 | ||
311 | /* Initialize the lapic mapping */ | 299 | /* Initialize the lapic mapping */ |
312 | if (!acpi_lapic) | 300 | if (!acpi_lapic) |
313 | smp_register_lapic_address(mpc->lapic); | 301 | register_lapic_address(mpc->lapic); |
314 | 302 | ||
315 | if (mpc->oemptr) | 303 | if (mpc->oemptr) |
316 | x86_init.mpparse.smp_read_mpc_oem(mpc); | 304 | x86_init.mpparse.smp_read_mpc_oem(mpc); |