aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/apic.h
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-03-24 17:16:30 -0400
committerIngo Molnar <mingo@elte.hu>2009-03-24 17:28:38 -0400
commitf56e5034121c4911a155ba907076ab920754626d (patch)
tree1e740d29265516099eb31b813a64ea813d25a298 /arch/x86/include/asm/apic.h
parentfa74c9073370e57fa28e02aff13f4d7b1806505c (diff)
x86: use default_cpu_mask_to_apicid for 64bit
Impact: cleanup Use online_mask directly on 64bit too. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Rusty Russell <rusty@rustcorp.com.au> LKML-Reference: <49C94DAE.9070300@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/apic.h')
-rw-r--r--arch/x86/include/asm/apic.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index 00f5962d82d0..130a9e2b4586 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -489,10 +489,19 @@ static inline int default_apic_id_registered(void)
489 return physid_isset(read_apic_id(), phys_cpu_present_map); 489 return physid_isset(read_apic_id(), phys_cpu_present_map);
490} 490}
491 491
492static inline int default_phys_pkg_id(int cpuid_apic, int index_msb)
493{
494 return cpuid_apic >> index_msb;
495}
496
497extern int default_apicid_to_node(int logical_apicid);
498
499#endif
500
492static inline unsigned int 501static inline unsigned int
493default_cpu_mask_to_apicid(const struct cpumask *cpumask) 502default_cpu_mask_to_apicid(const struct cpumask *cpumask)
494{ 503{
495 return cpumask_bits(cpumask)[0]; 504 return cpumask_bits(cpumask)[0] & APIC_ALL_CPUS;
496} 505}
497 506
498static inline unsigned int 507static inline unsigned int
@@ -506,15 +515,6 @@ default_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
506 return (unsigned int)(mask1 & mask2 & mask3); 515 return (unsigned int)(mask1 & mask2 & mask3);
507} 516}
508 517
509static inline int default_phys_pkg_id(int cpuid_apic, int index_msb)
510{
511 return cpuid_apic >> index_msb;
512}
513
514extern int default_apicid_to_node(int logical_apicid);
515
516#endif
517
518static inline unsigned long default_check_apicid_used(physid_mask_t bitmap, int apicid) 518static inline unsigned long default_check_apicid_used(physid_mask_t bitmap, int apicid)
519{ 519{
520 return physid_isset(apicid, bitmap); 520 return physid_isset(apicid, bitmap);