Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1477637rdb; Mon, 2 Oct 2023 10:37:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEZgHeXkNsUgjt42sCPrQIh3VqfMNNUlind7dLbsovOHxdTzhLoNOuFmuutrqijiI1slVLH X-Received: by 2002:a17:902:b7cc:b0:1c7:49dd:2ff with SMTP id v12-20020a170902b7cc00b001c749dd02ffmr307403plz.27.1696268268011; Mon, 02 Oct 2023 10:37:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696268267; cv=none; d=google.com; s=arc-20160816; b=pHNy56gLTfIQ4o6ex/XQ8nDxIUQDrjR+ZM/PgYksXthVczLBIHKnM+OGHtO0vfjEV1 epAx3xXNxpDubiXG/+XPyO5E2Nb5UGs7HgBhTHvyjiJJHqJBHHU3omEaRd9F/lHAVDSd Ww7+oSfJTJjXiXTNwqiug8vkGXdsVNOCDfZxJSstZBLIY95zWjOt+bOpzuX5LuCMyC6k 3nrEBsGQs4WSRAG8gDAX8V0XeoC+xGX0n81SgCbqBkdD6uuxqyHhcW0qEuwPa903kZlh GH2sA/BwOWeF+auSNUj4gVVyAjP8vfxtCEn4sJOoEBxtDlww8+v4zNKFthbHQScDDixx UigQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=SBcVYNtZV4bB3AnCqCaebCZX+wkyCbjl4XEwwp1HV2s=; fh=NqOvvBH8gp9hEevcRXvsujUi1IDNiRduN5uoFpGKEqI=; b=lPmcGIJYCtzIol2bjRWSiJJZtsRamWM8bsJ+F/s/d/wAFjQfmlOKKlHnlg6qtoEv2i LKHc4DS+l3TBddPxSxCF95nOmUuo67zZ6rZNjvBMAlXOYAMXS3WOCbDf2tWv5IZ0uYlD o+TitC7OB2woF00yLVf/CoIr8BdM02xDdChfrGfyJBmlHH6ydvRfwEvVxYKNBO/c5FK0 QMITz51vmgH4pNm+ictjk4RROk62txuiMS183olQqWeESoKV++tfxV4ksc3YXkzx2Yan TBl5nPNEBWKZQ9qxPfIarMGsb4sfEzJjZJkIFEB0C/G/uzhOfyn1Eh/f0w//KlTq16cC VF9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id d10-20020a170903230a00b001b662f49f60si30266147plh.419.2023.10.02.10.37.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 10:37:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A5F1480755F1; Mon, 2 Oct 2023 10:26:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229576AbjJBR0J (ORCPT + 99 others); Mon, 2 Oct 2023 13:26:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbjJBR0H (ORCPT ); Mon, 2 Oct 2023 13:26:07 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3192CAC for ; Mon, 2 Oct 2023 10:26:03 -0700 (PDT) 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 6D5FEC15; Mon, 2 Oct 2023 10:26:41 -0700 (PDT) Received: from FVFF77S0Q05N.cambridge.arm.com (FVFF77S0Q05N.cambridge.arm.com [10.1.28.139]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 238FA3F59C; Mon, 2 Oct 2023 10:26:01 -0700 (PDT) Date: Mon, 2 Oct 2023 18:25:58 +0100 From: Mark Rutland To: Douglas Anderson Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Stephen Boyd , Valentin Schneider , Chen-Yu Tsai , D Scott Phillips , Josh Poimboeuf , Peter Zijlstra , Sumit Garg , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] arm64: smp: Don't directly call arch_smp_send_reschedule() for wakeup Message-ID: References: <20231002094526.1.Ie8f760213053e3d11592f892b30912dbac6b8b48@changeid> <20231002094526.2.I2e6d22fc42ccbf6b26465a28a10e36e05ccf3075@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231002094526.2.I2e6d22fc42ccbf6b26465a28a10e36e05ccf3075@changeid> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 02 Oct 2023 10:26:12 -0700 (PDT) On Mon, Oct 02, 2023 at 09:45:30AM -0700, Douglas Anderson wrote: > In commit 2b2d0a7a96ab ("arm64: smp: Remove dedicated wakeup IPI") we > started using a scheduler IPI to avoid a dedicated reschedule. When we > did this, we used arch_smp_send_reschedule() directly rather than > calling smp_send_reschedule(). The only difference is that calling > arch_smp_send_reschedule() directly avoids tracing. Presumably we > _don't_ want to avoid tracing here, so switch to > smp_send_reschedule(). > > Fixes: 2b2d0a7a96ab ("arm64: smp: Remove dedicated wakeup IPI") > Signed-off-by: Douglas Anderson > --- > I don't 100% know if this is correct and I don't have any hardware > that uses the "ACPI parking protocol", but I think it's right. My main > incentive for this is that it makes it easier to backport pseudo-NMI > to kernels that don't have arch_smp_send_reschedule(), but I think > it's also more correct. > > If for some reason we truly did want to avoid tracing here, please > shout and we can drop this patch. This should be sound, and I don't have strong feelings either way on this, so FWIW: Acked-by: Mark Rutland Mark. > > arch/arm64/kernel/smp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c > index 0a6002243a8c..b530d8ef9c1d 100644 > --- a/arch/arm64/kernel/smp.c > +++ b/arch/arm64/kernel/smp.c > @@ -1063,7 +1063,7 @@ void arch_send_wakeup_ipi(unsigned int cpu) > * We use a scheduler IPI to wake the CPU as this avoids the need for a > * dedicated IPI and we can safely handle spurious scheduler IPIs. > */ > - arch_smp_send_reschedule(cpu); > + smp_send_reschedule(cpu); > } > #endif > > -- > 2.42.0.582.g8ccd20d70d-goog >