aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/memory.h')
-rw-r--r--include/linux/memory.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/memory.h b/include/linux/memory.h
index 85582e1bcee9..935699b30b7c 100644
--- a/include/linux/memory.h
+++ b/include/linux/memory.h
@@ -20,9 +20,14 @@
20#include <linux/compiler.h> 20#include <linux/compiler.h>
21#include <linux/mutex.h> 21#include <linux/mutex.h>
22 22
23#define MIN_MEMORY_BLOCK_SIZE (1 << SECTION_SIZE_BITS)
24
23struct memory_block { 25struct memory_block {
24 unsigned long phys_index; 26 unsigned long start_section_nr;
27 unsigned long end_section_nr;
25 unsigned long state; 28 unsigned long state;
29 int section_count;
30
26 /* 31 /*
27 * This serializes all state change requests. It isn't 32 * This serializes all state change requests. It isn't
28 * held during creation because the control files are 33 * held during creation because the control files are
@@ -113,6 +118,8 @@ extern int memory_dev_init(void);
113extern int remove_memory_block(unsigned long, struct mem_section *, int); 118extern int remove_memory_block(unsigned long, struct mem_section *, int);
114extern int memory_notify(unsigned long val, void *v); 119extern int memory_notify(unsigned long val, void *v);
115extern int memory_isolate_notify(unsigned long val, void *v); 120extern int memory_isolate_notify(unsigned long val, void *v);
121extern struct memory_block *find_memory_block_hinted(struct mem_section *,
122 struct memory_block *);
116extern struct memory_block *find_memory_block(struct mem_section *); 123extern struct memory_block *find_memory_block(struct mem_section *);
117#define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT) 124#define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT)
118enum mem_add_context { BOOT, HOTPLUG }; 125enum mem_add_context { BOOT, HOTPLUG };