Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 955E6C433EF for ; Mon, 20 Dec 2021 12:43:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231209AbhLTMnf (ORCPT ); Mon, 20 Dec 2021 07:43:35 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:50728 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229820AbhLTMne (ORCPT ); Mon, 20 Dec 2021 07:43:34 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 433F661043; Mon, 20 Dec 2021 12:43:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B6FAC36AE8; Mon, 20 Dec 2021 12:43:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1640004213; bh=qbxprMqCIA8aiPZPossO5ggao3JXZgSEWMr5dIvdevA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BcNrAgMGuk0ualZsRfLHJmeM2qXf1LMfbgDToteDw8So6HKPQKj5kmmEq5/awhUGC 40JFpm1USaF4fwNLz1HoprNwMq8RD0xl5cW5j4+VCUZzgztWFKwtASSQvK/4Wz8luv DSKUkNAC/CQYcHlGFGr5g+01955apoNXS9LlBddyETMRsbGPwh611kBtopR6u9Xo+q dRs+Rm+Fjxz67QR0GafZiAT8d+muydDUch/a0QScd2LCok+uF0abtPwaIN9AhnD4BQ Fepbc02uEVKTQ0n3fWCJtFTbgC8PzYFFzfsv63u3o6/OGwOVirGxJosKHzOOY+Z5xo ECNou0o5pLE/g== Received: from cfbb000407.r.cam.camfibre.uk ([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 1mzI0p-00DHgG-Mp; Mon, 20 Dec 2021 12:43:31 +0000 Date: Mon, 20 Dec 2021 12:43:31 +0000 Message-ID: <87a6gvwioc.wl-maz@kernel.org> From: Marc Zyngier To: Hector Martin Cc: Thomas Gleixner , Rob Herring , Sven Peter , Alyssa Rosenzweig , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH 2/6] irqchip/apple-aic: Add Fast IPI support In-Reply-To: <83631cf6-46c5-cd87-c3a7-6b619669a943@marcan.st> References: <20211209043249.65474-1-marcan@marcan.st> <20211209043249.65474-3-marcan@marcan.st> <87sfuyt3nh.wl-maz@kernel.org> <83631cf6-46c5-cd87-c3a7-6b619669a943@marcan.st> 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: marcan@marcan.st, tglx@linutronix.de, robh+dt@kernel.org, sven@svenpeter.dev, alyssa@rosenzweig.io, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 18 Dec 2021 05:31:28 +0000, Hector Martin wrote: > > >> + u64 idx = FIELD_GET(MPIDR_CPU, mpidr); > >> + > >> + if (FIELD_GET(MPIDR_CLUSTER, my_mpidr) == cluster) > >> + write_sysreg_s(FIELD_PREP(IPI_RR_CPU, idx), > >> + SYS_IMP_APL_IPI_RR_LOCAL_EL1); > >> + else > >> + write_sysreg_s(FIELD_PREP(IPI_RR_CPU, idx) | FIELD_PREP(IPI_RR_CLUSTER, cluster), > >> + SYS_IMP_APL_IPI_RR_GLOBAL_EL1); > > > > Don't you need an ISB, either here or in the two callers? At the > > moment, I don't see what will force the execution of these writes, and > > they could be arbitrarily delayed. > > Is there any requirement for timeliness sending IPIs? They're going to > another CPU after all, they could be arbitrarily delayed because it has > FIQs masked. They absolutely could, but this has a potential impact on the scheduling if you delay it (the vast majority of these IPIs are to indicate to the remote CPU that it needs to go and schedule something else). So there is an incentive for making it happen ASAP. Thanks, M. -- Without deviation from the norm, progress is not possible.