Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5363211iog; Wed, 22 Jun 2022 18:29:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vlDbZeVJ40RWBBIYK+M8dvsfrsU6GNUh/+i12miyZgkMYZCR7sLrz6Hw5XAQwRVeESrkea X-Received: by 2002:a17:907:7213:b0:71a:1dc8:dfd9 with SMTP id dr19-20020a170907721300b0071a1dc8dfd9mr5710912ejc.747.1655947794628; Wed, 22 Jun 2022 18:29:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655947794; cv=none; d=google.com; s=arc-20160816; b=HYnE+QFB/F2HPWfQIdcUeO5FEoj+7CYKBR7Blq0ewPzSy+rkYtFuKE4tHt8Go+kQlr UK/HhnqmgxuujIrZf5YlS5I+ZplcUcExgzb5v2u3zJdwDxhQwOHzfi4+o+fZ7qd0vioQ 6bWKFAgEL3ubmOxE5lTdiTExGZxc+jTVwhqJ/hXuu8wjTKxRGLaTT6eVO4SQ/Z5pj0wO l1RUNkW5iQmmq+i69VfNV7WsCWDATwRKVdIwJ3AkW9cTlseBINUHuCtD2y38WEU+59HK whCNIjevsc9RjrnkaORmwIMPIvO4DWtwpG7qcaaSt5n6cx00I/mJcgEQ1R1nMybAoEVA nY4Q== 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=KFhe+fxn178gLOkdIe6zPSZIWjwc6NaZTODWUsJlQnU=; b=nkIHzqtHyyh9IXEhDKlE0Bs8oxnmkIhxmpkJXCnp9rv+frY1xj22jEPDv7K1tJaMjl 2leyuSsUGvzZKlnBzEM3qKj3dBTJIOG59c18oEeUPfNzoEhW4WPg5Rvh8EHW7k+ZfpuA xnSguwXeXdcDt/vgQO/S5ljeVoKcNwzJ1YnmI9sTtKoKq2OotI0SD9mJHV1rts8Ucfb6 kONJLdXPRHzOpP/Ho2bx0YcNOW6flp7Tgo6QmJh1dXmBt9Vj7N6WjMtM0AsxqkQru8ps PKHwKm9xABZOEMpAWObf5P3XthuZ/ghdBsLm+6D862wMBTfb4UBzHjEaNxru/Ah3W9SX U+6Q== 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 jg25-20020a170907971900b00711f55a31c9si22962765ejc.675.2022.06.22.18.29.29; Wed, 22 Jun 2022 18:29:54 -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 S236107AbiFWB1L (ORCPT + 99 others); Wed, 22 Jun 2022 21:27:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229701AbiFWB1J (ORCPT ); Wed, 22 Jun 2022 21:27:09 -0400 Received: from ZXSHCAS1.zhaoxin.com (ZXSHCAS1.zhaoxin.com [210.0.225.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D95F93DA73; Wed, 22 Jun 2022 18:27:07 -0700 (PDT) Received: from zxbjmbx1.zhaoxin.com (10.29.252.163) by ZXSHCAS1.zhaoxin.com (10.28.252.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 23 Jun 2022 09:27:05 +0800 Received: from [10.32.64.1] (10.32.64.1) 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; Thu, 23 Jun 2022 09:27:03 +0800 To: "Rafael J. Wysocki" , Len Brown , Pavel Machek , Thomas Gleixner , "Ingo Molnar" , Borislav Petkov , Dave Hansen , the arch/x86 maintainers , "H. Peter Anvin" , Linux PM , "Linux Kernel Mailing List" CC: , , , , ACPI Devel Maling List From: Tony W Wang-oc Subject: [PATCH V1] x86/cstate: Add Zhaoxin/Centaur ACPI Cx FFH MWAIT support Message-ID: <0b583b7e-dcd3-be51-f367-1c12ac841d3f@zhaoxin.com> Date: Thu, 23 Jun 2022 09:26:57 +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.64.1] X-ClientProxiedBy: ZXSHCAS2.zhaoxin.com (10.28.252.162) 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/Centaur 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/Centaur systems. So let function ffh_cstate_init() support These CPUs 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