From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7826218398D for ; Thu, 30 May 2024 08:59:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717059592; cv=none; b=e0z6VVQ2XxpHjcrmuN7ojZPqv8SHo/V3dkxlYsGx2Sst6fpgLsscBRiBTXJuMMZj10Ya+UfcHyx6eH8tLrxszeAoBZSK8L55rfx4z6dGmh2DF0aE0aAblAIhPSY66sx5LzSHCYVmVZvf8NOzNYfcXZShjzCiSR7OoPjcz3k9dTc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717059592; c=relaxed/simple; bh=ToL+POEPulcMMhmLMfYyuoUlouCPWZtIwfrJY+aGc40=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=XV3pTErfEddWmWhXye2b9UnjC6cK1KRLJ51qUI8Hhyv5hCkn6QeVAOMuN6Ml6O4XsWc39WlcBv6bi0z1dEdZ2aasHehaQyvMbRbnw1e7vGQRRWyHz+tViV2ClwGVg7QI/5+qSCf5JGnzjY+9F8w8FFv/yam4oSU6DBbmtLrodoc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Om3QX1rq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Om3QX1rq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11027C2BBFC; Thu, 30 May 2024 08:59:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717059592; bh=ToL+POEPulcMMhmLMfYyuoUlouCPWZtIwfrJY+aGc40=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Om3QX1rqgYHkTDu1UjFsHzItLVYlfel+sxir7vFgmtwJV//BwBdJlXd34KKxnZwst bLofNY4bfsSUX/S4XGlUkHzeI14zrJCIbaV1Udxrkpf/YTH44yn80MAmNI0DFvFQXT U726MQaoL2ZS67Xk1QKaztQqqPxjv1Rltooad+g9BA8UG1f9VUTW+KYQYgiZV6f5e5 i76UQC6vNsZ0v4FO9dyn9taRavY3+wyDEeSQ08hqvyzvNOQrZndEnhCuf/YMlMFFZk qLII5yu3GShwpnsrTt/e4mzD2A1v+CvU9Swxi+5+GB50RQDIvz+KqIbG4VfIRASn6D aCYXTLLBFbDGQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sCbdV-00Gq4k-LV; Thu, 30 May 2024 09:59:49 +0100 Date: Thu, 30 May 2024 09:59:49 +0100 Message-ID: <86zfs7lloa.wl-maz@kernel.org> From: Marc Zyngier To: Samuel Holland Cc: Thomas Gleixner , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] irqchip/gic: Use smp_wmb() instead of dmb(ishst) In-Reply-To: <20240530005254.1495461-1-samuel.holland@sifive.com> References: <20240530005254.1495461-1-samuel.holland@sifive.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/29.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: samuel.holland@sifive.com, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Thu, 30 May 2024 01:52:30 +0100, Samuel Holland wrote: > > This is equivalent on ARM, but also works on other architectures. > > Signed-off-by: Samuel Holland > --- > > drivers/irqchip/irq-gic.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c > index 98aa383e39db..dc2e4018a40c 100644 > --- a/drivers/irqchip/irq-gic.c > +++ b/drivers/irqchip/irq-gic.c > @@ -839,7 +839,7 @@ static void gic_ipi_send_mask(struct irq_data *d, const struct cpumask *mask) > * Ensure that stores to Normal memory are visible to the > * other CPUs before they observe us issuing the IPI. > */ > - dmb(ishst); > + smp_wmb(); > > /* this always happens on GIC0 */ > writel_relaxed(map << 16 | d->hwirq, gic_data_dist_base(&gic_data[0]) + GIC_DIST_SOFTINT); Equivalent, sure. But what does it gain us, given that the driver is only compiled on ARM systems? Additionally, you may also want to address the one in the hip04 driver, which has the same dmb instruction. Thanks, M. -- Without deviation from the norm, progress is not possible.