Received: by 10.213.65.68 with SMTP id h4csp2138478imn; Sun, 8 Apr 2018 20:41:05 -0700 (PDT) X-Google-Smtp-Source: AIpwx49rEUdu4R18m/Up8/Rl/YZcasHHUeX5vDwFV2IrMibNP00behTGx92dwTQo+HsErqdpYRQS X-Received: by 2002:a17:902:8d97:: with SMTP id v23-v6mr36275518plo.285.1523245265324; Sun, 08 Apr 2018 20:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523245265; cv=none; d=google.com; s=arc-20160816; b=nu7hqQCvkFOkqUq+lHrmicDgDuyJJX25NdzxGu4OVARLJ+o36glC7ubRZMgMPAkbeR DsXiOPYerL/J+5mIFDTCA779nIU6bXtRUb0WsUKEmW1pwqucsOA9n7G2pEK9ajgSstM4 c4nd1434RMg9M1/oPF7v6tyBR+dURNrkbW+QjOb2LidbByLZaW3+zt5Vrs6A/1rpJ9XN IowFy4XO75YtFfFYsNoiHxK26WE7kqvUpdrKevDRTClGUDlr607F0aBtimDJU8xbn6pR GaNTTach5b2No9hg36SfoE3cRtIFlU/rG7ALl11NQXYUy4NNF9S9Ik7F6usLcgdLIKF8 JOdA== 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=SOM2qTWnnnrWcC+mx1Uxb03Mi8yvrTxBCcVlj2VcAQf5wfhv0UKhj7AYWq73EhOU8Y /0UWtS2ey25sh8cCLWELKj3uSBct3nXYYLxOfdks5zmTSaDgBIchVDVjAniyxilLiWqt we03/9pX7YwneOGgJ2qT8QjSSxBgpZGdzTcxfZ1WgvmQqcLIal0TlJaL4sfDimwwPwxX QTAWSO8YHDRgaBaOxLeux2N3lyw9D4ecXGjJBy2rCiezBguEjvgloXWdcmcm5A/2ud0d S3yNZW6ToP8KJvLDclGqYA4909NA9c7JTk6OmXS41iIM42FCPvU1t7y6Nn/eN2phVff8 a7Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=ogGhBbZa; 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 a6-v6si13709086pll.722.2018.04.08.20.40.28; Sun, 08 Apr 2018 20:41:05 -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=ogGhBbZa; 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 S1754752AbeDIDfr (ORCPT + 99 others); Sun, 8 Apr 2018 23:35:47 -0400 Received: from mail-bn3nam01on0124.outbound.protection.outlook.com ([104.47.33.124]:4000 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754411AbeDIAVP (ORCPT ); Sun, 8 Apr 2018 20:21:15 -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=ogGhBbZaT/mITP1NUCdzMvqmf2/wL8UjUM/cVhl/iGDMygZyO8fYKdB3CpCfmdNbnuTLFuBUqIUcab62kknmIQj2Im2o27s5cl4vVsq2DCq6gfKMjqBd08qmrIe6pEt41E6DtDUYxDhsoZKVafMSVfQGQRXPmkd0qY8DAwKiQ30= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1110.namprd21.prod.outlook.com (52.132.131.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:21:08 +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:21:08 +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.15 166/189] cpufreq: intel_pstate: Enable HWP during system resume on CPU0 Thread-Topic: [PATCH AUTOSEL for 4.15 166/189] cpufreq: intel_pstate: Enable HWP during system resume on CPU0 Thread-Index: AQHTz5hbRQtn7uEcYUmTOqKGtEmP1w== Date: Mon, 9 Apr 2018 00:19:00 +0000 Message-ID: <20180409001637.162453-166-alexander.levin@microsoft.com> References: <20180409001637.162453-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001637.162453-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;DM5PR2101MB1110;7:qyNnWxPxr0Dqyrz2X/tEtCi0il9VGUNylxLFUa3mRSmtYWhWMBLnPqzy8iimSgNH3a3A3o+vO9Q4sY3Bswbyv74cDR9hYfq27xMSUbWivCCdtrpZrMzPHskElUGH7mpN3A7+hovrJpwBofdDjjGHFVZIOryecoXobJBNnddwCc1yxJtIln2YeLwrNv4WOhPHat34WCupxUomObNdf0rVOztwbrp85m+0B5YOWHxDJ/iGSk4YZMOyLshfb+or5jf4;20:iS+JY62/yr4N30IxWoBlM1PS8VxPSLlzOJC81eMK7vSZvbi8UAMWKEdIntUuPTKSuKo8oMNt0HTAE/aMQaQDwS3oPPSt6v0St22/1WardAdlmpqKXJIcUMewF3os9TgPen0GTUKYaEyRqkiAXQJZkcZDo4e8W0v2vUXP1pACmiA= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: e8fe25d9-ce79-43e8-8d6e-08d59dafca50 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1110; x-ms-traffictypediagnostic: DM5PR2101MB1110: 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)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:DM5PR2101MB1110;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1110; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(366004)(346002)(396003)(39380400002)(39860400002)(54534003)(199004)(189003)(5660300001)(478600001)(86612001)(3846002)(6116002)(106356001)(6486002)(72206003)(25786009)(10290500003)(8936002)(6436002)(76176011)(2616005)(6506007)(2900100001)(97736004)(486006)(26005)(36756003)(10090500001)(81166006)(8676002)(81156014)(59450400001)(102836004)(2906002)(99286004)(11346002)(476003)(3660700001)(66066001)(6512007)(575784001)(86362001)(53936002)(105586002)(186003)(5250100002)(14454004)(22452003)(6666003)(2501003)(446003)(7736002)(316002)(1076002)(110136005)(3280700002)(54906003)(68736007)(107886003)(4326008)(305945005)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1110;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: vX/JBSufBKGZk2xsdLRczdTuThomTyLIL20aVc3bYlFbXE1pQf6PCQn3VLXg+DIgpPJ4jkfoli2Qx7uun7UnHiBfq0dSI8r+IIj2Ye85Bt6S7pLBhTsU8B7imJrulhuLYaJFPjLscZKiJnHPT01MFGvLVx1eWyjpgJxwgIdae1b6k1U6gHGLwrV5XP85Kot+VlgZ6QUlFq1aKwysnsvOr/+r9vHm0l6pEwtHOHTeEN4QuLQAOD8e4A6Em5Mew+E0Dq+fdaXEKB92klnWV6E6AH5kE43ZbhArE/mijUvt8ScQQL5YDKMp2nLhKseO4nIW7K98b1JYu0JIuBQp8p0D+MOkY7KGSDy2HaITWm6FwilXcF3VQsBmrhEPuTQHQ1hQkZKscmiKR3oJBUbIlzgma7Fy9KVe+BoJwjrNzENBQNA= 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: e8fe25d9-ce79-43e8-8d6e-08d59dafca50 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:19:00.9555 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1110 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