Received: by 10.213.65.68 with SMTP id h4csp2116095imn; Sun, 8 Apr 2018 20:06:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx49wc5+pTm90dgMASmSNd/0t5zlTQ3DqQuvDfrTzyOnVuLehwdWNMhGDcJtVw5Z2FizZiHos X-Received: by 2002:a17:902:788e:: with SMTP id q14-v6mr37816794pll.396.1523243215993; Sun, 08 Apr 2018 20:06:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243215; cv=none; d=google.com; s=arc-20160816; b=U/IFl5W08keSeqrp6QHKI9YpJuJvI9dpdgXgGnf/Io3fQrP/bwTG8vOsn6HqvpVUrv OEJLoSrIzsp/hFFPwqTB/Lhk1QZ7ekH5/1eN27ut9pblfVde54TTBqX+FORW9lLZhd8V sl937UN5VNANS6hUJaxZVHdWf1VW5Z5vra/7XSKWkP8U+6Sygc2wh+ID4oc9Y+lkmFEu mDTqRfMjwHepviQ7ip1X6NsIHth26a/EUrNGuXHjDdTtY9dR9Nczho3PM0VNhtmIRrdS GwXsVPqOPkFyo2NaLCbdnAst+7nj5a8hl4MDv0WwSlWx5kAASIkpHbQFYl2Rw+tvX246 eUmg== 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=9HV2iZBWj6E1ylI5j6nRPtv+mYDlX3QDXFPV2QOG3t8=; b=dc+NnNuu2TQBtoxWcmQZB0hTFE0a3PckV6h+9Tl4bwq6kdHCxayqf2iUH6z+PtNqwg UFbplhgkm0zrx/Q3F8DUzahGnQ0+b+DOFIIv1aF57eaB2S06hfq/yzTcx8HPl49ir7mB nUaRJrjh6kPZUn4YJMY/pB3qMnr96wK4ZqHxJRm/EHLCdEBSCgM3Y4Pp0JmRorNFTyvF eG35d2g7qCBjQvTZJXFBUJJgEjPSj02LkFDk1K5H4nJYarhR3S8AsxclWeUhx/FSF499 EdyZE0VN0JOPLXhqa/wBCDgJkZXCRp6mcwWgedO69XxUaN4GLudAcldTf2ltZcGIFN2v uBug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=mE4XvoOj; 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 o13si4487753pgs.830.2018.04.08.20.06.18; Sun, 08 Apr 2018 20:06:55 -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=mE4XvoOj; 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 S1756925AbeDIBIu (ORCPT + 99 others); Sun, 8 Apr 2018 21:08:50 -0400 Received: from mail-co1nam03on0120.outbound.protection.outlook.com ([104.47.40.120]:40064 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933032AbeDIAit (ORCPT ); Sun, 8 Apr 2018 20:38:49 -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=9HV2iZBWj6E1ylI5j6nRPtv+mYDlX3QDXFPV2QOG3t8=; b=mE4XvoOjdZRRFnztSb5ddj+7hlEvbtw7u8Q9ReoQBbtyH/3tqJlE2JCd0dLLASXsbS6+f2XHoMJM4TJ8dGCekYJprGgxzt045AJLZRW4d5N3maYFSE+vCng5RzgZrt8apNhOTJydpUg7DjXQS+J7WXMWdmFmuxstpKCMy8XDoDI= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1125.namprd21.prod.outlook.com (52.132.130.150) 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:38:45 +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:38:45 +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.4 146/162] ACPI: processor_perflib: Do not send _PPC change notification if not ready Thread-Topic: [PATCH AUTOSEL for 4.4 146/162] ACPI: processor_perflib: Do not send _PPC change notification if not ready Thread-Index: AQHTz5nauTe2yHiHFE6Alg3U3svSCw== Date: Mon, 9 Apr 2018 00:29:43 +0000 Message-ID: <20180409002738.163941-146-alexander.levin@microsoft.com> References: <20180409002738.163941-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002738.163941-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;DM5PR2101MB1125;7:y8Iz/I4F2Cs/qvN2yYjpamqlUMQN8HpkvsigAoE21L3I03SiHLB6KRC5ZLHhnruO+0PKm0DYTnI7zAsTg5d9KIUldwaP6y2HTLdqZ/KdpKbD5/aS977llxgvIQPuoNeB3K6WmQMkeHhrhjU/XgiDDrS9KN3t0EQqHcbBdPbrByfxS2DpXGCpBrjWIkYNgn78oWuJysKgwBbvk/Ixb86PtNlng0YOHoO3AvaWnag+aZX89QcTlZDIuxkt3QCrq3C6;20:q8fDGjpZk+tAdi7NvDNPUbKcO62+iSStH3ZQayIgjDJMow65btKmGgkRAEwGcTR9UIvWjIH6wSk9ari1fAb4c0ihzY10nPke+p0Gf5SGdLuBIwuW5c8VmVnDq086aRdHaLlq8XU++1/nNEkP8ThaZmZxul0m2zTo5moHDsk0CDE= X-MS-Office365-Filtering-Correlation-Id: 0b18e119-0dca-4da7-53a4-08d59db24091 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603328)(7193020);SRVR:DM5PR2101MB1125; x-ms-traffictypediagnostic: DM5PR2101MB1125: 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)(8121501046)(5005006)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB1125;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1125; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(39860400002)(39380400002)(366004)(376002)(396003)(189003)(199004)(2906002)(25786009)(6512007)(10090500001)(15650500001)(3280700002)(10290500003)(3660700001)(316002)(110136005)(54906003)(11346002)(107886003)(2616005)(476003)(446003)(36756003)(99286004)(86612001)(53936002)(4326008)(486006)(6436002)(3846002)(81156014)(305945005)(5250100002)(1076002)(102836004)(14454004)(66066001)(7736002)(105586002)(81166006)(59450400001)(106356001)(8676002)(97736004)(6116002)(6506007)(6486002)(5660300001)(186003)(76176011)(22452003)(72206003)(478600001)(2501003)(2900100001)(26005)(86362001)(8936002)(68736007)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1125;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Exe4Y8Gt68DOmoeq0gDbwBbS+ghUe6yi+iTzKozq3jvaovgyhfoxb+A6zccWW3Zdq8CxddBHXR5+ZMfnxw8BZ8q2BycAengWXDwXFBRO+KkvCxzU3Xy5ZWj/xp+9mSqZBUAwBjQFP9Zr1gRXFXwWj7MzmVI+AcY29lsDTco28PEo3FpftYjqsCJ1bQubsScHeEzCLR16T1jlsSzGTZ4OmXh4VA4Ia05MFeMLLBQRFc4psL3Vto6h2wnzXd3bzGZx8gEE0sHLJD0qm84tjGCNKSolBHo6BlwBCcmwcN0Q6cOQhtp7Rc3SXXmST9i49EA2XPmJMPUMQpyx4gVWZSYCp/HrYbAM+qDwT99aO5HK85HYzLa8VnH6UA2e5CkiTwvOyXTKnyRFg5IyGSYgTBz5Of0HzhRjmriOS9tuTb0AaZQ= 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: 0b18e119-0dca-4da7-53a4-08d59db24091 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:29:43.7401 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1125 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chen Yu [ Upstream commit ba1edb9a5125a617d612f98eead14b9b84e75c3a ] The following warning was triggered after resumed from S3 - if all the nonboot CPUs were put offline before suspend: [ 1840.329515] unchecked MSR access error: RDMSR from 0x771 at rIP: 0xfffff= fff86061e3a (native_read_msr+0xa/0x30) [ 1840.329516] Call Trace: [ 1840.329521] __rdmsr_on_cpu+0x33/0x50 [ 1840.329525] generic_exec_single+0x81/0xb0 [ 1840.329527] smp_call_function_single+0xd2/0x100 [ 1840.329530] ? acpi_ds_result_pop+0xdd/0xf2 [ 1840.329532] ? acpi_ds_create_operand+0x215/0x23c [ 1840.329534] rdmsrl_on_cpu+0x57/0x80 [ 1840.329536] ? cpumask_next+0x1b/0x20 [ 1840.329538] ? rdmsrl_on_cpu+0x57/0x80 [ 1840.329541] intel_pstate_update_perf_limits+0xf3/0x220 [ 1840.329544] ? notifier_call_chain+0x4a/0x70 [ 1840.329546] intel_pstate_set_policy+0x4e/0x150 [ 1840.329548] cpufreq_set_policy+0xcd/0x2f0 [ 1840.329550] cpufreq_update_policy+0xb2/0x130 [ 1840.329552] ? cpufreq_update_policy+0x130/0x130 [ 1840.329556] acpi_processor_ppc_has_changed+0x65/0x80 [ 1840.329558] acpi_processor_notify+0x80/0x100 [ 1840.329561] acpi_ev_notify_dispatch+0x44/0x5c [ 1840.329563] acpi_os_execute_deferred+0x14/0x20 [ 1840.329565] process_one_work+0x193/0x3c0 [ 1840.329567] worker_thread+0x35/0x3b0 [ 1840.329569] kthread+0x125/0x140 [ 1840.329571] ? process_one_work+0x3c0/0x3c0 [ 1840.329572] ? kthread_park+0x60/0x60 [ 1840.329575] ? do_syscall_64+0x67/0x180 [ 1840.329577] ret_from_fork+0x25/0x30 [ 1840.329585] unchecked MSR access error: WRMSR to 0x774 (tried to write 0= x0000000000000000) at rIP: 0xffffffff86061f78 (native_write_msr+0x8/0x30) [ 1840.329586] Call Trace: [ 1840.329587] __wrmsr_on_cpu+0x37/0x40 [ 1840.329589] generic_exec_single+0x81/0xb0 [ 1840.329592] smp_call_function_single+0xd2/0x100 [ 1840.329594] ? acpi_ds_create_operand+0x215/0x23c [ 1840.329595] ? cpumask_next+0x1b/0x20 [ 1840.329597] wrmsrl_on_cpu+0x57/0x70 [ 1840.329598] ? rdmsrl_on_cpu+0x57/0x80 [ 1840.329599] ? wrmsrl_on_cpu+0x57/0x70 [ 1840.329602] intel_pstate_hwp_set+0xd3/0x150 [ 1840.329604] intel_pstate_set_policy+0x119/0x150 [ 1840.329606] cpufreq_set_policy+0xcd/0x2f0 [ 1840.329607] cpufreq_update_policy+0xb2/0x130 [ 1840.329610] ? cpufreq_update_policy+0x130/0x130 [ 1840.329613] acpi_processor_ppc_has_changed+0x65/0x80 [ 1840.329615] acpi_processor_notify+0x80/0x100 [ 1840.329617] acpi_ev_notify_dispatch+0x44/0x5c [ 1840.329619] acpi_os_execute_deferred+0x14/0x20 [ 1840.329620] process_one_work+0x193/0x3c0 [ 1840.329622] worker_thread+0x35/0x3b0 [ 1840.329624] kthread+0x125/0x140 [ 1840.329625] ? process_one_work+0x3c0/0x3c0 [ 1840.329626] ? kthread_park+0x60/0x60 [ 1840.329628] ? do_syscall_64+0x67/0x180 [ 1840.329631] ret_from_fork+0x25/0x30 This is because if there's only one online CPU, the MSR_PM_ENABLE (package wide)can not be enabled after resumed, due to intel_pstate_hwp_enable() will only be invoked on AP's online process after resumed - if there's no AP online, the HWP remains disabled after resumed (BIOS has disabled it in S3). Then if there comes a _PPC change notification which touches HWP register during this stage, the warning is triggered. Since we don't call acpi_processor_register_performance() when HWP is enabled, the pr->performance will be NULL. When this is NULL we don't need to do _PPC change notification. Reported-by: Doug Smythies Suggested-by: Srinivas Pandruvada Signed-off-by: Yu Chen Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/processor_perflib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perf= lib.c index bb01dea39fdc..9825780a1cd2 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -161,7 +161,7 @@ int acpi_processor_ppc_has_changed(struct acpi_processo= r *pr, int event_flag) { int ret; =20 - if (ignore_ppc) { + if (ignore_ppc || !pr->performance) { /* * Only when it is notification event, the _OST object * will be evaluated. Otherwise it is skipped. --=20 2.15.1