aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-22 17:18:13 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-22 17:18:13 -0500
commitdd508ae2dbff0cfc7401eb6e278339fc56bc5033 (patch)
treedaa9f88a4e2e65e86b351ffa2d52dcc07e753c1e /include
parent7801edb0b8b66e83c13623b483bc2e846c007c9d (diff)
parent95cd34b42b43c0ed5a89a764e023189bfe7b1530 (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 'include')
-rw-r--r--include/linux/memory.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/memory.h b/include/linux/memory.h
index 37fa19b34ef5..1adfe779eb99 100644
--- a/include/linux/memory.h
+++ b/include/linux/memory.h
@@ -50,6 +50,19 @@ struct memory_notify {
50 int status_change_nid; 50 int status_change_nid;
51}; 51};
52 52
53/*
54 * During pageblock isolation, count the number of pages within the
55 * range [start_pfn, start_pfn + nr_pages) which are owned by code
56 * in the notifier chain.
57 */
58#define MEM_ISOLATE_COUNT (1<<0)
59
60struct memory_isolate_notify {
61 unsigned long start_pfn; /* Start of range to check */
62 unsigned int nr_pages; /* # pages in range to check */
63 unsigned int pages_found; /* # pages owned found by callbacks */
64};
65
53struct notifier_block; 66struct notifier_block;
54struct mem_section; 67struct mem_section;
55 68
@@ -76,14 +89,28 @@ static inline int memory_notify(unsigned long val, void *v)
76{ 89{
77 return 0; 90 return 0;
78} 91}
92static inline int register_memory_isolate_notifier(struct notifier_block *nb)
93{
94 return 0;
95}
96static inline void unregister_memory_isolate_notifier(struct notifier_block *nb)
97{
98}
99static inline int memory_isolate_notify(unsigned long val, void *v)
100{
101 return 0;
102}
79#else 103#else
80extern int register_memory_notifier(struct notifier_block *nb); 104extern int register_memory_notifier(struct notifier_block *nb);
81extern void unregister_memory_notifier(struct notifier_block *nb); 105extern void unregister_memory_notifier(struct notifier_block *nb);
106extern int register_memory_isolate_notifier(struct notifier_block *nb);
107extern void unregister_memory_isolate_notifier(struct notifier_block *nb);
82extern int register_new_memory(int, struct mem_section *); 108extern int register_new_memory(int, struct mem_section *);
83extern int unregister_memory_section(struct mem_section *); 109extern int unregister_memory_section(struct mem_section *);
84extern int memory_dev_init(void); 110extern int memory_dev_init(void);
85extern int remove_memory_block(unsigned long, struct mem_section *, int); 111extern int remove_memory_block(unsigned long, struct mem_section *, int);
86extern int memory_notify(unsigned long val, void *v); 112extern int memory_notify(unsigned long val, void *v);
113extern int memory_isolate_notify(unsigned long val, void *v);
87extern struct memory_block *find_memory_block(struct mem_section *); 114extern struct memory_block *find_memory_block(struct mem_section *);
88#define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT) 115#define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT)
89enum mem_add_context { BOOT, HOTPLUG }; 116enum mem_add_context { BOOT, HOTPLUG };