Re: [PATCH v5 6/8] x86/fpu: Remove cpu_has_xfeatures()

From: Peter Zijlstra

Date: Thu Sep 10 2026 - 04:46:30 EST


On Tue, Sep 01, 2026 at 07:57:38AM -0700, Eric Biggers wrote:
> The only remaining caller of cpu_has_xfeatures() is
> print_xstate_features(), which uses it only to check and get the name of
> a single feature.
>
> Remove it and just inline the needed code into print_xstate_features().
>
> This also makes the "unknown xstate feature" entry at index XFEATURE_MAX
> of xfeature_names[] unnecessary, so remove that too.
>
> Acked-by: Christoph Hellwig <hch@xxxxxx>
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
> ---

Turns out there are a few new ones in tip/perf/core, so if you merge
tip/x86/fpu and tip/perf/core things no longer build.

I'm not entirely sure how to go about fixing this. Some seem trivial
enough, but others, like XFEATURE_MASK_OPMASK I don't readily see a
replacement for.

Boris, can you have a look? For now I'm reverting this patch locally.