From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 for-4.5 3/5] xen: arm: correct off by one in xgene-storm's map_one_mmio Date: Thu, 20 Nov 2014 11:23:34 +0000 Message-ID: <546DCF36.7080400@linaro.org> References: <1416410868.29243.39.camel@citrix.com> <1416410895-20461-3-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1416410895-20461-3-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , xen-devel@lists.xen.org Cc: Pranavkumar Sawargaonkar , Clark Laughlin , tim@xen.org, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org Hi Ian, On 11/19/2014 03:28 PM, Ian Campbell wrote: > The callers pass the end as the pfn immediately *after* the last page to be > mapped, therefore adding one is incorrect and causes an additional page to be > mapped. > > At the same time correct the printing of the mfn values, zero-padding them to > 16 digits as for a paddr when they are frame numbers is just confusing. > > Signed-off-by: Ian Campbell Reviewed-by: Julien Grall Regards, > --- > v2: Fix the other printk format string too. > --- > xen/arch/arm/platforms/xgene-storm.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/xen/arch/arm/platforms/xgene-storm.c b/xen/arch/arm/platforms/xgene-storm.c > index 29c4752..8685c93 100644 > --- a/xen/arch/arm/platforms/xgene-storm.c > +++ b/xen/arch/arm/platforms/xgene-storm.c > @@ -45,11 +45,11 @@ static int map_one_mmio(struct domain *d, const char *what, > { > int ret; > > - printk("Additional MMIO %"PRIpaddr"-%"PRIpaddr" (%s)\n", > + printk("Additional MMIO %lx-%lx (%s)\n", > start, end, what); > - ret = map_mmio_regions(d, start, end - start + 1, start); > + ret = map_mmio_regions(d, start, end - start, start); > if ( ret ) > - printk("Failed to map %s @ %"PRIpaddr" to dom%d\n", > + printk("Failed to map %s @ %lx to dom%d\n", > what, start, d->domain_id); > return ret; > } > -- Julien Grall