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.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 658C7C433EF for ; Wed, 22 Sep 2021 08:28:16 +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 3758160F23 for ; Wed, 22 Sep 2021 08:28:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3758160F23 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de 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:Message-ID:In-reply-to: Date:Subject:Cc:To:From:References:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AljR8WPBEo6IukSir74UwxvMaHF+jXqInzxLuHzVXTQ=; b=P6UIQGDIdj1caV 2Z8p2ONYQ9hStZcZpQnXRpvivwDZ5HUGXHY5KD/KPlwJHU+8JDh2VvJ9r45zbkQPGVedL0Qasa/dI SukQ+psG9qa4p8UkfISUHMcsvMyw2tQNNUbjeJoTeh7zNDoh5aDq3AXqrlNd6QdON0NSyTiu4dqWC TWfV4FOFlEmnxM+Qz2tSjwHLovp5pzWbO0g7l+el946w/ss7xd0MVfeOEu0Ekj74GBPbnRlRnD14l Fc231yCAJzOC04WTwClB+vajzcK8de4tu+emE0+eQIV83qDWdVYhds6hlY+f/NxYGAI+hmlscuwuW +30OYMTVXBzFUjPlnVgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSxaR-007T2o-JT; Wed, 22 Sep 2021 08:26:39 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSxaN-007T1R-2H for linux-arm-kernel@lists.infradead.org; Wed, 22 Sep 2021 08:26:37 +0000 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0] helo=igor.pengutronix.de) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSxaK-0005qz-Pu; Wed, 22 Sep 2021 10:26:32 +0200 References: <87tuiexq5f.fsf@pengutronix.de> <87h7eeufby.wl-maz@kernel.org> <87o88lxec8.fsf@pengutronix.de> <87ee9huiz8.wl-maz@kernel.org> User-agent: mu4e 1.4.13; emacs 28.0.50 From: Steffen Trumtrar To: Marc Zyngier Cc: Steffen Trumtrar , Valentin Schneider , Andrew Lunn , Gregory Clement , linux-arm-kernel@lists.infradead.org Subject: Re: [BUG] irqchip: armada-370-xp: workqueue lockup Date: Wed, 22 Sep 2021 10:24:50 +0200 In-reply-to: <87ee9huiz8.wl-maz@kernel.org> Message-ID: <87ilytxbgq.fsf@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: s.trumtrar@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210922_012635_174566_B66B5BF3 X-CRM114-Status: GOOD ( 23.49 ) 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 Marc Zyngier writes: > On Wed, 22 Sep 2021 07:49:05 +0100, > Steffen Trumtrar wrote: >> >> >> Hi, >> >> Marc Zyngier writes: >> > 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 >> > >> >> didn't the fasteoi flow just call the irq_eoi earlier? Same as the >> irq_ack now? > > Yes, of course, you are correct. Another proof that the whole initial > fasteoi flow that used EOI as an ACK was *a bad idea* (tm). > >> >> > >> > 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, >> > }; >> >> This fixes it, yes \o/ > > Thanks. Can I use this as a Tested-by: tag in the official patch? > Yes, of course. Go ahead. Thanks, Steffen -- Pengutronix e.K. | Dipl.-Inform. Steffen Trumtrar | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686| Fax: +49-5121-206917-5555 | _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel