All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] ARM: dts: exynos: Add timer node for exynos5420
@ 2016-03-28 14:08 Adel Belhouane
  2016-03-28 14:08 ` [PATCH 1/1] " Adel Belhouane
  2016-03-29 10:06 ` [PATCH 0/1] " Krzysztof Kozlowski
  0 siblings, 2 replies; 8+ messages in thread
From: Adel Belhouane @ 2016-03-28 14:08 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, linux-samsung-soc; +Cc: Adel Belhouane

On ODROID XU3, after having all the Exynos5422 cores detected as
started in HYP mode with a patch[1], KVM still won't work because it
needs the Generic Timer Architecture. It's defined in other exynos5
models (5250, 5440) DTs,  but not the 542x/5800, so I just added it.

Actually this timer was defined in ODROID Hardkernel's repository [2],
so I took its clock-frequency value too (which isn't provided by
firmware/U-Boot).

KVM now works on ODROID XU3 with kernel v4.5 plus these changes.

regards,
Adel Belhouane.

[1] from Brian Kim:
https://gist.github.com/bkrepo/6f4eea33be133ad306e3

[2]
https://github.com/hardkernel/linux/blob/odroidxu3-3.10.y/arch/arm/boot/dts/exynos5422-odroidxu3.dts

Adel Belhouane (1):
  ARM: dts: exynos: Add timer node for exynos5420

 arch/arm/boot/dts/exynos5420.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/1] ARM: dts: exynos: Add timer node for exynos5420
  2016-03-28 14:08 [PATCH 0/1] ARM: dts: exynos: Add timer node for exynos5420 Adel Belhouane
@ 2016-03-28 14:08 ` Adel Belhouane
  2016-03-30  5:17   ` Chanwoo Choi
  2016-03-29 10:06 ` [PATCH 0/1] " Krzysztof Kozlowski
  1 sibling, 1 reply; 8+ messages in thread
From: Adel Belhouane @ 2016-03-28 14:08 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, linux-samsung-soc; +Cc: Adel Belhouane

This patch adds timer node for exynos542x/5800.
Generic Timer Architecture is needed by KVM.

Signed-off-by: Adel Belhouane <bugs.a.b@free.fr>
---
 arch/arm/boot/dts/exynos5420.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index 48a0a55314f5..4663006d15ab 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -1140,6 +1140,16 @@
 		power-domains = <&disp_pd>;
 		#iommu-cells = <0>;
 	};
+
+	timer {
+		compatible = "arm,cortex-a15-timer",
+			     "arm,armv7-timer";
+		interrupts = <1 13 0xf08>,
+			     <1 14 0xf08>,
+			     <1 11 0xf08>,
+			     <1 10 0xf08>;
+		clock-frequency = <24000000>;
+	};
 };
 
 &dp {
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/1] ARM: dts: exynos: Add timer node for exynos5420
  2016-03-28 14:08 [PATCH 0/1] ARM: dts: exynos: Add timer node for exynos5420 Adel Belhouane
  2016-03-28 14:08 ` [PATCH 1/1] " Adel Belhouane
@ 2016-03-29 10:06 ` Krzysztof Kozlowski
  2016-04-03 20:39   ` Adel Belhouane
  1 sibling, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2016-03-29 10:06 UTC (permalink / raw)
  To: Adel Belhouane, Kukjin Kim, linux-samsung-soc

On 28.03.2016 23:08, Adel Belhouane wrote:
> On ODROID XU3, after having all the Exynos5422 cores detected as
> started in HYP mode with a patch[1], KVM still won't work because it
> needs the Generic Timer Architecture. It's defined in other exynos5
> models (5250, 5440) DTs,  but not the 542x/5800, so I just added it.
> 
> Actually this timer was defined in ODROID Hardkernel's repository [2],
> so I took its clock-frequency value too (which isn't provided by
> firmware/U-Boot).
> 
> KVM now works on ODROID XU3 with kernel v4.5 plus these changes.
> 
> regards,
> Adel Belhouane.
> 
> [1] from Brian Kim:
> https://gist.github.com/bkrepo/6f4eea33be133ad306e3
> 
> [2]
> https://github.com/hardkernel/linux/blob/odroidxu3-3.10.y/arch/arm/boot/dts/exynos5422-odroidxu3.dts

Please look at this thread:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-July/359806.html

Unfortunately I do not have any more details about this.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] ARM: dts: exynos: Add timer node for exynos5420
  2016-03-28 14:08 ` [PATCH 1/1] " Adel Belhouane
@ 2016-03-30  5:17   ` Chanwoo Choi
  2016-04-03 20:49     ` Adel Belhouane
  0 siblings, 1 reply; 8+ messages in thread
From: Chanwoo Choi @ 2016-03-30  5:17 UTC (permalink / raw)
  To: Adel Belhouane, Kukjin Kim, Krzysztof Kozlowski, linux-samsung-soc

Hi Adel,

On 2016년 03월 28일 23:08, Adel Belhouane wrote:
> This patch adds timer node for exynos542x/5800.
> Generic Timer Architecture is needed by KVM.
> 
> Signed-off-by: Adel Belhouane <bugs.a.b@free.fr>
> ---
>  arch/arm/boot/dts/exynos5420.dtsi | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
> index 48a0a55314f5..4663006d15ab 100644
> --- a/arch/arm/boot/dts/exynos5420.dtsi
> +++ b/arch/arm/boot/dts/exynos5420.dtsi
> @@ -1140,6 +1140,16 @@
>  		power-domains = <&disp_pd>;
>  		#iommu-cells = <0>;
>  	};
> +
> +	timer {
> +		compatible = "arm,cortex-a15-timer",
> +			     "arm,armv7-timer";
> +		interrupts = <1 13 0xf08>,
> +			     <1 14 0xf08>,
> +			     <1 11 0xf08>,
> +			     <1 10 0xf08>;
> +		clock-frequency = <24000000>;
> +	};
>  };
>  
>  &dp {
> 

Did you test this arch_timer after deleting the MCT Device Tree node from dts file?

As I knew, the generic arch time uses same H/W with MCT device in Exynos SoC.
So, If we remove the MCT device-tree node from dts, the arch timer is not working.
Just, I tested it on Exynos3250 SoC.

Best Regards,
Chanwoo Choi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/1] ARM: dts: exynos: Add timer node for exynos5420
  2016-03-29 10:06 ` [PATCH 0/1] " Krzysztof Kozlowski
@ 2016-04-03 20:39   ` Adel Belhouane
  2016-04-04  1:57     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 8+ messages in thread
From: Adel Belhouane @ 2016-04-03 20:39 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Kukjin Kim, linux-samsung-soc

Le 29/03/2016 12:06, Krzysztof Kozlowski a écrit :
> Please look at this thread:
> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-July/359806.html
> 
> Unfortunately I do not have any more details about this.

So I understand MCT and Arch Timer use the same hardware timer and
there were issues when the MCT interface reset it at boot and during
resume and the Arch Timer consumers didn't expect it. In this thread there
were links [1] to a patch to have the MCT not writing the timer anymore,
thus allowing the two interfaces to co-exist.

This patch was applied in commit 1d80415db64b. So no problem is to be
expected when using both interfaces at the same time.

I can see  exynos5250 got its Arch Timer definition for KVM:

- From the description of commit 2b7da98870bc
ARM: dts: Add architected timer nodes for exynos5250
[...]
This is required by KVM.

So is there something else blocking adding this definition for 542x/5800
considering its effect is enabling KVM ?

[1]
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/257350.html
=> https://chromium-review.googlesource.com/#/c/200298/
=> https://chromium-review.googlesource.com/#/c/201143/
for 3.8

[2]
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/258622.html

best regards,
Adel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] ARM: dts: exynos: Add timer node for exynos5420
  2016-03-30  5:17   ` Chanwoo Choi
@ 2016-04-03 20:49     ` Adel Belhouane
  0 siblings, 0 replies; 8+ messages in thread
From: Adel Belhouane @ 2016-04-03 20:49 UTC (permalink / raw)
  To: Chanwoo Choi, Kukjin Kim, Krzysztof Kozlowski, linux-samsung-soc

Le 30/03/2016 07:17, Chanwoo Choi a écrit :
> Hi Adel,
> 
> On 2016년 03월 28일 23:08, Adel Belhouane wrote:
>> This patch adds timer node for exynos542x/5800.
> 
> Did you test this arch_timer after deleting the MCT Device Tree node from dts file?
> 
> As I knew, the generic arch time uses same H/W with MCT device in Exynos SoC.
> So, If we remove the MCT device-tree node from dts, the arch timer is not working.
> Just, I tested it on Exynos3250 SoC.

I got the same conclusion you got: it doesn't boot without the MCT
definition. But I'm not asking to change the MCT interface with the
Arch Timer interface (even if I understand it would give faster results
for some usages from the thread Krysztof Kozlowski gave before), I'm just
asking for both. The usage conflict was resolved with the commit
1d80415db64b that prevents the MCT interface from resetting the (same
hardware) timer thus no more disrupting the Arch Timer interface.

The goal is enabling KVM.

best regards,
Adel Belhouane.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/1] ARM: dts: exynos: Add timer node for exynos5420
  2016-04-03 20:39   ` Adel Belhouane
@ 2016-04-04  1:57     ` Krzysztof Kozlowski
  2016-04-04 19:08       ` Adel Belhouane
  0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2016-04-04  1:57 UTC (permalink / raw)
  To: Adel Belhouane, Kukjin Kim, linux-samsung-soc

On 04.04.2016 05:39, Adel Belhouane wrote:
> Le 29/03/2016 12:06, Krzysztof Kozlowski a écrit :
>> Please look at this thread:
>> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-July/359806.html
>>
>> Unfortunately I do not have any more details about this.
> 
> So I understand MCT and Arch Timer use the same hardware timer and
> there were issues when the MCT interface reset it at boot and during
> resume and the Arch Timer consumers didn't expect it. In this thread there
> were links [1] to a patch to have the MCT not writing the timer anymore,
> thus allowing the two interfaces to co-exist.
> 
> This patch was applied in commit 1d80415db64b. So no problem is to be
> expected when using both interfaces at the same time.
> 
> I can see  exynos5250 got its Arch Timer definition for KVM:
> 
> - From the description of commit 2b7da98870bc
> ARM: dts: Add architected timer nodes for exynos5250
> [...]
> This is required by KVM.
> 
> So is there something else blocking adding this definition for 542x/5800
> considering its effect is enabling KVM ?

Yeah, this is blocking:
> Doug Anderson:
> According to Samsung, there are issues where using cp15 could
> sometimes return the wrong value, especially if you happen to read it
> while on an A7 instead of an A15.

> Kukjin Kim:
> One more thing, if you change it for your own private platform, it's > up
> to you but if not, i.e., for mass product, please don't change it.
> Because it's not guaranteed even you haven't seen its failure...

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/1] ARM: dts: exynos: Add timer node for exynos5420
  2016-04-04  1:57     ` Krzysztof Kozlowski
@ 2016-04-04 19:08       ` Adel Belhouane
  0 siblings, 0 replies; 8+ messages in thread
From: Adel Belhouane @ 2016-04-04 19:08 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Kukjin Kim, linux-samsung-soc

Le 04/04/2016 03:57, Krzysztof Kozlowski a écrit :
> On 04.04.2016 05:39, Adel Belhouane wrote:
>> Le 29/03/2016 12:06, Krzysztof Kozlowski a écrit :
>>> Please look at this thread:
>>> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-July/359806.html
>>>
>>> Unfortunately I do not have any more details about this.

>> This patch was applied in commit 1d80415db64b. So no problem is to be
>> expected when using both interfaces at the same time.
>>

>> So is there something else blocking adding this definition for 542x/5800
>> considering its effect is enabling KVM ?
> 
> Yeah, this is blocking:
>> Doug Anderson:
>> According to Samsung, there are issues where using cp15 could
>> sometimes return the wrong value, especially if you happen to read it
>> while on an A7 instead of an A15.
> 
>> Kukjin Kim:
>> One more thing, if you change it for your own private platform, it's > up
>> to you but if not, i.e., for mass product, please don't change it.
>> Because it's not guaranteed even you haven't seen its failure...
> 
> Best regards,
> Krzysztof
> 

It seems I jumped to an other thread while reading the link you gave and
didn't manage to read till the end. Now I get it. Thanks for your
replies.

best regards,
Adel.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-04-04 19:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-28 14:08 [PATCH 0/1] ARM: dts: exynos: Add timer node for exynos5420 Adel Belhouane
2016-03-28 14:08 ` [PATCH 1/1] " Adel Belhouane
2016-03-30  5:17   ` Chanwoo Choi
2016-04-03 20:49     ` Adel Belhouane
2016-03-29 10:06 ` [PATCH 0/1] " Krzysztof Kozlowski
2016-04-03 20:39   ` Adel Belhouane
2016-04-04  1:57     ` Krzysztof Kozlowski
2016-04-04 19:08       ` Adel Belhouane

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.