[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/8] arm/gic-v3: Fold GICR subtable parsing into a new function
On 06/21/2016 05:17 AM, Julien Grall wrote: Thanks for catching coding bug, it was my mistake and this code should not be here.Hello Shanker, On 19/06/16 00:45, Shanker Donthineni wrote:Add a new function for parsing GICR subtable and move the code that is specific to GICR table to new function without changing the function gicv3_acpi_init() behavior. Signed-off-by: Shanker Donthineni <shankerd@xxxxxxxxxxxxxx> --- xen/arch/arm/gic-v3.c | 64+++++++++++++++++++++++++++++++++------------------1 file changed, 42 insertions(+), 22 deletions(-) diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c index ab1f380..af12ebc 100644 --- a/xen/arch/arm/gic-v3.c +++ b/xen/arch/arm/gic-v3.c @@ -1387,6 +1387,36 @@ gic_acpi_parse_madt_distributor(structacpi_subtable_header *header,return 0; } + +static int __init +gic_acpi_parse_madt_redistributor(struct acpi_subtable_header *header, + const unsigned long end) +{ + struct acpi_madt_generic_redistributor *rdist; + struct rdist_region *region; + + region = gicv3.rdist_regions + gicv3.rdist_count; + rdist = (struct acpi_madt_generic_redistributor *)header; + if ( BAD_MADT_ENTRY(rdist, end) ) + return -EINVAL; + + if ( !rdist->base_address || !rdist->length ) + return -EINVAL; + + region->base = rdist->base_address; + region->size = rdist->length; + + region->map_base = ioremap_nocache(region->base, region->size);In the commit message you said there is no functional change, however the remapping is not part of gicv3_acpi_init. So why did you add this line here? + if ( !region->map_base ) + { + printk("Unable to map GICR registers\n"); + return -ENOMEM; + } + gicv3.rdist_count++; + + return 0; +} +[...] Regards, -- Shanker Donthineni Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |