Skip to contentSkip to conversation

+ mm-free-memblockmemory-in-free_all_bootmem-fix.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Jan 8, 2014

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: + mm-free-memblockmemory-in-free_all_bootmem-fix.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Wed, 08 Jan 2014 14:07:00 -0800

The patch titled
Subject: mm-free-memblockmemory-in-free_all_bootmem-fix
has been added to the -mm tree. Its filename is
mm-free-memblockmemory-in-free_all_bootmem-fix.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-free-memblockmemory-in-free_all_bootmem-fix.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-free-memblockmemory-in-free_all_bootmem-fix.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Philipp Hachtmann <[email protected]>
Subject: mm-free-memblockmemory-in-free_all_bootmem-fix

Am Wed, 8 Jan 2014 12:08:04 +0800
schrieb Jianguo Wu <[email protected]>:

Quoted 3 lines

For some archs, like arm64, would use memblock.memory after system booting, so we can not simply released to the buddy allocator, maybe need !defined(CONFIG_ARCH_DISCARD_MEMBLOCK).

Cc Tejun Heo <[email protected]>
Cc Joonsoo Kim <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Tang Chen <[email protected]>
Cc Toshi Kani <[email protected]>
Cc Jianguo Wu <[email protected]>

---

 mm/memblock.c  |    4 ++++
 mm/nobootmem.c |    3 +++
 2 files changed, 7 insertions(+)
mm/memblock.c renamed from mm/memblock.c~mm-free-memblockmemory-in-free_all_bootmem-fix +4 -0
diff -puN mm/memblock.c~mm-free-memblockmemory-in-free_all_bootmem-fix mm/memblock.c
@@ -291,6 +291,8 @@ phys_addr_t __init_memblock get_allocate
 			  memblock.reserved.max);
 }
 
+#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK
+
 phys_addr_t __init_memblock get_allocated_memblock_memory_regions_info(
 					phys_addr_t *addr)
 {
@@ -303,6 +305,8 @@ phys_addr_t __init_memblock get_allocate
 			  memblock.memory.max);
 }
 
+#endif
+
 /**
  * memblock_double_array - double the size of the memblock regions array
  * @type: memblock type of the regions array being doubled
mm/nobootmem.c renamed from mm/nobootmem.c~mm-free-memblockmemory-in-free_all_bootmem-fix +3 -0
diff -puN mm/nobootmem.c~mm-free-memblockmemory-in-free_all_bootmem-fix mm/nobootmem.c
@@ -127,10 +127,13 @@ static unsigned long __init free_low_mem
 	if (size)
 		count += __free_memory_core(start, start + size);
 
+#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK
+
 	/* Free memblock.memory array if it was allocated */
 	size = get_allocated_memblock_memory_regions_info(&start);
 	if (size)
 		count += __free_memory_core(start, start + size);
+#endif
 
 	return count;
 }

_

Patches currently in -mm which might be from [email protected] are

mm-nobootmemc-add-return-value-check-in-__alloc_memory_core_early.patch mm-free-memblockmemory-in-free_all_bootmem.patch mm-free-memblockmemory-in-free_all_bootmem-fix.patch