[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 04/15] xen: arm: add a quirk to handle platforms with unusual GIC layout
On Fri, Nov 22, 2013 at 4:24 PM, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote: > Use this quirk on the xgene platform. > > This should ideally be fixed by an extension to the device tree bindings as > described in http://www.spinics.net/lists/devicetree/msg10473.html especially > http://www.spinics.net/lists/devicetree/msg10478.html. However for the time > being a platform specific quirk will do. > > Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Release-acked-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx> > --- > v2: This replaces "xen: arm: GICC_DIR register at offset 0x10000 instead of > 0x1000" > --- > xen/arch/arm/gic.c | 6 +++++- > xen/arch/arm/platforms/xgene-storm.c | 2 +- > xen/include/asm-arm/platform.h | 5 +++++ > 3 files changed, 11 insertions(+), 2 deletions(-) > > diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c > index ab49106..9711f5d 100644 > --- a/xen/arch/arm/gic.c > +++ b/xen/arch/arm/gic.c > @@ -30,6 +30,7 @@ > #include <xen/device_tree.h> > #include <asm/p2m.h> > #include <asm/domain.h> > +#include <asm/platform.h> > > #include <asm/gic.h> > > @@ -444,7 +445,10 @@ void __init gic_init(void) > BUILD_BUG_ON(FIXMAP_ADDR(FIXMAP_GICC1) != > FIXMAP_ADDR(FIXMAP_GICC2)-PAGE_SIZE); > set_fixmap(FIXMAP_GICC1, gic.cbase >> PAGE_SHIFT, DEV_SHARED); > - set_fixmap(FIXMAP_GICC2, (gic.cbase >> PAGE_SHIFT) + 1, DEV_SHARED); > + if ( platform_has_quirk(PLATFORM_QUIRK_GIC_64K_STRIDE) ) > + set_fixmap(FIXMAP_GICC2, (gic.cbase >> PAGE_SHIFT) + 0x10, > DEV_SHARED); > + else > + set_fixmap(FIXMAP_GICC2, (gic.cbase >> PAGE_SHIFT) + 0x1, > DEV_SHARED); > set_fixmap(FIXMAP_GICH, gic.hbase >> PAGE_SHIFT, DEV_SHARED); > > /* Global settings: interrupt distributor */ > diff --git a/xen/arch/arm/platforms/xgene-storm.c > b/xen/arch/arm/platforms/xgene-storm.c > index 727ac2b..d185a4a 100644 > --- a/xen/arch/arm/platforms/xgene-storm.c > +++ b/xen/arch/arm/platforms/xgene-storm.c > @@ -27,7 +27,7 @@ > > static uint32_t xgene_storm_quirks(void) > { > - return PLATFORM_QUIRK_DOM0_MAPPING_11; > + return PLATFORM_QUIRK_DOM0_MAPPING_11|PLATFORM_QUIRK_GIC_64K_STRIDE; > } > > > diff --git a/xen/include/asm-arm/platform.h b/xen/include/asm-arm/platform.h > index c282b30..c9314e5 100644 > --- a/xen/include/asm-arm/platform.h > +++ b/xen/include/asm-arm/platform.h > @@ -44,6 +44,11 @@ struct platform_desc { > * Useful on platform where System MMU is not yet implemented > */ > #define PLATFORM_QUIRK_DOM0_MAPPING_11 (1 << 0) > +/* > + * Quirk for platforms where the 4K GIC register ranges are placed at > + * 64K stride. > + */ > +#define PLATFORM_QUIRK_GIC_64K_STRIDE (1 << 1) > > void __init platform_init(void); > int __init platform_init_time(void); > -- > 1.7.10.4 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |