Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753240AbbHRPRN (ORCPT ); Tue, 18 Aug 2015 11:17:13 -0400 Received: from mga09.intel.com ([134.134.136.24]:55774 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752110AbbHRPRM (ORCPT ); Tue, 18 Aug 2015 11:17:12 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,702,1432623600"; d="scan'208";a="750892195" From: Jiang Liu To: Thomas Gleixner , Alexander Holler , Mark Rustad , Alex Deucher , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Jiang Liu Cc: Tony Luck , linux-kernel@vger.kernel.org Subject: [Bugfix] x86, irq: Fix an error in building CPU vector to IRQ number mapping for MSI Date: Tue, 18 Aug 2015 23:20:20 +0800 Message-Id: <1439911228-9880-1-git-send-email-jiang.liu@linux.intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1786 Lines: 41 Alex Deucher, Mark Rustad and Alexander Holler reported a regression with the latest v4.2-rc4 kernel, which breaks some SATA controllers. With multi-MSI capable SATA controllers, only the first port works, all other ports times out when executing SATA commands. The regression is caused by b5dc8e6c21e7 ("x86/irq: Use hierarchical irqdomain to manage CPU interrupt vectors"), which builds wrong CPU vector to IRQ number mappings for second and subsequent IRQs of multiple MSIs and causes that all MSI IRQs are handled as the first MSI IRQ. So fix the regression by building correct CPU vector to IRQ number mappings for multiple MSIs. Signed-off-by: Jiang Liu Reported-and-tested-by: Alex Deucher Reported-and-tested-by: Mark Rustad Reported-and-tested-by: Alexander Holler --- arch/x86/kernel/apic/vector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index f813261d9740..2683f36e4e0a 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c @@ -322,7 +322,7 @@ static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq, irq_data->chip = &lapic_controller; irq_data->chip_data = data; irq_data->hwirq = virq + i; - err = assign_irq_vector_policy(virq, irq_data->node, data, + err = assign_irq_vector_policy(virq + i, irq_data->node, data, info); if (err) goto error; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/