[PATCH 1/2] powerpc/pseries: Add a clear modifier to ibm,pa/pi-features parser

Vaibhav Jain vaibhav at linux.ibm.com
Thu Feb 8 04:10:55 AEDT 2024


Nicholas Piggin <npiggin at gmail.com> writes:

> When a new ibm,pa/pi-features bit is introduced that is intended to
> apply to existing systems and features, it may have an "inverted"
> meaning (i.e., bit clear => feature available; bit set => unavailable).
> Depending on the nature of the feature, this may give the best
> backward compatibility result where old firmware will continue to
> have that bit clear and therefore the feature available.
>
> The 'invert' modifier presumably was introduced for this type of
> feature bit. However it invert will set the feature if the bit is
> clear, which prevents it being used in the situation where an old
> CPU lacks a feature that a new CPU has, then a new firmware comes
> out to disable that feature on the new CPU if the bit is set.
> Adding an 'invert' entry for that feature would incorrectly enable
> it for the old CPU.
>
> So add a 'clear' modifier that clears the feature if the bit is set,
> but it does not set the feature if the bit is clear. The feature
> is expected to be set in the cpu table.
>
> This replaces the 'invert' modifier, which is unused since commit
> 7d4703455168 ("powerpc/feature: Remove CPU_FTR_NODSISRALIGN").
>
> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
> ---
<snip>

Tested this patch on a PP64-LE lpar with the patch[1] and seeing the
relevant pi-feature bit CPU_FTR_DBELL getting cleared.

[1]
https://lore.kernel.org/all/20240207035220.339726-2-npiggin@gmail.com

Hence,

Tested-by: Vaibhav Jain <vaibhav at linux.ibm.com>

-- 
Cheers
~ Vaibhav


More information about the Linuxppc-dev mailing list