From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96E4BC2D0A3 for ; Wed, 4 Nov 2020 10:13:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B9D822280 for ; Wed, 4 Nov 2020 10:13:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="HDNpjvEp"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="pB2K5RV4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728835AbgKDKNl (ORCPT ); Wed, 4 Nov 2020 05:13:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728508AbgKDKNk (ORCPT ); Wed, 4 Nov 2020 05:13:40 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E8E4C0613D3; Wed, 4 Nov 2020 02:13:40 -0800 (PST) Date: Wed, 04 Nov 2020 10:13:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1604484818; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tQP19svj7zoZI5FQx6Ol/pT+zPjAIX339Dbz0Fjqlqo=; b=HDNpjvEpHyW/ZL5egeogmpFeA05cle8PHqezNYJmrhidROgTDRFC3YL3QMgsIAMoSxyMSN ODMJIvUH4/pRdO35W05iqO5w4zGLBnNt1S4qJf3roTFYogjOHF5X+qw2IjN9BJmgrNVGQ/ iJIHMWvEg2AshP9Sunp7oh/tLtLa8MEN1YZNAKwzLADN6Pi7Hpf3b8vSS1n/hMVW6OG8RU MSFt6M2OFwbVyTYhENS0QkMeDjP4QbELPiPns5i4SAk2X+td74kUo132iotM6bOYIJoYm+ hzBi6BRfApHqx3TYORPL+FdViUQ2W3YF0Takz/+FWBAQVWnYmA+BDcysJzgtBQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1604484818; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tQP19svj7zoZI5FQx6Ol/pT+zPjAIX339Dbz0Fjqlqo=; b=pB2K5RV4FNE6as+du1B+t5HhIaG3TdBVB2uS1iyZ/HvVCVaPDyjctZCu9ySBphSX291rv5 2M4uh2rQMpc7RLAg== From: "tip-bot2 for David Woodhouse" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/apic] x86/ioapic: Use I/O-APIC ID for finding irqdomain, not index Cc: lkp , David Woodhouse , Thomas Gleixner , x86 , LKML In-Reply-To: <57adf2c305cd0c5e9d860b2f3007a7e676fd0f9f.camel@infradead.org> References: <57adf2c305cd0c5e9d860b2f3007a7e676fd0f9f.camel@infradead.org> MIME-Version: 1.0 Message-ID: <160448481750.397.15987267180792702259.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/apic branch of tip: Commit-ID: f36a74b9345aebaf5d325380df87a54720229d18 Gitweb: https://git.kernel.org/tip/f36a74b9345aebaf5d325380df87a54720229d18 Author: David Woodhouse AuthorDate: Tue, 03 Nov 2020 16:36:22 Committer: Thomas Gleixner CommitterDate: Wed, 04 Nov 2020 11:11:35 +01:00 x86/ioapic: Use I/O-APIC ID for finding irqdomain, not index In commit b643128b917 ("x86/ioapic: Use irq_find_matching_fwspec() to find remapping irqdomain") the I/O-APIC code was changed to find its parent irqdomain using irq_find_matching_fwspec(), but the key used for the lookup was wrong. It shouldn't use 'ioapic' which is the index into its own ioapics[] array. It should use the actual arbitration ID of the I/O-APIC in question, which is mpc_ioapic_id(ioapic). Fixes: b643128b917 ("x86/ioapic: Use irq_find_matching_fwspec() to find remapping irqdomain") Reported-by: lkp Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/57adf2c305cd0c5e9d860b2f3007a7e676fd0f9f.camel@infradead.org --- arch/x86/kernel/apic/io_apic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 1cfd65e..0602c95 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -2345,14 +2345,14 @@ static int mp_irqdomain_create(int ioapic) if (cfg->dev) { fn = of_node_to_fwnode(cfg->dev); } else { - fn = irq_domain_alloc_named_id_fwnode("IO-APIC", ioapic); + fn = irq_domain_alloc_named_id_fwnode("IO-APIC", mpc_ioapic_id(ioapic)); if (!fn) return -ENOMEM; } fwspec.fwnode = fn; fwspec.param_count = 1; - fwspec.param[0] = ioapic; + fwspec.param[0] = mpc_ioapic_id(ioapic); parent = irq_find_matching_fwspec(&fwspec, DOMAIN_BUS_ANY); if (!parent) {