Message ID | 20230424103156.66753-2-jiaxun.yang@flygoat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2642804vqo; Mon, 24 Apr 2023 03:34:10 -0700 (PDT) X-Google-Smtp-Source: AKy350asJ7cMIk7r8pJMrRmEbjHe8RGVVa1B8CnFcANUu82kvR0raUP18btBI1cBb/9pMTV94WR0 X-Received: by 2002:a17:902:d14d:b0:1a8:1a9d:d994 with SMTP id t13-20020a170902d14d00b001a81a9dd994mr11802605plt.48.1682332450408; Mon, 24 Apr 2023 03:34:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682332450; cv=none; d=google.com; s=arc-20160816; b=z/LuJAtXAyE44Hfr5SyR/cgq00FFNrQXrU6vzjOc0FZNwmcjB5jf4QM6vqmSe/BjX+ TDEwFKYetvjyCr5oxRauXcaIdgaDiHnY5AJOA6B24Y/WcJiprH8HPmt8E9R0rmS2shEI DRFlLkAyk6D07X+PxLZNbeoewTE7uxBdKyci6aPRLJG4AGLh3bI2AB1IYwWggpMUv1PK ZoBvTp6XLZXe0oyN5jt4BqXKK6OTQVo+DmNdAjOi86XIX/QpeP7ZdVI89qZq8MaMttCx MfrdSf/FSKM65BE9t+dRhqh4oBoNCMHRsapwq/c2rO6ob5LTiyiadCWy694bgKzBMdKM AcUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=lLDvZL8csOGSnpmvsIuBINdBPRus+0iDvwakrSAe4s0=; b=xrquvkRNACdKGTrt4StOnDqPZgPV6G5Z5w/ueqaBvPp5J4DfIGcVYu9/D4DeWBlflC Yrd5lxlhz7r8i7ef9uN/km3zIIZ9BA/FnOcC+ZsvsmfM1a/C0fpqTl6neLU/sZGVLlPs YTUhSkljWXWS33nfD3kdtzvbqqMIBg6caI4qpZJczYs9JuP5Dk4Jn0zuuJ+B9xSUeBCR MvwiAjuHlej+9H6e3TBl8bWcBStxwXj9GuqHfJoK0R+Og7SzeSh1o2nTLDQinYZPrlpY SSeiTY7u5COxLrYZHdF2YQQSNhYU64tP0hrXihlE9ki24pACWRzA5f/nDJxVema0ekzS CqfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=RG9yQO+v; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=XRhrL777; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i12-20020a170902cf0c00b001a6a3954e0fsi7382724plg.18.2023.04.24.03.33.55; Mon, 24 Apr 2023 03:34:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=RG9yQO+v; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=XRhrL777; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231426AbjDXKci (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Mon, 24 Apr 2023 06:32:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231203AbjDXKcZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 24 Apr 2023 06:32:25 -0400 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BD21D8; Mon, 24 Apr 2023 03:32:24 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 402C8320092D; Mon, 24 Apr 2023 06:32:23 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 24 Apr 2023 06:32:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1682332342; x= 1682418742; bh=lLDvZL8csOGSnpmvsIuBINdBPRus+0iDvwakrSAe4s0=; b=R G9yQO+veX+ZJzhvVc5RsIsy2dPd4TYACsDA3gVAW1cNEVlBMPkw2j25DScACpnPe LZ6pAMP7LwHOHwFWi8ex8PmunC0oZ2WPF6qmqBGlI/Qeu3xeOKMy6HxY6GiYrSMq C4bhwFohTdySjgFkrC6ttuKtCnru1If8FAj+PwZNaLEC/WmwWiy27yksj+R9g0k7 XMiMUEqZjyMJepDa7RxZCqaJrP2JVUqO8r16T9osZHWoohozFchq4wxPsIKZ9ltF bNtVs59w5LxQ6OZvaQSYzPqsRIgk+UJO0MwY9k78bwcgGza3WnlY+XoIJeKO9BG5 dr/mI/fjl3bnsl6XBlddA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1682332342; x= 1682418742; bh=lLDvZL8csOGSnpmvsIuBINdBPRus+0iDvwakrSAe4s0=; b=X RhrL777BPNP9IsnUlKPzY2GA7wj2i5n3pWJ/SglHFnxb/7iGm1gEJlOkJz5ZXdCR TrDaEPF0u/cDxxPGdoyuixKFXA5LzyCJJxlTShp3FeHQPlzyifm6XvbBZ0cwfk0I wQeMVjQ8RncEflhsan7QCTNGofISMFrGm9sYmTBAZiKqsoVDij7ajdHP95jUnzce wRHD7g8OXI1yclhT6P/R3u3fv2yWxm6f6ntXijPRnGPDSvtGxW323m4UW9x70xZu vLdnJk0NQpxfjC1Q+Sc8ODxzuzcir8aWr6HlLjTk4FzuJ5sluNZcp6SS9BpBvjPh ip5e5bo2kOdSPeiX+2mTw== X-ME-Sender: <xms:tlpGZLTXrF6smFeKOPQu5oi6tTfOa1W6mgBVY0FoJ05_h6y0L34G1A> <xme:tlpGZMyrSdPcmnVklLwXTfrgW8c_FhoNohhsUlCdqTaokONzE3Zo7vg44sjHjHKAI ndHK_N3cRjZXBJIC7Q> X-ME-Received: <xmr:tlpGZA3GJ2bw6TvXwZ-Fw97ljfeAXfNFiXKS_KFxY6YXX41x5jnrUKy-vepT> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedutddgvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpeflihgrgihunhcujggrnhhguceojhhirgiguhhnrdihrghn ghesfhhlhihgohgrthdrtghomheqnecuggftrfgrthhtvghrnhepfeeludefheegvdeuvd dvgeekgfdvtdettdelieeihfegtedugeekhfdvhfejfedtnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhi hgohgrthdrtghomh X-ME-Proxy: <xmx:tlpGZLBtvlm5cSwI1asvqxLHoZy09tBXaIB-bAH6YNJRkyKde8K0Kg> <xmx:tlpGZEiYJEf5pNn8KIHFZVU2ZyW2oKIsDpzmXpt58meJZDZltoULlA> <xmx:tlpGZPoirH7L1T-QNf75tZ8POIWVU-YusCLsSrH5a3yALTTdADSV2A> <xmx:tlpGZPWRj0ySyKFdu51k4WPTrccyefyOMOsjMOPZoc7-qlrGjSgZ5Q> Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Apr 2023 06:32:21 -0400 (EDT) From: Jiaxun Yang <jiaxun.yang@flygoat.com> To: maz@kernel.org Cc: tsbogend@alpha.franken.de, fancer.lancer@gmail.com, tglx@linutronix.de, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Jiaxun Yang <jiaxun.yang@flygoat.com>, stable@vger.kernel.org Subject: [PATCH 1/2] irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable Date: Mon, 24 Apr 2023 11:31:55 +0100 Message-Id: <20230424103156.66753-2-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20230424103156.66753-1-jiaxun.yang@flygoat.com> References: <20230424103156.66753-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764053431738934706?= X-GMAIL-MSGID: =?utf-8?q?1764053431738934706?= |
Series |
irqchip/mips-gic fixes
|
|
Commit Message
Jiaxun Yang
April 24, 2023, 10:31 a.m. UTC
When a GIC local interrupt is not routable, it's vl_map will be used
to control some internal states for core (providing IPTI, IPPCI, IPFDC
input signal for core). Overriding it will interfere core's intetrupt
controller.
Do not touch vl_map if a local interrupt is not routable, we are not
going to remap it.
Before dd098a0e0319 (" irqchip/mips-gic: Get rid of the reliance on
irq_cpu_online()"), if a local interrupt is not routable, then it won't
be requested from GIC Local domain, and thus gic_all_vpes_irq_cpu_online
won't be called for that particular interrupt.
Fixes: dd098a0e0319 (" irqchip/mips-gic: Get rid of the reliance on irq_cpu_online()")
Cc: stable@vger.kernel.org
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
drivers/irqchip/irq-mips-gic.c | 2 ++
1 file changed, 2 insertions(+)
Comments
Hello Jiaxun On Mon, Apr 24, 2023 at 11:31:55AM +0100, Jiaxun Yang wrote: > When a GIC local interrupt is not routable, it's vl_map will be used > to control some internal states for core (providing IPTI, IPPCI, IPFDC > input signal for core). Overriding it will interfere core's intetrupt s/intetrupt/interrupt > controller. > > Do not touch vl_map if a local interrupt is not routable, we are not > going to remap it. > > Before dd098a0e0319 (" irqchip/mips-gic: Get rid of the reliance on > irq_cpu_online()"), if a local interrupt is not routable, then it won't > be requested from GIC Local domain, and thus gic_all_vpes_irq_cpu_online > won't be called for that particular interrupt. > > Fixes: dd098a0e0319 (" irqchip/mips-gic: Get rid of the reliance on irq_cpu_online()") > Cc: stable@vger.kernel.org > Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> My system doesn't have VPEs but 2x MIPS32 P5600 cores with GIC enabled as EIC device so I can't fully test this change, but at the very least it looks reasonable. Indeed performing the local IRQs routing setups for the non-routable IRQs looks invalid. A similar change can be spotted in the gic_irq_domain_map() method implementation. > --- > drivers/irqchip/irq-mips-gic.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c > index 046c355e120b..b568d55ef7c5 100644 > --- a/drivers/irqchip/irq-mips-gic.c > +++ b/drivers/irqchip/irq-mips-gic.c > @@ -399,6 +399,8 @@ static void gic_all_vpes_irq_cpu_online(void) > unsigned int intr = local_intrs[i]; > struct gic_all_vpes_chip_data *cd; > > + if (!gic_local_irq_is_routable(intr)) > + continue; Please add newline here to distinguish the skip-step code chunk and the setup code so the look would look a tiny bit more readable. > cd = &gic_all_vpes_chip_data[intr]; > write_gic_vl_map(mips_gic_vx_map_reg(intr), cd->map); > if (cd->mask) Other than that the change looks good. Thanks. Reviewed-by: Serge Semin <fancer.lancer@gmail.com> -Serge(y) > -- > 2.34.1 >
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c index 046c355e120b..b568d55ef7c5 100644 --- a/drivers/irqchip/irq-mips-gic.c +++ b/drivers/irqchip/irq-mips-gic.c @@ -399,6 +399,8 @@ static void gic_all_vpes_irq_cpu_online(void) unsigned int intr = local_intrs[i]; struct gic_all_vpes_chip_data *cd; + if (!gic_local_irq_is_routable(intr)) + continue; cd = &gic_all_vpes_chip_data[intr]; write_gic_vl_map(mips_gic_vx_map_reg(intr), cd->map); if (cd->mask)