* [PATCH] x86/MTRR: make hold_mtrr_updates_on_aps static and bool
@ 2025-04-07 11:28 Jan Beulich
2025-04-07 11:51 ` Andrew Cooper
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2025-04-07 11:28 UTC (permalink / raw)
To: xen-devel@lists.xenproject.org; +Cc: Andrew Cooper, Roger Pau Monné
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>
--- a/xen/arch/x86/cpu/mtrr/main.c
+++ b/xen/arch/x86/cpu/mtrr/main.c
@@ -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)
--- a/xen/arch/x86/include/asm/mtrr.h
+++ b/xen/arch/x86/include/asm/mtrr.h
@@ -63,7 +63,6 @@ extern uint32_t get_pat_flags(struct vcp
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/MTRR: make hold_mtrr_updates_on_aps static and bool
2025-04-07 11:28 [PATCH] x86/MTRR: make hold_mtrr_updates_on_aps static and bool Jan Beulich
@ 2025-04-07 11:51 ` Andrew Cooper
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cooper @ 2025-04-07 11:51 UTC (permalink / raw)
To: Jan Beulich, xen-devel@lists.xenproject.org; +Cc: Roger Pau Monné
On 07/04/2025 12:28 pm, Jan Beulich wrote:
> 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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-07 11:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07 11:28 [PATCH] x86/MTRR: make hold_mtrr_updates_on_aps static and bool Jan Beulich
2025-04-07 11:51 ` Andrew Cooper
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.