From patchwork Thu Dec 10 05:47:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 11963317 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=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 B97A0C4361B for ; Thu, 10 Dec 2020 05:49:33 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 789D123D37 for ; Thu, 10 Dec 2020 05:49:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 789D123D37 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=vzVtC5svnZsV25v4XAM1tZNzpkZmRW43I9nsPuXsEvE=; b=dN7x/6TZX4VOoZiVnoB44vdCym +zp4vtTh5Adw8Ehfc/1u4OMCMn1+HwfcYMx/TR7zSZdoppDVUJKIzSNG61no8KOZCs2hjVzQVLx5E a59NHmDzC6MVUQIhiZzQQ1tdWR+xCHcK2hn/d92EtBvuebj+euNHxAc7dFKNNfCZjTUZukrihqTgW zugFgPJNy80oHQ80IeKo/RVSei/v67bq2HrCOS6RVO7GYQkurX5n+VyEC5WZlANidR0KFl6CPcRRE nlufhScUlArw1hHtFKuE5gcSa4gRx7WzV2R4oisw2KJgUvus8KthAEoYlH5DGOais+ZOeUKGKX++w 54/lVDOA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1knEoA-0006aZ-Qq; Thu, 10 Dec 2020 05:48:06 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1knEo2-0006a5-Oh for linux-arm-kernel@lists.infradead.org; Thu, 10 Dec 2020 05:48:01 +0000 Received: by mail-pl1-x643.google.com with SMTP id t6so2231290plq.1 for ; Wed, 09 Dec 2020 21:47:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NqfQ0H085YyswsYjlG/LMOHHjFKZeIKe7fDW3bYC1us=; b=OvqJ9Zo8LX6mbR4YCHZnxCYrjii0KcrLAcheqfJTH/hDLLalPwKyZO1dBRXao0njA8 Q6mqqRqhw6h1jL1f7HSkhN8ehGx9LxrjSgxPjhwHi0/UJnLHLHj6wF1oqRy/ATVohoFB kO94h2ihLj0RvLSYcJpKqinZ7cjAl6HqLMzf+jfsPYy/z0QV1EhOyTxDhD2f2OIAVNdY 5fiBPCDwzDItFmdKdkciNCst7GPCRFVZ1lvYBIXVGLU7t8IZDbDlf+NjF8InjB1rLpFQ Den4/sB+K9mVTFrKkkIzTlfz4zov1Op657fB2JVljUCf9TNzyrOJfKAzm2abSrN6Ap9k eX3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NqfQ0H085YyswsYjlG/LMOHHjFKZeIKe7fDW3bYC1us=; b=ETchnDTzZlgyvyIIedh31Cpkrokg098BP7bRBlgyG6qPSpJrNGtat6rbRnOy7d4Gpq TqrRH3BHUuy/3tNolkN7EN9SoF2LGQhAiW89Cza5vFTaGCuOAWbyHqNAQlSqh4qnfdz5 2hBZCCJy94qg0SfrFuImHRk+mJh8tVvJuEQk7oe8tS7TAlOWdO5Sv1WqAKcN8ohyrlbz WJmzOCoLJk8sJ8oP/m7ZAeyTLd+zlWr/ew7v/t2ZlSeO2EgNbR8TuleRqimDij8208o8 67NzVYCqHS30BCFbpjYT0EZnpah4gfYyoWJKUGwp8tT5XoTx8fRgtuwv3iTEyysh7oWq ee1A== X-Gm-Message-State: AOAM533pGf6TP3Iw4PbZKVFDDB/FO7IgJQrNPZiTp2c2VeooWtanQI+g YOSUIyN9Edj8F5oiIM0XrGuU2w== X-Google-Smtp-Source: ABdhPJz9s3He4dsrbNUL30WbsEGDj6KL5BGM9k6vFnpjcv6B2364ws+25ls9tFXDIqoWWd4cKy3WmA== X-Received: by 2002:a17:902:8649:b029:d9:fcd9:522a with SMTP id y9-20020a1709028649b02900d9fcd9522amr5231708plt.83.1607579274879; Wed, 09 Dec 2020 21:47:54 -0800 (PST) Received: from localhost ([122.172.20.109]) by smtp.gmail.com with ESMTPSA id h11sm4456652pfn.27.2020.12.09.21.47.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Dec 2020 21:47:54 -0800 (PST) From: Viresh Kumar To: Catalin Marinas , Will Deacon , Sudeep Holla , Ionela Voinescu Subject: [PATCH] arm64: topology: Drop the useless update to per-cpu cycles Date: Thu, 10 Dec 2020 11:17:40 +0530 Message-Id: <7a171f710cdc0f808a2bfbd7db839c0d265527e7.1607579234.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201210_004759_099765_1C673414 X-CRM114-Status: GOOD ( 12.51 ) 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: Viresh Kumar , Vincent Guittot , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The previous call to update_freq_counters_refs() has already updated the per-cpu variables, don't overwrite them with the same value again. Fixes: 4b9cf23c179a ("arm64: wrap and generalise counter read functions") Signed-off-by: Viresh Kumar Reviewed-by: Sudeep Holla Reviewed-by: Ionela Voinescu --- arch/arm64/kernel/topology.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c index c8308befdb1e..f6faa697e83e 100644 --- a/arch/arm64/kernel/topology.c +++ b/arch/arm64/kernel/topology.c @@ -314,7 +314,7 @@ void topology_scale_freq_tick(void) if (unlikely(core_cnt <= prev_core_cnt || const_cnt <= prev_const_cnt)) - goto store_and_exit; + return; /* * /\core arch_max_freq_scale @@ -331,10 +331,6 @@ void topology_scale_freq_tick(void) scale = min_t(unsigned long, scale, SCHED_CAPACITY_SCALE); this_cpu_write(freq_scale, (unsigned long)scale); - -store_and_exit: - this_cpu_write(arch_core_cycles_prev, core_cnt); - this_cpu_write(arch_const_cycles_prev, const_cnt); } #ifdef CONFIG_ACPI_CPPC_LIB