From: Eric Lin <tesheng@andestech.com>
To: <linux-riscv@lists.infradead.org>
Cc: aou@eecs.berkeley.edu, gary@garyguo.net, alex@ghiti.fr,
david.abdurachmanov@gmail.com, steven.price@arm.com,
Alan Kao <alankao@andestech.com>,
Anup.Patel@wdc.com, linux-kernel@vger.kernel.org,
rppt@linux.ibm.com, atish.patra@wdc.com, yash.shah@sifive.com,
Eric Lin <tesheng@andestech.com>,
palmer@dabbelt.com, green.hu@gmail.com, zong.li@sifive.com,
paul.walmsley@sifive.com, akpm@linux-foundation.org, bp@suse.de,
logang@deltatee.com, tglx@linutronix.de
Subject: [PATCH 3/3] riscv/mm: Add pkmap in print_vm_layout()
Date: Tue, 31 Mar 2020 17:32:41 +0800 [thread overview]
Message-ID: <20200331093241.3728-4-tesheng@andestech.com> (raw)
In-Reply-To: <20200331093241.3728-1-tesheng@andestech.com>
When enabling CONFIG_HIGHMEM, lowmem will before pkmap
region and the memory layout will be like as below:
Virtual kernel memory layout:
lowmem : 0xc0000000 - 0xf5400000 ( 852 MB)
pkmap : 0xf5600000 - 0xf5800000 ( 2 MB)
fixmap : 0xf5800000 - 0xf5c00000 (4096 kB)
pci io : 0xf5c00000 - 0xf6c00000 ( 16 MB)
vmemmap : 0xf6c00000 - 0xf7bfffff ( 15 MB)
vmalloc : 0xf7c00000 - 0xffc00000 ( 128 MB)
Signed-off-by: Eric Lin <tesheng@andestech.com>
Cc: Alan Kao <alankao@andestech.com>
---
arch/riscv/mm/init.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index 59afb479176a..b32d558e3f99 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -80,6 +80,12 @@ static inline void print_mlm(char *name, unsigned long b, unsigned long t)
static void print_vm_layout(void)
{
pr_notice("Virtual kernel memory layout:\n");
+#ifdef CONFIG_HIGHMEM
+ print_mlm("lowmem", (unsigned long)PAGE_OFFSET,
+ (unsigned long)high_memory);
+ print_mlm("pkmap", (unsigned long)PKMAP_BASE,
+ (unsigned long)FIXADDR_START);
+#endif
print_mlk("fixmap", (unsigned long)FIXADDR_START,
(unsigned long)FIXADDR_TOP);
print_mlm("pci io", (unsigned long)PCI_IO_START,
@@ -88,8 +94,10 @@ static void print_vm_layout(void)
(unsigned long)VMEMMAP_END);
print_mlm("vmalloc", (unsigned long)VMALLOC_START,
(unsigned long)VMALLOC_END);
+#ifndef CONFIG_HIGHMEM
print_mlm("lowmem", (unsigned long)PAGE_OFFSET,
(unsigned long)high_memory);
+#endif
}
#else
static void print_vm_layout(void) { }
--
2.17.0
next prev parent reply other threads:[~2020-03-31 9:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-31 9:32 [PATCH 0/3] Highmem support for 32-bit RISC-V Eric Lin
2020-03-31 9:32 ` [PATCH 1/3] riscv/mm: Add pkmap region and CONFIG_HIGHMEM Eric Lin
2020-03-31 9:32 ` [PATCH 2/3] riscv/mm: Implement kmap() and kmap_atomic() Eric Lin
2020-03-31 9:32 ` Eric Lin [this message]
2020-04-02 9:31 ` [PATCH 0/3] Highmem support for 32-bit RISC-V Arnd Bergmann
2020-04-08 3:51 ` Alan Kao
2020-04-08 14:40 ` Arnd Bergmann
2020-04-14 15:17 ` afzal mohammed
2020-04-14 19:29 ` Arnd Bergmann
2020-04-15 13:54 ` afzal mohammed
2020-05-03 14:50 ` afzal mohammed
2020-05-03 20:20 ` Arnd Bergmann
2020-05-04 9:10 ` afzal mohammed
2020-05-04 11:27 ` Arnd Bergmann
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=20200331093241.3728-4-tesheng@andestech.com \
--to=tesheng@andestech.com \
--cc=Anup.Patel@wdc.com \
--cc=akpm@linux-foundation.org \
--cc=alankao@andestech.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=atish.patra@wdc.com \
--cc=bp@suse.de \
--cc=david.abdurachmanov@gmail.com \
--cc=gary@garyguo.net \
--cc=green.hu@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=logang@deltatee.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=rppt@linux.ibm.com \
--cc=steven.price@arm.com \
--cc=tglx@linutronix.de \
--cc=yash.shah@sifive.com \
--cc=zong.li@sifive.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