summaryrefslogtreecommitdiff
path: root/drivers/base/memory.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-12-24 15:16:41 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-12-24 15:16:41 +0900
commit17eb9d62828c3688f41f31ac00d7fee6da9675bf (patch)
tree03da91192242b6467d4f2d9d0b26f11f4da55c0c /drivers/base/memory.c
parent76e7461a21dfe13565b2a323b53c8cc963541126 (diff)
parentf34548cb735b7a80bbbb0bdd09ad4c2173ba92d5 (diff)
Merge branches 'sh/g3-prep' and 'sh/stable-updates'
Diffstat (limited to 'drivers/base/memory.c')
-rw-r--r--drivers/base/memory.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index c4c8f2e1dd15..d7d77d4a402c 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -63,6 +63,20 @@ void unregister_memory_notifier(struct notifier_block *nb)
}
EXPORT_SYMBOL(unregister_memory_notifier);
+static ATOMIC_NOTIFIER_HEAD(memory_isolate_chain);
+
+int register_memory_isolate_notifier(struct notifier_block *nb)
+{
+ return atomic_notifier_chain_register(&memory_isolate_chain, nb);
+}
+EXPORT_SYMBOL(register_memory_isolate_notifier);
+
+void unregister_memory_isolate_notifier(struct notifier_block *nb)
+{
+ atomic_notifier_chain_unregister(&memory_isolate_chain, nb);
+}
+EXPORT_SYMBOL(unregister_memory_isolate_notifier);
+
/*
* register_memory - Setup a sysfs device for a memory block
*/
@@ -157,6 +171,11 @@ int memory_notify(unsigned long val, void *v)
return blocking_notifier_call_chain(&memory_chain, val, v);
}
+int memory_isolate_notify(unsigned long val, void *v)
+{
+ return atomic_notifier_call_chain(&memory_isolate_chain, val, v);
+}
+
/*
* MEMORY_HOTPLUG depends on SPARSEMEM in mm/Kconfig, so it is
* OK to have direct references to sparsemem variables in here.