From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757496Ab3LWOji (ORCPT ); Mon, 23 Dec 2013 09:39:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43251 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753518Ab3LWOjg (ORCPT ); Mon, 23 Dec 2013 09:39:36 -0500 From: Prarit Bhargava To: linux-kernel@vger.kernel.org Cc: Prarit Bhargava , Michel Lespinasse , Seiji Aguchi , Yang Zhang , Paul Gortmaker , Janet Morgan , Tony Luck , Ruiv Wang , Gong Chen , Andi Kleen , "H. Peter Anvin" , x86@kernel.org, Subject: [PATCH] x86, irq, fix logical AND/OR error in check_irq_vectors_for_cpu_disable() Date: Mon, 23 Dec 2013 09:39:12 -0500 Message-Id: <1387809552-20529-1-git-send-email-prarit@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Patch is against linux-tip.git and was tested on both linux.git and tip without any issues. As expected, the number of required vectors for the down'd cpu drops from 202 to 181 on my test system (which has 509 vectors assigned in total). Many thanks to Gong Chen for catching this. P. ----8<---- Gong Chen caught this coding error during inspection of the patch. The code should be AND not OR. Signed-off-by: Prarit Bhargava Cc: Michel Lespinasse Cc: Seiji Aguchi Cc: Yang Zhang Cc: Paul Gortmaker Cc: Janet Morgan Cc: Tony Luck Cc: Ruiv Wang Cc: Gong Chen Cc: Andi Kleen Cc: H. Peter Anvin Cc: x86@kernel.org Cc: --- arch/x86/kernel/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 7d40698..aed7acc 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c @@ -281,7 +281,7 @@ int check_irq_vectors_for_cpu_disable(void) desc = irq_to_desc(irq); data = irq_desc_get_irq_data(desc); affinity = data->affinity; - if (irq_has_action(irq) || !irqd_is_per_cpu(data) || + if (irq_has_action(irq) && !irqd_is_per_cpu(data) && !cpumask_subset(affinity, cpu_online_mask)) this_count++; } -- 1.8.3.1