[PATCH 1/2] Mark memory resources as busy

Nathan Fontenot nfont at linux.vnet.ibm.com
Sat Aug 10 01:30:28 EST 2013


Memory resources should be marked as busy.

If memory resources are not marked as busy they do not get released during
hotplug memory remove. This seems a bit counter intuitive but the core
kernel resource code checks for the IORESOURCE_BUSY flag before releasing
the resource.

Signed-off-by: Nathan Fontenot <nfont at linux.vnet.ibm.com>
---
 arch/powerpc/mm/mem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: powerpc/arch/powerpc/mm/mem.c
===================================================================
--- powerpc.orig/arch/powerpc/mm/mem.c
+++ powerpc/arch/powerpc/mm/mem.c
@@ -514,7 +514,7 @@ static int add_system_ram_resources(void
 			res->name = "System RAM";
 			res->start = base;
 			res->end = base + size - 1;
-			res->flags = IORESOURCE_MEM;
+			res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
 			WARN_ON(request_resource(&iomem_resource, res) < 0);
 		}
 	}



More information about the Linuxppc-dev mailing list