summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/buffer.c1
-rw-r--r--include/linux/cpu.h18
-rw-r--r--include/linux/smp.h18
-rw-r--r--init/main.c1
-rw-r--r--kernel/cpu.c1
-rw-r--r--kernel/rcupdate.c1
-rw-r--r--kernel/sched.c1
-rw-r--r--kernel/softirq.c1
-rw-r--r--kernel/timer.c1
-rw-r--r--mm/page-writeback.c1
-rw-r--r--mm/page_alloc.c1
-rw-r--r--mm/slab.c1
12 files changed, 28 insertions, 18 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index c64523feade7..e2a89caf51fd 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -36,6 +36,7 @@
#include <linux/buffer_head.h>
#include <linux/bio.h>
#include <linux/notifier.h>
+#include <linux/cpu.h>
#include <asm/bitops.h>
static void invalidate_bh_lrus(void);
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index e9e7ebfd63d4..93853448aeb9 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -31,6 +31,24 @@ struct cpu {
extern int register_cpu(struct cpu *, int, struct node *);
extern struct class cpu_class;
+struct notifier_block;
+
+#ifdef CONFIG_SMP
+/* Need to know about CPUs going up/down? */
+extern int register_cpu_notifier(struct notifier_block *nb);
+extern void unregister_cpu_notifier(struct notifier_block *nb);
+
+int cpu_up(unsigned int cpu);
+#else
+static inline int register_cpu_notifier(struct notifier_block *nb)
+{
+ return 0;
+}
+static inline void unregister_cpu_notifier(struct notifier_block *nb)
+{
+}
+#endif /* CONFIG_SMP */
+
/* Stop CPUs going up and down. */
extern struct semaphore cpucontrol;
#endif /* _LINUX_CPU_H_ */
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 98f235eec967..ade73fe7969b 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -84,14 +84,6 @@ extern int smp_threads_ready;
#define MSG_RESCHEDULE 0x0003 /* Reschedule request from master CPU*/
#define MSG_CALL_FUNCTION 0x0004 /* Call function on all other CPUs */
-struct notifier_block;
-
-/* Need to know about CPUs going up/down? */
-extern int register_cpu_notifier(struct notifier_block *nb);
-extern void unregister_cpu_notifier(struct notifier_block *nb);
-
-int cpu_up(unsigned int cpu);
-
/*
* Mark the boot cpu "online" so that it can call console drivers in
* printk() and can access its per-cpu storage.
@@ -117,16 +109,6 @@ static inline void smp_send_reschedule(int cpu) { }
#define cpu_possible(cpu) ({ BUG_ON((cpu) != 0); 1; })
#define smp_prepare_boot_cpu() do {} while (0)
-struct notifier_block;
-
-/* Need to know about CPUs going up/down? */
-static inline int register_cpu_notifier(struct notifier_block *nb)
-{
- return 0;
-}
-static inline void unregister_cpu_notifier(struct notifier_block *nb)
-{
-}
#endif /* !SMP */
#define get_cpu() ({ preempt_disable(); smp_processor_id(); })
diff --git a/init/main.c b/init/main.c
index cfe37ad1054c..e80b5d321abe 100644
--- a/init/main.c
+++ b/init/main.c
@@ -37,6 +37,7 @@
#include <linux/rcupdate.h>
#include <linux/moduleparam.h>
#include <linux/writeback.h>
+#include <linux/cpu.h>
#include <asm/io.h>
#include <asm/bugs.h>
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 4c0ada2b99ae..939fc284029d 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -8,6 +8,7 @@
#include <linux/notifier.h>
#include <linux/sched.h>
#include <linux/unistd.h>
+#include <linux/cpu.h>
#include <asm/semaphore.h>
/* This protects CPUs going up and down... */
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
index 4fcb2de8a7f6..49c3ab0a2a76 100644
--- a/kernel/rcupdate.c
+++ b/kernel/rcupdate.c
@@ -43,6 +43,7 @@
#include <linux/percpu.h>
#include <linux/notifier.h>
#include <linux/rcupdate.h>
+#include <linux/cpu.h>
/* Definition for rcupdate control block. */
struct rcu_ctrlblk rcu_ctrlblk =
diff --git a/kernel/sched.c b/kernel/sched.c
index 71a3677d7a8c..dca8492046d0 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -32,6 +32,7 @@
#include <linux/delay.h>
#include <linux/timer.h>
#include <linux/rcupdate.h>
+#include <linux/cpu.h>
#ifdef CONFIG_NUMA
#define cpu_to_node_mask(cpu) node_to_cpumask(cpu_to_node(cpu))
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 60f914897e46..69f571c8aa4a 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -14,6 +14,7 @@
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/notifier.h>
+#include <linux/cpu.h>
/*
- No shared variables, all the data are CPU local.
diff --git a/kernel/timer.c b/kernel/timer.c
index 0a10b3c44415..06f87498c7c7 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -29,6 +29,7 @@
#include <linux/thread_info.h>
#include <linux/time.h>
#include <linux/jiffies.h>
+#include <linux/cpu.h>
#include <asm/uaccess.h>
#include <asm/div64.h>
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 15528e1c9c68..27ddc1244ce9 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -27,6 +27,7 @@
#include <linux/notifier.h>
#include <linux/smp.h>
#include <linux/sysctl.h>
+#include <linux/cpu.h>
/*
* The maximum number of pages to writeout in a single bdflush/kupdate
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 4c0815f1a541..6f59feb32568 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -30,6 +30,7 @@
#include <linux/notifier.h>
#include <linux/topology.h>
#include <linux/sysctl.h>
+#include <linux/cpu.h>
DECLARE_BITMAP(node_online_map, MAX_NUMNODES);
DECLARE_BITMAP(memblk_online_map, MAX_NR_MEMBLKS);
diff --git a/mm/slab.c b/mm/slab.c
index c8178a0cccc4..aafffa664e67 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -88,6 +88,7 @@
#include <linux/seq_file.h>
#include <linux/notifier.h>
#include <linux/kallsyms.h>
+#include <linux/cpu.h>
#include <asm/uaccess.h>
/*