Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6007337iog; Thu, 23 Jun 2022 09:25:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u+l1PTqOSS47NCWc7JjQeM8P92B/eWnZgqLKf3YsEgu4imHNE2Mi+rBlNBTC7VrulY1lK1 X-Received: by 2002:a63:b514:0:b0:40c:9fc8:babe with SMTP id y20-20020a63b514000000b0040c9fc8babemr8070523pge.197.1656001537064; Thu, 23 Jun 2022 09:25:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656001537; cv=none; d=google.com; s=arc-20160816; b=siX8grZwFGg0B18nNfrJtG63C/uAD4ja6IGHOZP8icIrZgTJtCgIMpM9dDywxWKe3j hj+yPQ/aF5CYurYmb7NQ7Kf5AvckyjtszvQhxKRYXFbO4TTksYKFEFvPoGlFstFcWo6R Asir6M6lq00Pd4JFpaYHbpSI2ku0ybjvyaVV/s0botsCtC6Ey2bCtpGcgbJ3fV7M8ifi ikIbVSqMxwdikfmDVBhkZJNf8UruPC5oowRqKjZYwhYjT+YJd74uRiDqFhvOEZYbOGdu lA0KDLUrYyTfownxcerlXF2+gCIovw3JWoG4Z/UXa73FZqKXli/EZyK2YF5lx2WSLpQw G9UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=n0r2Ok6dFV4XXWw3QSAinCrPWvaZY8iKR2FyTnIIOYU=; b=Fw4ggI13bDTZz8AsZJm5wMeIo0SUBn/cQh81+PJ7xjtf8WpXYyk+CBAMx3XfiAJ9GG ydA68raPtYYu5AUBchBsSYnoW2nAsWj8S+GrVF91U8HqNGWpIsfr/6WDO6BDy4KtOkOe pbHz8FuZrHJX+iuG1YhWb63iJqxjciEYBmwcubNKeLN0HMT1wvK0PQAIwnJ+ntHkpqgx 4k3x2c3wKOdGdi3dp1D4yOKB6pHKUF7MrHFwkO9kmd0O6xUMtr/FUzpTlQYFoEYS0rHq YEaIaEuy0nt+DGVMPMlve4J/qau5OWtUMoWxq38xdAsuw1TEbxwF8DKDWnuH6K4IvwuY DdgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Zfx/u8fU"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s22-20020a634516000000b003f605851c65si27655603pga.303.2022.06.23.09.25.23; Thu, 23 Jun 2022 09:25:37 -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; dkim=pass header.i=@intel.com header.s=Intel header.b="Zfx/u8fU"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232110AbiFWP4P (ORCPT + 99 others); Thu, 23 Jun 2022 11:56:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231362AbiFWP4K (ORCPT ); Thu, 23 Jun 2022 11:56:10 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A705E443D7; Thu, 23 Jun 2022 08:56:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655999769; x=1687535769; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=2sQkvPgRrN3KPlpmOwqAcm6EAu1OjxyKTvt647C45Gw=; b=Zfx/u8fUriZFilCefwheZHtrDW/bmFNAyo+aEef2lNneYVZMk1hrtAvw nzG+B6sFvtnQCvh9WU3XsZCYDgZTPEpX7doh4dfpelYSBKhV3+GX5nNkP nPtDx/pSSPQtOuogcJb5jcUNCBl9ioZfDBim/MC4a9Klmo0DniV0y9nbV Dtve7GjYT0N8IjUMaEEKwcUJnOFFt3T28h+RhSb1TkQrKA2zL7NeNsJf4 VkFrlvvaRer0LF1o3g4zEC4D4wm9yHzHI9ohAHOepObAj8jfCJf75r3fI bOL2+HQySBd7Hraw99DOP/vu/1+OTQjSiVNbpomqDCVvH008iBn9lhsUr g==; X-IronPort-AV: E=McAfee;i="6400,9594,10386"; a="261190292" X-IronPort-AV: E=Sophos;i="5.92,216,1650956400"; d="scan'208";a="261190292" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2022 08:56:09 -0700 X-IronPort-AV: E=Sophos;i="5.92,216,1650956400"; d="scan'208";a="563500760" Received: from ckeane-mobl1.amr.corp.intel.com (HELO [10.209.81.98]) ([10.209.81.98]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2022 08:56:08 -0700 Message-ID: Date: Thu, 23 Jun 2022 08:55:42 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH V1] x86/cstate: Add Zhaoxin/Centaur ACPI Cx FFH MWAIT support Content-Language: en-US To: Tony W Wang-oc , "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: CobeChen@zhaoxin.com, TimGuo@zhaoxin.com, LindaChai@zhaoxin.com, LeoLiu@zhaoxin.com, ACPI Devel Maling List References: <0b583b7e-dcd3-be51-f367-1c12ac841d3f@zhaoxin.com> From: Dave Hansen In-Reply-To: <0b583b7e-dcd3-be51-f367-1c12ac841d3f@zhaoxin.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,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 On 6/22/22 18:26, Tony W Wang-oc wrote: > 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; Many of the changelogs that add new vendors here go on about particular C states declared in the _CST object and contents of CPUID leaf 5. Why do we even _have_ a vendor check here? Shouldn't the code just be going and doing the validation of the _CST object and CPUID that the changelogs blather on about? Intel certainly made the original sin on this one (see 991528d7348), but I hope _something_ changed in the 16 years since that patch went in.