diff options
Diffstat (limited to 'include/asm-x86/mach-default')
-rw-r--r-- | include/asm-x86/mach-default/mach_apic.h | 11 | ||||
-rw-r--r-- | include/asm-x86/mach-default/mach_apicdef.h | 5 |
2 files changed, 16 insertions, 0 deletions
diff --git a/include/asm-x86/mach-default/mach_apic.h b/include/asm-x86/mach-default/mach_apic.h index e3c2c1012c1c..e081bdccde2b 100644 --- a/include/asm-x86/mach-default/mach_apic.h +++ b/include/asm-x86/mach-default/mach_apic.h | |||
@@ -54,21 +54,27 @@ static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map) | |||
54 | return phys_map; | 54 | return phys_map; |
55 | } | 55 | } |
56 | 56 | ||
57 | #ifdef CONFIG_X86_64 | ||
58 | extern void setup_apic_routing(void); | ||
59 | #else | ||
57 | static inline void setup_apic_routing(void) | 60 | static inline void setup_apic_routing(void) |
58 | { | 61 | { |
59 | printk("Enabling APIC mode: %s. Using %d I/O APICs\n", | 62 | printk("Enabling APIC mode: %s. Using %d I/O APICs\n", |
60 | "Flat", nr_ioapics); | 63 | "Flat", nr_ioapics); |
61 | } | 64 | } |
65 | #endif | ||
62 | 66 | ||
63 | static inline int multi_timer_check(int apic, int irq) | 67 | static inline int multi_timer_check(int apic, int irq) |
64 | { | 68 | { |
65 | return 0; | 69 | return 0; |
66 | } | 70 | } |
67 | 71 | ||
72 | #ifdef CONFIG_X86_32 | ||
68 | static inline int apicid_to_node(int logical_apicid) | 73 | static inline int apicid_to_node(int logical_apicid) |
69 | { | 74 | { |
70 | return 0; | 75 | return 0; |
71 | } | 76 | } |
77 | #endif | ||
72 | 78 | ||
73 | /* Mapping from cpu number to logical apicid */ | 79 | /* Mapping from cpu number to logical apicid */ |
74 | static inline int cpu_to_logical_apicid(int cpu) | 80 | static inline int cpu_to_logical_apicid(int cpu) |
@@ -78,8 +84,13 @@ static inline int cpu_to_logical_apicid(int cpu) | |||
78 | 84 | ||
79 | static inline int cpu_present_to_apicid(int mps_cpu) | 85 | static inline int cpu_present_to_apicid(int mps_cpu) |
80 | { | 86 | { |
87 | #ifdef CONFIG_X86_64 | ||
88 | if (cpu_present(mps_cpu)) | ||
89 | return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu); | ||
90 | #else | ||
81 | if (mps_cpu < get_physical_broadcast()) | 91 | if (mps_cpu < get_physical_broadcast()) |
82 | return mps_cpu; | 92 | return mps_cpu; |
93 | #endif | ||
83 | else | 94 | else |
84 | return BAD_APICID; | 95 | return BAD_APICID; |
85 | } | 96 | } |
diff --git a/include/asm-x86/mach-default/mach_apicdef.h b/include/asm-x86/mach-default/mach_apicdef.h index ae9841319094..7b78275e6d33 100644 --- a/include/asm-x86/mach-default/mach_apicdef.h +++ b/include/asm-x86/mach-default/mach_apicdef.h | |||
@@ -3,7 +3,12 @@ | |||
3 | 3 | ||
4 | #include <asm/apic.h> | 4 | #include <asm/apic.h> |
5 | 5 | ||
6 | #ifdef CONFIG_X86_64 | ||
7 | #define APIC_ID_MASK (0xFFu<<24) | ||
8 | #define SET_APIC_ID(x) (((x)<<24)) | ||
9 | #else | ||
6 | #define APIC_ID_MASK (0xF<<24) | 10 | #define APIC_ID_MASK (0xF<<24) |
11 | #endif | ||
7 | 12 | ||
8 | static inline unsigned get_apic_id(unsigned long x) | 13 | static inline unsigned get_apic_id(unsigned long x) |
9 | { | 14 | { |