Patchwork [1/2] Mark memory resources as busy

login
register
mail settings
Submitter Nathan Fontenot
Date Aug. 9, 2013, 3:30 p.m.
Message ID <52050B14.4030304@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/266094/
State Superseded
Headers show

Comments

Nathan Fontenot - Aug. 9, 2013, 3:30 p.m.
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@linux.vnet.ibm.com>
---
 arch/powerpc/mm/mem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

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);
 		}
 	}