Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp495485pxj; Thu, 27 May 2021 05:22:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkBSFuIwof0OgOJno5ZRxANBO3iM7/C5h2Ru4fuZUs5ppxTmgWOTdVx9aljj94SWT/fO/j X-Received: by 2002:a17:906:fad1:: with SMTP id lu17mr643687ejb.124.1622118128826; Thu, 27 May 2021 05:22:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622118128; cv=none; d=google.com; s=arc-20160816; b=wKI700J0BY5T9jeyq8d1w0IQSerXgOjSxM4m5ZTg7zvvQ822N8PW5DinnLqEM2ycYX WrPBJM0Liaam++wEQznmyprnCyQSzXs9+K/sIYqW5to3nv1iZ4WzrgTaJAc/nVVff2EW M/W0rJu7WrQ67KLQxZd2uHhr55OL5p9+xtlHr2N+75YYfPnmG1ShVm8BiepJuNSw3f7D rH3YsepVYIlWLAPgJlX7yVzA6cHrrJOA4PqX3ITH8rqm7tUOt7QnCl4X4MaPei3VpNbE DpReyeLfPS52ufTjmxv5LUjdzUrMtgVtRwzMPImPyLgapWlXGEhGMLj7tYcFTK4n89rQ IFOg== 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=reoc0JINHKTNDCULQMU9mm8ncKyBgXp90t31eJmnFnw=; b=iqjh4fgUabGP2+VHO3w7Gxq/0AZCTa54SRPKMsqFcVjswSQQuGvy5JPpDUuqCUYI9J YeiIG2eYt7hoR51JzUClJz5RnCooUYooqELMaAiQi0iUQcHHDnt9PZeko8mNsbJQWv1y P2iVAN2Qr18UOUtfaDkPgend65Zi35op1MYJnAjAEy9UtH6yRR0mVtcRPHQ3+k1+244D 10McaOYxy3+EDfTzQEi3vkGd71KBlvG4AVOyrJHbd/HZyT0Pu62PPglZxeOHCCgPpvRE DXWCCLKfCaSrSvweFc13ZFNwMipPEO5cgIB0ALHPBKnLltyfL2uhc9t+BHi+LdKcM9Fe 9q/A== 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 v5si2210596edi.123.2021.05.27.05.21.43; Thu, 27 May 2021 05:22:08 -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 S234811AbhE0MTf (ORCPT + 99 others); Thu, 27 May 2021 08:19:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:56016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234091AbhE0MTf (ORCPT ); Thu, 27 May 2021 08:19:35 -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 2ECF5610CC; Thu, 27 May 2021 12:18:02 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] 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 1lmExc-003wPH-4D; Thu, 27 May 2021 13:18:00 +0100 Date: Thu, 27 May 2021 13:17:59 +0100 Message-ID: <87y2c0s748.wl-maz@kernel.org> From: Marc Zyngier To: Valentin Schneider Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thomas Gleixner , Lorenzo Pieralisi , Vincenzo Frascino Subject: Re: [RFC PATCH v2 08/10] irqchip/gic-v3-its: Use irq_chip_ack_parent() In-Reply-To: <20210525173255.620606-9-valentin.schneider@arm.com> References: <20210525173255.620606-1-valentin.schneider@arm.com> <20210525173255.620606-9-valentin.schneider@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: 62.31.163.78 X-SA-Exim-Rcpt-To: valentin.schneider@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tglx@linutronix.de, lorenzo.pieralisi@arm.com, vincenzo.frascino@arm.com 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 Tue, 25 May 2021 18:32:53 +0100, Valentin Schneider wrote: > > Subsequent patches will make the GIC irqchips use a flow handler that > issues an ->irq_ack(). irqchips of child domains need to handle this. > > Note: I'm very much not fond of this; this is treacherous and explodes if > any parent chip doesn't have an ->ack() callback. It turns out okay with > EOImode=0 because handle_fasteoi_irq() doesn't issue any ->ack(), but that > is very fragile at best. > > An alternative would be to > o make irq_chip_ack_parent() check the callback against NULL That's an overhead I'd like to avoid in the general case, given that we already have a bunch of users. > o make irq_chip_ack_parent() the default chip->irq_ack() via > MSI_FLAG_USE_DEF_CHIP_OPS. Seem like a reasonable approach: how about a custom irq_ack() callback that iterates over the hierarchy until it finds an a non-NULL entry? Flows that don't use ack won't be impacted, users that need ack will provide one if they want, and the default will do something slightly slower, but at least unsurprising. > XXX: what about pMSI and fMSI ? Same thing. They are just bus-specific domains on top of the ITS domain, and must follow the same convention. However, this patch is perfectly acceptable to me (as long as you take care of platform and fsl -MSI). Thanks, M. -- Without deviation from the norm, progress is not possible.