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.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,USER_AGENT_GIT 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 A57C3C4321A for ; Tue, 11 Jun 2019 18:11:08 +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 7ED4A20896 for ; Tue, 11 Jun 2019 18:11:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BKjvmDVl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7ED4A20896 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=iki.fi 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=pEYIr2/XAL3EqIfvoRjXwtZpVt5E2F5q4WAGSFo5ntk=; b=BKj vmDVlUPj4UyQMnvt2S8Y2vF2lyoJ1dnKmDk58MZDTvqzxrN40xYLG1LlphskYro67qudjX6lircCT fQwq6ZRJti/4cNxUQHEwGPP1+uwVsxfwZ8KyM0Vpi5Mz6j+1Dr1ZWl69Zkvig0E0LgF/DQdt0aZ5N a0s+WiGcH8mtu/p7PsYTUKPwnAlljXRxrMfqW0dv6uXXJMUCOIFzQjh2nJW6NIkp0NAAUqrjNAN0+ gnFKbjxIS7QefaQWSDuDl4ONpVgiBqcJKDF6gfY0h/GiR0a4ZNztYcHV3lcZ4grviBYBO6FDOEg1x VzIXuvosmHrcjLYfOiLfcrZH7JB/0Gw==; 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 1halEZ-0007Lb-QL; Tue, 11 Jun 2019 18:10:59 +0000 Received: from emh03.mail.saunalahti.fi ([62.142.5.109]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1halEV-0007HC-0V for linux-arm-kernel@lists.infradead.org; Tue, 11 Jun 2019 18:10:57 +0000 Received: from localhost.localdomain (85-76-70-161-nat.elisa-mobile.fi [85.76.70.161]) by emh03.mail.saunalahti.fi (Postfix) with ESMTP id 990264003B; Tue, 11 Jun 2019 21:10:50 +0300 (EEST) From: Aaro Koskinen To: Catalin Marinas , Will Deacon , James Morse , Jayachandran Chandrasekharan Nair Subject: [PATCH 1/2] arm64: Improve parking of stopped CPUs Date: Tue, 11 Jun 2019 21:10:49 +0300 Message-Id: <20190611181050.9647-1-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.17.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190611_111055_231356_438B4F76 X-CRM114-Status: UNSURE ( 7.97 ) X-CRM114-Notice: Please train this message. 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: Aaro Koskinen , linux-arm-kernel@lists.infradead.org, Aaro Koskinen MIME-Version: 1.0 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 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(); } #ifdef CONFIG_KEXEC_CORE -- 2.17.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel