extern u8 cpu_2_logical_apicid[];
/* Mapping from cpu number to logical apicid */
-static inline int cpu_to_logical_apicid(int cpu)
+static inline int bigsmp_cpu_to_logical_apicid(int cpu)
{
if (cpu >= nr_cpu_ids)
return BAD_APICID;
int apicid;
cpu = first_cpu(*cpumask);
- apicid = cpu_to_logical_apicid(cpu);
+ apicid = bigsmp_cpu_to_logical_apicid(cpu);
return apicid;
}
if (cpumask_test_cpu(cpu, cpu_online_mask))
break;
if (cpu < nr_cpu_ids)
- return cpu_to_logical_apicid(cpu);
+ return bigsmp_cpu_to_logical_apicid(cpu);
return BAD_APICID;
}
extern u8 cpu_2_logical_apicid[];
/* Mapping from cpu number to logical apicid */
-static inline int cpu_to_logical_apicid(int cpu)
+static inline int es7000_cpu_to_logical_apicid(int cpu)
{
#ifdef CONFIG_SMP
if (cpu >= nr_cpu_ids)
* on the same apicid cluster return default value of target_cpus():
*/
cpu = cpumask_first(cpumask);
- apicid = cpu_to_logical_apicid(cpu);
+ apicid = es7000_cpu_to_logical_apicid(cpu);
while (cpus_found < num_bits_set) {
if (cpumask_test_cpu(cpu, cpumask)) {
- int new_apicid = cpu_to_logical_apicid(cpu);
+ int new_apicid = es7000_cpu_to_logical_apicid(cpu);
if (apicid_cluster(apicid) !=
apicid_cluster(new_apicid)){
printk ("%s: Not a valid mask!\n", __func__);
num_bits_set = cpus_weight(*cpumask);
/* Return id to all */
if (num_bits_set == nr_cpu_ids)
- return cpu_to_logical_apicid(0);
+ return es7000_cpu_to_logical_apicid(0);
/*
* The cpus in the mask must all be on the apic cluster. If are not
* on the same apicid cluster return default value of target_cpus():
*/
cpu = first_cpu(*cpumask);
- apicid = cpu_to_logical_apicid(cpu);
+ apicid = es7000_cpu_to_logical_apicid(cpu);
while (cpus_found < num_bits_set) {
if (cpu_isset(cpu, *cpumask)) {
- int new_apicid = cpu_to_logical_apicid(cpu);
+ int new_apicid = es7000_cpu_to_logical_apicid(cpu);
if (apicid_cluster(apicid) !=
apicid_cluster(new_apicid)){
printk ("%s: Not a valid mask!\n", __func__);
- return cpu_to_logical_apicid(0);
+ return es7000_cpu_to_logical_apicid(0);
}
apicid = new_apicid;
cpus_found++;
static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *inmask,
const struct cpumask *andmask)
{
- int apicid = cpu_to_logical_apicid(0);
+ int apicid = es7000_cpu_to_logical_apicid(0);
cpumask_var_t cpumask;
if (!alloc_cpumask_var(&cpumask, GFP_ATOMIC))
}
/* Mapping from cpu number to logical apicid */
-static inline int cpu_to_logical_apicid(int cpu)
+static inline int default_cpu_to_logical_apicid(int cpu)
{
return 1 << cpu;
}
#include <asm/genapic.h>
-#define cpu_to_logical_apicid (apic->cpu_to_logical_apicid)
#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)
/* Mapping from cpu number to logical apicid */
extern u8 cpu_2_logical_apicid[];
-static inline int cpu_to_logical_apicid(int cpu)
+
+static inline int numaq_cpu_to_logical_apicid(int cpu)
{
if (cpu >= nr_cpu_ids)
return BAD_APICID;
}
/* Mapping from cpu number to logical apicid */
-static inline int cpu_to_logical_apicid(int cpu)
+static inline int summit_cpu_to_logical_apicid(int cpu)
{
#ifdef CONFIG_SMP
if (cpu >= nr_cpu_ids)
* on the same apicid cluster return default value of target_cpus():
*/
cpu = first_cpu(*cpumask);
- apicid = cpu_to_logical_apicid(cpu);
+ apicid = summit_cpu_to_logical_apicid(cpu);
while (cpus_found < num_bits_set) {
if (cpu_isset(cpu, *cpumask)) {
- int new_apicid = cpu_to_logical_apicid(cpu);
+ int new_apicid = summit_cpu_to_logical_apicid(cpu);
if (apicid_cluster(apicid) !=
apicid_cluster(new_apicid)){
printk ("%s: Not a valid mask!\n", __func__);
static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *inmask,
const struct cpumask *andmask)
{
- int apicid = cpu_to_logical_apicid(0);
+ int apicid = summit_cpu_to_logical_apicid(0);
cpumask_var_t cpumask;
if (!alloc_cpumask_var(&cpumask, GFP_ATOMIC))
local_irq_save(flags);
for_each_cpu(query_cpu, mask)
- __send_IPI_dest_field(cpu_to_logical_apicid(query_cpu), vector);
+ __send_IPI_dest_field(apic->cpu_to_logical_apicid(query_cpu), vector);
local_irq_restore(flags);
}
local_irq_save(flags);
for_each_cpu(query_cpu, mask)
if (query_cpu != this_cpu)
- __send_IPI_dest_field(cpu_to_logical_apicid(query_cpu),
+ __send_IPI_dest_field(apic->cpu_to_logical_apicid(query_cpu),
vector);
local_irq_restore(flags);
}
.setup_apic_routing = bigsmp_setup_apic_routing,
.multi_timer_check = NULL,
.apicid_to_node = bigsmp_apicid_to_node,
- .cpu_to_logical_apicid = cpu_to_logical_apicid,
+ .cpu_to_logical_apicid = bigsmp_cpu_to_logical_apicid,
.cpu_present_to_apicid = cpu_present_to_apicid,
.apicid_to_cpu_present = apicid_to_cpu_present,
.setup_portio_remap = setup_portio_remap,
.setup_apic_routing = default_setup_apic_routing,
.multi_timer_check = NULL,
.apicid_to_node = default_apicid_to_node,
- .cpu_to_logical_apicid = cpu_to_logical_apicid,
+ .cpu_to_logical_apicid = default_cpu_to_logical_apicid,
.cpu_present_to_apicid = cpu_present_to_apicid,
.apicid_to_cpu_present = apicid_to_cpu_present,
.setup_portio_remap = setup_portio_remap,
.setup_apic_routing = es7000_setup_apic_routing,
.multi_timer_check = NULL,
.apicid_to_node = es7000_apicid_to_node,
- .cpu_to_logical_apicid = cpu_to_logical_apicid,
+ .cpu_to_logical_apicid = es7000_cpu_to_logical_apicid,
.cpu_present_to_apicid = cpu_present_to_apicid,
.apicid_to_cpu_present = apicid_to_cpu_present,
.setup_portio_remap = setup_portio_remap,
.setup_apic_routing = numaq_setup_apic_routing,
.multi_timer_check = numaq_multi_timer_check,
.apicid_to_node = numaq_apicid_to_node,
- .cpu_to_logical_apicid = cpu_to_logical_apicid,
+ .cpu_to_logical_apicid = numaq_cpu_to_logical_apicid,
.cpu_present_to_apicid = cpu_present_to_apicid,
.apicid_to_cpu_present = apicid_to_cpu_present,
.setup_portio_remap = setup_portio_remap,
.setup_apic_routing = summit_setup_apic_routing,
.multi_timer_check = NULL,
.apicid_to_node = summit_apicid_to_node,
- .cpu_to_logical_apicid = cpu_to_logical_apicid,
+ .cpu_to_logical_apicid = summit_cpu_to_logical_apicid,
.cpu_present_to_apicid = cpu_present_to_apicid,
.apicid_to_cpu_present = apicid_to_cpu_present,
.setup_portio_remap = setup_portio_remap,