linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 1/3] mm: memblock enhence the memblock debugfs output
@ 2016-06-29  0:57 Dennis Chen
  2016-06-29  0:57 ` [PATCH v5 2/3] mm: memblock Add some new functions to address the mem limit issue Dennis Chen
  2016-06-29  0:57 ` [PATCH v5 3/3] arm64:acpi Fix the acpi alignment exeception when 'mem=' specified Dennis Chen
  0 siblings, 2 replies; 3+ messages in thread
From: Dennis Chen @ 2016-06-29  0:57 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: nd, Dennis Chen, Catalin Marinas, Steve Capper, Ard Biesheuvel,
	Will Deacon, Mark Rutland, Rafael J . Wysocki, Matt Fleming,
	linux-mm, linux-acpi, linux-efi

Current memblock debugfs output doesn't make the debug convenient
enough, for example, lack of the 'flag' of the corresponding memblock
region result in it's difficult to known whether the region has been
mapped to the kernel linear map zone or not. This patch is trying to
ease the dubug effort by adding 'size' and 'flag' output.

The '/sys/kernel/debug/memblock/memory' output looks like before:
   0: 0x0000008000000000..0x0000008001e7ffff
   1: 0x0000008001e80000..0x00000083ff184fff
   2: 0x00000083ff185000..0x00000083ff1c2fff
   3: 0x00000083ff1c3000..0x00000083ff222fff
   4: 0x00000083ff223000..0x00000083ffe42fff
   5: 0x00000083ffe43000..0x00000083ffffffff

After applied:
   0: 0x0000008000000000..0x0000008001e7ffff  0x0000000001e80000  0x4 
   1: 0x0000008001e80000..0x00000083ff184fff  0x00000003fd305000  0x0 
   2: 0x00000083ff185000..0x00000083ff1c2fff  0x000000000003e000  0x4 
   3: 0x00000083ff1c3000..0x00000083ff222fff  0x0000000000060000  0x0 
   4: 0x00000083ff223000..0x00000083ffe42fff  0x0000000000c20000  0x4 
   5: 0x00000083ffe43000..0x00000083ffffffff  0x00000000001bd000  0x0 

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Steve Capper <steve.capper@arm.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: linux-mm@kvack.org
Cc: linux-acpi@vger.kernel.org
Cc: linux-efi@vger.kernel.org
---
 mm/memblock.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/mm/memblock.c b/mm/memblock.c
index ca09915..0fc0fa1 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -1677,13 +1677,15 @@ static int memblock_debug_show(struct seq_file *m, void *private)
 		reg = &type->regions[i];
 		seq_printf(m, "%4d: ", i);
 		if (sizeof(phys_addr_t) == 4)
-			seq_printf(m, "0x%08lx..0x%08lx\n",
+			seq_printf(m, "0x%08lx..0x%08lx  0x%08lx  0x%lx\n",
 				   (unsigned long)reg->base,
-				   (unsigned long)(reg->base + reg->size - 1));
+				   (unsigned long)(reg->base + reg->size - 1),
+				   (unsigned long)reg->size, reg->flags);
 		else
-			seq_printf(m, "0x%016llx..0x%016llx\n",
+			seq_printf(m, "0x%016llx..0x%016llx  0x%016llx  0x%lx\n",
 				   (unsigned long long)reg->base,
-				   (unsigned long long)(reg->base + reg->size - 1));
+				   (unsigned long long)(reg->base + reg->size - 1),
+				   (unsigned long long)reg->size, reg->flags);
 
 	}
 	return 0;
-- 
2.7.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-29  0:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-29  0:57 [PATCH v5 1/3] mm: memblock enhence the memblock debugfs output Dennis Chen
2016-06-29  0:57 ` [PATCH v5 2/3] mm: memblock Add some new functions to address the mem limit issue Dennis Chen
2016-06-29  0:57 ` [PATCH v5 3/3] arm64:acpi Fix the acpi alignment exeception when 'mem=' specified Dennis Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).