aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/cpu.h33
-rw-r--r--include/linux/notifier.h34
-rw-r--r--net/rds/page.c1
3 files changed, 36 insertions, 32 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 5f09323ee88..b1a635acf72 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -70,6 +70,39 @@ enum {
70 CPU_PRI_WORKQUEUE = 5, 70 CPU_PRI_WORKQUEUE = 5,
71}; 71};
72 72
73#define CPU_ONLINE 0x0002 /* CPU (unsigned)v is up */
74#define CPU_UP_PREPARE 0x0003 /* CPU (unsigned)v coming up */
75#define CPU_UP_CANCELED 0x0004 /* CPU (unsigned)v NOT coming up */
76#define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v going down */
77#define CPU_DOWN_FAILED 0x0006 /* CPU (unsigned)v NOT going down */
78#define CPU_DEAD 0x0007 /* CPU (unsigned)v dead */
79#define CPU_DYING 0x0008 /* CPU (unsigned)v not running any task,
80 * not handling interrupts, soon dead.
81 * Called on the dying cpu, interrupts
82 * are already disabled. Must not
83 * sleep, must not fail */
84#define CPU_POST_DEAD 0x0009 /* CPU (unsigned)v dead, cpu_hotplug
85 * lock is dropped */
86#define CPU_STARTING 0x000A /* CPU (unsigned)v soon running.
87 * Called on the new cpu, just before
88 * enabling interrupts. Must not sleep,
89 * must not fail */
90
91/* Used for CPU hotplug events occurring while tasks are frozen due to a suspend
92 * operation in progress
93 */
94#define CPU_TASKS_FROZEN 0x0010
95
96#define CPU_ONLINE_FROZEN (CPU_ONLINE | CPU_TASKS_FROZEN)
97#define CPU_UP_PREPARE_FROZEN (CPU_UP_PREPARE | CPU_TASKS_FROZEN)
98#define CPU_UP_CANCELED_FROZEN (CPU_UP_CANCELED | CPU_TASKS_FROZEN)
99#define CPU_DOWN_PREPARE_FROZEN (CPU_DOWN_PREPARE | CPU_TASKS_FROZEN)
100#define CPU_DOWN_FAILED_FROZEN (CPU_DOWN_FAILED | CPU_TASKS_FROZEN)
101#define CPU_DEAD_FROZEN (CPU_DEAD | CPU_TASKS_FROZEN)
102#define CPU_DYING_FROZEN (CPU_DYING | CPU_TASKS_FROZEN)
103#define CPU_STARTING_FROZEN (CPU_STARTING | CPU_TASKS_FROZEN)
104
105
73#ifdef CONFIG_SMP 106#ifdef CONFIG_SMP
74/* Need to know about CPUs going up/down? */ 107/* Need to know about CPUs going up/down? */
75#if defined(CONFIG_HOTPLUG_CPU) || !defined(MODULE) 108#if defined(CONFIG_HOTPLUG_CPU) || !defined(MODULE)
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index c0688b0168b..9eb25fc0145 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -185,6 +185,8 @@ static inline int notifier_to_errno(int ret)
185 * VC switch chains (for loadable kernel svgalib VC switch helpers) etc... 185 * VC switch chains (for loadable kernel svgalib VC switch helpers) etc...
186 */ 186 */
187 187
188/* CPU notfiers are defined in include/linux/cpu.h. */
189
188/* netdevice notifier chain. Please remember to update the rtnetlink 190/* netdevice notifier chain. Please remember to update the rtnetlink
189 * notification exclusion list in rtnetlink_event() when adding new 191 * notification exclusion list in rtnetlink_event() when adding new
190 * types. 192 * types.
@@ -220,38 +222,6 @@ static inline int notifier_to_errno(int ret)
220 222
221#define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */ 223#define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */
222 224
223#define CPU_ONLINE 0x0002 /* CPU (unsigned)v is up */
224#define CPU_UP_PREPARE 0x0003 /* CPU (unsigned)v coming up */
225#define CPU_UP_CANCELED 0x0004 /* CPU (unsigned)v NOT coming up */
226#define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v going down */
227#define CPU_DOWN_FAILED 0x0006 /* CPU (unsigned)v NOT going down */
228#define CPU_DEAD 0x0007 /* CPU (unsigned)v dead */
229#define CPU_DYING 0x0008 /* CPU (unsigned)v not running any task,
230 * not handling interrupts, soon dead.
231 * Called on the dying cpu, interrupts
232 * are already disabled. Must not
233 * sleep, must not fail */
234#define CPU_POST_DEAD 0x0009 /* CPU (unsigned)v dead, cpu_hotplug
235 * lock is dropped */
236#define CPU_STARTING 0x000A /* CPU (unsigned)v soon running.
237 * Called on the new cpu, just before
238 * enabling interrupts. Must not sleep,
239 * must not fail */
240
241/* Used for CPU hotplug events occurring while tasks are frozen due to a suspend
242 * operation in progress
243 */
244#define CPU_TASKS_FROZEN 0x0010
245
246#define CPU_ONLINE_FROZEN (CPU_ONLINE | CPU_TASKS_FROZEN)
247#define CPU_UP_PREPARE_FROZEN (CPU_UP_PREPARE | CPU_TASKS_FROZEN)
248#define CPU_UP_CANCELED_FROZEN (CPU_UP_CANCELED | CPU_TASKS_FROZEN)
249#define CPU_DOWN_PREPARE_FROZEN (CPU_DOWN_PREPARE | CPU_TASKS_FROZEN)
250#define CPU_DOWN_FAILED_FROZEN (CPU_DOWN_FAILED | CPU_TASKS_FROZEN)
251#define CPU_DEAD_FROZEN (CPU_DEAD | CPU_TASKS_FROZEN)
252#define CPU_DYING_FROZEN (CPU_DYING | CPU_TASKS_FROZEN)
253#define CPU_STARTING_FROZEN (CPU_STARTING | CPU_TASKS_FROZEN)
254
255/* Hibernation and suspend events */ 225/* Hibernation and suspend events */
256#define PM_HIBERNATION_PREPARE 0x0001 /* Going to hibernate */ 226#define PM_HIBERNATION_PREPARE 0x0001 /* Going to hibernate */
257#define PM_POST_HIBERNATION 0x0002 /* Hibernation finished */ 227#define PM_POST_HIBERNATION 0x0002 /* Hibernation finished */
diff --git a/net/rds/page.c b/net/rds/page.c
index d8acdebe3c7..b82d63e77b0 100644
--- a/net/rds/page.c
+++ b/net/rds/page.c
@@ -32,6 +32,7 @@
32 */ 32 */
33#include <linux/highmem.h> 33#include <linux/highmem.h>
34#include <linux/gfp.h> 34#include <linux/gfp.h>
35#include <linux/cpu.h>
35 36
36#include "rds.h" 37#include "rds.h"
37 38