diff options
Diffstat (limited to 'include/asm-x86/mach-numaq/mach_apic.h')
-rw-r--r-- | include/asm-x86/mach-numaq/mach_apic.h | 39 |
1 files changed, 8 insertions, 31 deletions
diff --git a/include/asm-x86/mach-numaq/mach_apic.h b/include/asm-x86/mach-numaq/mach_apic.h index 75a56e5afbe7..d802465e026a 100644 --- a/include/asm-x86/mach-numaq/mach_apic.h +++ b/include/asm-x86/mach-numaq/mach_apic.h | |||
@@ -20,8 +20,14 @@ static inline cpumask_t target_cpus(void) | |||
20 | #define INT_DELIVERY_MODE dest_LowestPrio | 20 | #define INT_DELIVERY_MODE dest_LowestPrio |
21 | #define INT_DEST_MODE 0 /* physical delivery on LOCAL quad */ | 21 | #define INT_DEST_MODE 0 /* physical delivery on LOCAL quad */ |
22 | 22 | ||
23 | #define check_apicid_used(bitmap, apicid) physid_isset(apicid, bitmap) | 23 | static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) |
24 | #define check_apicid_present(bit) physid_isset(bit, phys_cpu_present_map) | 24 | { |
25 | return physid_isset(apicid, bitmap); | ||
26 | } | ||
27 | static inline unsigned long check_apicid_present(int bit) | ||
28 | { | ||
29 | return physid_isset(bit, phys_cpu_present_map); | ||
30 | } | ||
25 | #define apicid_cluster(apicid) (apicid & 0xF0) | 31 | #define apicid_cluster(apicid) (apicid & 0xF0) |
26 | 32 | ||
27 | static inline int apic_id_registered(void) | 33 | static inline int apic_id_registered(void) |
@@ -77,11 +83,6 @@ static inline int cpu_present_to_apicid(int mps_cpu) | |||
77 | return BAD_APICID; | 83 | return BAD_APICID; |
78 | } | 84 | } |
79 | 85 | ||
80 | static inline int generate_logical_apicid(int quad, int phys_apicid) | ||
81 | { | ||
82 | return (quad << 4) + (phys_apicid ? phys_apicid << 1 : 1); | ||
83 | } | ||
84 | |||
85 | static inline int apicid_to_node(int logical_apicid) | 86 | static inline int apicid_to_node(int logical_apicid) |
86 | { | 87 | { |
87 | return logical_apicid >> 4; | 88 | return logical_apicid >> 4; |
@@ -95,30 +96,6 @@ static inline physid_mask_t apicid_to_cpu_present(int logical_apicid) | |||
95 | return physid_mask_of_physid(cpu + 4*node); | 96 | return physid_mask_of_physid(cpu + 4*node); |
96 | } | 97 | } |
97 | 98 | ||
98 | struct mpc_config_translation { | ||
99 | unsigned char mpc_type; | ||
100 | unsigned char trans_len; | ||
101 | unsigned char trans_type; | ||
102 | unsigned char trans_quad; | ||
103 | unsigned char trans_global; | ||
104 | unsigned char trans_local; | ||
105 | unsigned short trans_reserved; | ||
106 | }; | ||
107 | |||
108 | static inline int mpc_apic_id(struct mpc_config_processor *m, | ||
109 | struct mpc_config_translation *translation_record) | ||
110 | { | ||
111 | int quad = translation_record->trans_quad; | ||
112 | int logical_apicid = generate_logical_apicid(quad, m->mpc_apicid); | ||
113 | |||
114 | printk("Processor #%d %u:%u APIC version %d (quad %d, apic %d)\n", | ||
115 | m->mpc_apicid, | ||
116 | (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8, | ||
117 | (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4, | ||
118 | m->mpc_apicver, quad, logical_apicid); | ||
119 | return logical_apicid; | ||
120 | } | ||
121 | |||
122 | extern void *xquad_portio; | 99 | extern void *xquad_portio; |
123 | 100 | ||
124 | static inline void setup_portio_remap(void) | 101 | static inline void setup_portio_remap(void) |