Message ID | 1415009522-6344-4-git-send-email-frediano.ziglio@huawei.com |
---|---|
State | New |
Headers | show |
Hi Frediano, This could be fold in #4. On 11/03/2014 10:11 AM, Frediano Ziglio wrote: > From: Zoltan Kiss <zoltan.kiss@huawei.com> > > Signed-off-by: Zoltan Kiss <zoltan.kiss@huawei.com> > --- > xen/arch/arm/platforms/hip04.c | 6 ++++++ > xen/include/asm-arm/platform.h | 5 +++++ > 2 files changed, 11 insertions(+) > > diff --git a/xen/arch/arm/platforms/hip04.c b/xen/arch/arm/platforms/hip04.c > index 62d2034..024c8a0 100644 > --- a/xen/arch/arm/platforms/hip04.c > +++ b/xen/arch/arm/platforms/hip04.c > @@ -253,12 +253,18 @@ static const struct dt_device_match hip04_blacklist_dev[] __initconst = > { /* sentinel */ }, > }; > > +static uint32_t hip04_quirks(void) > +{ > + return PLATFORM_QUIRK_GICV2_16_CPU; > +} > + > > PLATFORM_START(hip04, "HISILICON HIP04") > .compatible = hip04_dt_compat, > .smp_init = hip04_smp_init, > .cpu_up = hip04_cpu_up, > .reset = hip04_reset, > + .quirks = hip04_quirks, > .blacklist_dev = hip04_blacklist_dev, > PLATFORM_END > > diff --git a/xen/include/asm-arm/platform.h b/xen/include/asm-arm/platform.h > index eefaca6..537fba5 100644 > --- a/xen/include/asm-arm/platform.h > +++ b/xen/include/asm-arm/platform.h > @@ -60,6 +60,11 @@ struct platform_desc { > */ > #define PLATFORM_QUIRK_GUEST_PIRQ_NEED_EOI (1 << 1) > > +/* > + * Quirk for platforms where GICv2 has to handle 16 CPUs > + */ > +#define PLATFORM_QUIRK_GICV2_16_CPU (1 << 2) > + Actually you use the quirk to do hisilicon specific (mostly in patch #6). I would rename the quirk to show it's platform specific, something like: PLATFORM_QUIRK_HISILICON_GICV2 or PLATFROM_QUIRK_HISILICON_GICV2_16_CPU. Regards,
On Mon, 2014-11-03 at 13:50 +0000, Julien Grall wrote: > Actually you use the quirk to do hisilicon specific (mostly in patch > #6). I would rename the quirk to show it's platform specific, something > like: > > PLATFORM_QUIRK_HISILICON_GICV2 or PLATFROM_QUIRK_HISILICON_GICV2_16_CPU. I think this should be keyed of the DT compatible string, since there is one, it's not really a quirk, it's essentially implementing a different hardware spec. Ian.
diff --git a/xen/arch/arm/platforms/hip04.c b/xen/arch/arm/platforms/hip04.c index 62d2034..024c8a0 100644 --- a/xen/arch/arm/platforms/hip04.c +++ b/xen/arch/arm/platforms/hip04.c @@ -253,12 +253,18 @@ static const struct dt_device_match hip04_blacklist_dev[] __initconst = { /* sentinel */ }, }; +static uint32_t hip04_quirks(void) +{ + return PLATFORM_QUIRK_GICV2_16_CPU; +} + PLATFORM_START(hip04, "HISILICON HIP04") .compatible = hip04_dt_compat, .smp_init = hip04_smp_init, .cpu_up = hip04_cpu_up, .reset = hip04_reset, + .quirks = hip04_quirks, .blacklist_dev = hip04_blacklist_dev, PLATFORM_END diff --git a/xen/include/asm-arm/platform.h b/xen/include/asm-arm/platform.h index eefaca6..537fba5 100644 --- a/xen/include/asm-arm/platform.h +++ b/xen/include/asm-arm/platform.h @@ -60,6 +60,11 @@ struct platform_desc { */ #define PLATFORM_QUIRK_GUEST_PIRQ_NEED_EOI (1 << 1) +/* + * Quirk for platforms where GICv2 has to handle 16 CPUs + */ +#define PLATFORM_QUIRK_GICV2_16_CPU (1 << 2) + void __init platform_init(void); int __init platform_init_time(void); int __init platform_specific_mapping(struct domain *d);