Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3360286imj; Tue, 19 Feb 2019 02:03:01 -0800 (PST) X-Google-Smtp-Source: AHgI3IbINNLZzUhKw5CYfTaamyejyaOb8h7OfRLu5DWvQsHuKcpHDWNGnTLshYhN8qLSpHMj46Rg X-Received: by 2002:a17:902:b784:: with SMTP id e4mr18499355pls.308.1550570581107; Tue, 19 Feb 2019 02:03:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550570581; cv=none; d=google.com; s=arc-20160816; b=H1bhX4Dap1JHrSkfgtzcLS6zZ36WqoPqe4my7IghVbElQINVwzA9X6Emcyd4aodfdL 8w26y1qiwMggOvm25vjuLr5RU9C+jg6dtoDKJuIVsCJsjESUNmFiwm62Ona3MmciQ//a BwuXiTOHK/KIICIenUyBBHPbLhKdbAowVZBXCFTRFG3Maq2R/MIoVboF6LhvxclIXxLL Mdmf2BAYtqrITqK0CSmtg5hZNT/b5YazsOPLesAA6LhCuGuIJsQUeMdXHEq7yvatRCxl qKSuL0kA7SG41ZOXjmrky6MEbc2b6rcQiaI394pF/7U8vVVeL+yOXTR4aBrBg2pNVH2n pr1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=peSWnS5wbW9lEyzHswIPXiT1N2qqyYDqCManp7KLx5Y=; b=Gz+CTHTqVjmGYqGpp+7WPzQS7dboE3hndIS9i9gVISBmiNzJ/vYs17RoEAGbzSwPq8 9Y5JwS1bsPZfITBp9TD0dm16Pl32hWi0B3ZI/e/yXhHQCHHqejzfe9MjX98KID66v2fA lbYF7aR3GLSgsnOTv3lj2rV0jpy2kXRvO3RvSpHYPYlQzc76c5ian6G2M5GfFNbswS4G IkUFuvUzmmAm75Jr0NkuFZXcnCCjI17D8I1pQy3ka1bV+rflOeoG01iu1UzNxZp2PbwS qsgsAgYMr9nRkDRmmCxAfHjy9qWcMfNCuGKCkOPONEIYnR8i8CsH7g0vf3MziVcDcwQI 6uOQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2si10152930pgl.531.2019.02.19.02.02.46; Tue, 19 Feb 2019 02:03:01 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728295AbfBSKA2 (ORCPT + 99 others); Tue, 19 Feb 2019 05:00:28 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:50828 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728160AbfBSKA1 (ORCPT ); Tue, 19 Feb 2019 05:00:27 -0500 Received: from 79.184.254.15.ipv4.supernova.orange.pl (79.184.254.15) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.183) id 35ea91a1e58b3c4d; Tue, 19 Feb 2019 11:00:25 +0100 From: "Rafael J. Wysocki" To: Xiongfeng Wang Cc: viresh.kumar@linaro.org, rafael@kernel.org, gcherianv@gmail.com, pprakash@codeaurora.org, george.cherian@cavium.com, robert.moore@intel.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, guohanjun@huawei.com, john.garry@huawei.com Subject: Re: [PATCH v3 0/2] Work around for Hisilicon CPPC cpufreq Date: Tue, 19 Feb 2019 10:59:00 +0100 Message-ID: <12311117.DSx6JT7Gj8@aspire.rjw.lan> In-Reply-To: <1550375655-58007-1-git-send-email-wangxiongfeng2@huawei.com> References: <1550375655-58007-1-git-send-email-wangxiongfeng2@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sunday, February 17, 2019 4:54:13 AM CET Xiongfeng Wang wrote: > Hisilicon chips do not support delivered performance counter register > and reference performance counter register. But the platform can > calculate the real performance using its own method. This patch provide > a workaround for this problem, and other platforms can also use this > workaround framework. We reuse the desired performance register to > store the real performance calculated by the platform. After the > platform finished the frequency adjust, it gets the real performance and > writes it into desired performance register. OS can use it to calculate > the real frequency. > > Changlog: > > v2 -> v3: > Recontruct 'cppc_get_desired_perf'. > Rename 'cppc_workaround_info' to 'cppc_workaround_oem_info' > Drop 'get_rate' member from struct cppc_workaround_oem_info > Change 'cppc_wa_get_rate' pointer to a flag to indicate whether > we need to aplly the workaround. > Move the new functions to the beginning of cppc-cpufreq.c > > > Xiongfeng Wang (2): > ACPI / CPPC: Add a helper to get desired performance > cpufreq / cppc: Work around for Hisilicon CPPC cpufreq > > drivers/acpi/cppc_acpi.c | 39 +++++++++++++++++++++++++ > drivers/cpufreq/cppc_cpufreq.c | 66 ++++++++++++++++++++++++++++++++++++++++++ > include/acpi/cppc_acpi.h | 1 + > 3 files changed, 106 insertions(+) > > Both patches applied, thanks!