public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
* [bisected] sh_cmt Division by zero in kernel.
@ 2010-07-21  7:25 Arnd Hannemann
  2010-07-22 13:55 ` Magnus Damm
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Arnd Hannemann @ 2010-07-21  7:25 UTC (permalink / raw)
  To: linux-sh

Hi,

when booting recent genesis-2.6 head on an AP4EVB board a division by zero
in kernel is reported:
(Looks identical to: http://thread.gmane.org/gmane.linux.ports.sh.devel/8497)


[    0.000000]  sh_cmt.10: using deprecated clock lookup
[    0.000000]  sh_cmt.10: used for clock events
[    0.000000]  sh_cmt.10: used for periodic clock events
[    0.000000] Division by zero in kernel.
[    0.000000] Backtrace:
[    0.000000] [<c0028f08>] (dump_backtrace+0x0/0x110) from [<c0202ecc>] (dump_stack+0x18/0x1c)
[    0.000000]  r6:c0298978 r5:cf80e600 r4:cf801460 r3:c02a37ac
[    0.000000] [<c0202eb4>] (dump_stack+0x0/0x1c) from [<c002904c>] (__div0+0x18/0x20)
[    0.000000] [<c0029034>] (__div0+0x0/0x20) from [<c01177fc> ](Ldiv0+0x8/0x10)
[    0.000000] [<c0202444>] (sh_cmt_probe+0x0/0x4e4) from [<c0016f40> ](early_platform_driver_probe+0x1c8/0x264)
[    0.000000] [<c0016d78>] (early_platform_driver_probe+0x0/0x264) from[<c000cbb8>] (shmobile_late_time_init+0x24/0x2c)
[    0.000000] [<c000cb94>] (shmobile_late_time_init+0x0/0x2c) from[<c0008978>] (start_kernel+0x208/0x2a8)
[    0.000000] [<c0008770>] (start_kernel+0x0/0x2a8) from [<40008034>](0x40008034)
[    0.000000]  r5:c02bd1f0 r4:10c53c7d
[    0.000000]  sh_cmt.10: used as clock source

and as a result time is running too fast.
For example sleep 60 on bash returns after a few seconds.

Git bisect identified following commit as bad:

commit f4d7c3565c1692c54d9152b52090fe73f0029e37
Author: Paul Mundt <lethal@linux-sh.org>
Date:   Wed Jun 2 17:10:44 2010 +0900

    clocksource: sh_cmt: compute mult and shift before registration
       Based on the sh_tmu change in 66f49121ffa41a19c59965b31b046d8368fec3c7
    ("clocksource: sh_tmu: compute mult and shift before registration").
    The same issues impact the sh_cmt driver, so we take the same approach
    here.
       Cc: stable@kernel.org
    Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Best regards,
Arnd


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

* Re: [bisected] sh_cmt Division by zero in kernel.
  2010-07-21  7:25 [bisected] sh_cmt Division by zero in kernel Arnd Hannemann
@ 2010-07-22 13:55 ` Magnus Damm
  2010-07-23  7:35 ` Arnd Hannemann
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Magnus Damm @ 2010-07-22 13:55 UTC (permalink / raw)
  To: linux-sh

Hi Arnd,

Thanks for reporting and bisecting.

On Wed, Jul 21, 2010 at 4:25 PM, Arnd Hannemann <arnd@arndnet.de> wrote:
> Hi,
>
> when booting recent genesis-2.6 head on an AP4EVB board a division by zero
> in kernel is reported:
> (Looks identical to: http://thread.gmane.org/gmane.linux.ports.sh.devel/8497)
>
>
> [    0.000000]  sh_cmt.10: using deprecated clock lookup
> [    0.000000]  sh_cmt.10: used for clock events
> [    0.000000]  sh_cmt.10: used for periodic clock events
> [    0.000000] Division by zero in kernel.
> [    0.000000] Backtrace:
> [    0.000000] [<c0028f08>] (dump_backtrace+0x0/0x110) from [<c0202ecc>] (dump_stack+0x18/0x1c)
> [    0.000000]  r6:c0298978 r5:cf80e600 r4:cf801460 r3:c02a37ac
> [    0.000000] [<c0202eb4>] (dump_stack+0x0/0x1c) from [<c002904c>] (__div0+0x18/0x20)
> [    0.000000] [<c0029034>] (__div0+0x0/0x20) from [<c01177fc> ](Ldiv0+0x8/0x10)
> [    0.000000] [<c0202444>] (sh_cmt_probe+0x0/0x4e4) from [<c0016f40> ](early_platform_driver_probe+0x1c8/0x264)
> [    0.000000] [<c0016d78>] (early_platform_driver_probe+0x0/0x264) from[<c000cbb8>] (shmobile_late_time_init+0x24/0x2c)
> [    0.000000] [<c000cb94>] (shmobile_late_time_init+0x0/0x2c) from[<c0008978>] (start_kernel+0x208/0x2a8)
> [    0.000000] [<c0008770>] (start_kernel+0x0/0x2a8) from [<40008034>](0x40008034)
> [    0.000000]  r5:c02bd1f0 r4:10c53c7d
> [    0.000000]  sh_cmt.10: used as clock source
>
> and as a result time is running too fast.
> For example sleep 60 on bash returns after a few seconds.

I suspect 5967d33ce8a030f01a716fc0b25fcb03744a5fda fixes the issue
with the time running too fast.

> Git bisect identified following commit as bad:
>
> commit f4d7c3565c1692c54d9152b52090fe73f0029e37
> Author: Paul Mundt <lethal@linux-sh.org>
> Date:   Wed Jun 2 17:10:44 2010 +0900
>
>    clocksource: sh_cmt: compute mult and shift before registration
>       Based on the sh_tmu change in 66f49121ffa41a19c59965b31b046d8368fec3c7
>    ("clocksource: sh_tmu: compute mult and shift before registration").
>    The same issues impact the sh_cmt driver, so we take the same approach
>    here.
>       Cc: stable@kernel.org
>    Signed-off-by: Paul Mundt <lethal@linux-sh.org>

If you revert that one (and perhaps
5967d33ce8a030f01a716fc0b25fcb03744a5fda as well), does it fix your
crash?

Thanks,

/ magnus

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

* Re: [bisected] sh_cmt Division by zero in kernel.
  2010-07-21  7:25 [bisected] sh_cmt Division by zero in kernel Arnd Hannemann
  2010-07-22 13:55 ` Magnus Damm
@ 2010-07-23  7:35 ` Arnd Hannemann
  2010-08-02 10:35 ` Magnus Damm
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Arnd Hannemann @ 2010-07-23  7:35 UTC (permalink / raw)
  To: linux-sh

Hi Magnus,

Am 22.07.2010 15:55, schrieb Magnus Damm:
> Hi Arnd,
>
> Thanks for reporting and bisecting.
>
> On Wed, Jul 21, 2010 at 4:25 PM, Arnd Hannemann <arnd@arndnet.de> wrote:
>   
>> Hi,
>>
>> when booting recent genesis-2.6 head on an AP4EVB board a division by zero
>> in kernel is reported:
>> (Looks identical to: http://thread.gmane.org/gmane.linux.ports.sh.devel/8497)
>>
>>
>> [    0.000000]  sh_cmt.10: using deprecated clock lookup
>> [    0.000000]  sh_cmt.10: used for clock events
>> [    0.000000]  sh_cmt.10: used for periodic clock events
>> [    0.000000] Division by zero in kernel.
>> [    0.000000] Backtrace:
>> [    0.000000] [<c0028f08>] (dump_backtrace+0x0/0x110) from [<c0202ecc>] (dump_stack+0x18/0x1c)
>> [    0.000000]  r6:c0298978 r5:cf80e600 r4:cf801460 r3:c02a37ac
>> [    0.000000] [<c0202eb4>] (dump_stack+0x0/0x1c) from [<c002904c>] (__div0+0x18/0x20)
>> [    0.000000] [<c0029034>] (__div0+0x0/0x20) from [<c01177fc> ](Ldiv0+0x8/0x10)
>> [    0.000000] [<c0202444>] (sh_cmt_probe+0x0/0x4e4) from [<c0016f40> ](early_platform_driver_probe+0x1c8/0x264)
>> [    0.000000] [<c0016d78>] (early_platform_driver_probe+0x0/0x264) from[<c000cbb8>] (shmobile_late_time_init+0x24/0x2c)
>> [    0.000000] [<c000cb94>] (shmobile_late_time_init+0x0/0x2c) from[<c0008978>] (start_kernel+0x208/0x2a8)
>> [    0.000000] [<c0008770>] (start_kernel+0x0/0x2a8) from [<40008034>](0x40008034)
>> [    0.000000]  r5:c02bd1f0 r4:10c53c7d
>> [    0.000000]  sh_cmt.10: used as clock source
>>
>> and as a result time is running too fast.
>> For example sleep 60 on bash returns after a few seconds.
>>     
> I suspect 5967d33ce8a030f01a716fc0b25fcb03744a5fda fixes the issue
> with the time running too fast.
>   
Not sure what you mean, in the tested tree with the crash above
5967d33ce8a030f01a716fc0b25fcb03744a5fda was already included.

>   
>> Git bisect identified following commit as bad:
>>
>> commit f4d7c3565c1692c54d9152b52090fe73f0029e37
>> Author: Paul Mundt <lethal@linux-sh.org>
>> Date:   Wed Jun 2 17:10:44 2010 +0900
>>
>>    clocksource: sh_cmt: compute mult and shift before registration
>>       Based on the sh_tmu change in 66f49121ffa41a19c59965b31b046d8368fec3c7
>>    ("clocksource: sh_tmu: compute mult and shift before registration").
>>    The same issues impact the sh_cmt driver, so we take the same approach
>>    here.
>>       Cc: stable@kernel.org
>>    Signed-off-by: Paul Mundt <lethal@linux-sh.org>
>>     
> If you revert that one (and perhaps
> 5967d33ce8a030f01a716fc0b25fcb03744a5fda as well), does it fix your
> crash?
>   

Yes, if I revert both 5967d33ce8a030f01a716fc0b25fcb03744a5fda
and f4d7c3565c1692c54d9152b52090fe73f0029e37, this fixes the
crash and time is running "normal".

I reverted both mainly because the revert of
f4d7c3565c1692c54d9152b52090fe73f0029e37 would not go
through cleanly on top of the current tree.


Best regards,
Arnd

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

* Re: [bisected] sh_cmt Division by zero in kernel.
  2010-07-21  7:25 [bisected] sh_cmt Division by zero in kernel Arnd Hannemann
  2010-07-22 13:55 ` Magnus Damm
  2010-07-23  7:35 ` Arnd Hannemann
@ 2010-08-02 10:35 ` Magnus Damm
  2010-08-02 18:17 ` Arnd Hannemann
  2010-08-03  1:48 ` Magnus Damm
  4 siblings, 0 replies; 6+ messages in thread
From: Magnus Damm @ 2010-08-02 10:35 UTC (permalink / raw)
  To: linux-sh

Hi Arnd,

On Fri, Jul 23, 2010 at 4:35 PM, Arnd Hannemann <arnd@arndnet.de> wrote:
> Am 22.07.2010 15:55, schrieb Magnus Damm:
>> On Wed, Jul 21, 2010 at 4:25 PM, Arnd Hannemann <arnd@arndnet.de> wrote:
>>> Git bisect identified following commit as bad:
>>>
>>> commit f4d7c3565c1692c54d9152b52090fe73f0029e37
>>> Author: Paul Mundt <lethal@linux-sh.org>
>>> Date:   Wed Jun 2 17:10:44 2010 +0900
>>>
>>>    clocksource: sh_cmt: compute mult and shift before registration
>>>       Based on the sh_tmu change in 66f49121ffa41a19c59965b31b046d8368fec3c7
>>>    ("clocksource: sh_tmu: compute mult and shift before registration").
>>>    The same issues impact the sh_cmt driver, so we take the same approach
>>>    here.
>>>       Cc: stable@kernel.org
>>>    Signed-off-by: Paul Mundt <lethal@linux-sh.org>
>>>
>> If you revert that one (and perhaps
>> 5967d33ce8a030f01a716fc0b25fcb03744a5fda as well), does it fix your
>> crash?
>>
>
> Yes, if I revert both 5967d33ce8a030f01a716fc0b25fcb03744a5fda
> and f4d7c3565c1692c54d9152b52090fe73f0029e37, this fixes the
> crash and time is running "normal".
>
> I reverted both mainly because the revert of
> f4d7c3565c1692c54d9152b52090fe73f0029e37 would not go
> through cleanly on top of the current tree.

I think this patch should solve the issue:
http://www.spinics.net/lists/linux-sh/msg05433.html

If you have time, please give it a try.

Thanks,

/ magnus

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

* Re: [bisected] sh_cmt Division by zero in kernel.
  2010-07-21  7:25 [bisected] sh_cmt Division by zero in kernel Arnd Hannemann
                   ` (2 preceding siblings ...)
  2010-08-02 10:35 ` Magnus Damm
@ 2010-08-02 18:17 ` Arnd Hannemann
  2010-08-03  1:48 ` Magnus Damm
  4 siblings, 0 replies; 6+ messages in thread
From: Arnd Hannemann @ 2010-08-02 18:17 UTC (permalink / raw)
  To: linux-sh

Hi Magnus,

Am 02.08.2010 12:35, schrieb Magnus Damm:
>
> On Fri, Jul 23, 2010 at 4:35 PM, Arnd Hannemann <arnd@arndnet.de>
> wrote:
>> Am 22.07.2010 15:55, schrieb Magnus Damm:
>>> On Wed, Jul 21, 2010 at 4:25 PM, Arnd Hannemann <arnd@arndnet.de>
>>> wrote:
>>>> Git bisect identified following commit as bad:
>>>>
>>>> commit f4d7c3565c1692c54d9152b52090fe73f0029e37 Author: Paul
>>>> Mundt <lethal@linux-sh.org> Date:   Wed Jun 2 17:10:44 2010
>>>> +0900
>>>>
>>>> clocksource: sh_cmt: compute mult and shift before
>>>> registration Based on the sh_tmu change in
>>>> 66f49121ffa41a19c59965b31b046d8368fec3c7 ("clocksource: sh_tmu:
>>>> compute mult and shift before registration"). The same issues
>>>> impact the sh_cmt driver, so we take the same approach here.
>>>> Cc: stable@kernel.org Signed-off-by: Paul Mundt
>>>> <lethal@linux-sh.org>
>>>>
>>> If you revert that one (and perhaps
>>> 5967d33ce8a030f01a716fc0b25fcb03744a5fda as well), does it fix
>>> your crash?
>>>
>>
>> Yes, if I revert both 5967d33ce8a030f01a716fc0b25fcb03744a5fda and
>> f4d7c3565c1692c54d9152b52090fe73f0029e37, this fixes the crash and
>> time is running "normal".
>>
>> I reverted both mainly because the revert of
>> f4d7c3565c1692c54d9152b52090fe73f0029e37 would not go through
>> cleanly on top of the current tree.
>
> I think this patch should solve the issue:
> http://www.spinics.net/lists/linux-sh/msg05433.html
>
> If you have time, please give it a try.

I tried and this actually fixes the bug.

Thanks a lot,
Arnd



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

* Re: [bisected] sh_cmt Division by zero in kernel.
  2010-07-21  7:25 [bisected] sh_cmt Division by zero in kernel Arnd Hannemann
                   ` (3 preceding siblings ...)
  2010-08-02 18:17 ` Arnd Hannemann
@ 2010-08-03  1:48 ` Magnus Damm
  4 siblings, 0 replies; 6+ messages in thread
From: Magnus Damm @ 2010-08-03  1:48 UTC (permalink / raw)
  To: linux-sh

On Tue, Aug 3, 2010 at 3:17 AM, Arnd Hannemann <arnd@arndnet.de> wrote:
> Am 02.08.2010 12:35, schrieb Magnus Damm:
>> I think this patch should solve the issue:
>> http://www.spinics.net/lists/linux-sh/msg05433.html
>>
>> If you have time, please give it a try.
>
> I tried and this actually fixes the bug.

Great, thanks for testing!

/ magnus

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

end of thread, other threads:[~2010-08-03  1:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-21  7:25 [bisected] sh_cmt Division by zero in kernel Arnd Hannemann
2010-07-22 13:55 ` Magnus Damm
2010-07-23  7:35 ` Arnd Hannemann
2010-08-02 10:35 ` Magnus Damm
2010-08-02 18:17 ` Arnd Hannemann
2010-08-03  1:48 ` Magnus Damm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox