From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [RFC 05/22] xen/arm: gic-v3: Rework the print message at initialization Date: Fri, 5 Jun 2015 13:18:29 +0100 Message-ID: <1433506709.7108.247.camel@citrix.com> References: <1431091783-29090-1-git-send-email-julien.grall@citrix.com> <1431091783-29090-6-git-send-email-julien.grall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z0qa8-0002Wq-Kc for xen-devel@lists.xenproject.org; Fri, 05 Jun 2015 12:18:40 +0000 In-Reply-To: <1431091783-29090-6-git-send-email-julien.grall@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: Julien Grall Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Fri, 2015-05-08 at 14:29 +0100, Julien Grall wrote: Subject: "messages printed" > - Print all the redistributor regions rather than only the first > one... > - Add # in the format to print 0x for hexadecimal. It's easier to > differentiation from decimal FWIW # doesn't work if the value is 0 (it still comes out as 0, not 0x0). Some people prefer 0x%FOO for that reason (mainly if you are trying to line things up). You may not care here. > - Re-order informations printed > - Drop print of the virtual address. It's not useful The virtual address may appear in BUG info and stack traces etc, e.g. in the fault addresses as well as in registers, where it may be useful to know that an address corresponds (or is supposed to) the GIC. > > Signed-off-by: Julien Grall > --- > xen/arch/arm/gic-v3.c | 26 ++++++++++++++------------ > 1 file changed, 14 insertions(+), 12 deletions(-) > > diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c > index 16b1df4..c109433 100644 > --- a/xen/arch/arm/gic-v3.c > +++ b/xen/arch/arm/gic-v3.c > @@ -1252,18 +1252,20 @@ static int __init gicv3_init(void) > } > > printk("GICv3 initialization:\n" > - " gic_dist_addr=%"PRIpaddr"\n" > - " gic_dist_mapaddr=%p\n" > - " gic_rdist_regions=%d\n" > - " gic_rdist_stride=%x\n" > - " gic_rdist_base=%"PRIpaddr"\n" > - " gic_rdist_base_size=%"PRIpaddr"\n" > - " gic_rdist_base_mapaddr=%p\n" > - " gic_maintenance_irq=%u\n", > - gicv3.dbase, gicv3.map_dbase, gicv3.rdist_count, > - gicv3.rdist_stride, gicv3.rdist_regions[0].base, > - gicv3.rdist_regions[0].size, gicv3.rdist_regions[0].map_base, > - gicv3_info.maintenance_irq); > + " gic_dist_addr=%#"PRIpaddr"\n" > + " gic_maintenance_irq=%u\n" > + " gic_rdist_stride=%#x\n" > + " gic_rdist_regions=%d\n", > + gicv3.dbase, gicv3_info.maintenance_irq, > + gicv3.rdist_stride, gicv3.rdist_count); > + printk(" redistributor regions:\n"); > + for ( i = 0; i < gicv3.rdist_count; i++ ) > + { > + const struct rdist_region *r = &gicv3.rdist_regions[i]; > + > + printk(" - region %u: %#"PRIpaddr" - %#"PRIpaddr"\n", > + i, r->base, r->base + r->size); > + } > > spin_lock_init(&gicv3.lock); >