x86/cpu: Merge Intel and AMD ppin_init() functions
authorTony Luck <tony.luck@intel.com>
Mon, 31 Jan 2022 23:01:07 +0000 (15:01 -0800)
committerBorislav Petkov <bp@suse.de>
Tue, 1 Feb 2022 11:56:23 +0000 (12:56 +0100)
commit0dcab41d3487acadf64d0667398e032341bd9918
tree250060544457a08bb29c2953523ac31c96dba9cd
parent7f99cb5e60392fc3494c610776e733b68784280c
x86/cpu: Merge Intel and AMD ppin_init() functions

The code to decide whether a system supports the PPIN (Protected
Processor Inventory Number) MSR was cloned from the Intel
implementation. Apart from the X86_FEATURE bit and the MSR numbers it is
identical.

Merge the two functions into common x86 code, but use x86_match_cpu()
instead of the switch (c->x86_model) that was used by the old Intel
code.

No functional change.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220131230111.2004669-2-tony.luck@intel.com
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/mce/intel.c