Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1867030imu; Thu, 17 Jan 2019 04:42:44 -0800 (PST) X-Google-Smtp-Source: ALg8bN7RzIlTnEWtfK/T7O36FRy2Q0lkgEkDzs/8DGXo9678jLicWHZrUnBrxfElL6oEgJImQ/uK X-Received: by 2002:a17:902:1126:: with SMTP id d35mr14092829pla.1.1547728964138; Thu, 17 Jan 2019 04:42:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547728964; cv=none; d=google.com; s=arc-20160816; b=DzcUkeBrpR9vGqIro2fphhNgm5bTw1X4+foZ5+U0+klLVA0A0X2UWA0g7/VJGZ+G0E 9sARnUbqfhTRYM7vs0m8QXxnGkG7F/1oVRxenPHYY3fyngorLJrYAx4pxnU2kB5UEPq5 b0ehjLsLA6G2fnxlhkbCrUUAL7xk1vY4Kh3+EwacllT1MlPsZgfkwJkd962gfbqT3Dmg yEWgykC6EBpUb0ujhcS6mD7suKrbWgX6Vvel1Ato/A+LYA+Zk6//lBjAMjRIV7lclCQh 1uu/2IIJAFKrMjGXN+9S3fwGobtcTueAHyFjZWHIylCPgjRo0JAUxdPdSvVz/4N9bx/i TsLw== 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:subject:cc:to:from:date:message-id :mime-version:dkim-signature; bh=uK5gtDz3/2qRYgKOGoBN8YJgCyyAOq5Z3CxfnL6znhY=; b=nrwW0jLyo0rOh9+RqvsF6zM7oxy88rh47l/5entddgITbCMrYDj2wrszxnZ5d7o5rd 8S05v+ZHR1Vk7xS5d5ZnD4Iyiu9VxWAFzx+pJETGYSDIkDn/0gcOK9GMppY3KNYgOp4U R/Zfc9wMMza0ESDtVYRtWa1Y6AVOQo+vj91pcYDSinU5quZLRuK8kbPSTgcFLQNOR2t1 Juxi4bewwzaoUB1AVuPyGUkfrlUOrJl0EwaAg+TQWbs2P92I1dmWJWH+36butx2VC40Q BusnYvHzLzBZit7t44xYBzvcfQEbWvzyTG14PMMvCu/CwWxvl1IuALCW3ELZoLsL7VwH v14Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=gzjYkWV1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z20si1348826pgv.159.2019.01.17.04.42.28; Thu, 17 Jan 2019 04:42:44 -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; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=gzjYkWV1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727640AbfAQKL1 (ORCPT + 99 others); Thu, 17 Jan 2019 05:11:27 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:58498 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726948AbfAQKL1 (ORCPT ); Thu, 17 Jan 2019 05:11:27 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id x0H9xUMF168996; Thu, 17 Jan 2019 10:11:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : to : cc : subject : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=uK5gtDz3/2qRYgKOGoBN8YJgCyyAOq5Z3CxfnL6znhY=; b=gzjYkWV1rNEOy/7Lsm0N7LFPHt7gDEIbFY0hmNJPLHoEqg5X6jFSJuGBoN+BRrCZz1zA y8h3T5ebmOzp5Wx7JkmZtV2ZTfUxeWq+X7oL6OYYTrkyYYks2A1VjAhBLV1rKkMz0uxH rxzpFT64xGvik8Ecdy+6LdZ2fGBpGBF9isvARP8+16t1/pvHI2H+1zcNJvu57e6Tf+BZ WfszS2byOOkzCV1NGRUJZwoc/cpuRTw5B0lsU/gQYc/zQwSV1rBNjEQdI5FSuXqh+EJC 9oyqK8tgLX2PnNd1hbnvVrzEMKUr62KM6+GrSU73ChyRNk9QUL+3EqnGBQctTIkHqfBX nA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2pybkcq1ch-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 Jan 2019 10:11:06 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x0HAAxjQ007767 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 Jan 2019 10:11:00 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x0HAAxAV016668; Thu, 17 Jan 2019 10:10:59 GMT MIME-Version: 1.0 Message-ID: Date: Thu, 17 Jan 2019 02:10:59 -0800 (PST) From: Zhenzhong Duan To: Cc: , , , , , , , Subject: [PATCH] x86/speculation: Remove redundant arch_smt_update() call in sysfs SMT control X-Mailer: Zimbra on Oracle Beehive Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9138 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=941 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901170074 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With commit a74cfffb03b7 ("x86/speculation: Rework SMT state change"), arch_smt_update() is invoked from each individual CPU hotplug function. Then the extra arch_smt_update() call in the sysfs SMT control is redundant. Signed-off-by: Zhenzhong Duan --- kernel/cpu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index 91d5c38..c0c7f64 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -2090,10 +2090,8 @@ static int cpuhp_smt_disable(enum cpuhp_smt_control = ctrlval) =09=09 */ =09=09cpuhp_offline_cpu_device(cpu); =09} -=09if (!ret) { +=09if (!ret) =09=09cpu_smt_control =3D ctrlval; -=09=09arch_smt_update(); -=09} =09cpu_maps_update_done(); =09return ret; } @@ -2104,7 +2102,6 @@ static int cpuhp_smt_enable(void) =20 =09cpu_maps_update_begin(); =09cpu_smt_control =3D CPU_SMT_ENABLED; -=09arch_smt_update(); =09for_each_present_cpu(cpu) { =09=09/* Skip online CPUs and CPUs on offline nodes */ =09=09if (cpu_online(cpu) || !node_online(cpu_to_node(cpu))) --=20 1.8.3.1