From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [PATCH] x86/MTRR: make hold_mtrr_updates_on_aps static and bool
Date: Mon, 7 Apr 2025 13:28:18 +0200 [thread overview]
Message-ID: <55d1c198-79a8-4011-93b0-b36580e23c24@suse.com> (raw)
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);
next reply other threads:[~2025-04-07 11:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 11:28 Jan Beulich [this message]
2025-04-07 11:51 ` [PATCH] x86/MTRR: make hold_mtrr_updates_on_aps static and bool Andrew Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55d1c198-79a8-4011-93b0-b36580e23c24@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.