[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <882357df-7600-4aee-9fb1-4a118872f1af@intel.com>
Date: Tue, 11 Feb 2025 13:38:55 -0800
From: Sohil Mehta <sohil.mehta@...el.com>
To: Dave Hansen <dave.hansen@...el.com>, <x86@...nel.org>, Dave Hansen
<dave.hansen@...ux.intel.com>, Tony Luck <tony.luck@...el.com>
CC: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim
<namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>, "Alexander
Shishkin" <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
Ian Rogers <irogers@...gle.com>, Adrian Hunter <adrian.hunter@...el.com>,
"Kan Liang" <kan.liang@...ux.intel.com>, Thomas Gleixner
<tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>, "H . Peter Anvin"
<hpa@...or.com>, "Rafael J . Wysocki" <rafael@...nel.org>, Len Brown
<lenb@...nel.org>, Andy Lutomirski <luto@...nel.org>, Viresh Kumar
<viresh.kumar@...aro.org>, Jean Delvare <jdelvare@...e.com>, Guenter Roeck
<linux@...ck-us.net>, Zhang Rui <rui.zhang@...el.com>, Andrew Cooper
<andrew.cooper3@...rix.com>, "David Laight" <david.laight.linux@...il.com>,
<linux-perf-users@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-acpi@...r.kernel.org>, <linux-pm@...r.kernel.org>,
<linux-hwmon@...r.kernel.org>
Subject: Re: [PATCH v2 07/17] hwmon: Fix Intel Family-model checks to include
extended Families
On 2/11/2025 12:58 PM, Dave Hansen wrote:
> On 2/11/25 11:43, Sohil Mehta wrote:
>> + /*
>> + * Return without adjustment if the Family isn't 6.
>> + * The rest of the function assumes Family 6.
>> + */
>> + if (c->x86 != 6)
>> + return tjmax;
>
> Shouldn't we be converting this over to the vfm matches?
>
For drivers/, I mainly focused on fixes instead of cleanups.
Converting drivers over to VFM checks is significant work. There are a
lot of such comparisons and switch cases (probably more than 50) across
drivers/cpufreq/ and drivers/hwmon/.
Some of the functions might need significant refactoring and rewrites. I
think someone with expertise in that particular driver should probably
do it. I did start with it initially but it is beyond my bandwidth at
the moment.
> This is kinda icky:
>
>> + return family > 15 ||
>> + (family == 6 &&
>> + model > 0xe &&
>> + model != 0x1c &&
>> + model != 0x26 &&
>> + model != 0x27 &&
>> + model != 0x35 &&
>> + model != 0x36);
>> }
>
> I'm not sure how this escaped so far. Probably because it's not in arch/x86.
>
Powered by blists - more mailing lists