aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/mach-default/mach_apic.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/mach-default/mach_apic.h')
-rw-r--r--arch/x86/include/asm/mach-default/mach_apic.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h
index 6cb3a467e067..c18896b0508c 100644
--- a/arch/x86/include/asm/mach-default/mach_apic.h
+++ b/arch/x86/include/asm/mach-default/mach_apic.h
@@ -8,12 +8,12 @@
8 8
9#define APIC_DFR_VALUE (APIC_DFR_FLAT) 9#define APIC_DFR_VALUE (APIC_DFR_FLAT)
10 10
11static inline cpumask_t target_cpus(void) 11static inline const cpumask_t *target_cpus(void)
12{ 12{
13#ifdef CONFIG_SMP 13#ifdef CONFIG_SMP
14 return cpu_online_map; 14 return &cpu_online_map;
15#else 15#else
16 return cpumask_of_cpu(0); 16 return &cpumask_of_cpu(0);
17#endif 17#endif
18} 18}
19 19
@@ -61,9 +61,9 @@ static inline int apic_id_registered(void)
61 return physid_isset(read_apic_id(), phys_cpu_present_map); 61 return physid_isset(read_apic_id(), phys_cpu_present_map);
62} 62}
63 63
64static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask) 64static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask)
65{ 65{
66 return cpus_addr(cpumask)[0]; 66 return cpus_addr(*cpumask)[0];
67} 67}
68 68
69static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb) 69static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
@@ -88,7 +88,7 @@ static inline int apicid_to_node(int logical_apicid)
88#endif 88#endif
89} 89}
90 90
91static inline cpumask_t vector_allocation_domain(int cpu) 91static inline void vector_allocation_domain(int cpu, cpumask_t *retmask)
92{ 92{
93 /* Careful. Some cpus do not strictly honor the set of cpus 93 /* Careful. Some cpus do not strictly honor the set of cpus
94 * specified in the interrupt destination when using lowest 94 * specified in the interrupt destination when using lowest
@@ -98,8 +98,7 @@ static inline cpumask_t vector_allocation_domain(int cpu)
98 * deliver interrupts to the wrong hyperthread when only one 98 * deliver interrupts to the wrong hyperthread when only one
99 * hyperthread was specified in the interrupt desitination. 99 * hyperthread was specified in the interrupt desitination.
100 */ 100 */
101 cpumask_t domain = { { [0] = APIC_ALL_CPUS, } }; 101 *retmask = (cpumask_t) { { [0] = APIC_ALL_CPUS } };
102 return domain;
103} 102}
104#endif 103#endif
105 104
@@ -131,7 +130,7 @@ static inline int cpu_to_logical_apicid(int cpu)
131 130
132static inline int cpu_present_to_apicid(int mps_cpu) 131static inline int cpu_present_to_apicid(int mps_cpu)
133{ 132{
134 if (mps_cpu < NR_CPUS && cpu_present(mps_cpu)) 133 if (mps_cpu < nr_cpu_ids && cpu_present(mps_cpu))
135 return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu); 134 return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu);
136 else 135 else
137 return BAD_APICID; 136 return BAD_APICID;