diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-28 11:55:37 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-29 08:16:42 -0500 |
commit | 1dcdd3d15ecea0c22a09d4d001a39d425fceff2c (patch) | |
tree | 91419ae421b2d1cac6297c9671eac2ff7723d7c2 /arch/x86/kernel/apic.c | |
parent | 7c20dcc545d78946e40e8fab99637fe815b1d211 (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.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c index e6220809ca11..41a0ba34d6b2 100644 --- a/arch/x86/kernel/apic.c +++ b/arch/x86/kernel/apic.c | |||
@@ -49,7 +49,6 @@ | |||
49 | #include <asm/i8259.h> | 49 | #include <asm/i8259.h> |
50 | #include <asm/smp.h> | 50 | #include <asm/smp.h> |
51 | 51 | ||
52 | #include <mach_apic.h> | ||
53 | #include <mach_ipi.h> | 52 | #include <mach_ipi.h> |
54 | 53 | ||
55 | /* | 54 | /* |
@@ -1910,11 +1909,30 @@ void __cpuinit generic_processor_info(int apicid, int version) | |||
1910 | set_cpu_present(cpu, true); | 1909 | set_cpu_present(cpu, true); |
1911 | } | 1910 | } |
1912 | 1911 | ||
1913 | #ifdef CONFIG_X86_64 | ||
1914 | int hard_smp_processor_id(void) | 1912 | int hard_smp_processor_id(void) |
1915 | { | 1913 | { |
1916 | return read_apic_id(); | 1914 | return read_apic_id(); |
1917 | } | 1915 | } |
1916 | |||
1917 | void default_init_apic_ldr(void) | ||
1918 | { | ||
1919 | unsigned long val; | ||
1920 | |||
1921 | apic_write(APIC_DFR, APIC_DFR_VALUE); | ||
1922 | val = apic_read(APIC_LDR) & ~APIC_LDR_MASK; | ||
1923 | val |= SET_APIC_LOGICAL_ID(1UL << smp_processor_id()); | ||
1924 | apic_write(APIC_LDR, val); | ||
1925 | } | ||
1926 | |||
1927 | #ifdef CONFIG_X86_32 | ||
1928 | int default_apicid_to_node(int logical_apicid) | ||
1929 | { | ||
1930 | #ifdef CONFIG_SMP | ||
1931 | return apicid_2_node[hard_smp_processor_id()]; | ||
1932 | #else | ||
1933 | return 0; | ||
1934 | #endif | ||
1935 | } | ||
1918 | #endif | 1936 | #endif |
1919 | 1937 | ||
1920 | /* | 1938 | /* |