Skip to contentSkip to conversation

sched/clock: add dummy clear_sched_clock_stable stub function

PATCH New Paul Gortmaker 2 participants 2 messages Jan 27, 2017 – Feb 1, 2017 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched/clock: add dummy clear_sched_clock_stable stub function

In commit acb04058de49458010c44bb35b849d45113fd668 ("sched/clock:
Fix hotplug crash") the parisc code gained a call to this function.

However the prototype for it is within HAVE_UNSTABLE_SCHED_CLOCK 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.

Fixes acb04058de49 ("sched/clock: Fix hotplug crash")
Cc Peter Zijlstra (Intel) <[email protected]>
Cc Ingo Molnar <[email protected]>
---
 include/linux/sched.h | 4 ++++
 1 file changed, 4 insertions(+)
include/linux/sched.h +4 -0
index 43c4840c0485..c8a257fde056 100644
@@ -2498,6 +2498,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)
 {
 }
Signature · 1 line
2.11.0
#1 lore raw

[tip:sched/core] sched/clock: Add dummy clear_sched_clock_stable() stub function

sched/clock: Add dummy clear_sched_clock_stable() stub function
Commit-ID:  733ce725aa4bfa9063be053bfe7f4597d76f0dd1
Gitweb:     http://git.kernel.org/tip/733ce725aa4bfa9063be053bfe7f4597d76f0dd1
Author:     Paul Gortmaker <[email protected]>
AuthorDate: Fri, 27 Jan 2017 12:38:16 -0500
Committer:  Ingo Molnar <[email protected]>
CommitDate: Wed, 1 Feb 2017 11:01:29 +0100

sched/clock: Add dummy clear_sched_clock_stable() stub function

In commit:

acb04058de494 ("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.

Cc Linus Torvalds <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Fixes acb04058de49 ("sched/clock: Fix hotplug crash")
---
 include/linux/sched.h | 4 ++++
 1 file changed, 4 insertions(+)
include/linux/sched.h +4 -0
index d176454..e2ed46d 100644
@@ -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)
 {
 }