Skip to content

Commit

Permalink
sched/clock: Add dummy clear_sched_clock_stable() stub function
Browse files Browse the repository at this point in the history
In commit:

  acb0405 ("sched/clock: Fix hotplug crash")

the PARISC code gained a call to this function.

However the prototype for it is within a CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
 #ifdef/#endif.  That, combined with this:

  arch/parisc/Kconfig:    select HAVE_UNSTABLE_SCHED_CLOCK if SMP

means that PARISC can have it either enabled or disabled, resulting
in the following build fail:

  arch/parisc/kernel/setup.c:180:2: error: implicit declaration of
  function 'clear_sched_clock_stable' [-Werror=implicit-function-declaration]

Add a no-op stub for the non-SMP case to prevent this.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: acb0405 ("sched/clock: Fix hotplug crash")
Link: http://lkml.kernel.org/r/20170127173816.22733-1-paul.gortmaker@windriver.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Paul Gortmaker authored and Ingo Molnar committed Feb 1, 2017
1 parent b672592 commit 733ce72
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -2511,6 +2511,10 @@ static inline void sched_clock_tick(void)
{
}

static inline void clear_sched_clock_stable(void)
{
}

static inline void sched_clock_idle_sleep_event(void)
{
}
Expand Down

0 comments on commit 733ce72

Please sign in to comment.