diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/apic.h | 1 | ||||
-rw-r--r-- | include/asm-x86/apicdef.h | 6 | ||||
-rw-r--r-- | include/asm-x86/mach-default/mach_apic.h | 11 | ||||
-rw-r--r-- | include/asm-x86/mach-default/mach_apicdef.h | 5 | ||||
-rw-r--r-- | include/asm-x86/smp_64.h | 9 |
5 files changed, 17 insertions, 15 deletions
diff --git a/include/asm-x86/apic.h b/include/asm-x86/apic.h index db5f7501aed6..424e1dfe13c9 100644 --- a/include/asm-x86/apic.h +++ b/include/asm-x86/apic.h | |||
@@ -128,7 +128,6 @@ extern void enable_NMI_through_LVT0(void); | |||
128 | * On 32bit this is mach-xxx local | 128 | * On 32bit this is mach-xxx local |
129 | */ | 129 | */ |
130 | #ifdef CONFIG_X86_64 | 130 | #ifdef CONFIG_X86_64 |
131 | extern void setup_apic_routing(void); | ||
132 | extern void early_init_lapic_mapping(void); | 131 | extern void early_init_lapic_mapping(void); |
133 | #endif | 132 | #endif |
134 | 133 | ||
diff --git a/include/asm-x86/apicdef.h b/include/asm-x86/apicdef.h index b0c6b285c916..674a2280e21e 100644 --- a/include/asm-x86/apicdef.h +++ b/include/asm-x86/apicdef.h | |||
@@ -12,12 +12,6 @@ | |||
12 | 12 | ||
13 | #define APIC_ID 0x20 | 13 | #define APIC_ID 0x20 |
14 | 14 | ||
15 | #ifdef CONFIG_X86_64 | ||
16 | # define APIC_ID_MASK (0xFFu<<24) | ||
17 | # define GET_APIC_ID(x) (((x)>>24)&0xFFu) | ||
18 | # define SET_APIC_ID(x) (((x)<<24)) | ||
19 | #endif | ||
20 | |||
21 | #define APIC_LVR 0x30 | 15 | #define APIC_LVR 0x30 |
22 | #define APIC_LVR_MASK 0xFF00FF | 16 | #define APIC_LVR_MASK 0xFF00FF |
23 | #define GET_APIC_VERSION(x) ((x)&0xFFu) | 17 | #define GET_APIC_VERSION(x) ((x)&0xFFu) |
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 | { |
diff --git a/include/asm-x86/smp_64.h b/include/asm-x86/smp_64.h index 1b3c0f1de9a9..be870a4881fc 100644 --- a/include/asm-x86/smp_64.h +++ b/include/asm-x86/smp_64.h | |||
@@ -19,14 +19,6 @@ extern cpumask_t cpu_callin_map; | |||
19 | extern int smp_call_function_mask(cpumask_t mask, void (*func)(void *), | 19 | extern int smp_call_function_mask(cpumask_t mask, void (*func)(void *), |
20 | void *info, int wait); | 20 | void *info, int wait); |
21 | 21 | ||
22 | static inline int cpu_present_to_apicid(int mps_cpu) | ||
23 | { | ||
24 | if (cpu_present(mps_cpu)) | ||
25 | return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu); | ||
26 | else | ||
27 | return BAD_APICID; | ||
28 | } | ||
29 | |||
30 | #ifdef CONFIG_SMP | 22 | #ifdef CONFIG_SMP |
31 | 23 | ||
32 | #define raw_smp_processor_id() read_pda(cpunumber) | 24 | #define raw_smp_processor_id() read_pda(cpunumber) |
@@ -64,6 +56,7 @@ static __inline int logical_smp_processor_id(void) | |||
64 | return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR)); | 56 | return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR)); |
65 | } | 57 | } |
66 | 58 | ||
59 | #include <mach_apicdef.h> | ||
67 | static inline int hard_smp_processor_id(void) | 60 | static inline int hard_smp_processor_id(void) |
68 | { | 61 | { |
69 | /* we don't want to mark this access volatile - bad code generation */ | 62 | /* we don't want to mark this access volatile - bad code generation */ |