aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/apic.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-28 17:55:37 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-29 14:16:42 +0100
commit1dcdd3d15ecea0c22a09d4d001a39d425fceff2c (patch)
tree91419ae421b2d1cac6297c9671eac2ff7723d7c2 /arch/x86/kernel/apic.c
parent7c20dcc545d78946e40e8fab99637fe815b1d211 (diff)
x86: remove mach_apic.h
Spread mach_apic.h definitions into genapic.h. (with some knock-on effects on smp.h and apic.h.) Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/apic.c')
-rw-r--r--arch/x86/kernel/apic.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
index e6220809ca1..41a0ba34d6b 100644
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -49,7 +49,6 @@
#include <asm/i8259.h>
#include <asm/smp.h>
-#include <mach_apic.h>
#include <mach_ipi.h>
/*
@@ -1910,11 +1909,30 @@ void __cpuinit generic_processor_info(int apicid, int version)
set_cpu_present(cpu, true);
}
-#ifdef CONFIG_X86_64
int hard_smp_processor_id(void)
{
return read_apic_id();
}
+
+void default_init_apic_ldr(void)
+{
+ unsigned long val;
+
+ apic_write(APIC_DFR, APIC_DFR_VALUE);
+ val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
+ val |= SET_APIC_LOGICAL_ID(1UL << smp_processor_id());
+ apic_write(APIC_LDR, val);
+}
+
+#ifdef CONFIG_X86_32
+int default_apicid_to_node(int logical_apicid)
+{
+#ifdef CONFIG_SMP
+ return apicid_2_node[hard_smp_processor_id()];
+#else
+ return 0;
+#endif
+}
#endif
/*