xen/arm: Basic support for sunxi/sun50i h6 platform.
diff mbox series

Message ID 20191202084924.29893-1-tiny.windzz@gmail.com
State New
Headers show
Series
  • xen/arm: Basic support for sunxi/sun50i h6 platform.
Related show

Commit Message

Frank Lee Dec. 2, 2019, 8:49 a.m. UTC
adding compatible strings for h6 SoCs, Specifically orangepi3.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 xen/arch/arm/platforms/sunxi.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Julien Grall Dec. 3, 2019, 11:39 a.m. UTC | #1
(+Andre)

Hi,

@Andre, IIRC you originally added the support for sunxi in Xen. Could 
you have a look at this patch?

Cheers,

On 02/12/2019 08:49, Yangtao Li wrote:
> adding compatible strings for h6 SoCs, Specifically orangepi3.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> --- >   xen/arch/arm/platforms/sunxi.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/xen/arch/arm/platforms/sunxi.c b/xen/arch/arm/platforms/sunxi.c
> index 55705b15b2..e8e4d88bef 100644
> --- a/xen/arch/arm/platforms/sunxi.c
> +++ b/xen/arch/arm/platforms/sunxi.c
> @@ -119,6 +119,7 @@ static const char * const sunxi_v8_dt_compat[] __initconst =
>   {
>       "allwinner,sun50i-a64",
>       "allwinner,sun50i-h5",
> +    "allwinner,sun50i-h6",
>       NULL
>   };
>   
>
Andre Przywara Dec. 3, 2019, 2:38 p.m. UTC | #2
On Tue, 3 Dec 2019 11:39:58 +0000
Julien Grall <julien@xen.org> wrote:

Hi,

> (+Andre)
> 
> Hi,
> 
> @Andre, IIRC you originally added the support for sunxi in Xen. Could 
> you have a look at this patch?

Looks alright, and indeed the H6 needs it. Even though Allwinner totally re-arranged the memory map, they missed the opportunity to put each device at least in their own 4K page.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>


If you can wait till this evening, I can even test it.

It's actually a shame that we need this enumeration, when all we are after is an answer to the question: Does a device used by Xen share a 4K page with a device handed off to Dom0? It sounds like a nice rainy afternoon exercise to scan the DT to find those devices automatically and mask them (on the A64 for instance UART4 is on a different page).

Cheers,
Andre

> On 02/12/2019 08:49, Yangtao Li wrote:
> > adding compatible strings for h6 SoCs, Specifically orangepi3.
> > 
> > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>  
> > --- >   xen/arch/arm/platforms/sunxi.c | 1 +  
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/xen/arch/arm/platforms/sunxi.c b/xen/arch/arm/platforms/sunxi.c
> > index 55705b15b2..e8e4d88bef 100644
> > --- a/xen/arch/arm/platforms/sunxi.c
> > +++ b/xen/arch/arm/platforms/sunxi.c
> > @@ -119,6 +119,7 @@ static const char * const sunxi_v8_dt_compat[] __initconst =
> >   {
> >       "allwinner,sun50i-a64",
> >       "allwinner,sun50i-h5",
> > +    "allwinner,sun50i-h6",
> >       NULL
> >   };
> >   
> >   
>
Julien Grall Dec. 3, 2019, 4:52 p.m. UTC | #3
On 03/12/2019 14:38, Andre Przywara wrote:
> On Tue, 3 Dec 2019 11:39:58 +0000
> Julien Grall <julien@xen.org> wrote:
> 
> Hi,
> 
>> (+Andre)
>>
>> Hi,
>>
>> @Andre, IIRC you originally added the support for sunxi in Xen. Could
>> you have a look at this patch?
> 
> Looks alright, and indeed the H6 needs it. Even though Allwinner totally re-arranged the memory map, they missed the opportunity to put each device at least in their own 4K page.
> 
> Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Thank you for the review!

> 
> If you can wait till this evening, I can even test it.

I can wait until tomorrow before comitting the patch.

> 
> It's actually a shame that we need this enumeration, when all we are after is an answer to the question: Does a device used by Xen share a 4K page with a device handed off to Dom0? It sounds 
like a nice rainy afternoon exercise to scan the DT to find those 
devices automatically and mask them (on the A64 for instance UART4 is on 
a different page).

I agree and I think we discussed about it before :). I would welcome 
such improvement in Xen, this would actually allow us to drop sunxi.c 
completely.

Cheers,
Andre Przywara Dec. 4, 2019, 9:27 a.m. UTC | #4
On Tue, 3 Dec 2019 16:52:45 +0000
Julien Grall <julien@xen.org> wrote:

Hi,

> On 03/12/2019 14:38, Andre Przywara wrote:
> > On Tue, 3 Dec 2019 11:39:58 +0000
> > Julien Grall <julien@xen.org> wrote:
> > 
> > Hi,
> >   
> >> (+Andre)
> >>
> >> Hi,
> >>
> >> @Andre, IIRC you originally added the support for sunxi in Xen. Could
> >> you have a look at this patch?  
> > 
> > Looks alright, and indeed the H6 needs it. Even though Allwinner totally re-arranged the memory map, they missed the opportunity to put each device at least in their own 4K page.
> > 
> > Reviewed-by: Andre Przywara <andre.przywara@arm.com>  
> 
> Thank you for the review!
> 
> > 
> > If you can wait till this evening, I can even test it.  
> 
> I can wait until tomorrow before comitting the patch.

I booted Xen 4.12.1 to the Dom0 prompt on the Pine H64, and saw all the serial devices in /sys/firmware/devicetree/base/soc. Then I applied the patch, and the serial devices were gone. And yes, all the four main serial ports share one 4K page on the H6.

Tested-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre.

> > It's actually a shame that we need this enumeration, when all we are after is an answer to the question: Does a device used by Xen share a 4K page with a device handed off to Dom0? It sounds   
> like a nice rainy afternoon exercise to scan the DT to find those 
> devices automatically and mask them (on the A64 for instance UART4 is on 
> a different page).
> 
> I agree and I think we discussed about it before :). I would welcome 
> such improvement in Xen, this would actually allow us to drop sunxi.c 
> completely.
> 
> Cheers,
>
Julien Grall Dec. 17, 2019, 4:31 p.m. UTC | #5
Hi,

On 04/12/2019 09:27, Andre Przywara wrote:
> On Tue, 3 Dec 2019 16:52:45 +0000
> Julien Grall <julien@xen.org> wrote:
> 
> Hi,
> 
>> On 03/12/2019 14:38, Andre Przywara wrote:
>>> On Tue, 3 Dec 2019 11:39:58 +0000
>>> Julien Grall <julien@xen.org> wrote:
>>>
>>> Hi,
>>>    
>>>> (+Andre)
>>>>
>>>> Hi,
>>>>
>>>> @Andre, IIRC you originally added the support for sunxi in Xen. Could
>>>> you have a look at this patch?
>>>
>>> Looks alright, and indeed the H6 needs it. Even though Allwinner totally re-arranged the memory map, they missed the opportunity to put each device at least in their own 4K page.
>>>
>>> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
>>
>> Thank you for the review!
>>
>>>
>>> If you can wait till this evening, I can even test it.
>>
>> I can wait until tomorrow before comitting the patch.
> 
> I booted Xen 4.12.1 to the Dom0 prompt on the Pine H64, and saw all the serial devices in /sys/firmware/devicetree/base/soc. Then I applied the patch, and the serial devices were gone. And yes, all the four main serial ports share one 4K page on the H6.
> 
> Tested-by: Andre Przywara <andre.przywara@arm.com>

Thank you for the testing!

Acked-by: Julien Grall <julien@xen.org>

I have also committed it.

Cheers,

Patch
diff mbox series

diff --git a/xen/arch/arm/platforms/sunxi.c b/xen/arch/arm/platforms/sunxi.c
index 55705b15b2..e8e4d88bef 100644
--- a/xen/arch/arm/platforms/sunxi.c
+++ b/xen/arch/arm/platforms/sunxi.c
@@ -119,6 +119,7 @@  static const char * const sunxi_v8_dt_compat[] __initconst =
 {
     "allwinner,sun50i-a64",
     "allwinner,sun50i-h5",
+    "allwinner,sun50i-h6",
     NULL
 };