Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1344696rwd; Thu, 15 Jun 2023 09:16:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ63GzQf4Sm3xzM7R7+SBQqtzYHr4E39PtvCeR070pKst2UFPNqO8ArRrPRadaiAl1nvK7ud X-Received: by 2002:a19:e04e:0:b0:4f4:d383:4d6b with SMTP id g14-20020a19e04e000000b004f4d3834d6bmr11414632lfj.6.1686845818707; Thu, 15 Jun 2023 09:16:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686845818; cv=none; d=google.com; s=arc-20160816; b=Ppy2qCdg08lakBKpNvjgguEC9sdnVibtgWXee8AFdjrCRb/rMLValwKNczC218BBVT 3kVICsnq/ZKCwn4nl/OcgxAMZKR4sWjQ02U2smbK4x82T592sgpgKD7s9H8So0gPbIsP xhQ/ksadq1NdZzMB9UlhySGo5sEH6vNf8Ln9rxIQa475kKQikHrPDFzrBbc3cqv2GKib NignEz62FKMRYjJUy0GagtlbwRB1B3hLLcdArW1dbcZpLzsP/xImwZpplFJ1whHAdf8Y ytoRf0m33ZZqfZsd/+4k2b5pSE39aHUIoayFeBUZ/i45H+89VK7UN9MY5OK4stYKW8CK 1l4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=+QbobCtugxJDUMbdYbV9n3X5BDpliD1bGvlK4DoVx4Y=; b=NcCkeQlgqP6PUjitDIsNDXYqoFA3ALUqcfK2+CA5aVnFSAUbgTgbGVIsSUcEHgbFVF zNB+Md5DD8jHOamriWcRIih5Aqi17iFhoSVu4zzpqtC4uk+16YZ4mF8lBr+Ol5yNVlz+ VNuJM6d+VPNi6LuB+VF2NhHWJO66YffrtCbOz053WXnGFHkpnw1qYOJ5gcX3BBeNfn+p sDVnrGVivYG6EwHbrxAVBlwgIbC/+rZ0AL1UiZDTYvLPOGLBcydomy4NqJWRnsgVXbu0 w602Qx5+68PAK4eRJVzIwAg35ixbAJQj2L/c/BbsNegg0cEYko52Hu9z8s6Vx1byh/HI t5zA== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p12-20020a1709060e8c00b0097881a23786si665573ejf.826.2023.06.15.09.16.20; Thu, 15 Jun 2023 09:16:58 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241673AbjFOP5l convert rfc822-to-8bit (ORCPT + 99 others); Thu, 15 Jun 2023 11:57:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230256AbjFOP5k (ORCPT ); Thu, 15 Jun 2023 11:57:40 -0400 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93847273E; Thu, 15 Jun 2023 08:57:39 -0700 (PDT) Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-9787d11a410so181857666b.0; Thu, 15 Jun 2023 08:57:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686844658; x=1689436658; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Sm9fY4fNQuAWXQzX5fCrHR40yXo8pF4xEqMnMicx6sQ=; b=YPTNFV0kT8HlfLvORSQDYkkNADf3jIczBW5/IenS+GQoYdI0labfVA2EcvzpnovSLM qR2wRNhyuqoZYcXaSpiWBvblVQWPsGs3C5eHxjpUQWJSXJu3TIxqQ+KzA0ThLg3i6c/s eCHzdAtp9qcJPqteVTxVHPZCUbPA6oFn7YKrg06cYauEA5vW0zlW0rYYEqbINFV1+TxA vLo6XMECreFOMjNMuaeMyy8DIQ50sYrFMRMqbaOdWMlLFrY7ZNrDAzD6pH22C5oM6xsD +HnuCrVeSEwNQf5kbVbkpSqMm2ai/pmU23MfIqlV+JK5hTHRNuk2lOQMW6/5xs95AMhX o5Rg== X-Gm-Message-State: AC+VfDzfi4x6GUG+x5zO6cohwwXEotp4eNLZ5BNzwvmHLlRM6kD3NGAk maWt4zWA1uvHmalm26xb+71rll5nxhh2JYPtR0H8GNrQ X-Received: by 2002:a17:906:7785:b0:976:7c67:4bf8 with SMTP id s5-20020a170906778500b009767c674bf8mr14238671ejm.5.1686844657811; Thu, 15 Jun 2023 08:57:37 -0700 (PDT) MIME-Version: 1.0 References: <20230615063333.4030395-1-perry.yuan@amd.com> In-Reply-To: <20230615063333.4030395-1-perry.yuan@amd.com> From: "Rafael J. Wysocki" Date: Thu, 15 Jun 2023 17:57:26 +0200 Message-ID: Subject: Re: [PATCH v2 4/4] cpufreq: intel_pstate: Use the acpi_pm_profile_server() symbol To: Perry Yuan Cc: rafael.j.wysocki@intel.com, viresh.kumar@linaro.org, Ray.Huang@amd.com, Mario.Limonciello@amd.com, Deepak.Sharma@amd.com, Wyes.Karny@amd.com, gautham.shenoy@amd.com, Sunpeng.Li@amd.com, Xinmei.Huang@amd.com, Xiaojian.Du@amd.com, Li.Meng@amd.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Thu, Jun 15, 2023 at 8:35 AM Perry Yuan wrote: > > From: Mario Limonciello > > Avoid duplication of functionality by using the generic symbol. > This does have a functional change that intel-pstate will now > match "SOHO server" as well. And why do you think that it is a good idea to change this behavior? > Reviewed-by: Gautham R. Shenoy > Signed-off-by: Mario Limonciello > Signed-off-by: Perry Yuan > --- > drivers/cpufreq/intel_pstate.c | 19 ++++--------------- > 1 file changed, 4 insertions(+), 15 deletions(-) > > diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c > index 2548ec92faa2..6401338971c7 100644 > --- a/drivers/cpufreq/intel_pstate.c > +++ b/drivers/cpufreq/intel_pstate.c > @@ -313,18 +313,9 @@ static DEFINE_MUTEX(intel_pstate_limits_lock); > > #ifdef CONFIG_ACPI > > -static bool intel_pstate_acpi_pm_profile_server(void) > -{ > - if (acpi_gbl_FADT.preferred_profile == PM_ENTERPRISE_SERVER || > - acpi_gbl_FADT.preferred_profile == PM_PERFORMANCE_SERVER) > - return true; > - > - return false; > -} > - > static bool intel_pstate_get_ppc_enable_status(void) > { > - if (intel_pstate_acpi_pm_profile_server()) > + if (acpi_pm_profile_server()) > return true; > > return acpi_ppc; > @@ -481,10 +472,6 @@ static inline void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy) > { > } > > -static inline bool intel_pstate_acpi_pm_profile_server(void) > -{ > - return false; > -} > #endif /* CONFIG_ACPI */ > > #ifndef CONFIG_ACPI_CPPC_LIB > @@ -2407,8 +2394,10 @@ static int intel_pstate_init_cpu(unsigned int cpunum) > if (hwp_active) { > intel_pstate_hwp_enable(cpu); > > - if (intel_pstate_acpi_pm_profile_server()) > +#ifdef CONFIG_ACPI > + if (acpi_pm_profile_server()) > hwp_boost = true; > +#endif > } > } else if (hwp_active) { > /* > -- > 2.34.1 >