[PATCH] catch valid mem range at onlining memory
This patch allows hot-add memory which is not aligned to section.
Now, hot-added memory has to be aligned to section size. Considering big
section sized archs, this is not useful.
When hot-added memory is registerd as iomem resoruce by iomem resource
patch, we can make use of that information to detect valid memory range.
Note: With this, not-aligned memory can be registerd. To allow hot-add
memory with holes, we have to do more work around add_memory().
(It doesn't allows add memory to already existing mem section.)
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
0a54703904
commit
2842f11419
@@ -105,6 +105,9 @@ extern int allocate_resource(struct resource *root, struct resource *new,
|
||||
int adjust_resource(struct resource *res, unsigned long start,
|
||||
unsigned long size);
|
||||
|
||||
/* get registered SYSTEM_RAM resources in specified area */
|
||||
extern int find_next_system_ram(struct resource *res);
|
||||
|
||||
/* Convenience shorthand with allocation */
|
||||
#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name))
|
||||
#define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name))
|
||||
|
||||
Reference in New Issue
Block a user