[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120831122616.GA4083@x1.osrc.amd.com>
Date: Fri, 31 Aug 2012 14:26:17 +0200
From: Borislav Petkov <bp@...en8.de>
To: Marcos Souza <marcos.souza.org@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: Get the min and max frequency of a processor
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists