Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5134082imu; Tue, 29 Jan 2019 13:26:18 -0800 (PST) X-Google-Smtp-Source: ALg8bN5pFNTIFCidT6pyrBiSNF0cv5ay/NwCHyi30IkgQT1PqkbMS2uXCqo7U4rehXlt+EArklpd X-Received: by 2002:a17:902:820f:: with SMTP id x15mr26707769pln.224.1548797178912; Tue, 29 Jan 2019 13:26:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548797178; cv=none; d=google.com; s=arc-20160816; b=FD5jvKHABh1iYE0fYV3JiRmbsBPllrf3LvfelJCXJEda8I2sRLZ9s85GJpoYiAyE6l ONmoWhZbFzW9mADEzv1bWy1xfsK+tS3Jpmjme2yOzFTNqZXgZepDYFhP1jpI5WGh9Dgf kewHxNdrG0SxVXxemYkYUBPTcgZoOotsvWVUI3k9XtR2sjCgHQBQxF8PUdqVewrihKNs +Mpmah2cPu6EYo4wOeKV8zdofLHRrh/M+0R5jLWeGAzrz6CCkkg8+T5jzSfvkDPVWwLc LDytnMzmkqW+MKYYLVRnqDTTPDs74L20Z4+q1nvvo7Wj/q9PmpV++Bl/Y2OAuyBe7e8P 9gFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=bW0/pf+fzppvJHL9+zmnmwn3UaN2End/KTC1hOyplsY=; b=M9V+C4gNJ20eVzveR+xBIPYF7H38aUHBZloCs1zv7QyS0T+/+x3I8JTL6FKXFz/LWd uTu+VSsLNN17A3lBz5z3Q54dSYD+vmdnIzbevQFyQ4Kt2gxLhOUgI0kYvMzMak2BU8Up g8UK2NQjYf7OczxBU/5DAsy2AxjavzRqdJjbakKZUQqBOKHb9aIO4zKaoQgB0jq2lMGc XGGgiSPA5WHWk3g8nf8YF5RZofyr5rCpmc21FnoLaPeFlfD/XusJoHXiWJGxfVdqrWu3 GfbGOU04XA0zSafDjYGVhFYNSdgIxgVgS88E7b2IBu3dx+mH3jdXajWC5RGyeq8LBF6M 57iA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c12si8637020pgb.402.2019.01.29.13.26.02; Tue, 29 Jan 2019 13:26:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729593AbfA2VZP (ORCPT + 99 others); Tue, 29 Jan 2019 16:25:15 -0500 Received: from terminus.zytor.com ([198.137.202.136]:35659 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727570AbfA2VZP (ORCPT ); Tue, 29 Jan 2019 16:25:15 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x0TLOwO32105831 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 29 Jan 2019 13:24:58 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x0TLOvXa2105827; Tue, 29 Jan 2019 13:24:58 -0800 Date: Tue, 29 Jan 2019 13:24:58 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Zhenzhong Duan Message-ID: Cc: peterz@infradead.org, srinivas.eeda@oracle.com, tglx@linutronix.de, dwmw@amazon.co.uk, zhenzhong.duan@oracle.com, linux-kernel@vger.kernel.org, mingo@kernel.org, konrad.wilk@oracle.com, hpa@zytor.com, bp@suse.de Reply-To: bp@suse.de, hpa@zytor.com, konrad.wilk@oracle.com, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de, zhenzhong.duan@oracle.com, dwmw@amazon.co.uk, peterz@infradead.org, srinivas.eeda@oracle.com In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:smp/urgent] x86/speculation: Remove redundant arch_smt_update() invocation Git-Commit-ID: 34d66caf251df91ff27b24a3a786810d29989eca X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_48_96 autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 34d66caf251df91ff27b24a3a786810d29989eca Gitweb: https://git.kernel.org/tip/34d66caf251df91ff27b24a3a786810d29989eca Author: Zhenzhong Duan AuthorDate: Thu, 17 Jan 2019 02:10:59 -0800 Committer: Thomas Gleixner CommitDate: Tue, 29 Jan 2019 22:20:24 +0100 x86/speculation: Remove redundant arch_smt_update() invocation With commit a74cfffb03b7 ("x86/speculation: Rework SMT state change"), arch_smt_update() is invoked from each individual CPU hotplug function. Therefore the extra arch_smt_update() call in the sysfs SMT control is redundant. Fixes: a74cfffb03b7 ("x86/speculation: Rework SMT state change") Signed-off-by: Zhenzhong Duan Signed-off-by: Thomas Gleixner Cc: Cc: Cc: Cc: Cc: Cc: Link: https://lkml.kernel.org/r/e2e064f2-e8ef-42ca-bf4f-76b612964752@default --- kernel/cpu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index 91d5c38eb7e5..c0c7f64573ed 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -2090,10 +2090,8 @@ static int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) */ cpuhp_offline_cpu_device(cpu); } - if (!ret) { + if (!ret) cpu_smt_control = ctrlval; - arch_smt_update(); - } cpu_maps_update_done(); return ret; } @@ -2104,7 +2102,6 @@ static int cpuhp_smt_enable(void) cpu_maps_update_begin(); cpu_smt_control = CPU_SMT_ENABLED; - arch_smt_update(); for_each_present_cpu(cpu) { /* Skip online CPUs and CPUs on offline nodes */ if (cpu_online(cpu) || !node_online(cpu_to_node(cpu)))