Message ID | 51F01EB2.9060802@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | f748edafac858404be6c8dd67160c2032d97ddf5 |
Headers | show |
On Wed, Jul 24, 2013 at 01:36:34PM -0500, Nathan Fontenot wrote: > Memory I/O resources need to be marked as busy or else we cannot remove > them when doing memory hot remove. I would have thought it was the opposite? cheers
On 08/01/2013 09:28 PM, Michael Ellerman wrote: > On Wed, Jul 24, 2013 at 01:36:34PM -0500, Nathan Fontenot wrote: >> Memory I/O resources need to be marked as busy or else we cannot remove >> them when doing memory hot remove. > > I would have thought it was the opposite? Me too. As it turns out the code in kernel/resource.c checks to make sure the IORESOURCE_BUSY flag is set when trying to release a resource. -Nathan
On Fri, Aug 02, 2013 at 02:05:57PM -0500, Nathan Fontenot wrote: > On 08/01/2013 09:28 PM, Michael Ellerman wrote: > > On Wed, Jul 24, 2013 at 01:36:34PM -0500, Nathan Fontenot wrote: > >> Memory I/O resources need to be marked as busy or else we cannot remove > >> them when doing memory hot remove. > > > > I would have thought it was the opposite? > > Me too. > > As it turns out the code in kernel/resource.c checks to make sure the > IORESOURCE_BUSY flag is set when trying to release a resource. OK, I guess there's probably some sane reason, but it does seem backward. cheers
Index: linux/arch/powerpc/mm/mem.c =================================================================== --- linux.orig/arch/powerpc/mm/mem.c +++ linux/arch/powerpc/mm/mem.c @@ -523,7 +523,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); } }
Memory I/O resources need to be marked as busy or else we cannot remove them when doing memory hot remove. Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com> --- arch/powerpc/mm/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)