[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <17d15837848eddd8445b206356531b9b5aae644b.camel@kepstin.ca>
Date: Wed, 14 Apr 2021 22:13:02 -0400
From: Calvin Walton <calvin.walton@...stin.ca>
To: Terry Bowman <terry.bowman@....com>, lenb@...nel.org,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4] tools/power turbostat: Fix RAPL summary collection
on AMD processors
On Tue, 2021-03-30 at 21:38 +0000, Terry Bowman wrote:
>
> +int idx_valid_amd(int idx)
> +{
> + switch (idx) {
> + case IDX_PKG_ENERGY:
> + return do_rapl & MSR_PKG_ENERGY_STAT;
This isn't correct - MSR_PKG_ENERGY_STAT is the MSR offset, not a bit
mask for the do_rapl bit field.
The presence of MSR_PKG_ENERGY_STAT (along with MSR_RAPL_PWR_UNIT and
MSR_CORE_ENERGY_STAT) is indicated by the RAPL_AMD_F17H bit in do_rapl,
and can be checked with:
do_rapl & RAPL_AMD_F17H
--
Calvin Walton <calvin.walton@...stin.ca>
Powered by blists - more mailing lists