Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1704997pxb; Mon, 23 Aug 2021 02:35:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMUV0vTyWwI+AQYWclwX5J2gxJ0uZ7fiaEdjiTjR4+Rl8eytvlYMKDvddp+twAsuROzgp0 X-Received: by 2002:a6b:f817:: with SMTP id o23mr25744862ioh.205.1629711310759; Mon, 23 Aug 2021 02:35:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629711310; cv=none; d=google.com; s=arc-20160816; b=RgVzdzvdLhyQbrEWYcP0FTftBnhbOG+nEmVxCXxU4jilTQ8YYU9Z/rBjTid9fP6ZpJ S1960dqnCSVf0Ei9NRpR48YVIn0+z3elZ1RW4m2kH/dlUj+FYlIJCWftCu4uWF0XHE/d vAtw11Bez4QeN1szMNu5Gr4AsV+V2r4pBnjozjlIT38xKTEWIsNITvKSHFnZzLLqYJiU ecKduo0uTKpYs0oCaTHH9vW1bDz0aj//yL8iW2LzP0y3kPqufywWxiRrn7c/3XB7NFuk Yg6VmCe2ibpK97pId21EXCy3ribYVH56765uYoX112njw+2+FZ00Imst48QLl02GCnfJ mUbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=8tcmPlYLM2AaiTNWcH951o2o048usHqXlz2uuNM0xMY=; b=nUKQ7WnJ2xFPjYVm+49KH+X6T3/lGRBQAo9KU7AN+K+b11rG4kwtAcogVbS8QbiIiU mh+72r9e7SdO2Tx0zLrEuXcuf8Mr21PBQDVcuoX/RSacon6MQrfQ6X3thDC7L1gxmKvK /uyCuN10a3ueRGQm984Up9X/MqnNwBRQRf7dtvnPRZHmDDfRrepUDapZw2aK5IoJ117o j+J1QHfDpn8S4GOZZ75ALUkZMBXlXJCtzf5+W2IQZGIBumIw+AlC5/eJaXy2Va3n5/z5 0Gcab0wMN60c+nnoWPkdMb49ApxADIlbfDYkLrplEOmwuBCJT4R5ii0hH5y7t3AhxwQY t4Ag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si13510356jar.79.2021.08.23.02.35.00; Mon, 23 Aug 2021 02:35:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236058AbhHWJeb (ORCPT + 99 others); Mon, 23 Aug 2021 05:34:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:33254 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236434AbhHWJeY (ORCPT ); Mon, 23 Aug 2021 05:34:24 -0400 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 7C1486137F; Mon, 23 Aug 2021 09:33:42 +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 1mI6Kq-006cqm-GD; Mon, 23 Aug 2021 10:33:40 +0100 Date: Mon, 23 Aug 2021 10:33:40 +0100 Message-ID: <87czq4qzd7.wl-maz@kernel.org> From: Marc Zyngier To: Valentin Schneider 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: <878s0t6s7p.mognet@arm.com> References: <20210814194737.GA3951530@roeck-us.net> <87sfzb7jeo.mognet@arm.com> <87eeav19mc.wl-maz@kernel.org> <87k0kk7w0c.mognet@arm.com> <87czqasn9u.wl-maz@kernel.org> <878s0t6s7p.mognet@arm.com> 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") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: valentin.schneider@arm.com, linux@roeck-us.net, linux-kernel@vger.kernel.org, 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 22 Aug 2021 23:16:10 +0100, Valentin Schneider wrote: > > On 18/08/21 17:58, Marc Zyngier wrote: > > On Tue, 17 Aug 2021 01:30:43 +0100, > > Valentin Schneider wrote: > >> 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. > > > > An intermediate layer is allowed to implement its own irq_ack that is > > not irq_chip_ack_parent, but it then has to call irq_chip_ack_parent > > itself. > > > > Right, makes sense. > > > There is the bizarre case of drivers/gpio/gpio-thunderx.c that changes > > the irqchip flow to use either handle_fasteoi_ack_irq or > > handle_fasteoi_mask_irq, which won't play very nicely with this. > > Someone said Cavium? > > > > Humph... > > I'm not familiar at all with the gpiolib irqchips, but I was under the > impression those would involve chained IRQs (it does appear to be the case > for the pl061 GPIOs on a Juno). For those, the innermost desc would be handled > via chained_irq_{enter, exit}() [!!!], and the outermost one via whatever > flow was installed by the relevant driver. Not all of them are built like this. There is actually a bunch of these build as full hierarchies (QC, nvidia and some others). > I can't easily grok what goes on between that gpio-thunderx.c driver and > gpiolib, but since that GPIO chip has > > .irq_eoi = irq_chip_eoi_parent, > > and > > girq->parent_domain = > irq_get_irq_data(txgpio->msix_entries[0].vector)->domain; > > (GPIOs hooked to MSI-X? Do I want to know?) It's good, isn't it? TX1 has all its HW appearing as PCI, even if it clearly isn't PCI underneath. > > I'm guessing it is *not* chained, which means the irq_set_handler_locked() > affects the entire stack :/ It does. We can probably fix that, but I won't be able to test (my TX1 was taken away a few months ago...). I'll accept body donations, for scientific purposes. > > [!!!] Speaking of chained IRQs, I'm now thinking this series breaks them; > chained_irq_enter() + chained_irq_exit() will only issue an ->irq_eoi(), > skipping the ->irq_ack()... One more thing to add to the list! Urghh... Yeah, that's awful. Thanks, M. -- Without deviation from the norm, progress is not possible.