Received: by 10.213.65.68 with SMTP id h4csp2121068imn; Sun, 8 Apr 2018 20:13:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/yXAn4rej5rg/bgbw1LYBdakO360xzXMCsCEos3hkg+1ehhtbqHv7j4hqPKKjOYqRbA+MS X-Received: by 2002:a17:902:850c:: with SMTP id bj12-v6mr37316034plb.110.1523243609569; Sun, 08 Apr 2018 20:13:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243609; cv=none; d=google.com; s=arc-20160816; b=gvQe4lXcMnjrYdMOZSS1ThYq6b2fsFNwONnTndM1cqlqBaGoUKZjniRYiefH7OE2mU kxP/5rF+109JdTkgzi5xTx5ZDG+CosMnmxp0t2E5/MbaSVSYJc8lJtBypfmZFx/MBJ4e 6v5hN7b/OjhW7nE8OeszLeMVDnLW6S1xGOw1jmm7eeUJQODzxKBb4UYiLvamUnE161+8 BXjO8CjI2vGtLzr87hrbXd+6f9lpuGMqsZ+YBn8pZJR7QLoeOSERlCIiEKCR4ffeuq62 3cFFeRuwcHr1uG2uqrhfW+7pb02Ytw23y3axFpVvKYrevGp4VkLcuSLr+MMsffs8IqgZ KmdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=jf4oRWtZ2Wak4hwLu/SSwqBSQ3StucjuEFs0HGbX2Ek=; b=ZUMvDLF3qRaSy0B95rc5uW0lITZE6M9ersxxZEDF8o1DQ/yazL4BtWvmNO/W6IGS+n D9YHtcqhs/5VrRMxWA7P01Y5pidLkLDFZwrNF19huWFru0bmVanKl1fgaEZ1IvofnHvL ieVNBfFafKRE6pc8GtZkbG3nbIkFD9m79D4er2DMhFtaDeKtfmVvH69ijziIZ2GUIH9i TQJN8zLiFaYRWBcJ/G9Gt/PkucJdX/MQVxBIv5oyvLK5lsYx5B4S59YmpaNAauPD7jqG kGzOIdHMXPn1WWGXdD+7IkGnP6g0SZyUYmg3J6HYvQUz23Uo7w2G5vpGd4Gkbe/uJTzO aWTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=CBAD1DqM; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w2-v6si13717079plk.702.2018.04.08.20.12.52; Sun, 08 Apr 2018 20:13:29 -0700 (PDT) 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=@microsoft.com header.s=selector1 header.b=CBAD1DqM; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758080AbeDICzE (ORCPT + 99 others); Sun, 8 Apr 2018 22:55:04 -0400 Received: from mail-sn1nam02on0125.outbound.protection.outlook.com ([104.47.36.125]:42928 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755249AbeDIAZs (ORCPT ); Sun, 8 Apr 2018 20:25:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=jf4oRWtZ2Wak4hwLu/SSwqBSQ3StucjuEFs0HGbX2Ek=; b=CBAD1DqMSBPvrm7vzmLuokbYd0TvgsvkDDtlsnTz2oH3vrCVnwVZs6TB+fboxULkSG7+kMecJXah0yuR3gR75/OKKPUo91JsrlTo57Y6D6R1Fhn7XdO6QwSJ4KQPioTu6PpAzGC0hRxtXfHReghJRZaXzJZAMbYnEE1geNT5Fn8= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0725.namprd21.prod.outlook.com (10.167.107.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:25:44 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:25:44 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Chen Yu , "Rafael J . Wysocki" , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 140/161] cpufreq: intel_pstate: Enable HWP during system resume on CPU0 Thread-Topic: [PATCH AUTOSEL for 4.14 140/161] cpufreq: intel_pstate: Enable HWP during system resume on CPU0 Thread-Index: AQHTz5i/bWgaD0z9eECdLJBPnbG9tQ== Date: Mon, 9 Apr 2018 00:21:48 +0000 Message-ID: <20180409001936.162706-140-alexander.levin@microsoft.com> References: <20180409001936.162706-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001936.162706-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0725;7:i4hU+qOvxZay8ehh2wbWfTZx/6Lykj7oo1U36qY+KzW8ruK20+qtxhRmcPZe0hd9EufAr5/ATJiZk2XXkR/0gHoinvwm6YLjPx995+scb10Ow62QbhegBgO54lIdn1km/zW4RDyuLFuiSrSBlrSp6kEt0vksDfKeR6imnHq0NMpu+kq4bFBEeB5/W2YL+kw/F2keyYtFx++v0yxpl2qf61CpqNgJggBZMetEPFfuEnJ3qY5kf2BLnvFS/P2Z4m6n;20:d4ytSjl1K4Xk6A9P+MVLW8v8nQlDA2mN151KP0SSwumbcCasFtYA4RB2JAN+N/5UCNzPu5aobGeBrMSAH3wRPrZp7dX4wVjy/liPMAqI6g7k+5IA9/tm4q791jLA1pWp7r6kiWOwzSzwLk48i/Mx8HPv2VrAZr8mdaDSMhPfIjk= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: d1308329-bc5d-47f9-26e8-08d59db06f00 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0725; x-ms-traffictypediagnostic: DM5PR2101MB0725: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(209352067349851)(228905959029699)(54914632383503); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231221)(944501327)(52105095)(93006095)(93001095)(3002001)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB0725;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0725; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(346002)(366004)(376002)(396003)(39860400002)(54534003)(199004)(189003)(6486002)(81166006)(26005)(6512007)(4326008)(6436002)(81156014)(8676002)(97736004)(186003)(36756003)(72206003)(53936002)(107886003)(2906002)(86362001)(76176011)(110136005)(305945005)(10090500001)(486006)(3660700001)(102836004)(5660300001)(14454004)(476003)(575784001)(86612001)(446003)(99286004)(68736007)(66066001)(11346002)(54906003)(2616005)(1076002)(7736002)(5250100002)(25786009)(8936002)(478600001)(2900100001)(2501003)(3280700002)(105586002)(59450400001)(316002)(106356001)(22452003)(6506007)(3846002)(10290500003)(6116002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0725;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: leFqJsbexc6HRi3vE/P3P9vpB8Nck7rHwd8iXKNqplmV1ttQ6BfIO7MwkHjh6IYt/pLk9vG/qKo3Ct0Pj7TT4nYLwO0HU7bUr+MSNsMcuT7oE1IWYT70+d8OjNaZi79W7v5F0iEED0Z/um9qhb8G9yxGNqmCtq70FLlKA9puTaL1CxcCE9bLpSK4JEkF+jZlBBaJI9BXdOHIn7L4WIgeMsCX1BmYocR1eQcsdXsHT95ZtiqMy5xYSogSSH4CUU4hCIbvXJk7oOFjFDCdvOEYYFYXL22TfJULP/d5B/CVmmy/hzRLRo5PTYCG4v+W11U3Ot3gNyGC/bpCSu9tNyoRdeHegZu02wGsHr4UR+Ex5HVLFV4+Ff+1OZLLS3WFsLewp8rX53oqw1MTzzaBP1ekeOH4G2/oDuuJoO95HVmGJFU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: d1308329-bc5d-47f9-26e8-08d59db06f00 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:21:48.0186 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0725 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chen Yu [ Upstream commit 70f6bf2a3b7e40c3f802b0ea837762a8bc6c1430 ] When maxcpus=3D1 is in the kernel command line, the BP is responsible for re-enabling the HWP - because currently only the APs invoke intel_pstate_hwp_enable() during their online process - which might put the system into unstable state after resume. Fix this by enabling the HWP explicitly on BP during resume. Reported-by: Doug Smythies Suggested-by: Srinivas Pandruvada Signed-off-by: Yu Chen [ rjw: Subject/changelog, minor modifications ] Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/cpufreq/intel_pstate.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.= c index 93a0e88bef76..20226d4243f2 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -779,6 +779,8 @@ static int intel_pstate_hwp_save_state(struct cpufreq_p= olicy *policy) return 0; } =20 +static void intel_pstate_hwp_enable(struct cpudata *cpudata); + static int intel_pstate_resume(struct cpufreq_policy *policy) { if (!hwp_active) @@ -786,6 +788,9 @@ static int intel_pstate_resume(struct cpufreq_policy *p= olicy) =20 mutex_lock(&intel_pstate_limits_lock); =20 + if (policy->cpu =3D=3D 0) + intel_pstate_hwp_enable(all_cpu_data[policy->cpu]); + all_cpu_data[policy->cpu]->epp_policy =3D 0; intel_pstate_hwp_set(policy->cpu); =20 --=20 2.15.1