diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-22 17:18:13 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-22 17:18:13 -0500 |
| commit | dd508ae2dbff0cfc7401eb6e278339fc56bc5033 (patch) | |
| tree | daa9f88a4e2e65e86b351ffa2d52dcc07e753c1e /drivers | |
| parent | 7801edb0b8b66e83c13623b483bc2e846c007c9d (diff) | |
| parent | 95cd34b42b43c0ed5a89a764e023189bfe7b1530 (diff) | |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (36 commits)
powerpc/gc/wii: Remove get_irq_desc()
powerpc/gc/wii: hlwd-pic: convert irq_desc.lock to raw_spinlock
powerpc/gamecube/wii: Fix off-by-one error in ugecon/usbgecko_udbg
powerpc/mpic: Fix problem that affinity is not updated
powerpc/mm: Fix stupid bug in subpge protection handling
powerpc/iseries: use DECLARE_COMPLETION_ONSTACK for non-constant completion
powerpc: Fix MSI support on U4 bridge PCIe slot
powerpc: Handle VSX alignment faults correctly in little-endian mode
powerpc/mm: Fix typo of cpumask_clear_cpu()
powerpc/mm: Fix hash_utils_64.c compile errors with DEBUG enabled.
powerpc: Convert BUG() to use unreachable()
powerpc/pseries: Make declarations of cpu_hotplug_driver_lock() ANSI compatible.
powerpc/pseries: Don't panic when H_PROD fails during cpu-online.
powerpc/mm: Fix a WARN_ON() with CONFIG_DEBUG_PAGEALLOC and CONFIG_DEBUG_VM
powerpc/defconfigs: Set HZ=100 on pseries and ppc64 defconfigs
powerpc/defconfigs: Disable token ring in powerpc defconfigs
powerpc/defconfigs: Reduce 64bit vmlinux by making acenic and cramfs modules
powerpc/pseries: Select XICS and PCI_MSI PSERIES
powerpc/85xx: Wrong variable returned on error
powerpc/iseries: Convert to proc_fops
...
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/base/memory.c | 19 |
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) | |||
| 63 | } | 63 | } |
| 64 | EXPORT_SYMBOL(unregister_memory_notifier); | 64 | EXPORT_SYMBOL(unregister_memory_notifier); |
| 65 | 65 | ||
| 66 | static ATOMIC_NOTIFIER_HEAD(memory_isolate_chain); | ||
| 67 | |||
| 68 | int register_memory_isolate_notifier(struct notifier_block *nb) | ||
| 69 | { | ||
| 70 | return atomic_notifier_chain_register(&memory_isolate_chain, nb); | ||
| 71 | } | ||
| 72 | EXPORT_SYMBOL(register_memory_isolate_notifier); | ||
| 73 | |||
| 74 | void unregister_memory_isolate_notifier(struct notifier_block *nb) | ||
| 75 | { | ||
| 76 | atomic_notifier_chain_unregister(&memory_isolate_chain, nb); | ||
| 77 | } | ||
| 78 | EXPORT_SYMBOL(unregister_memory_isolate_notifier); | ||
| 79 | |||
| 66 | /* | 80 | /* |
| 67 | * register_memory - Setup a sysfs device for a memory block | 81 | * register_memory - Setup a sysfs device for a memory block |
| 68 | */ | 82 | */ |
| @@ -157,6 +171,11 @@ int memory_notify(unsigned long val, void *v) | |||
| 157 | return blocking_notifier_call_chain(&memory_chain, val, v); | 171 | return blocking_notifier_call_chain(&memory_chain, val, v); |
| 158 | } | 172 | } |
| 159 | 173 | ||
| 174 | int memory_isolate_notify(unsigned long val, void *v) | ||
| 175 | { | ||
| 176 | return atomic_notifier_call_chain(&memory_isolate_chain, val, v); | ||
| 177 | } | ||
| 178 | |||
| 160 | /* | 179 | /* |
| 161 | * MEMORY_HOTPLUG depends on SPARSEMEM in mm/Kconfig, so it is | 180 | * MEMORY_HOTPLUG depends on SPARSEMEM in mm/Kconfig, so it is |
| 162 | * OK to have direct references to sparsemem variables in here. | 181 | * OK to have direct references to sparsemem variables in here. |
