Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1576879
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 15/53] sched/headers: Move softlockup detector watchdog methods to <linux/nmi.h> |
| Date | 2017-02-08 20:00 +0100 |
| Message-ID | <t8FDd-3VT-57@gated-at.bofh.it> (permalink) |
| References | <t8Ftw-3Sf-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
These methods don't belong into <linux/sched.h>, they are neither directly
related to task_struct or are scheduler functionality.
Put them next to the other watchdog methods in <linux/nmi.h>.
( Arguably that header's name is a misnomer, and this patch makes it
more so - but it should be renamed in another patch. )
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>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
include/linux/nmi.h | 37 +++++++++++++++++++++++++++++++++++++
include/linux/sched.h | 37 -------------------------------------
2 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index 0a3fadc32693..aa3cd0878270 100644
--- a/include/linux/nmi.h
+++ b/include/linux/nmi.h
@@ -7,6 +7,43 @@
#include <linux/sched.h>
#include <asm/irq.h>
+#ifdef CONFIG_LOCKUP_DETECTOR
+extern void touch_softlockup_watchdog_sched(void);
+extern void touch_softlockup_watchdog(void);
+extern void touch_softlockup_watchdog_sync(void);
+extern void touch_all_softlockup_watchdogs(void);
+extern int proc_dowatchdog_thresh(struct ctl_table *table, int write,
+ void __user *buffer,
+ size_t *lenp, loff_t *ppos);
+extern unsigned int softlockup_panic;
+extern unsigned int hardlockup_panic;
+void lockup_detector_init(void);
+#else
+static inline void touch_softlockup_watchdog_sched(void)
+{
+}
+static inline void touch_softlockup_watchdog(void)
+{
+}
+static inline void touch_softlockup_watchdog_sync(void)
+{
+}
+static inline void touch_all_softlockup_watchdogs(void)
+{
+}
+static inline void lockup_detector_init(void)
+{
+}
+#endif
+
+#ifdef CONFIG_DETECT_HUNG_TASK
+void reset_hung_task_detector(void);
+#else
+static inline void reset_hung_task_detector(void)
+{
+}
+#endif
+
/*
* The run state of the lockup detectors is controlled by the content of the
* 'watchdog_enabled' variable. Each lockup detector has its dedicated bit -
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 966c53903eff..0278deb1a992 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -286,43 +286,6 @@ extern int sched_cpu_dying(unsigned int cpu);
extern void sched_show_task(struct task_struct *p);
-#ifdef CONFIG_LOCKUP_DETECTOR
-extern void touch_softlockup_watchdog_sched(void);
-extern void touch_softlockup_watchdog(void);
-extern void touch_softlockup_watchdog_sync(void);
-extern void touch_all_softlockup_watchdogs(void);
-extern int proc_dowatchdog_thresh(struct ctl_table *table, int write,
- void __user *buffer,
- size_t *lenp, loff_t *ppos);
-extern unsigned int softlockup_panic;
-extern unsigned int hardlockup_panic;
-void lockup_detector_init(void);
-#else
-static inline void touch_softlockup_watchdog_sched(void)
-{
-}
-static inline void touch_softlockup_watchdog(void)
-{
-}
-static inline void touch_softlockup_watchdog_sync(void)
-{
-}
-static inline void touch_all_softlockup_watchdogs(void)
-{
-}
-static inline void lockup_detector_init(void)
-{
-}
-#endif
-
-#ifdef CONFIG_DETECT_HUNG_TASK
-void reset_hung_task_detector(void);
-#else
-static inline void reset_hung_task_detector(void)
-{
-}
-#endif
-
/* Attach to any functions which should be ignored in wchan output. */
#define __sched __attribute__((__section__(".sched.text")))
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/53] sched.h modernization -v2, phase #3: "Move definitions between headers" Ingo Molnar <mingo@kernel.org> - 2017-02-08 19:50 +0100 [PATCH 04/53] sched/headers: Move idle polling methods to <linux/sched/idle.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 19:50 +0100 [PATCH 16/53] sched/headers: Move 'struct pacct_struct' and 'struct cpu_itimer' form <linux/sched.h> to <linux/sched/signal.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 19:50 +0100 [PATCH 05/53] sched/headers: Move the wake-queue types and interfaces from sched.h into <linux/sched/wake_q.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 19:50 +0100 [PATCH 26/53] sched/headers: Move the memalloc_noio_*() APIs to <linux/sched/mm.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 19:50 +0100 [PATCH 28/53] sched/headers: Move the NOHZ APIs from <linux/sched.h> to <linux/sched/nohz.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 19:50 +0100 [PATCH 34/53] sched/headers, RCU: Move rcu_copy_process() from <linux/sched/task.h> to kernel/fork.c Ingo Molnar <mingo@kernel.org> - 2017-02-08 19:50 +0100 [PATCH 30/53] sched/headers, time/timekeeping: Move the xtime_update() prototype from <linux/sched.h> to <linux/time.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 19:50 +0100 [PATCH 17/53] sched/headers: Move the cpufreq interfaces to <linux/sched/cpufreq.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100 [PATCH 11/53] sched/headers: Move task->mm handling methods to <linux/sched/mm.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100 [PATCH 48/53] sched/headers: Move exit_files() and exit_itimers() from <linux/sched.h> to <linux/sched/task.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100 [PATCH 08/53] sched/headers: Move various ABI definitions to <uapi/linux/sched/types.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100 [PATCH 19/53] sched/headers: Move the 'init_mm' declaration from <linux/sched.h> to <linux/mm_types.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100 [PATCH 25/53] sched/headers: Move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100 [PATCH 02/53] sched/headers: Move the 'cpu_idle_type' enum from <linux/sched.h> to <linux/sched/idle.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100 [PATCH 50/53] sched/headers, timekeeping: Move the timer tick function prototypes to <linux/timekeeping.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100 [PATCH 21/53] sched/headers: Move the NUMA balancing interfaces from <linux/sched.h> to <linux/sched/numa_balancing.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100 [PATCH 31/53] sched/headers: Move <asm/current.h> include from the middle of <linux/sched.h> to the header portion Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100 [PATCH 15/53] sched/headers: Move softlockup detector watchdog methods to <linux/nmi.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100 [PATCH 29/53] sched/headers: Move debugging functions from <linux/sched.h> to <linux/sched/debug.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100 [PATCH 27/53] sched/headers: Move task statistics APIs from <linux/sched.h> to <linux/sched/stat.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100 [PATCH 23/53] sched/headers: Remove various unrelated headers from <linux/sched.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100 [PATCH 13/53] sched/headers: Move task_struct::signal and task_struct::sighand types and accessors into <linux/sched/signal.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100 [PATCH 18/53] sched/headers: Move more mm_struct related functionality from <linux/sched.h> to <linux/sched/mm.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100 [PATCH 01/53] sched/headers: Move scheduler topology interfaces to <linux/sched/topology.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100 [PATCH 42/53] sched/headers: Move 'init_task' and 'init_thread_union' from <linux/sched.h> to <linux/sched/task.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:20 +0100 [PATCH 49/53] sched/headers: Move _init() prototypes from <linux/sched.h> to <linux/sched/init.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:20 +0100 [PATCH 41/53] sched/headers: Remove the <linux/mm_types.h> dependency from <linux/sched.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:20 +0100 [PATCH 44/53] sched/headers: Move cputime functionality from <linux/sched.h> and <linux/cputime.h> into <linux/sched/cputime.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:20 +0100 [PATCH 40/53] mm/headers, sched/headers: Move task related MM types from <linux/mm_types.> to <linux/mm_types_task.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:20 +0100 [PATCH 43/53] sched/headers: Move the task_lock()/unlock() APIs to <linux/sched/task.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:20 +0100 [PATCH 46/53] sched/headers, vfs/execve: Move the do_execve*() prototypes from <linux/sched.h> to <linux/binfmts.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:50 +0100 [PATCH 53/53] sched/headers: Move the sched_exec() prototype to <linux/sched/task.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:50 +0100 [PATCH 45/53] sched/headers: Move sched_info_on() and force_schedstat_enabled() from <linux/sched.h> to <linux/sched/stat.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 21:40 +0100 [PATCH 51/53] sched/headers, mm: Move 'struct tlbflush_unmap_batch' from <linux/sched.h> to <linux/mm_types_task.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 21:40 +0100 [PATCH 37/53] sched/headers: Move task-stack related APIs from <linux/sched.h> to <linux/sched/task_stack.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 21:50 +0100 [PATCH 47/53] sched/headers: Move kstack_end() from <linux/sched.h> to <linux/sched/task_stack.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 22:40 +0100 [PATCH 52/53] sched/headers: Move the get_task_struct()/put_task_struct() and related APIs from <linux/sched.h> to <linux/sched/task.h> Ingo Molnar <mingo@kernel.org> - 2017-02-09 00:10 +0100
csiph-web