[PATCH 0/3] x86/mtrr, pat: make PAT independent from MTRR

From: Isaku Yamahata
Date: Thu Aug 08 2019 - 23:54:56 EST


Make PAT(Page Attribute Table) independent from
MTRR(Memory Type Range Register).
Some environments (mainly virtual ones) support only PAT, but not MTRR
because PAT replaces MTRR.
It's tricky and no gain to support both MTRR and PAT except compatibility.
So some VM technologies don't support MTRR, but only PAT.
This patch series makes PAT available on such environments without MTRR.

patch 1 and 2 are only preparation. no logic change, function rename
(mtrr_ => mtrr_pat_ which is commonly used by both MTRR and PAT) and
moving functions out from mtrr specific files to a common file.
patch 3 is an essential patch which makes PAT independent from MTRR.

Isaku Yamahata (3):
x86/mtrr: split common funcs from mtrr.c
x86/mtrr: split common funcs from generic.c
x86/mtrr, pat: make PAT independent from MTRR

arch/x86/Kconfig | 1 -
arch/x86/include/asm/mtrr.h | 37 ++-
arch/x86/include/asm/pat.h | 2 +
arch/x86/kernel/cpu/common.c | 2 +-
arch/x86/kernel/cpu/mtrr/Makefile | 2 +-
arch/x86/kernel/cpu/mtrr/generic.c | 116 +--------
arch/x86/kernel/cpu/mtrr/mtrr.c | 211 +----------------
arch/x86/kernel/cpu/mtrr/mtrr.h | 8 +-
arch/x86/kernel/cpu/mtrr/rendezvous.c | 324 ++++++++++++++++++++++++++
arch/x86/kernel/setup.c | 4 +-
arch/x86/kernel/smpboot.c | 8 +-
arch/x86/mm/Makefile | 3 +
arch/x86/mm/pat.c | 99 +++++++-
arch/x86/power/cpu.c | 2 +-
14 files changed, 479 insertions(+), 340 deletions(-)
create mode 100644 arch/x86/kernel/cpu/mtrr/rendezvous.c

--
2.17.1