Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2525788imm; Mon, 28 May 2018 09:45:14 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo4YGT6k95V7AvFzTKaFhSsb9bszUFmPRGsxUrDaK/8HQ4c5qAJhIgUCsdeMDRczPAR5O0c X-Received: by 2002:a17:902:206:: with SMTP id 6-v6mr14176842plc.294.1527525913973; Mon, 28 May 2018 09:45:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527525913; cv=none; d=google.com; s=arc-20160816; b=XZppukxR9+k78O7qLRvDqh/adMSGvXF7YwiLSSDmQJbE0KnHSgdCGFJ2F8/kxJy4Px Iq2dQiFGTy3ZuRl7WNgkG43dxaHodV9KyzJOkghevXSthCw+wYAU27andad9Wk8PzP4O 5gEmCNoR2CRW6UzEA/3hHcLvJ6Lo5WZCawyBZtK8k0zRufqwpgZLIGG3hAoMTVnKinez e6L5zoPc+4KiLja9aVopzpMcOgEUP7MpywMD+kDSqVdidQfzuqxQmtD9lqUthITHK1EE aSho716kEZiJh7FtPWtMBnUNGEdG0iPBeVLMofCYGABDF4GHPI6IBfW3WDjCfG/qH7Ug u9xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=PuxRuVYxdw/EXj0P176KtZVksNW584wBN88f/3b/R1k=; b=Qp0bSQbNsMZ4jcq0bBNiQC/zptMo/Tjl10oefgYL/+w0romK/8prmq2c+F0nzM7wvK I0SnlzpsH7ieX7tFp6645o3QjyXRfzgUrRck3BIOw6SpgijlHdEHGKCl5x8yEP957YBa XLLFAYqIMAsoXHO5Wgb5CZfzTgqjyQsfDHud8u/Q/X76bAi79KstsTlNzlmfTIYne8RO +y1mEv+3aTdeKNqy2T3cDGbZju7BClh2vmwSVfaUyJDAYv+1yJw9OczSX/QzikePQwGk IxM8HsfeTDzVaEtcRgC9KEZiV263UboLUH9JHbpkc4wOZ5ZQBIBFdI8mqpCKv+XFB/QW ZDDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=s5unoDvV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bg2-v6si5698098plb.243.2018.05.28.09.44.58; Mon, 28 May 2018 09:45:13 -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=@kernel.org header.s=default header.b=s5unoDvV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933179AbeE1KHh (ORCPT + 99 others); Mon, 28 May 2018 06:07:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:55580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932358AbeE1KHc (ORCPT ); Mon, 28 May 2018 06:07:32 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1F621208A0; Mon, 28 May 2018 10:07:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527502051; bh=yEU9Y1rUn2Lk9rE4sYxOyCD1tFl6UFWsqa6kYf0uwso=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s5unoDvV/Xv2cPwhuvaPiODcH0K60ZOjZvjj0JxM9ANkCVXFY4kcerqK9eQXE2BLa ZdVH/gl5mpI3+8jkY1nvrdxBEaRc9jJEqgaw2svrgg8O7WLbuLySXznUsT6k+JRYau hb/CXggxH5HWyid+tl0r/+qdNyG+sEaa5qv7xrU0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Doug Smythies , Srinivas Pandruvada , Yu Chen , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 3.18 036/185] ACPI: processor_perflib: Do not send _PPC change notification if not ready Date: Mon, 28 May 2018 12:01:17 +0200 Message-Id: <20180528100053.120686016@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100050.700971285@linuxfoundation.org> References: <20180528100050.700971285@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ 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: 0xffffffff86061e3a (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 0x0000000000000000) 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 Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/processor_perflib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -165,7 +165,7 @@ int acpi_processor_ppc_has_changed(struc { int ret; - if (ignore_ppc) { + if (ignore_ppc || !pr->performance) { /* * Only when it is notification event, the _OST object * will be evaluated. Otherwise it is skipped.