summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-28 06:50:47 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-28 23:20:24 +0100
commita21769a4461801454930a06bc18bd8249cd9e993 (patch)
tree8b879f9a6d1c957d17a155ff865a0f7c8a18e257 /arch/x86/include/asm
parent5257c5111ca21c8e857b65a79ab986b313e1c362 (diff)
x86, apic: clean up ->cpu_present_to_apicid()
- separate the namespace - remove macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r--arch/x86/include/asm/bigsmp/apic.h2
-rw-r--r--arch/x86/include/asm/es7000/apic.h2
-rw-r--r--arch/x86/include/asm/genapic.h2
-rw-r--r--arch/x86/include/asm/mach-default/mach_apic.h11
-rw-r--r--arch/x86/include/asm/mach-generic/mach_apic.h1
-rw-r--r--arch/x86/include/asm/numaq/apic.h2
-rw-r--r--arch/x86/include/asm/summit/apic.h2
7 files changed, 16 insertions, 6 deletions
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h
index d0d894ff7d3e..eea5e9788ddd 100644
--- a/arch/x86/include/asm/bigsmp/apic.h
+++ b/arch/x86/include/asm/bigsmp/apic.h
@@ -67,7 +67,7 @@ static inline int bigsmp_apicid_to_node(int logical_apicid)
return apicid_2_node[hard_smp_processor_id()];
}
-static inline int cpu_present_to_apicid(int mps_cpu)
+static inline int bigsmp_cpu_present_to_apicid(int mps_cpu)
{
if (mps_cpu < nr_cpu_ids)
return (int) per_cpu(x86_bios_cpu_apicid, mps_cpu);
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h
index e0cd07e74f98..7cdde3d9c5f6 100644
--- a/arch/x86/include/asm/es7000/apic.h
+++ b/arch/x86/include/asm/es7000/apic.h
@@ -88,7 +88,7 @@ static inline int es7000_apicid_to_node(int logical_apicid)
}
-static inline int cpu_present_to_apicid(int mps_cpu)
+static inline int es7000_cpu_present_to_apicid(int mps_cpu)
{
if (!mps_cpu)
return boot_cpu_physical_apicid;
diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index 38b1202316f5..2cb14d51e459 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -108,6 +108,8 @@ extern struct genapic apic_x2apic_uv_x;
DECLARE_PER_CPU(int, x2apic_extra_bits);
extern void default_setup_apic_routing(void);
+
+extern int default_cpu_present_to_apicid(int mps_cpu);
#endif
#endif /* _ASM_X86_GENAPIC_64_H */
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h
index eae3e4b6ed04..15d5627a9d6f 100644
--- a/arch/x86/include/asm/mach-default/mach_apic.h
+++ b/arch/x86/include/asm/mach-default/mach_apic.h
@@ -110,7 +110,7 @@ static inline int default_cpu_to_logical_apicid(int cpu)
return 1 << cpu;
}
-static inline int cpu_present_to_apicid(int mps_cpu)
+static inline int __default_cpu_present_to_apicid(int mps_cpu)
{
if (mps_cpu < nr_cpu_ids && cpu_present(mps_cpu))
return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu);
@@ -118,6 +118,15 @@ static inline int cpu_present_to_apicid(int mps_cpu)
return BAD_APICID;
}
+#ifdef CONFIG_X86_32
+static inline int default_cpu_present_to_apicid(int mps_cpu)
+{
+ return __default_cpu_present_to_apicid(mps_cpu);
+}
+#else
+extern int default_cpu_present_to_apicid(int mps_cpu);
+#endif
+
static inline physid_mask_t apicid_to_cpu_present(int phys_apicid)
{
return physid_mask_of_physid(phys_apicid);
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h
index 2ea913e8e0d0..332fe93ab41a 100644
--- a/arch/x86/include/asm/mach-generic/mach_apic.h
+++ b/arch/x86/include/asm/mach-generic/mach_apic.h
@@ -3,7 +3,6 @@
#include <asm/genapic.h>
-#define cpu_present_to_apicid (apic->cpu_present_to_apicid)
#define apicid_to_cpu_present (apic->apicid_to_cpu_present)
#define setup_portio_remap (apic->setup_portio_remap)
#define check_phys_apicid_present (apic->check_phys_apicid_present)
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h
index 6989abd34853..f482b0634476 100644
--- a/arch/x86/include/asm/numaq/apic.h
+++ b/arch/x86/include/asm/numaq/apic.h
@@ -69,7 +69,7 @@ static inline int numaq_cpu_to_logical_apicid(int cpu)
* cpu to APIC ID relation to properly interact with the intelligent
* mode of the cluster controller.
*/
-static inline int cpu_present_to_apicid(int mps_cpu)
+static inline int numaq_cpu_present_to_apicid(int mps_cpu)
{
if (mps_cpu < 60)
return ((mps_cpu >> 2) << 4) | (1 << (mps_cpu & 0x3));
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h
index d564d7ee3f6c..fc1273691880 100644
--- a/arch/x86/include/asm/summit/apic.h
+++ b/arch/x86/include/asm/summit/apic.h
@@ -96,7 +96,7 @@ static inline int summit_cpu_to_logical_apicid(int cpu)
#endif
}
-static inline int cpu_present_to_apicid(int mps_cpu)
+static inline int summit_cpu_present_to_apicid(int mps_cpu)
{
if (mps_cpu < nr_cpu_ids)
return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu);