[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] xen/arm: p2m_set_entry duplicate calculation.
It doesn't seem necessary to do that calculation of order shift again. Signed-off-by: Paran Lee <p4ranlee@xxxxxxxxx> --- xen/arch/arm/p2m.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 1d1059f7d2..533afc830a 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -1092,7 +1092,7 @@ int p2m_set_entry(struct p2m_domain *p2m, while ( nr ) { unsigned long mask; - unsigned long order; + unsigned long order, pages; /* * Don't take into account the MFN when removing mapping (i.e @@ -1118,11 +1118,12 @@ int p2m_set_entry(struct p2m_domain *p2m, if ( rc ) break; - sgfn = gfn_add(sgfn, (1 << order)); + pages = 1 << order; + sgfn = gfn_add(sgfn, pages); if ( !mfn_eq(smfn, INVALID_MFN) ) - smfn = mfn_add(smfn, (1 << order)); + smfn = mfn_add(smfn, pages); - nr -= (1 << order); + nr -= pages; } return rc; -- 2.25.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |