[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3] xen: get GIC addresses from DT



On Wed, 2012-12-05 at 19:01 +0000, Stefano Stabellini wrote:

> @@ -306,10 +306,28 @@ static void __cpuinit gic_hyp_disable(void)
>  /* Set up the GIC */
>  void __init gic_init(void)
>  {
> -    /* XXX FIXME get this from devicetree */
> -    gic.dbase = GIC_BASE_ADDRESS + GIC_DR_OFFSET;
> -    gic.cbase = GIC_BASE_ADDRESS + GIC_CR_OFFSET;
> -    gic.hbase = GIC_BASE_ADDRESS + GIC_HR_OFFSET;
> +       printk("GIC initialization:\n"
> +              "        gic_dist_addr=%"PRIpaddr"\n"
> +              "        gic_cpu_addr=%"PRIpaddr"\n"
> +              "        gic_hyp_addr=%"PRIpaddr"\n"
> +              "        gic_vcpu_addr=%"PRIpaddr"\n",
> +              early_info.gic.gic_dist_addr, early_info.gic.gic_cpu_addr,
> +              early_info.gic.gic_hyp_addr, early_info.gic.gic_vcpu_addr);

I think there's a hard tab in here somewhere.

> +static void device_tree_nr_reg_ranges(const struct fdt_property *prop,
> +        u32 address_cells, u32 size_cells, int *ranges)
> +{
> +    u32 reg_cells = address_cells + size_cells;
> +    *ranges = fdt32_to_cpu(prop->len) / (reg_cells * sizeof(u32));

Why not just return the value here?

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.