summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic/apic.c
diff options
context:
space:
mode:
authorYinghai Lu2010-12-07 09:55:17 +0100
committerThomas Gleixner2010-12-09 21:52:04 +0100
commitc0104d38a740b25662c592c71f6907676510289c (patch)
tree35a8ab1ec51b3614e2a42ca5f373075161c9eeeb /arch/x86/kernel/apic/apic.c
parentMerge branch 'x86/platform' into x86/apic-cleanups (diff)
downloadkernel-qcow2-linux-c0104d38a740b25662c592c71f6907676510289c.tar.gz
kernel-qcow2-linux-c0104d38a740b25662c592c71f6907676510289c.tar.xz
kernel-qcow2-linux-c0104d38a740b25662c592c71f6907676510289c.zip
x86, apic: Unify identical register_lapic_address() functions
They are the same, move the common function to apic.c to allow further cleanups. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Suresh Siddha <suresh.b.siddha@intel.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Len Brown <lenb@kernel.org> LKML-Reference: <4CFDF675.4060305@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/apic/apic.c')
-rw-r--r--arch/x86/kernel/apic/apic.c12
1 files changed, 12 insertions, 0 deletions
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)
}
}
+void __init register_lapic_address(unsigned long address)
+{
+ mp_lapic_addr = address;
+
+ set_fixmap_nocache(FIX_APIC_BASE, address);
+ if (boot_cpu_physical_apicid == -1U) {
+ boot_cpu_physical_apicid = read_apic_id();
+ apic_version[boot_cpu_physical_apicid] =
+ GET_APIC_VERSION(apic_read(APIC_LVR));
+ }
+}
+
/*
* This initializes the IO-APIC and APIC hardware if this is
* a UP kernel.