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=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 82CE9C433E8 for ; Fri, 10 Jul 2020 17:09:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 4D6682078D for ; Fri, 10 Jul 2020 17:09:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="W75ey6xc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D6682078D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:In-reply-to:Subject: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=ml7/nzMcuf+CxUr8OUwzl10MrtDBaFQV4Ka4QBQcwIE=; b=W75ey6xcdtQFGcSMs5xlt0hjI vfcKVPU+hwfNn+zhfn9+7U2so6dxq8wmgNEfQO+NsLQEcbCoBSZrJv8vQrsi0akw4yHH1N58Nkwx4 wefzINOfhMfwkKc2oe/t+HnrJn8/2E6/LGvBDr4Tn8KcA8n5G42f8XEPC/hHTNOoYJ/bIm4ARIy9A GzcQX9iQEutNU+jIDxCw7EoubOQcZwRORHkfMO13WOcdRglpAhoo0hcj1qBjis/LnIHiKnXZTMCXp 86OOb+z9Tn0dZ0Emr2w6MwecoaeV7tE0OKBni9fu59GO7WAKjrjSRYoqAzjevNlFw0Wo3GflCX6ti 0a4v6FTYw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtwVQ-0002X4-F9; Fri, 10 Jul 2020 17:08:12 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtwVO-0002WD-Ck for linux-arm-kernel@lists.infradead.org; Fri, 10 Jul 2020 17:08:11 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7DB8231B; Fri, 10 Jul 2020 10:08:08 -0700 (PDT) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 969463F8F8; Fri, 10 Jul 2020 10:08:07 -0700 (PDT) References: <20200710145642.28978-1-valentin.schneider@arm.com> <87tuyfxria.wl-maz@kernel.org> User-agent: mu4e 0.9.17; emacs 26.3 From: Valentin Schneider To: Marc Zyngier Subject: Re: [RFC PATCH] irqchip/gic: Implement irq_chip->irq_retrigger() In-reply-to: <87tuyfxria.wl-maz@kernel.org> Date: Fri, 10 Jul 2020 18:08:01 +0100 Message-ID: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200710_130810_501422_21D0E438 X-CRM114-Status: GOOD ( 17.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Gleixner , Lorenzo Pieralisi , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jason Cooper 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 On 10/07/20 17:29, Marc Zyngier wrote: > On Fri, 10 Jul 2020 15:56:42 +0100, > Valentin Schneider wrote: [...] >> Implement irq_chip.irq_retrigger() for both GICs. > > Although I am very grateful for the whole documentation, I'd rather > have a slightly more condensed changelog that documents the > implementation of the retrigger callback! ;-) > Hah, indeed! I was relatively unsure about that whole thing, hence why I sent it as RFC with a wall of text attached. I'll probably strip out the GIC doc snippets for the "actual" changelog, and talk about the *contents* of the patch some more. >> >> Signed-off-by: Valentin Schneider >> --- >> drivers/irqchip/irq-gic-v3.c | 7 +++++++ >> drivers/irqchip/irq-gic.c | 6 ++++++ >> 2 files changed, 13 insertions(+) >> >> diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c >> index cc46bc2d634b..c025e8b51464 100644 >> --- a/drivers/irqchip/irq-gic-v3.c >> +++ b/drivers/irqchip/irq-gic-v3.c >> @@ -1207,6 +1207,11 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val, >> #define gic_smp_init() do { } while(0) >> #endif >> >> +static int gic_retrigger(struct irq_data *data) >> +{ >> + return gic_irq_set_irqchip_state(data, IRQCHIP_STATE_PENDING, true); > > If I'm not mistaken, check_irq_resend() requires a non-zero return > value if the retrigger has succeeded. So something like > > return !gic_irq_set_irqchip_state(data, IRQCHIP_STATE_PENDING, true); > > would be more appropriate. > Aye, you're right. And while we're at it, we probably still don't want to fallback to irq_sw_resend() if the retrigger fails, so we should add some irqd_set_handle_enforce_irqctx() somewhere in the GICs or plainly deselect CONFIG_HARDIRQS_SW_RESEND. I'm not very familiar with LPIs just yet, but seeing as they too use handle_fasteoi_irq() and can't get retriggered, I'd rather play it safe. This brings me to another point: while this boots just fine, I didn't get to test out IRQs marked with IRQS_PENDING. IIUC enable_irq_wake() should give me a decent trail - I see serial_core making use of it. I'll go give suspend a try. > Otherwise, looks good. > Thanks for having a look! > Thanks, > > M. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel