linux/arch/x86/include/asm/mach-default
Mike Travis a775a38b13 x86: fix cpu_mask_to_apicid_and to include cpu_online_mask
Impact: fix potential APIC crash

In determining the destination apicid, there are usually three cpumasks
that are considered: the incoming cpumask arg, cfg->domain and the
cpu_online_mask.  Since we are just introducing the cpu_mask_to_apicid_and
function, make sure it includes the cpu_online_mask in it's evaluation.
[Added with this patch.]

There are two io_apic.c functions that did not previously use the
cpu_online_mask:  setup_IO_APIC_irq and msi_compose_msg.  Both of these
simply used cpu_mask_to_apicid(cfg->domain & TARGET_CPUS), and all but
one arch (NUMAQ[*]) returns only online cpus in the TARGET_CPUS mask,
so the behavior is identical for all cases.

[*: NUMAQ bug?]

Note that alloc_cpumask_var is only used for the 32-bit cases where
it's highly likely that the cpumask set size will be small and therefore
CPUMASK_OFFSTACK=n.  But if that's not the case, failing the allocate
will cause the same return value as the default.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-18 11:59:24 +01:00
..
apm.h x86: drop double underscores from header guards 2008-10-23 00:01:39 -07:00
do_timer.h x86, um: ... and asm-x86 move 2008-10-22 22:55:20 -07:00
entry_arch.h x86, um: ... and asm-x86 move 2008-10-22 22:55:20 -07:00
mach_apic.h x86: fix cpu_mask_to_apicid_and to include cpu_online_mask 2008-12-18 11:59:24 +01:00
mach_apicdef.h x86: drop double underscores from header guards 2008-10-23 00:01:39 -07:00
mach_ipi.h x86: cosmetic changes apic-related files. 2008-12-16 17:40:57 -08:00
mach_mpparse.h x86: drop double underscores from header guards 2008-10-23 00:01:39 -07:00
mach_mpspec.h x86: drop double underscores from header guards 2008-10-23 00:01:39 -07:00
mach_timer.h x86: drop double underscores from header guards 2008-10-23 00:01:39 -07:00
mach_traps.h x86: drop double underscores from header guards 2008-10-23 00:01:39 -07:00
mach_wakecpu.h x86: fix wakeup_cpu with numaq/es7000, v2 2008-11-17 17:57:34 +01:00
pci-functions.h x86, um: ... and asm-x86 move 2008-10-22 22:55:20 -07:00
setup_arch.h x86, um: ... and asm-x86 move 2008-10-22 22:55:20 -07:00
smpboot_hooks.h x86: fix wakeup_cpu with numaq/es7000, v2 2008-11-17 17:57:34 +01:00