Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp4539671rwj; Tue, 20 Dec 2022 11:30:23 -0800 (PST) X-Google-Smtp-Source: AMrXdXs0pMiEZVfcrRejW7OHJz9kLqR933TUXXsWLlQh0OunKWQIWMEN3AIl09yUu0sbm/2n72Vs X-Received: by 2002:a05:6a21:398e:b0:b2:3b40:32b1 with SMTP id ad14-20020a056a21398e00b000b23b4032b1mr4833092pzc.57.1671564622802; Tue, 20 Dec 2022 11:30:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671564622; cv=none; d=google.com; s=arc-20160816; b=qbNFvjy1w2TeU9nHIVhOjvi/8PwFWxqhny5VrhUBgVHmckxmzSiJFQQN2O7n7afMh2 sO6+DzvcRzXMvYEV0M9bb76GHxbRPyLZ8pcXECcSoeY0u1g100zhMT6L0bbDjQBQkjF0 3LlMVh250AVt9mSfWjnkO2klJe5QyEsasaX5kvEXpE05bE9b+t15ukBbN43jiAq8CPfu l365Uy8DF7NElu9m1TxQuXOdI1+ElD32tpW9Ug6v3evFxrIevtA4KqScq+GtEhCqPA69 /TxEGPT1B4rcAhU64wHmQiZQiKCGyn4gK4WEZvc7Lcm0+ljokFTNgoz9TgJgjD48U0rF NotA== 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:references :cc:to:from:content-language:subject:mime-version:date:message-id :dkim-signature; bh=mEIhlEMRgSrhEhC6C4CxZMy+wH2/EZjfbZsB0XqjGr8=; b=SfrLpk+37FWhoFy5Q/c5/a09uJP+aGEsawTiBd7GxvmVBdjnavsrVkO0QKkIi33C0I wqoMhOR/NfIit0FdwqLa6qbIUlmX8Dwb0BcO/AjfPdOhS7dOiKc5hY19mSm1DKxflIGg Aq6fXsl3mBHI/eV66aOH1KMnr5up+QY0RV5FvQJMa17T6Y9VAeP1TX+/qv7lrF0fF3be pGzunIcr29LRXtKzx4/0RSUIzcEFu4PhGK2NrangJYWJakU7wisDWRj8+s1Fd9dOVl1R LDhTnJvSAPjOw6UnXltg3eiVgtEkBGEkVbD63KbyEYpzoqNEZrHo98+p4CJltU5KJA8e xWEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=kypl6NEA; 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=REJECT sp=REJECT dis=NONE) header.from=mailbox.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o1-20020a635a01000000b004792f347556si13945087pgb.623.2022.12.20.11.30.13; Tue, 20 Dec 2022 11:30:22 -0800 (PST) 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=@mailbox.org header.s=mail20150812 header.b=kypl6NEA; 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=REJECT sp=REJECT dis=NONE) header.from=mailbox.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229727AbiLTSwp (ORCPT + 68 others); Tue, 20 Dec 2022 13:52:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229482AbiLTSwn (ORCPT ); Tue, 20 Dec 2022 13:52:43 -0500 Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F332DF06; Tue, 20 Dec 2022 10:52:41 -0800 (PST) Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4Nc5Kv36mdz9sW1; Tue, 20 Dec 2022 19:52:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1671562355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mEIhlEMRgSrhEhC6C4CxZMy+wH2/EZjfbZsB0XqjGr8=; b=kypl6NEAt1bO3rlLFxV+xzGLR2bNiC/b8dIHDFzkSe7gkoKl6x65eAXmNfgRsuipiso3yq AuXZH/MCUI72wrQoxESe1XLRAZsqmpWe1Iy03ASnjzv1N1aWu5sqKN+5Qa6XYKGJbKhTjS sqmj4SJhrUDQoxEVSBaly19mQgjHv5IPpnnhc5jziYG5QrQK903tPjxvjRlLH63itOCVVf 663OrLNzC4VsRK9w2u8lejZHM94oP2dcrMs9X75QJhKD0Oge7njXY1cz3bCWeI6h5womcW EyKBC4vWTQCS6LdTCTjdu6kx60m40t5F/U8CFgy9+aMJmXDzfSbR5Ra/qJVUNQ== Message-ID: <7602a0c7-df8c-5d6d-401d-55620d28c584@mailbox.org> Date: Tue, 20 Dec 2022 18:52:32 +0000 MIME-Version: 1.0 Subject: Re: [PATCH v8 00/13] Implement AMD Pstate EPP Driver Content-Language: en-US From: Tor Vic To: Perry Yuan , rafael.j.wysocki@intel.com, Mario.Limonciello@amd.com, ray.huang@amd.com, viresh.kumar@linaro.org Cc: Deepak.Sharma@amd.com, Nathan.Fontenot@amd.com, Alexander.Deucher@amd.com, Shimmer.Huang@amd.com, Xiaojian.Du@amd.com, Li.Meng@amd.com, wyes.karny@amd.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221219064042.661122-1-perry.yuan@amd.com> <73b77acd-813a-458b-61e2-87116720cc38@mailbox.org> In-Reply-To: <73b77acd-813a-458b-61e2-87116720cc38@mailbox.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-MBO-RS-META: sm93bp8fq3sn8gq5spgrwj9wrs4osy43 X-MBO-RS-ID: 6afee3298071c47f3a0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS 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 20.12.22 18:13, Tor Vic wrote: > > On 19.12.22 06:40, Perry Yuan wrote: >> Hi all, >> >> This patchset implements one new AMD CPU frequency driver >> `amd-pstate-epp` instance for better performance and power control. >> CPPC has a parameter called energy preference performance (EPP). >> The EPP is used in the CCLK DPM controller to drive the frequency that >> a core >> is going to operate during short periods of activity. >> EPP values will be utilized for different OS profiles (balanced, >> performance, power savings). >> > > Using v8 and clang-15 on 6.1 I get: > Got it. Mario was right. INTEL_PSTATE must be selected, it has become a dependency. That doesn't seem correct. With it selected, it builds just fine. Not tested though. > --- > ld.lld: error: undefined symbol: energy_perf_strings > >>> referenced by amd-pstate.c:789 > (/tmp/makepkg/linux61-vd/src/linux-stable/drivers/cpufreq/amd-pstate.c:789) > >>>               vmlinux.o:(show_energy_performance_preference) > >>> referenced by amd-pstate.c:768 > (/tmp/makepkg/linux61-vd/src/linux-stable/drivers/cpufreq/amd-pstate.c:768) > >>>               vmlinux.o:(store_energy_performance_preference) > >>> referenced by amd-pstate.c:749 > (/tmp/makepkg/linux61-vd/src/linux-stable/drivers/cpufreq/amd-pstate.c:749) > >>> > vmlinux.o:(show_energy_performance_available_preferences) > >>> referenced 1 more times > >>> did you mean: energy_perf_strings > >>> defined in: vmlinux.o > > ld.lld: error: undefined symbol: epp_values > >>> referenced by amd-pstate.c:189 > (/tmp/makepkg/linux61-vd/src/linux-stable/drivers/cpufreq/amd-pstate.c:189) > >>>               vmlinux.o:(store_energy_performance_preference) > --- > > and a few warnings: > > --- > drivers/cpufreq/amd-pstate.c:966:6: warning: variable 'ret' is used > uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] >         if (rc) >             ^~ > drivers/cpufreq/amd-pstate.c:1025:9: note: uninitialized use occurs here >         return ret; >                ^~~ > drivers/cpufreq/amd-pstate.c:966:2: note: remove the 'if' if its > condition is always false >         if (rc) >         ^~~~~~~ > drivers/cpufreq/amd-pstate.c:962:6: warning: variable 'ret' is used > uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] >         if (!dev) >             ^~~~ > drivers/cpufreq/amd-pstate.c:1025:9: note: uninitialized use occurs here >         return ret; >                ^~~ > drivers/cpufreq/amd-pstate.c:962:2: note: remove the 'if' if its > condition is always false >         if (!dev) >         ^~~~~~~~~ > drivers/cpufreq/amd-pstate.c:949:66: note: initialize the variable 'ret' > to silence this warning >         int min_freq, max_freq, nominal_freq, lowest_nonlinear_freq, ret; >                                                                         ^ > >  = 0 > drivers/cpufreq/amd-pstate.c:996:52: warning: variable 'value' is > uninitialized when used here [-Wuninitialized] >         cpudata->epp_cached = amd_pstate_get_epp(cpudata, value); >                                                           ^~~~~ > drivers/cpufreq/amd-pstate.c:953:11: note: initialize the variable > 'value' to silence this warning >         u64 value; >                  ^ >                   = 0 > drivers/cpufreq/amd-pstate.c:1085:6: warning: variable 'epp' is used > uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] >         if (cpudata->epp_policy == cpudata->policy) >             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/cpufreq/amd-pstate.c:1110:30: note: uninitialized use occurs here >         amd_pstate_set_epp(cpudata, epp); >                                     ^~~ > drivers/cpufreq/amd-pstate.c:1085:2: note: remove the 'if' if its > condition is always false >         if (cpudata->epp_policy == cpudata->policy) >         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/cpufreq/amd-pstate.c:1064:9: note: initialize the variable 'epp' > to silence this warning >         s16 epp; >                ^ >                 = 0 > --- > > Cheers, > > Tor Vic >