From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 286FFC2BA83 for ; Thu, 13 Feb 2020 12:00:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D2A19222C2 for ; Thu, 13 Feb 2020 12:00:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NTJLtmCx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2A19222C2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PO/uwP2s3rxwUqmO2IXCIvCukn0V5AkQ2Vjpxq5kng4=; b=NTJLtmCxlUMgT1 iY7RukLlreWr+q7nyRkzCLIU+7m9mMz0WN3he2/DpSmpSxk9iDaFtRzuc73Yba6vnPi96fsnz2eXA pX8HVxyDpG9JxR/wnfqq9eeVRzH/GO7o0JeVFe1Vp3mXSHH3enLXqDUywjFcUbjEIFBpZPHPugF0L VpupYZ4qBz9MlXWN7VkQM5pCH+if6UDE1o29NbXO15NcBCyoP4x7Y4DKxqNvNplXzCjuNiMw0CDx/ 4fJLGeqWmDndPVOnZQhxyYp2qLRZ7AbN3vtHHU87xn8HogQ2wNDkfvaO1AzjpcjFUJvxzM+bRRGDu Dv1p1TU0zun8z0O3ew4g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2DAJ-00038j-QH; Thu, 13 Feb 2020 12:00:19 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2DAG-0002Lu-JH for linux-arm-kernel@lists.infradead.org; Thu, 13 Feb 2020 12:00:18 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EB8D61FB; Thu, 13 Feb 2020 04:00:02 -0800 (PST) Received: from [10.1.195.59] (ifrit.cambridge.arm.com [10.1.195.59]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E1AA03F6CF; Thu, 13 Feb 2020 04:00:00 -0800 (PST) Subject: Re: [PATCH v3 5/7] cpufreq: add function to get the hardware max frequency To: Ionela Voinescu , catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, maz@kernel.org, suzuki.poulose@arm.com, sudeep.holla@arm.com, lukasz.luba@arm.com, rjw@rjwysocki.net References: <20200211184542.29585-1-ionela.voinescu@arm.com> <20200211184542.29585-6-ionela.voinescu@arm.com> From: Valentin Schneider Message-ID: Date: Thu, 13 Feb 2020 11:59:56 +0000 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200211184542.29585-6-ionela.voinescu@arm.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200213_040016_683695_7B9238AA X-CRM114-Status: GOOD ( 12.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-doc@vger.kernel.org, peterz@infradead.org, viresh.kumar@linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2/11/20 6:45 PM, Ionela Voinescu wrote: > +/** > + * cpufreq_get_hw_max_freq - get the max hardware frequency of the CPU > + * @cpu: CPU number > + * > + * The default return value is the max_freq field of cpuinfo. > + */ > +__weak unsigned int cpufreq_get_hw_max_freq(unsigned int cpu) > +{ > + struct cpufreq_policy *policy = cpufreq_cpu_get(cpu); > + unsigned int ret_freq = 0; > + > + if (policy) { > + ret_freq = policy->cpuinfo.max_freq; > + cpufreq_cpu_put(policy); What about intel_pstate / turbo stuff? IIRC one of Giovanni's issues was that turbo freq is not always reported as the max freq. Dunno if we can do anything about it; at the very least maybe document the caveat? > + } > + > + return ret_freq; > +} > +EXPORT_SYMBOL(cpufreq_get_hw_max_freq); > + > static unsigned int __cpufreq_get(struct cpufreq_policy *policy) > { > if (unlikely(policy_is_inactive(policy))) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel