Received: by 10.213.65.68 with SMTP id h4csp2113734imn; Sun, 8 Apr 2018 20:03:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx48hb8M+ZD+jLPHOFM1iBQvxTn0NWKqD1spnGmcVOQToFBr/t8Hi0HOutcDQ6GWpeK4nVlBi X-Received: by 10.99.37.70 with SMTP id l67mr24483064pgl.106.1523243027621; Sun, 08 Apr 2018 20:03:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243027; cv=none; d=google.com; s=arc-20160816; b=y9MHB+iP1O/vwQLCfpK4I6LUlXXgqfBVHiqlPa2oYOfsJ8QepidsI3ypPk4kHtCIqS Op6z8uJKQM92Vc3Pfg7AWwNIwvgtSsUuCr1BPKKgEdBzTDFZtiqi57/Ch2Eu/DSbxMQk noa+64piIy8A45svBchMYktVvoaPVAq1G08ly2ID8J0NqvU6Nh5WpiA9urmt+s8iPjJ2 ipwWHvPn+RnQ0QoapVicP6CtOuNdngXzgdhrU3sf138XDVyxZ329SbVU5C3iyBwg+Yih 2+BQaY+Q0sPSZZWqOjaWsmOtzTm8BweVY7Kw+mSyIyDDiC3vaYhzN8k/PMUtqNcGcp0r raQQ== 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=qy7zQDPpQ4lIE0RsBLM84L83GWDgS8rTE1ke0qjxOys=; b=utvFV86yL4JANCkNu3VuwQnmqcjdTAXUfA/md/y6m+Hb/8Gl+N4bR/tnVtiAceXtfn G3ht7g2gzI1+w8juxq2WxDfYZJQLz9GkEZBEnGFXgjnBE45A2ixOaZv0pL1WAVy5NN4w 8SE+zqB2tqVuGGX9hhn/l8vwF1gftezaf/1nrzJhlG6v+cIqA0D3CS9hQ2gbXE5e93r+ /6N9gdsn59XIhnPAG24J5g55/bTUJXujIKLPCnvqogNm4ElVSpdrTP/7j2WPssY+HBTi 6piKX2CTOs6VxYurBXJc3ZzQ1pJCHZnYl+Pp750a4jQ8ISlOH9Fb5VVnuXfZ7gUs3EqD n5tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Xv6uUeUY; 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 97-v6si13774297plb.383.2018.04.08.20.03.11; Sun, 08 Apr 2018 20:03:47 -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=Xv6uUeUY; 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 S1754306AbeDIAUn (ORCPT + 98 others); Sun, 8 Apr 2018 20:20:43 -0400 Received: from mail-sn1nam01on0138.outbound.protection.outlook.com ([104.47.32.138]:56136 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754208AbeDIAU0 (ORCPT ); Sun, 8 Apr 2018 20:20:26 -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=qy7zQDPpQ4lIE0RsBLM84L83GWDgS8rTE1ke0qjxOys=; b=Xv6uUeUY6J8Gjlh9/S5hxcYJJnO6aMJoh1/A8XQcxBnqdhz93nMb+H8mVV8BiWucDQPI/ozKti6AqOAb5n7v24azwKxvuGi8z926p6PZwzMMOUthhwBbKyr4qgvk7CFtd3bii2Vt4Iu0Fj+AxdRC1mgZImE9qmI74Vh7f9bY1Jo= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0920.namprd21.prod.outlook.com (52.132.132.165) 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:20:21 +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:20:21 +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 143/189] ACPI: processor_perflib: Do not send _PPC change notification if not ready Thread-Topic: [PATCH AUTOSEL for 4.15 143/189] ACPI: processor_perflib: Do not send _PPC change notification if not ready Thread-Index: AQHTz5hRO1WRSP1ve0iRBy808c7pQg== Date: Mon, 9 Apr 2018 00:18:43 +0000 Message-ID: <20180409001637.162453-143-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;DM5PR2101MB0920;7:BO716daA7MNEGjPvmSTuXp9rkrK01vXu5i+FGpjzNU5AlI8b3uPq9VPfKMkxuxuujDYkiJULq6OTdwM3THgrHS4qx0HBfwt57gvZW52uU4ZC9KfZZ2lYvcEOXxplofoKirQDtjy9uTHWFDh8OjxL/z3BsJicThPebCdPd4Dn4awl47n7qefhl5letGMyzPG/dlJDDCGWXUhcLIdOPzFVPi5tExwl/PV0gv04am+b6aXmQ2LfCM1RrNnnMKNQLCiC;20:CMqwGAgWFy+1kGda+DReD0zGsTYdO+KeHHdtVjxo2Wp3HztW3jG+hyz2wv3liaomM9YSDeKxE1Ed6qveQuj5U2HCkxB/LQ2XQ5yol7ZGAcHIXirFR5HbUCsFzCWVR4Nud9V5HGj/IjCeL6Kublhvq3crG9IFk/q69pcAOcbq5rc= X-MS-Office365-Filtering-Correlation-Id: 9eb99e75-b90d-4902-8d5f-08d59dafae56 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:DM5PR2101MB0920; x-ms-traffictypediagnostic: DM5PR2101MB0920: 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)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB0920;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0920; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(39380400002)(396003)(366004)(346002)(376002)(199004)(189003)(66066001)(86362001)(59450400001)(3660700001)(3280700002)(25786009)(76176011)(2900100001)(36756003)(6506007)(2906002)(99286004)(86612001)(6486002)(102836004)(305945005)(1076002)(7736002)(97736004)(2616005)(446003)(11346002)(476003)(486006)(26005)(6666003)(6512007)(4326008)(107886003)(5660300001)(478600001)(6436002)(105586002)(10290500003)(5250100002)(22452003)(15650500001)(316002)(186003)(8676002)(110136005)(81166006)(54906003)(6116002)(8936002)(72206003)(53936002)(2501003)(3846002)(68736007)(14454004)(81156014)(10090500001)(106356001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0920;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: pZaADklug34cJuCQKyeORsXBizVvIJ0YMgX04qfsMAftdkIzZAwnt9xbezvc9orEUOjKjdyO+FLFaej4CAF4eb6VmyNTq/ZjbqC4JcZbK8zEuFbVYjGFvYpaqFIGIFdSe5odE4u6yHevCwmRd3C0RdiVb0RrpGZWsVKyKmHXKwv010zpab5GUAMa3g59kL3w8VhZfQqD5Ts8CgnSgnqKnkekD1K/22DBrZDhvqHgs6rBwLGv902EbPuGDHD7REsJuEQBpwxrIhbOGmscOcp3lS6d5emKxfyJxQ2gL7mQ0byuXELZ5Y0UOTiFeyFtpiT2tlI2XRYUeYyPc+G0RAQx43v+ShHG331VuQtSwkDKIqrMS0wKECXQ3E+KwBySLSjZhZJ645UvuGcWHI+Udc2NKRJRjieVHXXpb87+WW1NiP8= 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: 9eb99e75-b90d-4902-8d5f-08d59dafae56 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:18:43.6750 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0920 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 18b72eec3507..c7cf48ad5cb9 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -159,7 +159,7 @@ void acpi_processor_ppc_has_changed(struct acpi_process= or *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