linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dennis Chen <dennis.chen@arm.com>
To: linux-arm-kernel@lists.infradead.org
Cc: nd@arm.com, Dennis Chen <dennis.chen@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Steve Capper <steve.capper@arm.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Will Deacon <will.deacon@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	Matt Fleming <matt@codeblueprint.co.uk>,
	linux-mm@kvack.org, linux-acpi@vger.kernel.org,
	linux-efi@vger.kernel.org
Subject: [PATCH v5 1/3] mm: memblock enhence the memblock debugfs output
Date: Wed, 29 Jun 2016 08:57:33 +0800	[thread overview]
Message-ID: <1467161855-10010-1-git-send-email-dennis.chen@arm.com> (raw)

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>

             reply	other threads:[~2016-06-29  0:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29  0:57 Dennis Chen [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467161855-10010-1-git-send-email-dennis.chen@arm.com \
    --to=dennis.chen@arm.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mark.rutland@arm.com \
    --cc=matt@codeblueprint.co.uk \
    --cc=nd@arm.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=steve.capper@arm.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).