Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5363126iog; Wed, 22 Jun 2022 18:29:44 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uLxGpc8QQ+DcnDmiO9gjebr3bKZi79g2q3ojyaPhxtPm1oE/X16MotKhPO33XVy8YcH+bc X-Received: by 2002:a17:906:4f:b0:712:af2:29d9 with SMTP id 15-20020a170906004f00b007120af229d9mr5860231ejg.751.1655947784215; Wed, 22 Jun 2022 18:29:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655947784; cv=none; d=google.com; s=arc-20160816; b=gEPvIX2llIH1sSdgZZ8mXJ+y/U9FMKlGwXeTxe97o8yVmZq/vDGofKdFHfLkqF7XA3 ngC8RhfqsSHJhUqjXiyDatX+MFOsdqFfNKqiv5w0SK1mDYGWD6vcFQaWDl0iEVFP66IN vk/6wKOE1C6IyORgk3mTBjcevYXT/5iVwJFpOEqY+Bl1wrwfa2fpT4FgruSkfhjT//Qs RnCWQMEx+cpl4ZeLDOg3oVu3T22AqVUIYEfKZzOac6GvCXn68NOKkVi64W+S4qcNIbyq 6GwRSPkKq66cg5w8U5SlzMdUf2NYt2w6fi2Q3OWC0kvWveHvrMDHekNa3Q2dpySo1+fH 2V/w== 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 :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=7mldg00DvihD+QlCPabJ7zS782+7p1i+DDQ0kUJB654=; b=N/b2S7n86eXUy/jz/FkJrXNNtg9QBzhANwYkIkDK4R8D3+8GrB/DusPeK6xbG5/mJh MzrdaCDAI/3raD7R6xiAPOK2ifiaXAhfuCe2a5vUscVdGyBban0fdSzsVR9d+SXz5T2d hca+/nizCaCqEGeU4bAypJi2ET6Dos9ajLZkTFOKR0sLNf4y3nwspyaqc9ys6WDXtBCb 87B+lMjJ0fAyTjx8/dB731JGrX8IiXxHc6dp6Ob5BmXG0LE+77/r3XUVpgs4PQWdRaO0 b6YLfvqnlwO+g54ABvsOmb+DfeBsh0pgn2CAOgAkU8rA7csWwveusCfbLTgu1qGl+W+f +ldg== 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 d18-20020aa7d5d2000000b0043573352428si14361789eds.507.2022.06.22.18.29.18; Wed, 22 Jun 2022 18:29:44 -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 S234931AbiFWBLu (ORCPT + 99 others); Wed, 22 Jun 2022 21:11:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230101AbiFWBLs (ORCPT ); Wed, 22 Jun 2022 21:11:48 -0400 Received: from ZXSHCAS1.zhaoxin.com (ZXSHCAS1.zhaoxin.com [210.0.225.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F7B830F68; Wed, 22 Jun 2022 18:11:46 -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:11:44 +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:11:42 +0800 Subject: Re: [PATCH] cpufreq: Add Zhaoxin turbo boost control interface support To: "Rafael J. Wysocki" CC: Viresh Kumar , Linux PM , Linux Kernel Mailing List , , , , References: <8b748cc6-09c9-081c-c0c5-2e75f017b032@zhaoxin.com> From: Tony W Wang-oc Message-ID: Date: Thu, 23 Jun 2022 09:11:43 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: 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,NICE_REPLY_A, 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 On 22/6/2022 21:39, Rafael J. Wysocki wrote: > On Wed, Jun 22, 2022 at 5:44 AM Tony W Wang-oc wrote: >> >> Recent Zhaoxin CPUs support X86_FEATURE_IDA and the turbo boost can >> be dynamically enabled or disabled through MSR 0x1a0[38] in the same >> way as Intel. So add turbo boost control support for Zhaoxin too. > > And for Centaur too according to the code changes below. Ok, thanks a lot. > >> >> Signed-off-by: Tony W Wang-oc >> --- >> drivers/cpufreq/acpi-cpufreq.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c >> index 3d514b8..1bb2b90 100644 >> --- a/drivers/cpufreq/acpi-cpufreq.c >> +++ b/drivers/cpufreq/acpi-cpufreq.c >> @@ -78,6 +78,8 @@ static bool boost_state(unsigned int cpu) >> >> switch (boot_cpu_data.x86_vendor) { >> case X86_VENDOR_INTEL: >> + case X86_VENDOR_CENTAUR: >> + case X86_VENDOR_ZHAOXIN: >> rdmsr_on_cpu(cpu, MSR_IA32_MISC_ENABLE, &lo, &hi); >> msr = lo | ((u64)hi << 32); >> return !(msr & MSR_IA32_MISC_ENABLE_TURBO_DISABLE); >> @@ -97,6 +99,8 @@ static int boost_set_msr(bool enable) >> >> switch (boot_cpu_data.x86_vendor) { >> case X86_VENDOR_INTEL: >> + case X86_VENDOR_CENTAUR: >> + case X86_VENDOR_ZHAOXIN: >> msr_addr = MSR_IA32_MISC_ENABLE; >> msr_mask = MSR_IA32_MISC_ENABLE_TURBO_DISABLE; >> break; >> -- >> 2.7.4 > . > -- Sincerely TonyWWang-oc