linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Marcos Souza <marcos.souza.org@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Get the min and max frequency of a processor
Date: Fri, 31 Aug 2012 14:26:17 +0200	[thread overview]
Message-ID: <20120831122616.GA4083@x1.osrc.amd.com> (raw)
In-Reply-To: <CAH0vN5J0_3B2e_dmLk1yaKfCde79egkG-s7THrKtEwzcLnmm5Q@mail.gmail.com>

On Fri, Aug 31, 2012 at 06:52:46AM -0300, Marcos Souza wrote:
> Nothing is wrong with access /sys, but I thought there was another
> way, like an API or something else.

Ah, there's no API, AFAICT.

Also, tools/power/cpupower/ uses sysfs too - you could reuse that
code if you don't feel like writing it yourself. The function is
cpufreq_get_hardware_limits()

Ok, technically, there is also a way to query the CPU's MSRs directly
but this is a bit more involved than reading sysfs nodes.

HTH.

-- 
Regards/Gruss,
Boris.

  reply	other threads:[~2012-08-31 12:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-30 17:48 Get the min and max frequency of a processor Marcos Souza
2012-08-31  8:37 ` Borislav Petkov
2012-08-31  9:52   ` Marcos Souza
2012-08-31 12:26     ` Borislav Petkov [this message]
2012-09-01 20:26       ` Marcos Souza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120831122616.GA4083@x1.osrc.amd.com \
    --to=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcos.souza.org@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).