Commit 8058714a authored by Ingo Molnar's avatar Ingo Molnar

x86, apic: clean up ->apicid_to_cpu_present()

- separate the namespace

 - remove macros
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent a21769a4
......@@ -75,7 +75,7 @@ static inline int bigsmp_cpu_present_to_apicid(int mps_cpu)
return BAD_APICID;
}
static inline physid_mask_t apicid_to_cpu_present(int phys_apicid)
static inline physid_mask_t bigsmp_apicid_to_cpu_present(int phys_apicid)
{
return physid_mask_of_physid(phys_apicid);
}
......
......@@ -98,7 +98,7 @@ static inline int es7000_cpu_present_to_apicid(int mps_cpu)
return BAD_APICID;
}
static inline physid_mask_t apicid_to_cpu_present(int phys_apicid)
static inline physid_mask_t es7000_apicid_to_cpu_present(int phys_apicid)
{
static int id = 0;
physid_mask_t mask;
......
......@@ -127,7 +127,7 @@ static inline int default_cpu_present_to_apicid(int mps_cpu)
extern int default_cpu_present_to_apicid(int mps_cpu);
#endif
static inline physid_mask_t apicid_to_cpu_present(int phys_apicid)
static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid)
{
return physid_mask_of_physid(phys_apicid);
}
......
......@@ -3,7 +3,6 @@
#include <asm/genapic.h>
#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)
#define cpu_mask_to_apicid (apic->cpu_mask_to_apicid)
......
......@@ -82,7 +82,7 @@ static inline int numaq_apicid_to_node(int logical_apicid)
return logical_apicid >> 4;
}
static inline physid_mask_t apicid_to_cpu_present(int logical_apicid)
static inline physid_mask_t numaq_apicid_to_cpu_present(int logical_apicid)
{
int node = numaq_apicid_to_node(logical_apicid);
int cpu = __ffs(logical_apicid & 0xf);
......
......@@ -105,13 +105,13 @@ static inline int summit_cpu_present_to_apicid(int mps_cpu)
}
static inline physid_mask_t
summit_ioapic_phys_id_map(physid_mask_t phys_id_map)
summit_ioapic_phys_id_map(physid_mask_t phys_id_map)
{
/* For clustered we don't have a good way to do this yet - hack */
return physids_promote(0x0F);
}
static inline physid_mask_t apicid_to_cpu_present(int apicid)
static inline physid_mask_t summit_apicid_to_cpu_present(int apicid)
{
return physid_mask_of_physid(0);
}
......
......@@ -2155,7 +2155,7 @@ static void __init setup_ioapic_ids_from_mpc(void)
mp_ioapics[apic_id].apicid = i;
} else {
physid_mask_t tmp;
tmp = apicid_to_cpu_present(mp_ioapics[apic_id].apicid);
tmp = apic->apicid_to_cpu_present(mp_ioapics[apic_id].apicid);
apic_printk(APIC_VERBOSE, "Setting %d in the "
"phys_id_present_map\n",
mp_ioapics[apic_id].apicid);
......@@ -3899,7 +3899,7 @@ int __init io_apic_get_unique_id(int ioapic, int apic_id)
apic_id = i;
}
tmp = apicid_to_cpu_present(apic_id);
tmp = apic->apicid_to_cpu_present(apic_id);
physids_or(apic_id_map, apic_id_map, tmp);
if (reg_00.bits.ID != apic_id) {
......
......@@ -200,7 +200,7 @@ static void __init MP_processor_info(struct mpc_cpu *m)
return;
}
apic_cpus = apicid_to_cpu_present(m->apicid);
apic_cpus = apic->apicid_to_cpu_present(m->apicid);
physids_or(phys_cpu_present_map, phys_cpu_present_map, apic_cpus);
/*
* Validate version
......
......@@ -83,7 +83,7 @@ struct genapic apic_bigsmp = {
.apicid_to_node = bigsmp_apicid_to_node,
.cpu_to_logical_apicid = bigsmp_cpu_to_logical_apicid,
.cpu_present_to_apicid = bigsmp_cpu_present_to_apicid,
.apicid_to_cpu_present = apicid_to_cpu_present,
.apicid_to_cpu_present = bigsmp_apicid_to_cpu_present,
.setup_portio_remap = setup_portio_remap,
.check_phys_apicid_present = check_phys_apicid_present,
.enable_apic_mode = enable_apic_mode,
......
......@@ -64,7 +64,7 @@ struct genapic apic_default = {
.apicid_to_node = default_apicid_to_node,
.cpu_to_logical_apicid = default_cpu_to_logical_apicid,
.cpu_present_to_apicid = default_cpu_present_to_apicid,
.apicid_to_cpu_present = apicid_to_cpu_present,
.apicid_to_cpu_present = default_apicid_to_cpu_present,
.setup_portio_remap = setup_portio_remap,
.check_phys_apicid_present = check_phys_apicid_present,
.enable_apic_mode = enable_apic_mode,
......
......@@ -125,7 +125,7 @@ struct genapic apic_es7000 = {
.apicid_to_node = es7000_apicid_to_node,
.cpu_to_logical_apicid = es7000_cpu_to_logical_apicid,
.cpu_present_to_apicid = es7000_cpu_present_to_apicid,
.apicid_to_cpu_present = apicid_to_cpu_present,
.apicid_to_cpu_present = es7000_apicid_to_cpu_present,
.setup_portio_remap = setup_portio_remap,
.check_phys_apicid_present = check_phys_apicid_present,
.enable_apic_mode = enable_apic_mode,
......
......@@ -70,7 +70,7 @@ struct genapic apic_numaq = {
.apicid_to_node = numaq_apicid_to_node,
.cpu_to_logical_apicid = numaq_cpu_to_logical_apicid,
.cpu_present_to_apicid = numaq_cpu_present_to_apicid,
.apicid_to_cpu_present = apicid_to_cpu_present,
.apicid_to_cpu_present = numaq_apicid_to_cpu_present,
.setup_portio_remap = setup_portio_remap,
.check_phys_apicid_present = check_phys_apicid_present,
.enable_apic_mode = enable_apic_mode,
......
......@@ -63,7 +63,7 @@ struct genapic apic_summit = {
.apicid_to_node = summit_apicid_to_node,
.cpu_to_logical_apicid = summit_cpu_to_logical_apicid,
.cpu_present_to_apicid = summit_cpu_present_to_apicid,
.apicid_to_cpu_present = apicid_to_cpu_present,
.apicid_to_cpu_present = summit_apicid_to_cpu_present,
.setup_portio_remap = setup_portio_remap,
.check_phys_apicid_present = check_phys_apicid_present,
.enable_apic_mode = enable_apic_mode,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment