]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
x86/MTRR: make hold_mtrr_updates_on_aps static and bool
authorJan Beulich <jbeulich@suse.com>
Tue, 8 Apr 2025 07:39:11 +0000 (09:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 8 Apr 2025 07:39:11 +0000 (09:39 +0200)
It's not used outside of the CU defining it, and it is clearly of
boolean nature.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/cpu/mtrr/main.c
xen/arch/x86/include/asm/mtrr.h

index 24cddcaddf2a07b425e4d55d0da13e8693bb198b..d4f549d92ee7a775a440545349d9acc1d6406835 100644 (file)
@@ -118,7 +118,7 @@ struct set_mtrr_data {
  * After all the cpus have came up, then mtrr_aps_sync_end() synchronizes all 
  * the cpus and updates mtrrs on all of them. Then this flag is turned off.
  */
-int hold_mtrr_updates_on_aps;
+static bool hold_mtrr_updates_on_aps;
 
 static void cf_check ipi_handler(void *info)
 /*  [SUMMARY] Synchronisation handler. Executed by "other" CPUs.
@@ -600,14 +600,14 @@ void mtrr_save_state(void)
 
 void mtrr_aps_sync_begin(void)
 {
-       hold_mtrr_updates_on_aps = 1;
+       hold_mtrr_updates_on_aps = true;
 }
 
 void mtrr_aps_sync_end(void)
 {
        if (mtrr_if)
                set_mtrr(~0U, 0, 0, 0);
-       hold_mtrr_updates_on_aps = 0;
+       hold_mtrr_updates_on_aps = false;
 }
 
 void asmlinkage mtrr_bp_restore(void)
index 48b59d2620c8cdf343e174f2939a59b9a00bf93f..25d442659df2cc27700481c077373bd50195d92b 100644 (file)
@@ -63,7 +63,6 @@ extern uint32_t get_pat_flags(struct vcpu *v, uint32_t gl1e_flags,
                               paddr_t gpaddr, paddr_t spaddr,
                               uint8_t gmtrr_mtype);
 extern uint8_t pat_type_2_pte_flags(uint8_t pat_type);
-extern int hold_mtrr_updates_on_aps;
 extern void mtrr_aps_sync_begin(void);
 extern void mtrr_aps_sync_end(void);