Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1600368imj; Thu, 14 Feb 2019 09:00:09 -0800 (PST) X-Google-Smtp-Source: AHgI3IaAFIdJ2Cu3bkx+x1gSqPgJeclrDqkFYlToILReoNKhUS4rd81Eh7tsBM1ekMspJxNUna4e X-Received: by 2002:a17:902:31c3:: with SMTP id x61mr5115689plb.113.1550163609364; Thu, 14 Feb 2019 09:00:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550163609; cv=none; d=google.com; s=arc-20160816; b=UPmxmFcbgrgaWRdb0Ic/N4dF3ywGiG55Owz1zbzih8Lz0dPLXXOKmHf4hERfHnNyE+ VlL+4dwPjVglubgy45I6sWrhoK9M1u/F2pqgMn/Sb6/NqoHUnNF1Qmyr0a69/y3YIz0S Sj4y0jswVChpP/gDTmehkn81Cwhss5rjjzaxHyGhlys5hT2NcfKUP/NcRfQH5tfcpyfg l2snP+bXj5PklirvNPg4xCGufhUysZHTbvr/cyqxZoHNPZpLJiL7+hEh35lJZf8U+hjk orgBcpBNM/X1+S2lejtmKSY6270Y5Q0phgabhPDuZ98gCNq32ImZO3w03KOMNyGwgJVB ladg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=F64IoGRBQC9tbdmalgwJkLdO2s7uhh1bQ3MNXtsYt9A=; b=ImBfSncweJnki1oLg9v7j6TgovqkLcyqKrnIBbed/UhzyfX/Evb4QDl4m9LVX2Sz7s Ey/k8eKBnaI9gAbwXHWuFYysyBQMZFdQPQjT8Gd8m5pZS+CuodaIQn3FlfS8MnQjZpET IOiBbuHqeMu8GibrHZFFi6CleJ2IeExU6V6+uqDM2bUMNotF2r1xfyttWUldFzYULrLz r3iOI7NTXyAsY/Ggq815ji2jLgULj0jhulm4odWB3gDvZjgPA23TyurP/nxMgGIJXOrY g/y3hW1uocGYyrvUj8sUg4giLsLmDePhirZSANeljhWYMxqUUhYglm0azJJfK1qSGx5H CT+Q== 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 q13si2829875pgj.86.2019.02.14.08.59.52; Thu, 14 Feb 2019 09:00: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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437353AbfBNHrC (ORCPT + 99 others); Thu, 14 Feb 2019 02:47:02 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:44888 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726358AbfBNHq5 (ORCPT ); Thu, 14 Feb 2019 02:46:57 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 40705BF11EAD046DFFB1; Thu, 14 Feb 2019 15:46:54 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.408.0; Thu, 14 Feb 2019 15:46:44 +0800 From: Xiongfeng Wang To: , , , , , CC: , , , , Subject: [PATCH v2 0/2] Work around for Hisilicon CPPC cpufreq Date: Thu, 14 Feb 2019 15:46:06 +0800 Message-ID: <1550130368-60513-1-git-send-email-wangxiongfeng2@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 | 38 +++++++++++++++++++++++ drivers/cpufreq/cppc_cpufreq.c | 70 ++++++++++++++++++++++++++++++++++++++++++ include/acpi/cppc_acpi.h | 1 + 3 files changed, 109 insertions(+) -- 1.7.12.4