From: Wei Liu Date: Tue, 11 Dec 2018 11:56:31 +0000 (+0000) Subject: xen: simplify {check,poison}_one_page X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a9c904c5a827144eb722cfb46634c60b739e19eb;p=people%2Fpauldu%2Fxen.git 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 Acked-by: Jan Beulich --- diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 677a8e18ce..2c6509e3a0 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -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);