android_kernel_xiaomi_sm8350/arch/x86/include/asm
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
..
bigsmp x86: fix cpu_mask_to_apicid_and to include cpu_online_mask 2008-12-18 11:59:24 +01:00
es7000 x86: fix cpu_mask_to_apicid_and to include cpu_online_mask 2008-12-18 11:59:24 +01:00
mach-default x86: fix cpu_mask_to_apicid_and to include cpu_online_mask 2008-12-18 11:59:24 +01:00
mach-generic x86: Add cpu_mask_to_apicid_and 2008-12-16 17:40:56 -08:00
mach-rdc321x
mach-voyager
numaq x86: cosmetic changes apic-related files. 2008-12-16 17:40:57 -08:00
summit x86: fix cpu_mask_to_apicid_and to include cpu_online_mask 2008-12-18 11:59:24 +01:00
uv
visws
xen
a.out-core.h
a.out.h
acpi.h
agp.h
alternative-asm.h
alternative.h
amd_iommu_types.h AMD IOMMU: struct amd_iommu remove padding on 64 bit 2008-12-03 12:20:46 +01:00
amd_iommu.h
apic.h
apicdef.h
arch_hooks.h
asm.h
atomic_32.h
atomic_64.h
atomic.h
auxvec.h
bios_ebda.h
bitops.h
boot.h
bootparam.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h
calgary.h
calling.h
checksum_32.h
checksum_64.h
checksum.h
cmpxchg_32.h
cmpxchg_64.h
cmpxchg.h
compat.h
cpu.h
cpufeature.h
cputime.h
current.h
debugreg.h
delay.h
desc_defs.h
desc.h
device.h
div64.h
dma-mapping.h x86: fix dma_mapping_error for 32bit x86 2008-11-29 21:00:38 +01:00
dma.h
dmi.h
ds.h x86, bts, ptrace: move BTS buffer allocation from ds.c into ptrace.c 2008-11-25 17:31:12 +01:00
dwarf2.h
e820.h
edac.h
efi.h
elf.h
emergency-restart.h
errno.h
fb.h
fcntl.h
fixmap_32.h
fixmap_64.h
fixmap.h
floppy.h
frame.h
ftrace.h tracing/function-return-tracer: change the name into function-graph-tracer 2008-11-26 01:59:45 +01:00
futex.h
gart.h
genapic_32.h x86: cosmetic changes apic-related files. 2008-12-16 17:40:57 -08:00
genapic_64.h x86: cosmetic changes apic-related files. 2008-12-16 17:40:57 -08:00
genapic.h
geode.h
gpio.h
hardirq_32.h
hardirq_64.h
hardirq.h
highmem.h
hpet.h
hugetlb.h
hw_irq.h
hypertransport.h
i387.h
i8253.h
i8259.h
ia32_unistd.h
ia32.h
idle.h
intel_arch_perfmon.h
io_32.h
io_64.h
io_apic.h sparseirq: fix typo in !CONFIG_IO_APIC case 2008-12-08 18:47:51 +01:00
io.h
ioctl.h
ioctls.h
iomap.h
iommu.h
ipcbuf.h
ipi.h x86: cosmetic changes apic-related files. 2008-12-16 17:40:57 -08:00
irq_regs_32.h
irq_regs_64.h
irq_regs.h
irq_remapping.h
irq_vectors.h x86: use NR_IRQS_LEGACY 2008-12-08 14:31:52 +01:00
irq.h x86: fixup_irqs() doesnt need an argument. 2008-12-16 17:40:57 -08:00
irqflags.h
ist.h
k8.h
Kbuild
kdebug.h
kexec.h
kgdb.h
kmap_types.h
kprobes.h
kvm_host.h
kvm_para.h
kvm_x86_emulate.h
kvm.h
ldt.h
lguest_hcall.h
lguest.h
linkage.h
local.h
math_emu.h
mc146818rtc.h
mca_dma.h
mca.h
mce.h
microcode.h
mman.h
mmconfig.h
mmu_context_32.h
mmu_context_64.h
mmu_context.h
mmu.h
mmx.h
mmzone_32.h
mmzone_64.h
mmzone.h
module.h
mpspec_def.h
mpspec.h
msgbuf.h
msidef.h
msr-index.h
msr.h
mtrr.h
mutex_32.h
mutex_64.h
mutex.h
nmi.h
nops.h
numa_32.h
numa_64.h
numa.h
numaq.h
olpc.h
page_32.h
page_64.h
page.h
param.h
paravirt.h
parport.h
pat.h
pci_32.h
pci_64.h x86: always define DECLARE_PCI_UNMAP* macros 2008-11-27 12:44:08 +01:00
pci-direct.h
pci.h
pda.h
percpu.h
pgalloc.h
pgtable_32.h
pgtable_64.h
pgtable-2level-defs.h
pgtable-2level.h
pgtable-3level-defs.h
pgtable-3level.h
pgtable.h
poll.h
posix_types_32.h
posix_types_64.h
posix_types.h
prctl.h
processor-cyrix.h
processor-flags.h
processor.h
proto.h
ptrace-abi.h
ptrace.h remove __ARCH_WANT_COMPAT_SYS_PTRACE 2008-11-30 11:00:15 -08:00
pvclock-abi.h
pvclock.h
reboot_fixups.h
reboot.h
required-features.h
resource.h
resume-trace.h
rio.h
rtc.h
rwlock.h
rwsem.h
scatterlist.h
seccomp_32.h
seccomp_64.h
seccomp.h
sections.h
segment.h
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
sigcontext32.h
sigcontext.h
siginfo.h
signal.h
smp.h x86: cosmetic changes apic-related files. 2008-12-16 17:40:57 -08:00
socket.h
sockios.h
sparsemem.h
spinlock_types.h
spinlock.h
srat.h
stacktrace.h
stat.h
statfs.h
string_32.h
string_64.h
string.h
suspend_32.h
suspend_64.h
suspend.h
swiotlb.h
sync_bitops.h
syscall.h
syscalls.h
system_64.h
system.h
tce.h
termbits.h
termios.h
therm_throt.h
thread_info.h
time.h
timer.h
timex.h
tlb.h
tlbflush.h
topology.h x86: Introduce topology_core_cpumask()/topology_thread_cpumask() 2008-12-16 17:40:59 -08:00
trampoline.h
traps.h
tsc.h
types.h
uaccess_32.h
uaccess_64.h
uaccess.h
ucontext.h
unaligned.h
unistd_32.h
unistd_64.h
unistd.h
unwind.h
user32.h
user_32.h
user_64.h
user.h
vdso.h
vga.h
vgtod.h
vic.h
vm86.h
vmi_time.h
vmi.h x86 Fix VMI crash on boot in 2.6.28-rc8 2008-12-14 16:24:38 -08:00
voyager.h
vsyscall.h
xcr.h
xor_32.h
xor_64.h
xor.h
xsave.h