From: Yinghai Lu Date: Tue, 13 May 2014 15:39:34 +0000 (-0400) Subject: x86: irq: Get correct available vectors for cpu disable X-Git-Tag: omap-for-v3.16/fixes-against-rc1~96^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac2a55395eddccd6e3e39532df9869d61e97b2ee;p=pandora-kernel.git x86: irq: Get correct available vectors for cpu disable check_irq_vectors_for_cpu_disable() can overestimate the number of available interrupt vectors, so the check for cpu down succeeds, but the actual cpu removal fails. It iterates from FIRST_EXTERNAL_VECTOR to NR_VECTORS, which is wrong because the systems vectors are not taken into account. Limit the search to first_system_vector instead of NR_VECTORS. The second indicator for vector availability the used_vectors bitmap is not taken into account at all. So system vectors, e.g. IA32_SYSCALL_VECTOR (0x80) and IRQ_MOVE_CLEANUP_VECTOR (0x20), are accounted as available. Add a check for the used_vectors bitmap and do not account vectors which are marked there. [ tglx: Simplified code. Rewrote changelog and code comments. ] Signed-off-by: Yinghai Lu Acked-by: Prarit Bhargava Cc: Seiji Aguchi Cc: Andi Kleen Cc: K. Y. Srinivasan Cc: Steven Rostedt (Red Hat) Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: "Elliott, Robert (Server Storage)" Cc: x86@kernel.org Link: http://lkml.kernel.org/r/1400160305-17774-2-git-send-email-prarit@redhat.com Signed-off-by: Thomas Gleixner --- Reading git-diff-tree failed