]> git.baikalelectronics.ru Git - kernel.git/commit
x86/mtrr: Remove the mtrr_bp_init() stub
authorChristoph Hellwig <hch@lst.de>
Wed, 15 Dec 2021 16:56:11 +0000 (17:56 +0100)
committerBorislav Petkov <bp@suse.de>
Wed, 22 Dec 2021 18:50:26 +0000 (19:50 +0100)
commit911ea6cdacfee469e52cccf2b7abbaf6477280b0
tree73c3658b7700ccd9eeb34799d4f2c49c1097e4c0
parent3c5b5d6ec3471d84c50dc7c8dad81b6bbb39b083
x86/mtrr: Remove the mtrr_bp_init() stub

Add an IS_ENABLED() check in setup_arch() and call pat_disable()
directly if MTRRs are not supported. This allows to remove the
<asm/memtype.h> include in <asm/mtrr.h>, which pull in lowlevel x86
headers that should not be included for UML builds and will cause build
warnings with a following patch.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20211215165612.554426-2-hch@lst.de
arch/x86/include/asm/mtrr.h
arch/x86/kernel/setup.c
arch/x86/kvm/mmu/spte.c