aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-28 00:50:47 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-28 17:20:24 -0500
commit8058714a41afc4c983acb274b1adf7bd3cfe7f6e (patch)
treecd600b0c20d797a989a3ee46b1a0ed8f50c5277c
parenta21769a4461801454930a06bc18bd8249cd9e993 (diff)
x86, apic: clean up ->apicid_to_cpu_present()
- separate the namespace - remove macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
-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/mach-default/mach_apic.h2
-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.h4
-rw-r--r--arch/x86/kernel/io_apic.c4
-rw-r--r--arch/x86/kernel/visws_quirks.c2
-rw-r--r--arch/x86/mach-generic/bigsmp.c2
-rw-r--r--arch/x86/mach-generic/default.c2
-rw-r--r--arch/x86/mach-generic/es7000.c2
-rw-r--r--arch/x86/mach-generic/numaq.c2
-rw-r--r--arch/x86/mach-generic/summit.c2
13 files changed, 14 insertions, 15 deletions
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h
index eea5e9788ddd..080457450b22 100644
--- a/arch/x86/include/asm/bigsmp/apic.h
+++ b/arch/x86/include/asm/bigsmp/apic.h
@@ -75,7 +75,7 @@ static inline int bigsmp_cpu_present_to_apicid(int mps_cpu)
75 return BAD_APICID; 75 return BAD_APICID;
76} 76}
77 77
78static inline physid_mask_t apicid_to_cpu_present(int phys_apicid) 78static inline physid_mask_t bigsmp_apicid_to_cpu_present(int phys_apicid)
79{ 79{
80 return physid_mask_of_physid(phys_apicid); 80 return physid_mask_of_physid(phys_apicid);
81} 81}
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h
index 7cdde3d9c5f6..a09e1133ced9 100644
--- a/arch/x86/include/asm/es7000/apic.h
+++ b/arch/x86/include/asm/es7000/apic.h
@@ -98,7 +98,7 @@ static inline int es7000_cpu_present_to_apicid(int mps_cpu)
98 return BAD_APICID; 98 return BAD_APICID;
99} 99}
100 100
101static inline physid_mask_t apicid_to_cpu_present(int phys_apicid) 101static inline physid_mask_t es7000_apicid_to_cpu_present(int phys_apicid)
102{ 102{
103 static int id = 0; 103 static int id = 0;
104 physid_mask_t mask; 104 physid_mask_t mask;
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h
index 15d5627a9d6f..22683e5b82be 100644
--- a/arch/x86/include/asm/mach-default/mach_apic.h
+++ b/arch/x86/include/asm/mach-default/mach_apic.h
@@ -127,7 +127,7 @@ static inline int default_cpu_present_to_apicid(int mps_cpu)
127extern int default_cpu_present_to_apicid(int mps_cpu); 127extern int default_cpu_present_to_apicid(int mps_cpu);
128#endif 128#endif
129 129
130static inline physid_mask_t apicid_to_cpu_present(int phys_apicid) 130static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid)
131{ 131{
132 return physid_mask_of_physid(phys_apicid); 132 return physid_mask_of_physid(phys_apicid);
133} 133}
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h
index 332fe93ab41a..997618f2eb5c 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 @@
3 3
4#include <asm/genapic.h> 4#include <asm/genapic.h>
5 5
6#define apicid_to_cpu_present (apic->apicid_to_cpu_present)
7#define setup_portio_remap (apic->setup_portio_remap) 6#define setup_portio_remap (apic->setup_portio_remap)
8#define check_phys_apicid_present (apic->check_phys_apicid_present) 7#define check_phys_apicid_present (apic->check_phys_apicid_present)
9#define cpu_mask_to_apicid (apic->cpu_mask_to_apicid) 8#define cpu_mask_to_apicid (apic->cpu_mask_to_apicid)
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h
index f482b0634476..8ac000f99285 100644
--- a/arch/x86/include/asm/numaq/apic.h
+++ b/arch/x86/include/asm/numaq/apic.h
@@ -82,7 +82,7 @@ static inline int numaq_apicid_to_node(int logical_apicid)
82 return logical_apicid >> 4; 82 return logical_apicid >> 4;
83} 83}
84 84
85static inline physid_mask_t apicid_to_cpu_present(int logical_apicid) 85static inline physid_mask_t numaq_apicid_to_cpu_present(int logical_apicid)
86{ 86{
87 int node = numaq_apicid_to_node(logical_apicid); 87 int node = numaq_apicid_to_node(logical_apicid);
88 int cpu = __ffs(logical_apicid & 0xf); 88 int cpu = __ffs(logical_apicid & 0xf);
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h
index fc1273691880..79c1a45f886b 100644
--- a/arch/x86/include/asm/summit/apic.h
+++ b/arch/x86/include/asm/summit/apic.h
@@ -105,13 +105,13 @@ static inline int summit_cpu_present_to_apicid(int mps_cpu)
105} 105}
106 106
107static inline physid_mask_t 107static inline physid_mask_t
108 summit_ioapic_phys_id_map(physid_mask_t phys_id_map) 108summit_ioapic_phys_id_map(physid_mask_t phys_id_map)
109{ 109{
110 /* For clustered we don't have a good way to do this yet - hack */ 110 /* For clustered we don't have a good way to do this yet - hack */
111 return physids_promote(0x0F); 111 return physids_promote(0x0F);
112} 112}
113 113
114static inline physid_mask_t apicid_to_cpu_present(int apicid) 114static inline physid_mask_t summit_apicid_to_cpu_present(int apicid)
115{ 115{
116 return physid_mask_of_physid(0); 116 return physid_mask_of_physid(0);
117} 117}
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 282ea112f3cf..3d85d3d810b2 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -2155,7 +2155,7 @@ static void __init setup_ioapic_ids_from_mpc(void)
2155 mp_ioapics[apic_id].apicid = i; 2155 mp_ioapics[apic_id].apicid = i;
2156 } else { 2156 } else {
2157 physid_mask_t tmp; 2157 physid_mask_t tmp;
2158 tmp = apicid_to_cpu_present(mp_ioapics[apic_id].apicid); 2158 tmp = apic->apicid_to_cpu_present(mp_ioapics[apic_id].apicid);
2159 apic_printk(APIC_VERBOSE, "Setting %d in the " 2159 apic_printk(APIC_VERBOSE, "Setting %d in the "
2160 "phys_id_present_map\n", 2160 "phys_id_present_map\n",
2161 mp_ioapics[apic_id].apicid); 2161 mp_ioapics[apic_id].apicid);
@@ -3899,7 +3899,7 @@ int __init io_apic_get_unique_id(int ioapic, int apic_id)
3899 apic_id = i; 3899 apic_id = i;
3900 } 3900 }
3901 3901
3902 tmp = apicid_to_cpu_present(apic_id); 3902 tmp = apic->apicid_to_cpu_present(apic_id);
3903 physids_or(apic_id_map, apic_id_map, tmp); 3903 physids_or(apic_id_map, apic_id_map, tmp);
3904 3904
3905 if (reg_00.bits.ID != apic_id) { 3905 if (reg_00.bits.ID != apic_id) {
diff --git a/arch/x86/kernel/visws_quirks.c b/arch/x86/kernel/visws_quirks.c
index d801d06af068..2ed5bdf15c9f 100644
--- a/arch/x86/kernel/visws_quirks.c
+++ b/arch/x86/kernel/visws_quirks.c
@@ -200,7 +200,7 @@ static void __init MP_processor_info(struct mpc_cpu *m)
200 return; 200 return;
201 } 201 }
202 202
203 apic_cpus = apicid_to_cpu_present(m->apicid); 203 apic_cpus = apic->apicid_to_cpu_present(m->apicid);
204 physids_or(phys_cpu_present_map, phys_cpu_present_map, apic_cpus); 204 physids_or(phys_cpu_present_map, phys_cpu_present_map, apic_cpus);
205 /* 205 /*
206 * Validate version 206 * Validate version
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c
index 1eaf18c801d8..613965230744 100644
--- a/arch/x86/mach-generic/bigsmp.c
+++ b/arch/x86/mach-generic/bigsmp.c
@@ -83,7 +83,7 @@ struct genapic apic_bigsmp = {
83 .apicid_to_node = bigsmp_apicid_to_node, 83 .apicid_to_node = bigsmp_apicid_to_node,
84 .cpu_to_logical_apicid = bigsmp_cpu_to_logical_apicid, 84 .cpu_to_logical_apicid = bigsmp_cpu_to_logical_apicid,
85 .cpu_present_to_apicid = bigsmp_cpu_present_to_apicid, 85 .cpu_present_to_apicid = bigsmp_cpu_present_to_apicid,
86 .apicid_to_cpu_present = apicid_to_cpu_present, 86 .apicid_to_cpu_present = bigsmp_apicid_to_cpu_present,
87 .setup_portio_remap = setup_portio_remap, 87 .setup_portio_remap = setup_portio_remap,
88 .check_phys_apicid_present = check_phys_apicid_present, 88 .check_phys_apicid_present = check_phys_apicid_present,
89 .enable_apic_mode = enable_apic_mode, 89 .enable_apic_mode = enable_apic_mode,
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c
index 2903657f4209..8fc704a3db7c 100644
--- a/arch/x86/mach-generic/default.c
+++ b/arch/x86/mach-generic/default.c
@@ -64,7 +64,7 @@ struct genapic apic_default = {
64 .apicid_to_node = default_apicid_to_node, 64 .apicid_to_node = default_apicid_to_node,
65 .cpu_to_logical_apicid = default_cpu_to_logical_apicid, 65 .cpu_to_logical_apicid = default_cpu_to_logical_apicid,
66 .cpu_present_to_apicid = default_cpu_present_to_apicid, 66 .cpu_present_to_apicid = default_cpu_present_to_apicid,
67 .apicid_to_cpu_present = apicid_to_cpu_present, 67 .apicid_to_cpu_present = default_apicid_to_cpu_present,
68 .setup_portio_remap = setup_portio_remap, 68 .setup_portio_remap = setup_portio_remap,
69 .check_phys_apicid_present = check_phys_apicid_present, 69 .check_phys_apicid_present = check_phys_apicid_present,
70 .enable_apic_mode = enable_apic_mode, 70 .enable_apic_mode = enable_apic_mode,
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c
index 5a3a8ab4f8a0..1e0e16274557 100644
--- a/arch/x86/mach-generic/es7000.c
+++ b/arch/x86/mach-generic/es7000.c
@@ -125,7 +125,7 @@ struct genapic apic_es7000 = {
125 .apicid_to_node = es7000_apicid_to_node, 125 .apicid_to_node = es7000_apicid_to_node,
126 .cpu_to_logical_apicid = es7000_cpu_to_logical_apicid, 126 .cpu_to_logical_apicid = es7000_cpu_to_logical_apicid,
127 .cpu_present_to_apicid = es7000_cpu_present_to_apicid, 127 .cpu_present_to_apicid = es7000_cpu_present_to_apicid,
128 .apicid_to_cpu_present = apicid_to_cpu_present, 128 .apicid_to_cpu_present = es7000_apicid_to_cpu_present,
129 .setup_portio_remap = setup_portio_remap, 129 .setup_portio_remap = setup_portio_remap,
130 .check_phys_apicid_present = check_phys_apicid_present, 130 .check_phys_apicid_present = check_phys_apicid_present,
131 .enable_apic_mode = enable_apic_mode, 131 .enable_apic_mode = enable_apic_mode,
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c
index d928cae211cc..839b86b765a1 100644
--- a/arch/x86/mach-generic/numaq.c
+++ b/arch/x86/mach-generic/numaq.c
@@ -70,7 +70,7 @@ struct genapic apic_numaq = {
70 .apicid_to_node = numaq_apicid_to_node, 70 .apicid_to_node = numaq_apicid_to_node,
71 .cpu_to_logical_apicid = numaq_cpu_to_logical_apicid, 71 .cpu_to_logical_apicid = numaq_cpu_to_logical_apicid,
72 .cpu_present_to_apicid = numaq_cpu_present_to_apicid, 72 .cpu_present_to_apicid = numaq_cpu_present_to_apicid,
73 .apicid_to_cpu_present = apicid_to_cpu_present, 73 .apicid_to_cpu_present = numaq_apicid_to_cpu_present,
74 .setup_portio_remap = setup_portio_remap, 74 .setup_portio_remap = setup_portio_remap,
75 .check_phys_apicid_present = check_phys_apicid_present, 75 .check_phys_apicid_present = check_phys_apicid_present,
76 .enable_apic_mode = enable_apic_mode, 76 .enable_apic_mode = enable_apic_mode,
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c
index e6bb34ee580b..b6e37607a523 100644
--- a/arch/x86/mach-generic/summit.c
+++ b/arch/x86/mach-generic/summit.c
@@ -63,7 +63,7 @@ struct genapic apic_summit = {
63 .apicid_to_node = summit_apicid_to_node, 63 .apicid_to_node = summit_apicid_to_node,
64 .cpu_to_logical_apicid = summit_cpu_to_logical_apicid, 64 .cpu_to_logical_apicid = summit_cpu_to_logical_apicid,
65 .cpu_present_to_apicid = summit_cpu_present_to_apicid, 65 .cpu_present_to_apicid = summit_cpu_present_to_apicid,
66 .apicid_to_cpu_present = apicid_to_cpu_present, 66 .apicid_to_cpu_present = summit_apicid_to_cpu_present,
67 .setup_portio_remap = setup_portio_remap, 67 .setup_portio_remap = setup_portio_remap,
68 .check_phys_apicid_present = check_phys_apicid_present, 68 .check_phys_apicid_present = check_phys_apicid_present,
69 .enable_apic_mode = enable_apic_mode, 69 .enable_apic_mode = enable_apic_mode,