Skip to contentSkip to conversation

mm-memblock-debug-correct-displaying-of-upper-memory-boundary.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jan 22, 2014

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: [merged] mm-memblock-debug-correct-displaying-of-upper-memory-boundary.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Wed, 22 Jan 2014 12:12:58 -0800

The patch titled
Subject: mm/memblock: debug: correct displaying of upper memory boundary
has been removed from the -mm tree. Its filename was
mm-memblock-debug-correct-displaying-of-upper-memory-boundary.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Grygorii Strashko <[email protected]>
Subject: mm/memblock: debug: correct displaying of upper memory boundary

Current memblock APIs don't work on 32 PAE or LPAE extension arches where the physical memory start address beyond 4GB. The problem was discussed here [3] where Tejun, Yinghai(thanks) proposed a way forward with memblock interfaces. Based on the proposal, this series adds necessary memblock interfaces and convert the core kernel code to use them. Architectures already converted to NO_BOOTMEM use these new interfaces and other which still uses bootmem, these new interfaces just fallback to exiting bootmem APIs.

So no functional change in behavior. In long run, once all the architectures moves to NO_BOOTMEM, we can get rid of bootmem layer completely. This is one step to remove the core code dependency with bootmem and also gives path for architectures to move away from bootmem.

Testing is done on ARM architecture with 32 bit ARM LAPE machines with normal as well sparse(faked) memory model.

This patch (of 23):

When debugging is enabled (cmdline has "memblock=debug") the memblock will display upper memory boundary per each allocated/freed memory range wrongly. For example:

memblock_reserve: [0x0000009e7e8000-0x0000009e7ed000] _memblock_early_alloc_try_nid_nopanic+0xfc/0x12c

The 0x0000009e7ed000 is displayed instead of 0x0000009e7ecfff

Hence, correct this by changing formula used to calculate upper memory boundary to (u64)base + size - 1 instead of (u64)base + size everywhere in the debug messages.

Cc Yinghai Lu <[email protected]>
Cc H. Peter Anvin <[email protected]>
Cc Russell King <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Christoph Lameter <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc KAMEZAWA Hiroyuki <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Tony Lindgren <[email protected]>

---

 mm/memblock.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/memblock.c renamed from mm/memblock.c~mm-memblock-debug-correct-displaying-of-upper-memory-boundary +2 -2
diff -puN mm/memblock.c~mm-memblock-debug-correct-displaying-of-upper-memory-boundary mm/memblock.c
@@ -643,7 +643,7 @@ int __init_memblock memblock_free(phys_a
 {
 	memblock_dbg("   memblock_free: [%#016llx-%#016llx] %pF\n",
 		     (unsigned long long)base,
-		     (unsigned long long)base + size,
+		     (unsigned long long)base + size - 1,
 		     (void *)_RET_IP_);
 
 	return __memblock_remove(&memblock.reserved, base, size);
@@ -655,7 +655,7 @@ int __init_memblock memblock_reserve(phy
 
 	memblock_dbg("memblock_reserve: [%#016llx-%#016llx] %pF\n",
 		     (unsigned long long)base,
-		     (unsigned long long)base + size,
+		     (unsigned long long)base + size - 1,
 		     (void *)_RET_IP_);
 
 	return memblock_add_region(_rgn, base, size, MAX_NUMNODES);

_

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

origin.patch
mm-nobootmem-free_all_bootmem-again.patch
rtc-rtc-twl-use-devm_-functions.patch
rtc-rtc-vr41xx-use-devm_-functions.patch
linux-next.patch