mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen: simplify {check,poison}_one_page
Use __map_domain_page macro to deal with page_info directly. No functional change. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
d887ced5d2
commit
a9c904c5a8
1 file changed
+2
-4
@@ -771,13 +771,12 @@ static void page_list_add_scrub(struct page_info *pg, unsigned int node,
|
||||
static void poison_one_page(struct page_info *pg)
|
||||
{
|
||||
#ifdef CONFIG_SCRUB_DEBUG
|
||||
mfn_t mfn = page_to_mfn(pg);
|
||||
uint64_t *ptr;
|
||||
|
||||
if ( !scrub_debug )
|
||||
return;
|
||||
|
||||
ptr = map_domain_page(mfn);
|
||||
ptr = __map_domain_page(pg);
|
||||
*ptr = ~SCRUB_PATTERN;
|
||||
unmap_domain_page(ptr);
|
||||
#endif
|
||||
@@ -786,14 +785,13 @@ static void poison_one_page(struct page_info *pg)
|
||||
static void check_one_page(struct page_info *pg)
|
||||
{
|
||||
#ifdef CONFIG_SCRUB_DEBUG
|
||||
mfn_t mfn = page_to_mfn(pg);
|
||||
const uint64_t *ptr;
|
||||
unsigned int i;
|
||||
|
||||
if ( !scrub_debug )
|
||||
return;
|
||||
|
||||
ptr = map_domain_page(mfn);
|
||||
ptr = __map_domain_page(pg);
|
||||
for ( i = 0; i < PAGE_SIZE / sizeof (*ptr); i++ )
|
||||
BUG_ON(ptr[i] != SCRUB_PATTERN);
|
||||
unmap_domain_page(ptr);
|
||||
|
||||