Message ID | 1415180475-8339-5-git-send-email-frediano.ziglio@huawei.com |
---|---|
State | New |
Headers | show |
Hi Frediano, On 11/05/2014 09:41 AM, Frediano Ziglio wrote: > This name can appear in some Linux kernel repos. Not very fortunate, > but to avoid others spending an hour to spot that few characters > difference it worth to work around it. Linux upstream is using "hisilicon,hip04-intc" to detect the hisilicon interrupt controller. So it's not a workaround. Which kernel is using the "*,hip04-gic"? Regards, > Signed-off-by: Zoltan Kiss <zoltan.kiss@huawei.com> > --- > xen/arch/arm/gic-v2.c | 1 + > xen/include/asm-arm/gic.h | 4 +++- > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c > index 3cb59dd..9ab30ce 100644 > --- a/xen/arch/arm/gic-v2.c > +++ b/xen/arch/arm/gic-v2.c > @@ -823,6 +823,7 @@ DT_DEVICE_END > static const char * const hip04_gicv2_dt_compat[] __initconst = > { > DT_COMPAT_GIC_HIP04, > + DT_COMPAT_GIC_HIP04_2, > NULL > }; > > diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h > index 5adb628..3d2b3db 100644 > --- a/xen/include/asm-arm/gic.h > +++ b/xen/include/asm-arm/gic.h > @@ -156,11 +156,13 @@ > #define DT_COMPAT_GIC_CORTEX_A15 "arm,cortex-a15-gic" > #define DT_COMPAT_GIC_CORTEX_A7 "arm,cortex-a7-gic" > #define DT_COMPAT_GIC_HIP04 "hisilicon,hip04-gic" > +#define DT_COMPAT_GIC_HIP04_2 "hisilicon,hip04-intc" > > #define DT_MATCH_GIC_V2 DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_CORTEX_A15), \ > DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_CORTEX_A7), \ > DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_400), \ > - DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_HIP04) > + DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_HIP04), \ > + DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_HIP04_2) > > #define DT_COMPAT_GIC_V3 "arm,gic-v3" > >
On Wed, 5 Nov 2014, Julien Grall wrote: > Hi Frediano, > > On 11/05/2014 09:41 AM, Frediano Ziglio wrote: > > This name can appear in some Linux kernel repos. Not very fortunate, > > but to avoid others spending an hour to spot that few characters > > difference it worth to work around it. > > Linux upstream is using "hisilicon,hip04-intc" to detect the hisilicon > interrupt controller. So it's not a workaround. > > Which kernel is using the "*,hip04-gic"? Good question, but what really matters is the string that u-boot (or any other firmware/bootloader) is going to use, right? So, which one is it? > > Signed-off-by: Zoltan Kiss <zoltan.kiss@huawei.com> > > --- > > xen/arch/arm/gic-v2.c | 1 + > > xen/include/asm-arm/gic.h | 4 +++- > > 2 files changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c > > index 3cb59dd..9ab30ce 100644 > > --- a/xen/arch/arm/gic-v2.c > > +++ b/xen/arch/arm/gic-v2.c > > @@ -823,6 +823,7 @@ DT_DEVICE_END > > static const char * const hip04_gicv2_dt_compat[] __initconst = > > { > > DT_COMPAT_GIC_HIP04, > > + DT_COMPAT_GIC_HIP04_2, > > NULL > > }; > > > > diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h > > index 5adb628..3d2b3db 100644 > > --- a/xen/include/asm-arm/gic.h > > +++ b/xen/include/asm-arm/gic.h > > @@ -156,11 +156,13 @@ > > #define DT_COMPAT_GIC_CORTEX_A15 "arm,cortex-a15-gic" > > #define DT_COMPAT_GIC_CORTEX_A7 "arm,cortex-a7-gic" > > #define DT_COMPAT_GIC_HIP04 "hisilicon,hip04-gic" > > +#define DT_COMPAT_GIC_HIP04_2 "hisilicon,hip04-intc" > > > > #define DT_MATCH_GIC_V2 DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_CORTEX_A15), \ > > DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_CORTEX_A7), \ > > DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_400), \ > > - DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_HIP04) > > + DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_HIP04), \ > > + DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_HIP04_2) > > > > #define DT_COMPAT_GIC_V3 "arm,gic-v3" > > > > > > > -- > Julien Grall >
On 05/11/14 14:52, Stefano Stabellini wrote: > On Wed, 5 Nov 2014, Julien Grall wrote: >> Hi Frediano, >> >> On 11/05/2014 09:41 AM, Frediano Ziglio wrote: >>> This name can appear in some Linux kernel repos. Not very fortunate, >>> but to avoid others spending an hour to spot that few characters >>> difference it worth to work around it. >> >> Linux upstream is using "hisilicon,hip04-intc" to detect the hisilicon >> interrupt controller. So it's not a workaround. >> >> Which kernel is using the "*,hip04-gic"? > > Good question, but what really matters is the string that u-boot (or any > other firmware/bootloader) is going to use, right? So, which one is it? We are using the DTB from the kernel source, even when loading a bare metal kernel. I've looked around, the *gic version seems to exist only in internal repos, as far as I can see. Including the one Frediano started to use for porting. Therefore, I don't insist to keep both, but as I mentioned in the commit message, it would still provide some benefit, and given that it's just a 3 line change which just extend a few listings, I think we should keep it. Of course with a different commit message, which clears that this is the official name of it. Zoli > > > >>> Signed-off-by: Zoltan Kiss <zoltan.kiss@huawei.com> >>> --- >>> xen/arch/arm/gic-v2.c | 1 + >>> xen/include/asm-arm/gic.h | 4 +++- >>> 2 files changed, 4 insertions(+), 1 deletion(-) >>> >>> diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c >>> index 3cb59dd..9ab30ce 100644 >>> --- a/xen/arch/arm/gic-v2.c >>> +++ b/xen/arch/arm/gic-v2.c >>> @@ -823,6 +823,7 @@ DT_DEVICE_END >>> static const char * const hip04_gicv2_dt_compat[] __initconst = >>> { >>> DT_COMPAT_GIC_HIP04, >>> + DT_COMPAT_GIC_HIP04_2, >>> NULL >>> }; >>> >>> diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h >>> index 5adb628..3d2b3db 100644 >>> --- a/xen/include/asm-arm/gic.h >>> +++ b/xen/include/asm-arm/gic.h >>> @@ -156,11 +156,13 @@ >>> #define DT_COMPAT_GIC_CORTEX_A15 "arm,cortex-a15-gic" >>> #define DT_COMPAT_GIC_CORTEX_A7 "arm,cortex-a7-gic" >>> #define DT_COMPAT_GIC_HIP04 "hisilicon,hip04-gic" >>> +#define DT_COMPAT_GIC_HIP04_2 "hisilicon,hip04-intc" >>> >>> #define DT_MATCH_GIC_V2 DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_CORTEX_A15), \ >>> DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_CORTEX_A7), \ >>> DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_400), \ >>> - DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_HIP04) >>> + DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_HIP04), \ >>> + DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_HIP04_2) >>> >>> #define DT_COMPAT_GIC_V3 "arm,gic-v3" >>> >>> >> >> >> -- >> Julien Grall >> > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel >
Hi Zoltan, On 06/11/2014 09:46, Zoltan Kiss wrote: > > > On 05/11/14 14:52, Stefano Stabellini wrote: >> On Wed, 5 Nov 2014, Julien Grall wrote: >>> Hi Frediano, >>> >>> On 11/05/2014 09:41 AM, Frediano Ziglio wrote: >>>> This name can appear in some Linux kernel repos. Not very fortunate, >>>> but to avoid others spending an hour to spot that few characters >>>> difference it worth to work around it. >>> >>> Linux upstream is using "hisilicon,hip04-intc" to detect the hisilicon >>> interrupt controller. So it's not a workaround. >>> >>> Which kernel is using the "*,hip04-gic"? >> >> Good question, but what really matters is the string that u-boot (or any >> other firmware/bootloader) is going to use, right? So, which one is it? > We are using the DTB from the kernel source, even when loading a bare > metal kernel. I've looked around, the *gic version seems to exist only > in internal repos, as far as I can see. Including the one Frediano > started to use for porting. Therefore, I don't insist to keep both, but > as I mentioned in the commit message, it would still provide some > benefit, and given that it's just a 3 line change which just extend a > few listings, I think we should keep it. In general, Xen should respect the binding that has been agreed by the device tree team. Anything different should not be upstream, hence it's for only internal purpose. > Of course with a different commit message, which clears that this is the > official name of it. If it happens that both compatible are upstream. I would prefer that you define the *-intc one in the patch #3 and *-gic in #4. It's more logical than defining first the non-official and then the official. Regards,
> Hi Zoltan, > > On 06/11/2014 09:46, Zoltan Kiss wrote: > > > > > > On 05/11/14 14:52, Stefano Stabellini wrote: > >> On Wed, 5 Nov 2014, Julien Grall wrote: > >>> Hi Frediano, > >>> > >>> On 11/05/2014 09:41 AM, Frediano Ziglio wrote: > >>>> This name can appear in some Linux kernel repos. Not very > >>>> fortunate, but to avoid others spending an hour to spot that few > >>>> characters difference it worth to work around it. > >>> > >>> Linux upstream is using "hisilicon,hip04-intc" to detect the > >>> hisilicon interrupt controller. So it's not a workaround. > >>> > >>> Which kernel is using the "*,hip04-gic"? > >> > >> Good question, but what really matters is the string that u-boot (or > >> any other firmware/bootloader) is going to use, right? So, which one > is it? > > We are using the DTB from the kernel source, even when loading a bare > > metal kernel. I've looked around, the *gic version seems to exist > only > > in internal repos, as far as I can see. Including the one Frediano > > started to use for porting. Therefore, I don't insist to keep both, > > but as I mentioned in the commit message, it would still provide some > > benefit, and given that it's just a 3 line change which just extend a > > few listings, I think we should keep it. > > In general, Xen should respect the binding that has been agreed by the > device tree team. Anything different should not be upstream, hence it's > for only internal purpose. > > > Of course with a different commit message, which clears that this is > > the official name of it. > > If it happens that both compatible are upstream. I would prefer that > you define the *-intc one in the patch #3 and *-gic in #4. > > It's more logical than defining first the non-official and then the > official. > Done > Regards, > Sent version 4. Frediano
Hi Zoltan, On 06/11/2014 09:46, Zoltan Kiss wrote: > > > On 05/11/14 14:52, Stefano Stabellini wrote: >> On Wed, 5 Nov 2014, Julien Grall wrote: >>> Hi Frediano, >>> >>> On 11/05/2014 09:41 AM, Frediano Ziglio wrote: >>>> This name can appear in some Linux kernel repos. Not very fortunate, >>>> but to avoid others spending an hour to spot that few characters >>>> difference it worth to work around it. >>> >>> Linux upstream is using "hisilicon,hip04-intc" to detect the hisilicon >>> interrupt controller. So it's not a workaround. >>> >>> Which kernel is using the "*,hip04-gic"? >> >> Good question, but what really matters is the string that u-boot (or any >> other firmware/bootloader) is going to use, right? So, which one is it? > We are using the DTB from the kernel source, even when loading a bare > metal kernel. I've looked around, the *gic version seems to exist only > in internal repos, as far as I can see. Including the one Frediano > started to use for porting. Therefore, I don't insist to keep both, but > as I mentioned in the commit message, it would still provide some > benefit, and given that it's just a 3 line change which just extend a > few listings, I think we should keep it. > Of course with a different commit message, which clears that this is the > official name of it. If it's only used in your internal repo, we shouldn't support this compatible string in Xen. Nothing prevent someone in the future to use this compatible for a completely different purpose (for instance a different GIC driver). We aim to support only official bindings to avoid a such issue. Regards,
> Hi Zoltan, > > On 06/11/2014 09:46, Zoltan Kiss wrote: > > > > > > On 05/11/14 14:52, Stefano Stabellini wrote: > >> On Wed, 5 Nov 2014, Julien Grall wrote: > >>> Hi Frediano, > >>> > >>> On 11/05/2014 09:41 AM, Frediano Ziglio wrote: > >>>> This name can appear in some Linux kernel repos. Not very > >>>> fortunate, but to avoid others spending an hour to spot that few > >>>> characters difference it worth to work around it. > >>> > >>> Linux upstream is using "hisilicon,hip04-intc" to detect the > >>> hisilicon interrupt controller. So it's not a workaround. > >>> > >>> Which kernel is using the "*,hip04-gic"? > >> > >> Good question, but what really matters is the string that u-boot (or > >> any other firmware/bootloader) is going to use, right? So, which one > is it? > > We are using the DTB from the kernel source, even when loading a bare > > metal kernel. I've looked around, the *gic version seems to exist > only > > in internal repos, as far as I can see. Including the one Frediano > > started to use for porting. Therefore, I don't insist to keep both, > > but as I mentioned in the commit message, it would still provide some > > benefit, and given that it's just a 3 line change which just extend a > > few listings, I think we should keep it. > > Of course with a different commit message, which clears that this is > > the official name of it. > > If it's only used in your internal repo, we shouldn't support this > compatible string in Xen. > > Nothing prevent someone in the future to use this compatible for a > completely different purpose (for instance a different GIC driver). > > We aim to support only official bindings to avoid a such issue. > > Regards, > Now all changes for old development compatible string are in a single patch so feel free to drop it. Regards, Frediano
diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c index 3cb59dd..9ab30ce 100644 --- a/xen/arch/arm/gic-v2.c +++ b/xen/arch/arm/gic-v2.c @@ -823,6 +823,7 @@ DT_DEVICE_END static const char * const hip04_gicv2_dt_compat[] __initconst = { DT_COMPAT_GIC_HIP04, + DT_COMPAT_GIC_HIP04_2, NULL }; diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h index 5adb628..3d2b3db 100644 --- a/xen/include/asm-arm/gic.h +++ b/xen/include/asm-arm/gic.h @@ -156,11 +156,13 @@ #define DT_COMPAT_GIC_CORTEX_A15 "arm,cortex-a15-gic" #define DT_COMPAT_GIC_CORTEX_A7 "arm,cortex-a7-gic" #define DT_COMPAT_GIC_HIP04 "hisilicon,hip04-gic" +#define DT_COMPAT_GIC_HIP04_2 "hisilicon,hip04-intc" #define DT_MATCH_GIC_V2 DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_CORTEX_A15), \ DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_CORTEX_A7), \ DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_400), \ - DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_HIP04) + DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_HIP04), \ + DT_MATCH_COMPATIBLE(DT_COMPAT_GIC_HIP04_2) #define DT_COMPAT_GIC_V3 "arm,gic-v3"
This name can appear in some Linux kernel repos. Not very fortunate, but to avoid others spending an hour to spot that few characters difference it worth to work around it. Signed-off-by: Zoltan Kiss <zoltan.kiss@huawei.com> --- xen/arch/arm/gic-v2.c | 1 + xen/include/asm-arm/gic.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-)