Re: [PATCH] x86/cpu: Start documenting what the X86_FEATURE_ flag testing macros do
From: Borislav Petkov
Date: Tue Nov 08 2022 - 04:43:05 EST
On Mon, Nov 07, 2022 at 02:13:52PM -0800, Dave Hansen wrote:
> It seems to be mildly warning against using _static_cpu_has()
> indiscriminately. Should we tone that down a bit if we're recommending
> implicit use of static_cpu_has() via cpu_feature_enabled() everywhere?
Yeah, that comment is mine AFAIR. I was thinking of simply removing
it as part of a long-term effort of converting everything to
cpu_feature_enabled() and hiding static_cpu_has() eventually...
> I was also thinking that some longer-form stuff in Documentation/ might
> be a good idea, along with some examples. I'd be happy to follow this
> up with another patch that added Documentation/ like:
The problem with this is, it'll go out of sync with the code. So how
about we make this a kernel-doc thing so that it gets updated in
parallel?
Also look at Documentation/x86/cpuinfo.rst
It basically has most of what you wanna add.
:-)
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette