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=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, 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 696CBC433EF for ; Tue, 21 Sep 2021 15:21:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 32CE460F6D for ; Tue, 21 Sep 2021 15:21:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 32CE460F6D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NfoxjAodhpzoAtYe/FGqL0pQtLtxn4JLP6NJPgchs8s=; b=n9WZvndpj7qSIA yZJEOFIshDEAykecuy0mWDBQpx8LVU/jx5V2O1ELz65wq/E7LUOVDZ4VcPuPeI7JGFGOLBT/7JdFZ idkBb6bTe2CyFg6OjctgxAL+DCTG1aAJto4VtiBTeqZpNovFedCGufP0YdesAYdk+gd6slNrA/tKG dEV9vKeDtDa2lBklGosb70OiOKnhad07ThY/b36tRpL9bnVF0FZF7Q+8ey9VF3rcHlqzBvZr7BC6/ pEUEeNfF/GT8qzW8Q1lnHQcw2ZHV20AqTvofcTgEPKcAHYQXK3qdgnzfvxLggudhZxwSR6GlbKgA/ Y0sWAsqHkMwKwuIJNJ7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mShY5-004rz5-PW; Tue, 21 Sep 2021 15:19:09 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mShXx-004rxo-5B for linux-arm-kernel@lists.infradead.org; Tue, 21 Sep 2021 15:19:02 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 568CB61165; Tue, 21 Sep 2021 15:19:00 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mShXu-00C4Nj-Ai; Tue, 21 Sep 2021 16:18:58 +0100 Date: Tue, 21 Sep 2021 16:18:57 +0100 Message-ID: <87h7eeufby.wl-maz@kernel.org> From: Marc Zyngier To: Steffen Trumtrar Cc: Valentin Schneider , Andrew Lunn , Gregory Clement , Sebastion Hesselbarth , linux-arm-kernel@lists.infradead.org Subject: Re: [BUG] irqchip: armada-370-xp: workqueue lockup In-Reply-To: <87tuiexq5f.fsf@pengutronix.de> References: <87tuiexq5f.fsf@pengutronix.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: s.trumtrar@pengutronix.de, valentin.schneider@arm.com, andrew@lunn.ch, gregory.clement@bootlin.com, sebastion.hesselbarth@gmail.com, linux-arm-kernel@lists.infradead.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210921_081901_312179_F9D15685 X-CRM114-Status: GOOD ( 34.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Steffen, On Tue, 21 Sep 2021 09:40:59 +0100, Steffen Trumtrar wrote: > > > Hi, > > I noticed that after the patch > > e52e73b7e9f7d08b8c2ef6fb1657105093e22a03 > From: Valentin Schneider > Date: Mon, 9 Nov 2020 09:41:18 +0000 > Subject: [PATCH] irqchip/armada-370-xp: Make IPIs use > handle_percpu_devid_irq() > > As done for the Arm GIC irqchips, move IPIs to handle_percpu_devid_irq() as > handle_percpu_devid_fasteoi_ipi() isn't actually required. > > Signed-off-by: Valentin Schneider > Signed-off-by: Marc Zyngier > Link: https://lore.kernel.org/r/20201109094121.29975-3-valentin.schneider@arm.com > --- > drivers/irqchip/irq-armada-370-xp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c > index d7eb2e93db8f..32938dfc0e46 100644 > --- a/drivers/irqchip/irq-armada-370-xp.c > +++ b/drivers/irqchip/irq-armada-370-xp.c > @@ -382,7 +382,7 @@ static int armada_370_xp_ipi_alloc(struct irq_domain *d, > irq_set_percpu_devid(virq + i); > irq_domain_set_info(d, virq + i, i, &ipi_irqchip, > d->host_data, > - handle_percpu_devid_fasteoi_ipi, > + handle_percpu_devid_irq, > NULL, NULL); > } > > I get workqueue lockups on my Armada-XP based board. > When I run the following test on v5.15-rc2 > > stress-ng --cpu 8 --io 4 --vm 2 --vm-bytes 128M --fork 4 --timeout 120s > > I get a backtrace like this: [...] > Earlier kernels (i.e v5.13.9) completely froze the machine resulting in > the watchdog triggering and rebooting the machine. So, $something was > already fixed here. Fixed? Or broken? More likely the later. > Bisecting leads to the mentioned commit, reverting of the commit results > in a BUG-less run of the stress-ng test. > Any idea what might cause this and how to fix it? It isn't obvious to me how reverting this patch fixes anything. The fasteoi flow does the same thing as far as the IPI driver is concerned However, it appears that I have broken that part much earlier in f02147dd02eb ("irqchip/armada-370-xp: Configure IPIs as standard interrupts"), as the write to ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS that used to occur before the handling (an ACK) has now been moved after as an EOI. That's a pretty good way to lose edge interrupts. Could you try the following patch on top of 5.12-rc2? Thanks, M. diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c index 7557ab551295..53e0fb0562c1 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -359,16 +359,16 @@ static void armada_370_xp_ipi_send_mask(struct irq_data *d, ARMADA_370_XP_SW_TRIG_INT_OFFS); } -static void armada_370_xp_ipi_eoi(struct irq_data *d) +static void armada_370_xp_ipi_ack(struct irq_data *d) { writel(~BIT(d->hwirq), per_cpu_int_base + ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS); } static struct irq_chip ipi_irqchip = { .name = "IPI", + .irq_ack = armada_370_xp_ipi_ack, .irq_mask = armada_370_xp_ipi_mask, .irq_unmask = armada_370_xp_ipi_unmask, - .irq_eoi = armada_370_xp_ipi_eoi, .ipi_send_mask = armada_370_xp_ipi_send_mask, }; -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel