lkml.org 
[lkml]   [2017]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] powerpc/watchdog: Convert timers to use timer_setup()
On Mon, 16 Oct 2017 16:47:10 -0700
Kees Cook <keescook@chromium.org> wrote:

> In preparation for unconditionally passing the struct timer_list pointer to
> all timer callbacks, switch to using the new timer_setup() and from_timer()
> to pass the timer pointer explicitly.
>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Nicholas Piggin <npiggin@gmail.com>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Kees Cook <keescook@chromium.org>

Looks fine to me. Is this intended to be merged via the powerpc tree
in the next merge window?

Acked-by: Nicholas Piggin <npiggin@gmail.com>

> ---
> arch/powerpc/kernel/watchdog.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c
> index 15e209a37c2d..50797528b5e1 100644
> --- a/arch/powerpc/kernel/watchdog.c
> +++ b/arch/powerpc/kernel/watchdog.c
> @@ -263,9 +263,8 @@ static void wd_timer_reset(unsigned int cpu, struct timer_list *t)
> add_timer_on(t, cpu);
> }
>
> -static void wd_timer_fn(unsigned long data)
> +static void wd_timer_fn(struct timer_list *t)
> {
> - struct timer_list *t = this_cpu_ptr(&wd_timer);
> int cpu = smp_processor_id();
>
> watchdog_timer_interrupt(cpu);
> @@ -292,7 +291,7 @@ static void start_watchdog_timer_on(unsigned int cpu)
>
> per_cpu(wd_timer_tb, cpu) = get_tb();
>
> - setup_pinned_timer(t, wd_timer_fn, 0);
> + timer_setup(t, wd_timer_fn, TIMER_PINNED);
> wd_timer_reset(cpu, t);
> }
>

\
 
 \ /
  Last update: 2017-10-17 04:53    [W:0.062 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site