* [PATCH] ARM: dts: Update arch timer node with clock frequency
[not found] <1379499113-20342-1-git-send-email-yuvaraj.cd@samsung.com>
@ 2013-09-18 10:23 ` Mark Rutland
2013-09-20 4:57 ` Yuvaraj Kumar
0 siblings, 1 reply; 5+ messages in thread
From: Mark Rutland @ 2013-09-18 10:23 UTC (permalink / raw)
To: linux-arm-kernel
[adding lakml]
On Wed, Sep 18, 2013 at 11:11:53AM +0100, Yuvaraj Kumar C D wrote:
> Without the "clock-frequency" property in arch timer node, could able
> to see the below crash dump.
Why does this cause the below crash specifically? What is CNTFRQ reading
as?
Your firmware or bootloader should set CNTFRQ -- setting the
clock-frequency is a work-around for buggy firmware/bootloaders that
should be avoided as far as possible.
Is it not possible to fix your firmware or bootlaoder to set CNTFRQ?
Thanks,
Mark.
>
> [<c0014e28>] (unwind_backtrace+0x0/0xf4) from [<c0011808>] (show_stack+0x10/0x14)
> [<c0011808>] (show_stack+0x10/0x14) from [<c036ac1c>] (dump_stack+0x7c/0xb0)
> [<c036ac1c>] (dump_stack+0x7c/0xb0) from [<c01ab760>] (Ldiv0_64+0x8/0x18)
> [<c01ab760>] (Ldiv0_64+0x8/0x18) from [<c0062f60>] (clockevents_config.part.2+0x1c/0x74)
> [<c0062f60>] (clockevents_config.part.2+0x1c/0x74) from [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c)
> [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c) from [<c02b8e8c>] (arch_timer_setup+0xa8/0x134)
> [<c02b8e8c>] (arch_timer_setup+0xa8/0x134) from [<c04b47b4>] (arch_timer_init+0x1f4/0x24c)
> [<c04b47b4>] (arch_timer_init+0x1f4/0x24c) from [<c04b40d8>] (clocksource_of_init+0x34/0x58)
> [<c04b40d8>] (clocksource_of_init+0x34/0x58) from [<c049ed8c>] (time_init+0x20/0x2c)
> [<c049ed8c>] (time_init+0x20/0x2c) from [<c049b95c>] (start_kernel+0x1e0/0x39c)
>
> Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com>
> ---
> arch/arm/boot/dts/exynos5250.dtsi | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
> index 7d7cc77..668ce5d 100644
> --- a/arch/arm/boot/dts/exynos5250.dtsi
> +++ b/arch/arm/boot/dts/exynos5250.dtsi
> @@ -96,6 +96,7 @@
> <1 14 0xf08>,
> <1 11 0xf08>,
> <1 10 0xf08>;
> + clock-frequency = <24000000>;
> };
>
> mct at 101C0000 {
> --
> 1.7.9.5
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ARM: dts: Update arch timer node with clock frequency
2013-09-18 10:23 ` [PATCH] ARM: dts: Update arch timer node with clock frequency Mark Rutland
@ 2013-09-20 4:57 ` Yuvaraj Kumar
2013-09-20 8:17 ` Marc Zyngier
0 siblings, 1 reply; 5+ messages in thread
From: Yuvaraj Kumar @ 2013-09-20 4:57 UTC (permalink / raw)
To: linux-arm-kernel
Resending it as it bounced from kernel mailing group
On Wed, Sep 18, 2013 at 3:53 PM, Mark Rutland <mark.rutland@arm.com> wrote:
> [adding lakml]
>
> On Wed, Sep 18, 2013 at 11:11:53AM +0100, Yuvaraj Kumar C D wrote:
>> Without the "clock-frequency" property in arch timer node, could able
>> to see the below crash dump.
>
> Why does this cause the below crash specifically? What is CNTFRQ reading
> as?
Return value of arch_timer_get_cntfrq() is 0
>
> Your firmware or bootloader should set CNTFRQ -- setting the
> clock-frequency is a work-around for buggy firmware/bootloaders that
> should be avoided as far as possible.
Why kernel should depend on bootloader/firmware to set CNTFRQ? Any
specific reasons?
Should'nt be indepenedent each other(kernel and bootloader/firmware)?
>
> Is it not possible to fix your firmware or bootlaoder to set CNTFRQ?
>
> Thanks,
> Mark.
>
>>
>> [<c0014e28>] (unwind_backtrace+0x0/0xf4) from [<c0011808>] (show_stack+0x10/0x14)
>> [<c0011808>] (show_stack+0x10/0x14) from [<c036ac1c>] (dump_stack+0x7c/0xb0)
>> [<c036ac1c>] (dump_stack+0x7c/0xb0) from [<c01ab760>] (Ldiv0_64+0x8/0x18)
>> [<c01ab760>] (Ldiv0_64+0x8/0x18) from [<c0062f60>] (clockevents_config.part.2+0x1c/0x74)
>> [<c0062f60>] (clockevents_config.part.2+0x1c/0x74) from [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c)
>> [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c) from [<c02b8e8c>] (arch_timer_setup+0xa8/0x134)
>> [<c02b8e8c>] (arch_timer_setup+0xa8/0x134) from [<c04b47b4>] (arch_timer_init+0x1f4/0x24c)
>> [<c04b47b4>] (arch_timer_init+0x1f4/0x24c) from [<c04b40d8>] (clocksource_of_init+0x34/0x58)
>> [<c04b40d8>] (clocksource_of_init+0x34/0x58) from [<c049ed8c>] (time_init+0x20/0x2c)
>> [<c049ed8c>] (time_init+0x20/0x2c) from [<c049b95c>] (start_kernel+0x1e0/0x39c)
>>
>> Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com>
>> ---
>> arch/arm/boot/dts/exynos5250.dtsi | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
>> index 7d7cc77..668ce5d 100644
>> --- a/arch/arm/boot/dts/exynos5250.dtsi
>> +++ b/arch/arm/boot/dts/exynos5250.dtsi
>> @@ -96,6 +96,7 @@
>> <1 14 0xf08>,
>> <1 11 0xf08>,
>> <1 10 0xf08>;
>> + clock-frequency = <24000000>;
>> };
>>
>> mct at 101C0000 {
>> --
>> 1.7.9.5
>>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ARM: dts: Update arch timer node with clock frequency
2013-09-20 4:57 ` Yuvaraj Kumar
@ 2013-09-20 8:17 ` Marc Zyngier
2013-09-20 14:55 ` Christopher Covington
0 siblings, 1 reply; 5+ messages in thread
From: Marc Zyngier @ 2013-09-20 8:17 UTC (permalink / raw)
To: linux-arm-kernel
On 20/09/13 05:57, Yuvaraj Kumar wrote:
> Resending it as it bounced from kernel mailing group
>
> On Wed, Sep 18, 2013 at 3:53 PM, Mark Rutland <mark.rutland@arm.com> wrote:
>> [adding lakml]
>>
>> On Wed, Sep 18, 2013 at 11:11:53AM +0100, Yuvaraj Kumar C D wrote:
>>> Without the "clock-frequency" property in arch timer node, could able
>>> to see the below crash dump.
>>
>> Why does this cause the below crash specifically? What is CNTFRQ reading
>> as?
> Return value of arch_timer_get_cntfrq() is 0
>>
>> Your firmware or bootloader should set CNTFRQ -- setting the
>> clock-frequency is a work-around for buggy firmware/bootloaders that
>> should be avoided as far as possible.
> Why kernel should depend on bootloader/firmware to set CNTFRQ? Any
> specific reasons?
Because the kernel can't set it if running non-secure. Only secure mode
can do this (see the ARM ARM for details).
> Should'nt be indepenedent each other(kernel and bootloader/firmware)?
In my book, the firmware is responsible for setting up the platform in a
sane state. Leaving CNTFRQ in its UNKNOWN reset state is a bug, and your
firmware should program it on each CPU. Same goes for CNTVOFF, which
should be set to a common value (preferably zero).
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ARM: dts: Update arch timer node with clock frequency
2013-09-20 8:17 ` Marc Zyngier
@ 2013-09-20 14:55 ` Christopher Covington
2013-09-20 15:04 ` Marc Zyngier
0 siblings, 1 reply; 5+ messages in thread
From: Christopher Covington @ 2013-09-20 14:55 UTC (permalink / raw)
To: linux-arm-kernel
On 09/20/2013 04:17 AM, Marc Zyngier wrote:
> On 20/09/13 05:57, Yuvaraj Kumar wrote:
>> Resending it as it bounced from kernel mailing group
>>
>> On Wed, Sep 18, 2013 at 3:53 PM, Mark Rutland <mark.rutland@arm.com> wrote:
>>> [adding lakml]
>>>
>>> On Wed, Sep 18, 2013 at 11:11:53AM +0100, Yuvaraj Kumar C D wrote:
>>>> Without the "clock-frequency" property in arch timer node, could able
>>>> to see the below crash dump.
>>>
>>> Why does this cause the below crash specifically? What is CNTFRQ reading
>>> as?
>> Return value of arch_timer_get_cntfrq() is 0
>>>
>>> Your firmware or bootloader should set CNTFRQ -- setting the
>>> clock-frequency is a work-around for buggy firmware/bootloaders that
>>> should be avoided as far as possible.
>> Why kernel should depend on bootloader/firmware to set CNTFRQ? Any
>> specific reasons?
>
> Because the kernel can't set it if running non-secure. Only secure mode
> can do this (see the ARM ARM for details).
What software outside the kernel actually reads the CNTFRQ and why?
Thanks,
Christopher
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ARM: dts: Update arch timer node with clock frequency
2013-09-20 14:55 ` Christopher Covington
@ 2013-09-20 15:04 ` Marc Zyngier
0 siblings, 0 replies; 5+ messages in thread
From: Marc Zyngier @ 2013-09-20 15:04 UTC (permalink / raw)
To: linux-arm-kernel
On 20/09/13 15:55, Christopher Covington wrote:
> On 09/20/2013 04:17 AM, Marc Zyngier wrote:
>> On 20/09/13 05:57, Yuvaraj Kumar wrote:
>>> Resending it as it bounced from kernel mailing group
>>>
>>> On Wed, Sep 18, 2013 at 3:53 PM, Mark Rutland <mark.rutland@arm.com> wrote:
>>>> [adding lakml]
>>>>
>>>> On Wed, Sep 18, 2013 at 11:11:53AM +0100, Yuvaraj Kumar C D wrote:
>>>>> Without the "clock-frequency" property in arch timer node, could able
>>>>> to see the below crash dump.
>>>>
>>>> Why does this cause the below crash specifically? What is CNTFRQ reading
>>>> as?
>>> Return value of arch_timer_get_cntfrq() is 0
>>>>
>>>> Your firmware or bootloader should set CNTFRQ -- setting the
>>>> clock-frequency is a work-around for buggy firmware/bootloaders that
>>>> should be avoided as far as possible.
>>> Why kernel should depend on bootloader/firmware to set CNTFRQ? Any
>>> specific reasons?
>>
>> Because the kernel can't set it if running non-secure. Only secure mode
>> can do this (see the ARM ARM for details).
>
> What software outside the kernel actually reads the CNTFRQ and why?
Your favourite virtual machine does, for the same reason the host kernel
does. And as you can't guess the frequency from userspace, you cannot
specify it in the guest's DT, getting whatever random number sits in CNTFRQ.
As you would expect, things don't go smoothly when that happens.
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-09-20 15:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1379499113-20342-1-git-send-email-yuvaraj.cd@samsung.com>
2013-09-18 10:23 ` [PATCH] ARM: dts: Update arch timer node with clock frequency Mark Rutland
2013-09-20 4:57 ` Yuvaraj Kumar
2013-09-20 8:17 ` Marc Zyngier
2013-09-20 14:55 ` Christopher Covington
2013-09-20 15:04 ` Marc Zyngier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).