|
@@ -205,8 +205,8 @@ static struct apic apic_flat = {
|
|
|
.set_apic_id = set_apic_id,
|
|
|
.apic_id_mask = 0xFFu << 24,
|
|
|
|
|
|
- .cpu_mask_to_apicid = default_cpu_mask_to_apicid,
|
|
|
- .cpu_mask_to_apicid_and = default_cpu_mask_to_apicid_and,
|
|
|
+ .cpu_mask_to_apicid = flat_cpu_mask_to_apicid,
|
|
|
+ .cpu_mask_to_apicid_and = flat_cpu_mask_to_apicid_and,
|
|
|
|
|
|
.send_IPI_mask = flat_send_IPI_mask,
|
|
|
.send_IPI_mask_allbutself = flat_send_IPI_mask_allbutself,
|
|
@@ -284,38 +284,6 @@ static void physflat_send_IPI_all(int vector)
|
|
|
physflat_send_IPI_mask(cpu_online_mask, vector);
|
|
|
}
|
|
|
|
|
|
-static unsigned int physflat_cpu_mask_to_apicid(const struct cpumask *cpumask)
|
|
|
-{
|
|
|
- int cpu;
|
|
|
-
|
|
|
- /*
|
|
|
- * We're using fixed IRQ delivery, can only return one phys APIC ID.
|
|
|
- * May as well be the first.
|
|
|
- */
|
|
|
- cpu = cpumask_first(cpumask);
|
|
|
- if ((unsigned)cpu < nr_cpu_ids)
|
|
|
- return per_cpu(x86_cpu_to_apicid, cpu);
|
|
|
- else
|
|
|
- return BAD_APICID;
|
|
|
-}
|
|
|
-
|
|
|
-static unsigned int
|
|
|
-physflat_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
|
|
|
- const struct cpumask *andmask)
|
|
|
-{
|
|
|
- int cpu;
|
|
|
-
|
|
|
- /*
|
|
|
- * We're using fixed IRQ delivery, can only return one phys APIC ID.
|
|
|
- * May as well be the first.
|
|
|
- */
|
|
|
- for_each_cpu_and(cpu, cpumask, andmask) {
|
|
|
- if (cpumask_test_cpu(cpu, cpu_online_mask))
|
|
|
- break;
|
|
|
- }
|
|
|
- return per_cpu(x86_cpu_to_apicid, cpu);
|
|
|
-}
|
|
|
-
|
|
|
static int physflat_probe(void)
|
|
|
{
|
|
|
if (apic == &apic_physflat || num_possible_cpus() > 8)
|
|
@@ -360,8 +328,8 @@ static struct apic apic_physflat = {
|
|
|
.set_apic_id = set_apic_id,
|
|
|
.apic_id_mask = 0xFFu << 24,
|
|
|
|
|
|
- .cpu_mask_to_apicid = physflat_cpu_mask_to_apicid,
|
|
|
- .cpu_mask_to_apicid_and = physflat_cpu_mask_to_apicid_and,
|
|
|
+ .cpu_mask_to_apicid = default_cpu_mask_to_apicid,
|
|
|
+ .cpu_mask_to_apicid_and = default_cpu_mask_to_apicid_and,
|
|
|
|
|
|
.send_IPI_mask = physflat_send_IPI_mask,
|
|
|
.send_IPI_mask_allbutself = physflat_send_IPI_mask_allbutself,
|