• Ingo Molnar's avatar
    x86/mm/pat: Clean up PAT initialization flags · d891b921
    Ingo Molnar authored
    
    
    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: default avatarIngo Molnar <mingo@kernel.org>
    d891b921
pat.c 31.3 KB