From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76247C31E45 for ; Thu, 13 Jun 2019 09:22:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4B6E920B7C for ; Thu, 13 Jun 2019 09:22:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="agaUxWUN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B6E920B7C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KZXknh6R6httfZz1jKzaYTx1u6JFdREUkI3/MUIPR7M=; b=agaUxWUNT27poi C55ykcUkEYVxx6339977T/iNjbc0XxBHSWvBIzYPYsG4OuIUqGoqQfw9x/WM6Muc9zGScQenWDozR pSQaRllgD8opG0jZAiI1jn34zvFQ1irVQyv/GY4TWR5yIN009QiBaoqc1kWG5quLTtvRqukwd25SX 883AxPnKXFVEQuEji/njpKGkU/6Orw78R5EIiIBNKXisMzKkmdAgcDcrTs6k3H7MK+16H5U0b2pPt kPmAfWNoQqgCTFSEmiHE2DGsH8z/JPzaQkYj6QQW+xRaVnQsf9xZR2R4rxTApy4dc6WBaTCJLc5WY EJwc8RvXHcXpRkKExCag==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hbLwF-0000od-4R; Thu, 13 Jun 2019 09:22:31 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hbLwB-0000nz-5A for linux-arm-kernel@lists.infradead.org; Thu, 13 Jun 2019 09:22:29 +0000 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 76CD5367; Thu, 13 Jun 2019 02:22:26 -0700 (PDT) Received: from fuggles.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8ED903F694; Thu, 13 Jun 2019 02:22:25 -0700 (PDT) Date: Thu, 13 Jun 2019 10:22:23 +0100 From: Will Deacon To: Aaro Koskinen Subject: Re: [PATCH 1/2] arm64: Improve parking of stopped CPUs Message-ID: <20190613092223.GC17331@fuggles.cambridge.arm.com> References: <20190611181050.9647-1-aaro.koskinen@iki.fi> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190611181050.9647-1-aaro.koskinen@iki.fi> User-Agent: Mutt/1.11.1+86 (6f28e57d73f2) () X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190613_022227_236543_5BEAE804 X-CRM114-Status: GOOD ( 15.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin Marinas , Jayachandran Chandrasekharan Nair , James Morse , linux-arm-kernel@lists.infradead.org, Aaro Koskinen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jun 11, 2019 at 09:10:49PM +0300, Aaro Koskinen wrote: > From: Jayachandran C > > The current code puts the stopped cpus in an 'yield' instruction loop. > Using a busy loop here is unnecessary, we can use the cpu_park_loop() > function here to do a wfi/wfe. > > Signed-off-by: Jayachandran C > Signed-off-by: Aaro Koskinen > --- > > This is a rebased resend of the patch: > > https://patchwork.kernel.org/patch/9549145/ > > arch/arm64/kernel/smp.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c > index bb4b3f07761a..1a1b96a50245 100644 > --- a/arch/arm64/kernel/smp.c > +++ b/arch/arm64/kernel/smp.c > @@ -854,9 +854,7 @@ static void ipi_cpu_stop(unsigned int cpu) > > local_daif_mask(); > sdei_mask_local_cpu(); > - > - while (1) > - cpu_relax(); > + cpu_park_loop(); > } Acked-by: Will Deacon Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel