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.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 1BAADC4320A for ; Tue, 17 Aug 2021 00:32:56 +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 D5BC760FA0 for ; Tue, 17 Aug 2021 00:32:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D5BC760FA0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com 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:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RfjPD2fcIbp/NWDKPpzxwxtD2X+E0/pILLvMy2aOMZQ=; b=ESaxoKoagWOfkV 3mxeqWtZcvUnsBtBEzJsCF2TvEI+07PN/qPEztG/8ikbv/OLMhP+CSxGwgavtxGxEbiYOg8tcfGtC WNLuxCmHd1tA2NNiZZJUv/XD0LD+HVbDHFFxFwQXBUZUo4pyuHpxhKnT9A2VuNRziG+aXGHhRblD4 VFTzIVgfsYfHq1rEcVt4AsQK4Z29W4RZt3GuY/+FBCKMvO9ADuPPZXZNvf5Z8q9xGkIYewhQvlc3m toE8caM5pvqjRicKBuNb72+4KZcb1FtbhFrtwbuJeGPW2S8GytBRIDIqRBOhEiYP4df0o0ferF96/ VEWl8mfSHFHnJ7+t3Awg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mFn0I-000a5t-UI; Tue, 17 Aug 2021 00:30:55 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mFn0E-000a5J-EO for linux-arm-kernel@lists.infradead.org; Tue, 17 Aug 2021 00:30:51 +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 A4BF91FB; Mon, 16 Aug 2021 17:30:46 -0700 (PDT) Received: from e113632-lin (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F21EC3F66F; Mon, 16 Aug 2021 17:30:45 -0700 (PDT) From: Valentin Schneider To: Marc Zyngier Cc: Guenter Roeck , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] irqchip/gic: Convert to handle_strict_flow_irq() In-Reply-To: <87eeav19mc.wl-maz@kernel.org> References: <20210814194737.GA3951530@roeck-us.net> <87sfzb7jeo.mognet@arm.com> <87eeav19mc.wl-maz@kernel.org> Date: Tue, 17 Aug 2021 01:30:43 +0100 Message-ID: <87k0kk7w0c.mognet@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210816_173050_576638_F5C43542 X-CRM114-Status: GOOD ( 22.29 ) 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 On 15/08/21 07:54, Marc Zyngier wrote: > This is going and-up in a wack-a-mole game. There is probably a bunch > of these all over the place. I'd rather squash it at the root, > i.e. with something like this (untested): > > diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c > index 099bc7e13d1b..601ad3fc47cd 100644 > --- a/kernel/irq/chip.c > +++ b/kernel/irq/chip.c > @@ -410,7 +410,12 @@ void irq_percpu_disable(struct irq_desc *desc, unsigned int cpu) > > void ack_irq(struct irq_desc *desc) > { > - desc->irq_data.chip->irq_ack(&desc->irq_data); > + struct irq_data *data = &desc->irq_data; > + > + while (!data->chip->irq_ack) > + data = data->parent_data; > + > + data->chip->irq_ack(&desc->irq_data); > > if (desc->irq_data.chip->flags & IRQCHIP_AUTOMASKS_FLOW) > irq_state_set_flow_masked(desc); > > We probably need something similar for irq_eoi(). > > This however shows a more fundamental problem, I'm afraid. We set > IRQCHIP_AUTOMASKS_FLOW in the GIC drivers (i.e. at the root), but test > for it at the top of the hierarchy. As soon as we have more than a > single layer of irqchip, this will do the wrong thing (or at least > miss the masking optimisation). > Yup. > This probably advocates for moving the flag into the descriptor. This > really makes sense, as the flow is global to the whole stack, not just > to the localised irqchip. > Are we guaranteed to have .irq_ack \in {NULL, irq_chip_ack_parent} for all intermediate (!root) irqchips? I don't see why that wouldn't be the case, and with that in mind what you described makes sense to me. > In order to restore -next into a working state, I'm temporarily > dropping this series. Hopefully, we can sort this out before the merge > window and reinstate it. > I'm away from any keyboard for most of this week, but I'll get to it by the weekend. > Thanks, > > M. > > -- > 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