Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp966117img; Thu, 28 Feb 2019 10:41:09 -0800 (PST) X-Google-Smtp-Source: APXvYqza9ss1jhsoNCtq9eM3AtK2ThZzegUnuLNx/LDNwLpRo91RZO4UZ51dcfrUiy/5mxOI9U8P X-Received: by 2002:a17:902:834b:: with SMTP id z11mr797987pln.257.1551379269138; Thu, 28 Feb 2019 10:41:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551379269; cv=none; d=google.com; s=arc-20160816; b=N4KLMDrBop/lkuqA+VwFyF7bENkzwkiOFQhulK+apGIeZW34EkxDKyhJSCUeF3qVsk cQ2y4ldP0+nyg+KtTLiHDYTyn/YVHS0cl35K2fOzrI+20UbGJWLdubIbC3q9P2nXFQ8z 8yICzQt0eWAYiOy3dgsq1/fklUmNGVKjSMQhsqfApzePhol7dv87w1QxJMkNCeC7WxmU 4Vg7eXvYq+5D+qZppmRG472q8h5Fu43UHuiSict+vBiE0newaD1nrVfSTSSwHkZSCOWi j/NSOAvseO+nkNlo88FW9t4ZY7KxfvY2vekayhUYlKODmiqqZV7/fgd3v9P6I/zTgqH/ dS8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=hC2kQX7cbSgcmFjVZVUx/8GtgHNWBxC4Rm92Ck33T5k=; b=w40hXGN5/D4F4O3GjZGh+sgFwKIyMB61enXQquPghynrJpNaLilNubx8L+Eonun5uv 6szO0sa0u9ysIqFEf1RFjaUHSwop0lW00R8tPs6btuwJHS9sNvQ4lyPndBqsT5jmBc8n EQHWr14C+kojfory/lGfDvFdoFd4bv2AGU50SEywr4qoOkmbQLvEwY4OSKWjFa6+ZpEM d9BxiURLTy9/qdpcmT8keGy9QCMPEg+TKaP2ty+N6BnEtiWOEwr2NJT36QZd96UKA95H 09v1juB54J/iDs9Yahihu7aMuovFNs5Wz9MCtsgiKr9fSEfrncfAGXmWV3PqYw5ZNKeV sRgA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b27si18056133pgb.366.2019.02.28.10.40.53; Thu, 28 Feb 2019 10:41:09 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388363AbfB1R7F (ORCPT + 99 others); Thu, 28 Feb 2019 12:59:05 -0500 Received: from mga07.intel.com ([134.134.136.100]:62019 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726214AbfB1R7E (ORCPT ); Thu, 28 Feb 2019 12:59:04 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Feb 2019 09:59:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,423,1544515200"; d="scan'208";a="147405164" Received: from chenyu-office.sh.intel.com ([10.239.158.163]) by fmsmga002.fm.intel.com with ESMTP; 28 Feb 2019 09:59:02 -0800 From: Chen Yu To: "Rafael J. Wysocki" , Viresh Kumar , Srinivas Pandruvada , Len Brown Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, yu.chen.surf@gmail.com, Chen Yu Subject: [PATCH 1/2][RFC v2] ACPI: add "processor.broadcast_ppc" hook to broadcast _PPC Date: Fri, 1 Mar 2019 02:07:47 +0800 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On some problematic platforms, the _PPC notifier is only delivered to one CPU, which might cause information inconsistent between CPUs within the package. Thus introduce a boot up parameter to broadcast this _PPC notifier onto all online CPUs. Signed-off-by: Chen Yu --- drivers/acpi/processor_perflib.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index a303fd0e108c..737dbf5aa7f7 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -63,6 +63,10 @@ module_param(ignore_ppc, int, 0644); MODULE_PARM_DESC(ignore_ppc, "If the frequency of your machine gets wrongly" \ "limited by BIOS, this should help"); +static int broadcast_ppc; +module_param(broadcast_ppc, int, 0644); +MODULE_PARM_DESC(broadcast_ppc, "Broadcast the ppc to all online CPUs"); + #define PPC_REGISTERED 1 #define PPC_IN_USE 2 @@ -180,8 +184,16 @@ void acpi_processor_ppc_has_changed(struct acpi_processor *pr, int event_flag) else acpi_processor_ppc_ost(pr->handle, 0); } - if (ret >= 0) - cpufreq_update_policy(pr->id); + if (ret >= 0) { + if (broadcast_ppc) { + int cpu; + + for_each_possible_cpu(cpu) + cpufreq_update_policy(cpu); + } else { + cpufreq_update_policy(pr->id); + } + } } int acpi_processor_get_bios_limit(int cpu, unsigned int *limit) -- 2.17.1