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:
Wei Liu committed 2018-12-11 17:20:32 +00:00
1 parent d887ced5d2
commit a9c904c5a8
1 file changed
+2 -4
+2 -4
View File
@@ -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);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.