diff mbox

Traceback in -next due to commit 'clockevents/drivers/sh_tmu: Migrate to new 'set-state' interface'

Message ID 20150721023114.GD4994@linux (mailing list archive)
State Accepted
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Viresh Kumar July 21, 2015, 2:31 a.m. UTC
On 20-07-15, 14:07, Guenter Roeck wrote:
> Hi,
> 
> Commit 991a7f4970ed1 ("clockevents/drivers/sh_tmu: Migrate to new 'set-state' interface")
> in -next causes the following traceback. This is seen with qemu runs for the sh target.
> 
> ------------[ cut here ]------------
> WARNING: at drivers/clocksource/sh_tmu.c:202
> Modules linked in:

Can you please try this:

Comments

Guenter Roeck July 21, 2015, 2:50 a.m. UTC | #1
On 07/20/2015 07:31 PM, Viresh Kumar wrote:
> On 20-07-15, 14:07, Guenter Roeck wrote:
>> Hi,
>>
>> Commit 991a7f4970ed1 ("clockevents/drivers/sh_tmu: Migrate to new 'set-state' interface")
>> in -next causes the following traceback. This is seen with qemu runs for the sh target.
>>
>> ------------[ cut here ]------------
>> WARNING: at drivers/clocksource/sh_tmu.c:202
>> Modules linked in:
>
> Can you please try this:
>
> diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
> index 43c98143f79a..469e776ec17a 100644
> --- a/drivers/clocksource/sh_tmu.c
> +++ b/drivers/clocksource/sh_tmu.c
> @@ -362,7 +362,8 @@ static int sh_tmu_clock_event_shutdown(struct clock_event_device *ced)
>   {
>   	struct sh_tmu_channel *ch = ced_to_sh_tmu(ced);
>
> -	sh_tmu_disable(ch);
> +	if (clockevent_state_oneshot(ced) || clockevent_state_periodic(ced))
> +		sh_tmu_disable(ch);
>   	return 0;
>   }
>
>
This patch fixes the problem.

Thanks,
Guenter

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Viresh Kumar July 21, 2015, 3:15 a.m. UTC | #2
On 20-07-15, 19:50, Guenter Roeck wrote:
> This patch fixes the problem.

Thanks for doing this quickly. Daniel isn't around right now and may
take some time to get this commited.
Geert Uytterhoeven Aug. 3, 2015, 3:03 p.m. UTC | #3
Hi Viresh,

On Tue, Jul 21, 2015 at 4:50 AM, Guenter Roeck <linux@roeck-us.net> wrote:
> On 07/20/2015 07:31 PM, Viresh Kumar wrote:
>> On 20-07-15, 14:07, Guenter Roeck wrote:
>>> Commit 991a7f4970ed1 ("clockevents/drivers/sh_tmu: Migrate to new
>>> 'set-state' interface")
>>> in -next causes the following traceback. This is seen with qemu runs for
>>> the sh target.
>>>
>>> ------------[ cut here ]------------
>>> WARNING: at drivers/clocksource/sh_tmu.c:202
>>> Modules linked in:
>>
>> Can you please try this:
>>
>> diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
>> index 43c98143f79a..469e776ec17a 100644
>> --- a/drivers/clocksource/sh_tmu.c
>> +++ b/drivers/clocksource/sh_tmu.c
>> @@ -362,7 +362,8 @@ static int sh_tmu_clock_event_shutdown(struct
>> clock_event_device *ced)
>>   {
>>         struct sh_tmu_channel *ch = ced_to_sh_tmu(ced);
>>
>> -       sh_tmu_disable(ch);
>> +       if (clockevent_state_oneshot(ced) ||
>> clockevent_state_periodic(ced))
>> +               sh_tmu_disable(ch);
>>         return 0;
>>   }
>>
>>
> This patch fixes the problem.

I'm seeing the same WARNING on ARM (r8a7740/armadillo), and it's fixed by
your patch.

Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Viresh Kumar Aug. 3, 2015, 3:51 p.m. UTC | #4
On 03-08-15, 17:03, Geert Uytterhoeven wrote:
> I'm seeing the same WARNING on ARM (r8a7740/armadillo), and it's fixed by
> your patch.
> 
> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

Thanks. Daniel is back now and we should see this in linux-next soon.
Daniel Lezcano Aug. 5, 2015, 12:38 p.m. UTC | #5
On 08/03/2015 05:51 PM, Viresh Kumar wrote:
> On 03-08-15, 17:03, Geert Uytterhoeven wrote:
>> I'm seeing the same WARNING on ARM (r8a7740/armadillo), and it's fixed by
>> your patch.
>>
>> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Thanks. Daniel is back now and we should see this in linux-next soon.

Fixed and pushed in clockevents/next
diff mbox

Patch

diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
index 43c98143f79a..469e776ec17a 100644
--- a/drivers/clocksource/sh_tmu.c
+++ b/drivers/clocksource/sh_tmu.c
@@ -362,7 +362,8 @@  static int sh_tmu_clock_event_shutdown(struct clock_event_device *ced)
 {
 	struct sh_tmu_channel *ch = ced_to_sh_tmu(ced);
 
-	sh_tmu_disable(ch);
+	if (clockevent_state_oneshot(ced) || clockevent_state_periodic(ced))
+		sh_tmu_disable(ch);
 	return 0;
 }