]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/cpufeatures: Free up unused feature bits
authorSohil Mehta <sohil.mehta@intel.com>
Thu, 7 Nov 2024 23:30:00 +0000 (23:30 +0000)
committerIngo Molnar <mingo@kernel.org>
Fri, 6 Dec 2024 09:57:44 +0000 (10:57 +0100)
commit7a470e826d7521bec6af789deab31cfa4fd05af3
tree2eb5e47345c02b06ec954bfc7b2602a6bc513a66
parentb8f52214c61a5b99a54168145378e91b40d10c90
x86/cpufeatures: Free up unused feature bits

Linux defined feature bits X86_FEATURE_P3 and X86_FEATURE_P4 are not
used anywhere. Commit f31d731e4467 ("x86: use X86_FEATURE_NOPL in
alternatives") got rid of the last usage in 2008. Remove the related
mappings and code.

Just like all X86_FEATURE bits, the raw bit numbers can be exposed to
userspace via MODULE_DEVICE_TABLE(). There is a very small theoretical
chance of userspace getting confused if these bits got reassigned and
changed logical meaning.  But these bits were never used for a device
table, so it's highly unlikely this will ever happen in practice.

[ dhansen: clarify userspace visibility of these bits ]

Signed-off-by: Sohil Mehta <sohil.mehta@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/all/20241107233000.2742619-1-sohil.mehta%40intel.com
arch/x86/include/asm/cpufeatures.h
arch/x86/kernel/cpu/intel.c