]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
powerpc/watchdog: Convert timers to use timer_setup()
authorKees Cook <keescook@chromium.org>
Thu, 12 Oct 2017 22:47:30 +0000 (15:47 -0700)
committerKees Cook <keescook@chromium.org>
Thu, 2 Nov 2017 22:50:31 +0000 (15:50 -0700)
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>
arch/powerpc/kernel/watchdog.c

index 2f6eadd9408d9490b171ca20f937c1af79096acd..224a16438baa81a028fa7c2c5ec5e79fca3fdd0f 100644 (file)
@@ -261,9 +261,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);
@@ -287,7 +286,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);
 }