#define PHYSID_MASK_NONE { {[0 ... PHYSID_ARRAY_SIZE-1] = 0UL} }
extern physid_mask_t phys_cpu_present_map;
+extern cpumask_t x86_non_ir_cpumask;
#endif /* _ASM_X86_MPSPEC_H */
EXPORT_EARLY_PER_CPU_SYMBOL(x86_bios_cpu_apicid);
EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_acpiid);
+/*
+ * Mask of CPUs which can be targeted by non-remapped interrupts.
+ * By default, all CPUs can be reached. Only x2apic makes it
+ * possible for that to be untrue, and the x2apic initialisation
+ * code path will clear this and populate it accordingly.
+ */
+cpumask_t x86_non_ir_cpumask = { CPU_BITS_ALL };
+
#ifdef CONFIG_X86_32
/*
static __init void try_to_enable_x2apic(int remap_mode)
{
u32 apic_limit = 255;
+ int i;
if (x2apic_state == X2APIC_DISABLED)
return;
x2apic_phys = 1;
}
+ /* Build the affinity mask for interrupts that can't be remapped. */
+ cpumask_clear(&x86_non_ir_cpumask);
+ for (i = num_possible_cpus() - 1; i >= 0; i--) {
+ if (cpu_physical_id(i) <= apic_limit)
+ cpumask_set_cpu(i, &x86_non_ir_cpumask);
+ }
+
x2apic_enable();
}
set_cpu_present(cpu, true);
num_processors++;
+ if (apicid < (msi_ext_dest_id ? 32768 : 256))
+ cpumask_set_cpu(cpu, &x86_non_ir_cpumask);
+
return cpu;
}