Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4437672iog; Tue, 21 Jun 2022 21:02:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sYEscsu8flk7M7JMZJU7wZjEwgdyxitHwG92nL3pAyZPt8Irctwhli3VP2qO6Ce2IiFcnq X-Received: by 2002:aa7:930e:0:b0:525:360e:eae9 with SMTP id cz14-20020aa7930e000000b00525360eeae9mr7053170pfb.67.1655870554925; Tue, 21 Jun 2022 21:02:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655870554; cv=none; d=google.com; s=arc-20160816; b=cvggPdFMu9OTM/oLbo1AmTWQP/Tb9Ass2XdB5Us2Pz4gnBR3GffVhWwklCX2M4gTe1 qPhYCAp+bQoeU2CZh1JU96/5Vfrk2tOBdhtOJcgq9ZCb34FQYl6os3tX85RlqwXVcyuG M1cmR/glQ6fJXwVtYIdj6nLSw+ITCxdqkgXAZAzxN8OulfNC12Dzlgm4Q2pmBSpwnoe/ sPqligyKcHbH+APF9YRqJOtbczA0rUgEVc1cdE9i2XWhIUrbiuhhU30OWPHawWrhVU+H DGRt7D7TtQHtCZgCthMUlMikZB0fnFY6jyqolgl5humIEgy0fi4ey7Ap+saiKWYDtjei CqEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:user-agent:date:message-id:subject:from:cc:to; bh=km3p51FB5OnHkHQbLfEveOgb1+QCdugr/UjjPAWxiJk=; b=1LBF9VOc7uKM7zkoIxaUkOPO/P0dyy4MYbFC8/vFILOSRAfwFDVtqd0PEz3SxnN0DI 3GWA0EgMMb/0IhjAPaDo0TMOMsnwAUxW8R7okg32S7G7jxxbQyZJB5XWspKSfK/grj3t gR/O/H1R8/GVMj48YpfRzLJ8GciVYx1Gg9cXRPuuTZyr0u25LujjjZi4CYRLiPNYbwoW ULlngaHhJo/3V8aee4LDrhZWLSQE53PjzOHT+y3+vobCbQv0QGuBX0N60ZeDFqU3a3a/ zcvXEFJePD8T8plt2AGAqobDjNcAOpS5LqZds1MM7hgUe2KVBtTFp/1oUxwMX6p5dAzt or5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a17090302c700b001677106c13csi15687592plk.128.2022.06.21.21.02.17; Tue, 21 Jun 2022 21:02:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356655AbiFVDo6 (ORCPT + 99 others); Tue, 21 Jun 2022 23:44:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356633AbiFVDou (ORCPT ); Tue, 21 Jun 2022 23:44:50 -0400 Received: from ZXSHCAS2.zhaoxin.com (ZXSHCAS2.zhaoxin.com [210.0.225.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1A0E3055C; Tue, 21 Jun 2022 20:44:48 -0700 (PDT) Received: from zxbjmbx1.zhaoxin.com (10.29.252.163) by ZXSHCAS2.zhaoxin.com (10.28.252.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 22 Jun 2022 11:29:44 +0800 Received: from [10.32.56.37] (10.32.56.37) by zxbjmbx1.zhaoxin.com (10.29.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 22 Jun 2022 11:29:42 +0800 To: , , , , , , , , , , CC: , , , From: Tony W Wang-oc Subject: [PATCH] x86/cstate: Add Zhaoxin ACPI Cx FFH MWAIT support Message-ID: Date: Wed, 22 Jun 2022 11:29:41 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.32.56.37] X-ClientProxiedBy: ZXSHCAS1.zhaoxin.com (10.28.252.161) To zxbjmbx1.zhaoxin.com (10.29.252.163) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Recent Zhaoxin CPUs support X86_FEATURE_MWAIT that implies the MONITOR/MWAIT instructions can be used for ACPI Cx state. The BIOS declares Cx state in _CST object to use FFH on Zhaoxin systems. So let function ffh_cstate_init() support Zhaoxin too. Signed-off-by: Tony W Wang-oc --- arch/x86/kernel/acpi/cstate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c index 7945eae..d4185e1 100644 --- a/arch/x86/kernel/acpi/cstate.c +++ b/arch/x86/kernel/acpi/cstate.c @@ -213,7 +213,9 @@ static int __init ffh_cstate_init(void) if (c->x86_vendor != X86_VENDOR_INTEL && c->x86_vendor != X86_VENDOR_AMD && - c->x86_vendor != X86_VENDOR_HYGON) + c->x86_vendor != X86_VENDOR_HYGON && + c->x86_vendor != X86_VENDOR_CENTAUR && + c->x86_vendor != X86_VENDOR_ZHAOXIN) return -1; cpu_cstate_entry = alloc_percpu(struct cstate_entry); -- 2.7.4