[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <677c46db-02ef-24b8-c25f-762b41fb8bdb@intel.com>
Date: Wed, 22 Jun 2022 08:07:31 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Maxim Levitsky <mlevitsk@...hat.com>, linux-kernel@...r.kernel.org
Cc: "Chang S. Bae" <chang.seok.bae@...el.com>,
Jiri Olsa <jolsa@...nel.org>, linux-perf-users@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
"H. Peter Anvin" <hpa@...or.com>,
"David S. Miller" <davem@...emloft.net>,
Borislav Petkov <bp@...en8.de>,
Kees Cook <keescook@...omium.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Namhyung Kim <namhyung@...nel.org>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
Jane Malalane <jane.malalane@...rix.com>,
Tony Luck <tony.luck@...el.com>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
"open list:CRYPTO API" <linux-crypto@...r.kernel.org>,
Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [PATCH 2/4] x86/cpuid: refactor setup_clear_cpu_cap/clear_feature
On 6/22/22 07:48, Maxim Levitsky wrote:
> Simplify the code a bit by always passing &boot_cpu_data
> in case the setup_clear_cpu_cap was called.
>
> Also unify clear_cpu_cap and do_clear_cpu_cap.
Please always add a "()" suffix to functions. "foo" is a variable, but
"foo()" is a function.
I also really like when a changelog has a clear problem statement. I
_think_ the problem here is something along the lines of the 'c'
argument to clear_feature() having different behavior when it is NULL
versus '&boot_cpu_data'.
Basically, there's no reason to support clearing a bit in
'&boot_cpu_data' without also setting that bit in 'cpu_caps_cleared'.
> {
> - do_clear_cpu_cap(NULL, feature);
> + clear_cpu_cap(&boot_cpu_data, feature);
> }
Powered by blists - more mailing lists