2014-11-07 00:22:01

by Anatol Pomozov

[permalink] [raw]
Subject: [PATCH] clocksource: tegra: Port tegra20 clocksource to arm64

register_persistent_clock() are in different headers in arm/arm64

Tested: Compiled the driver on 64bit platform and make sure that
it works

Signed-off-by: Anatol Pomozov <[email protected]>
---
drivers/clocksource/tegra20_timer.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/clocksource/tegra20_timer.c b/drivers/clocksource/tegra20_timer.c
index d2616ef..e0123c7 100644
--- a/drivers/clocksource/tegra20_timer.c
+++ b/drivers/clocksource/tegra20_timer.c
@@ -29,8 +29,12 @@
#include <linux/sched_clock.h>
#include <linux/delay.h>

+#ifdef CONFIG_ARM64
+#include <asm/time.h>
+#else
#include <asm/mach/time.h>
#include <asm/smp_twd.h>
+#endif

#define RTC_SECONDS 0x08
#define RTC_SHADOW_SECONDS 0x0c
--
2.1.0.rc2.206.gedb03e5


2014-11-07 04:17:07

by Stephen Warren

[permalink] [raw]
Subject: Re: [PATCH] clocksource: tegra: Port tegra20 clocksource to arm64

On 11/06/2014 05:21 PM, Anatol Pomozov wrote:
> register_persistent_clock() are in different headers in arm/arm64
>
> Tested: Compiled the driver on 64bit platform and make sure that
> it works

I assume "it works" refers to "it compiles" not "it executes successfully"?

I think it'd be better to make the same APIs available on arm and arm64,
or even across all architectures.

> Signed-off-by: Anatol Pomozov <[email protected]>
> ---
> drivers/clocksource/tegra20_timer.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/clocksource/tegra20_timer.c b/drivers/clocksource/tegra20_timer.c
> index d2616ef..e0123c7 100644
> --- a/drivers/clocksource/tegra20_timer.c
> +++ b/drivers/clocksource/tegra20_timer.c
> @@ -29,8 +29,12 @@
> #include <linux/sched_clock.h>
> #include <linux/delay.h>
>
> +#ifdef CONFIG_ARM64
> +#include <asm/time.h>
> +#else
> #include <asm/mach/time.h>
> #include <asm/smp_twd.h>
> +#endif
>
> #define RTC_SECONDS 0x08
> #define RTC_SHADOW_SECONDS 0x0c
>

2014-11-07 04:26:22

by Anatol Pomozov

[permalink] [raw]
Subject: Re: [PATCH] clocksource: tegra: Port tegra20 clocksource to arm64

Hi

On Thu, Nov 6, 2014 at 8:17 PM, Stephen Warren <[email protected]> wrote:
> On 11/06/2014 05:21 PM, Anatol Pomozov wrote:
>> register_persistent_clock() are in different headers in arm/arm64
>>
>> Tested: Compiled the driver on 64bit platform and make sure that
>> it works
>
> I assume "it works" refers to "it compiles" not "it executes successfully"?

It execute successfully, at least on 3.14 + bunch of backported
changes. I tested it on chromiumos 3.14 kernel and 64bit tegra board.

> I think it'd be better to make the same APIs available on arm and arm64,
> or even across all architectures.
>
>> Signed-off-by: Anatol Pomozov <[email protected]>
>> ---
>> drivers/clocksource/tegra20_timer.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/clocksource/tegra20_timer.c b/drivers/clocksource/tegra20_timer.c
>> index d2616ef..e0123c7 100644
>> --- a/drivers/clocksource/tegra20_timer.c
>> +++ b/drivers/clocksource/tegra20_timer.c
>> @@ -29,8 +29,12 @@
>> #include <linux/sched_clock.h>
>> #include <linux/delay.h>
>>
>> +#ifdef CONFIG_ARM64
>> +#include <asm/time.h>
>> +#else
>> #include <asm/mach/time.h>
>> #include <asm/smp_twd.h>
>> +#endif
>>
>> #define RTC_SECONDS 0x08
>> #define RTC_SHADOW_SECONDS 0x0c
>>
>