cpumask_set_cpu(this_cpu, per_cpu(cluster_cpus, this_cpu));
}
-static const cpumask_t *cf_check vector_allocation_cpumask_x2apic_cluster(
- int cpu)
-{
- return per_cpu(cluster_cpus, cpu);
-}
-
-static unsigned int cf_check cpu_mask_to_apicid_x2apic_cluster(
- const cpumask_t *cpumask)
-{
- unsigned int cpu = cpumask_any(cpumask);
- unsigned int dest = per_cpu(cpu_2_logical_apicid, cpu);
- const cpumask_t *cluster_cpus = per_cpu(cluster_cpus, cpu);
-
- for_each_cpu ( cpu, cluster_cpus )
- if ( cpumask_test_cpu(cpu, cpumask) )
- dest |= per_cpu(cpu_2_logical_apicid, cpu);
-
- return dest;
-}
-
static void cf_check send_IPI_self_x2apic(uint8_t vector)
{
apic_wrmsr(APIC_SELF_IPI, vector);
.send_IPI_self = send_IPI_self_x2apic
};
-static const struct genapic __initconst_cf_clobber apic_x2apic_cluster = {
- APIC_INIT("x2apic_cluster", NULL),
- .int_delivery_mode = dest_LowestPrio,
- .int_dest_mode = 1 /* logical delivery */,
- .init_apic_ldr = init_apic_ldr_x2apic_cluster,
- .vector_allocation_cpumask = vector_allocation_cpumask_x2apic_cluster,
- .cpu_mask_to_apicid = cpu_mask_to_apicid_x2apic_cluster,
- .send_IPI_mask = send_IPI_mask_x2apic_cluster,
- .send_IPI_self = send_IPI_self_x2apic
-};
-
/*
* Mixed x2APIC mode: use physical for external (device) interrupts, and
* cluster for inter processor interrupts. Such mode has the benefits of not
boolean_param("x2apic_phys", x2apic_phys);
enum {
- unset, physical, cluster, mixed
+ unset, physical, mixed
} static __initdata x2apic_mode = unset;
static int __init cf_check parse_x2apic_mode(const char *s)
{
if ( !cmdline_strcmp(s, "physical") )
x2apic_mode = physical;
- else if ( !cmdline_strcmp(s, "cluster") )
- x2apic_mode = cluster;
else if ( !cmdline_strcmp(s, "mixed") )
x2apic_mode = mixed;
else
{
/* Honour the legacy cmdline setting if it's the only one provided. */
if ( x2apic_mode == unset && x2apic_phys >= 0 )
- x2apic_mode = x2apic_phys ? physical : cluster;
+ x2apic_mode = x2apic_phys ? physical : mixed;
if ( x2apic_mode == unset )
{
else
x2apic_mode = IS_ENABLED(CONFIG_X2APIC_MIXED) ? mixed
: (IS_ENABLED(CONFIG_X2APIC_PHYSICAL) ? physical
- : cluster);
+ : mixed);
}
if ( x2apic_mode == physical )
return &apic_x2apic_phys;
- if ( x2apic_mode == cluster && iommu_intremap != iommu_intremap_full )
- {
- printk("WARNING: x2APIC cluster mode is not supported %s interrupt remapping -"
- " forcing mixed mode\n",
- iommu_intremap == iommu_intremap_off ? "without"
- : "with restricted");
- x2apic_mode = mixed;
- }
-
if ( !this_cpu(cluster_cpus) )
{
update_clusterinfo(NULL, CPU_UP_PREPARE,
register_cpu_notifier(&x2apic_cpu_nfb);
}
- return x2apic_mode == cluster ? &apic_x2apic_cluster : &apic_x2apic_mixed;
+ return &apic_x2apic_mixed;
}
void __init check_x2apic_preenabled(void)