x86/mm/pat: Clean up PAT initialization flags
authorIngo Molnar <mingo@kernel.org>
Tue, 19 Nov 2019 10:46:36 +0000 (11:46 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 10 Dec 2019 09:12:55 +0000 (10:12 +0100)
commitd891b9219d2a73640d2f2a216ecb6fb29d832013
treef1cf54c11124ab7724c62277cb8455a654bcc309
parentbaf65855baac302bbacf0ce17ed99b9c0940b930
x86/mm/pat: Clean up PAT initialization flags

Right now we have these variables that impact the PAT initialization sequence:

  pat_disabled
  boot_cpu_done
  pat_initialized
  init_cm_done

Some have a pat_ prefix, some not, and the naming is random,
which makes their purpose rather opaque.

Name them consistently and according to their role:

  pat_disabled
  pat_bp_initialized
  pat_bp_enabled
  pat_cm_initialized

Also rename pat_bsp_init() => pat_bp_init(), to use the canonical
abbreviation.

Also add a warning for double calls of init_cache_modes(), the call chains
leading to this are complex and I couldn't convince myself that we never
call this function twice - so utilize the flag for a debug check.

No change in functionality intended.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/mm/pat.c