Message ID | 20170911043820.14617-3-haozhong.zhang@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, 2017-09-11 at 12:37 +0800, Haozhong Zhang wrote: > Replace pdx_to_page(pfn_to_pdx(pfn)) by mfn_to_page(pfn), which is > identical to the former. Looks good to me. Chao > > Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com> > --- > Cc: Jan Beulich <jbeulich@suse.com> > Cc: Andrew Cooper <andrew.cooper3@citrix.com> > --- > xen/arch/x86/x86_64/mm.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c > index 6c5221f90c..c93383d7d9 100644 > --- a/xen/arch/x86/x86_64/mm.c > +++ b/xen/arch/x86/x86_64/mm.c > @@ -720,12 +720,11 @@ static void cleanup_frame_table(struct > mem_hotadd_info *info) > spfn = info->spfn; > epfn = info->epfn; > > - sva = (unsigned long)pdx_to_page(pfn_to_pdx(spfn)); > - eva = (unsigned long)pdx_to_page(pfn_to_pdx(epfn)); > + sva = (unsigned long)mfn_to_page(spfn); > + eva = (unsigned long)mfn_to_page(epfn); > > /* Intialize all page */ > - memset(mfn_to_page(spfn), -1, > - (unsigned long)mfn_to_page(epfn) - (unsigned > long)mfn_to_page(spfn)); > + memset((void *)sva, -1, eva - sva); > > while (sva < eva) > {
On 27/10/17 07:58, Chao Peng wrote: > On Mon, 2017-09-11 at 12:37 +0800, Haozhong Zhang wrote: >> Replace pdx_to_page(pfn_to_pdx(pfn)) by mfn_to_page(pfn), which is >> identical to the former. > Looks good to me. Is that a Reviewed-by: then? > > Chao >> Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com> >> --- >> Cc: Jan Beulich <jbeulich@suse.com> >> Cc: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Given that this is a trivial cleanup patch, I will include it in the x86-next branch I am maintaining until the 4.11 release window opens. ~Andrew
On Fri, 2017-10-27 at 10:24 +0100, Andrew Cooper wrote: > On 27/10/17 07:58, Chao Peng wrote: > > > > On Mon, 2017-09-11 at 12:37 +0800, Haozhong Zhang wrote: > > > > > > Replace pdx_to_page(pfn_to_pdx(pfn)) by mfn_to_page(pfn), which is > > > identical to the former. > > Looks good to me. > > Is that a Reviewed-by: then? Yes, Reviewed-by: Chao Peng <chao.p.peng@linux.intel.com> > > > > > > > Chao > > > > > > Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com> > > > --- > > > Cc: Jan Beulich <jbeulich@suse.com> > > > Cc: Andrew Cooper <andrew.cooper3@citrix.com> > > Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> > > Given that this is a trivial cleanup patch, I will include it in the > x86-next branch I am maintaining until the 4.11 release window opens. > > ~Andrew
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c index 6c5221f90c..c93383d7d9 100644 --- a/xen/arch/x86/x86_64/mm.c +++ b/xen/arch/x86/x86_64/mm.c @@ -720,12 +720,11 @@ static void cleanup_frame_table(struct mem_hotadd_info *info) spfn = info->spfn; epfn = info->epfn; - sva = (unsigned long)pdx_to_page(pfn_to_pdx(spfn)); - eva = (unsigned long)pdx_to_page(pfn_to_pdx(epfn)); + sva = (unsigned long)mfn_to_page(spfn); + eva = (unsigned long)mfn_to_page(epfn); /* Intialize all page */ - memset(mfn_to_page(spfn), -1, - (unsigned long)mfn_to_page(epfn) - (unsigned long)mfn_to_page(spfn)); + memset((void *)sva, -1, eva - sva); while (sva < eva) {
Replace pdx_to_page(pfn_to_pdx(pfn)) by mfn_to_page(pfn), which is identical to the former. Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com> --- Cc: Jan Beulich <jbeulich@suse.com> Cc: Andrew Cooper <andrew.cooper3@citrix.com> --- xen/arch/x86/x86_64/mm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)