* [RFC] peeling off zone from physical memory layout [8/10] power pc remove memory fix
@ 2006-02-03 7:51 KAMEZAWA Hiroyuki
0 siblings, 0 replies; only message in thread
From: KAMEZAWA Hiroyuki @ 2006-02-03 7:51 UTC (permalink / raw)
To: linux-mm
This is a patch against remove_memory().
I think this patch is not very good, but remove_memory() will fail
in current kernel anyway.
Signed-Off-By: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Index: hogehoge/arch/powerpc/mm/mem.c
===================================================================
--- hogehoge.orig/arch/powerpc/mm/mem.c
+++ hogehoge/arch/powerpc/mm/mem.c
@@ -32,6 +32,7 @@
#include <linux/highmem.h>
#include <linux/initrd.h>
#include <linux/pagemap.h>
+#include <linux/memorymap.h>
#include <asm/pgalloc.h>
#include <asm/prom.h>
@@ -163,7 +164,7 @@ int __devinit remove_memory(u64 start, u
* not handling removing memory ranges that
* overlap multiple zones yet
*/
- if (end_pfn > (zone->zone_start_pfn + zone->spanned_pages))
+ if (page_zone(pfn_to_page(start_pfn)) != page_zone(pfn_to_page(end_pfn - 1))
goto overlap;
/* make sure it is NOT in RMO */
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-02-03 7:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-03 7:51 [RFC] peeling off zone from physical memory layout [8/10] power pc remove memory fix KAMEZAWA Hiroyuki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox