Skip to content

Commit 8eace9f

Browse files
Merge branch 'next/misc2' into for-next
2 parents 5ba9aa5 + 2cc6c4a commit 8eace9f

File tree

2 files changed

+40
-8
lines changed

2 files changed

+40
-8
lines changed

arch/riscv/Kconfig.socs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
menu "SoC selection"
22

33
config SOC_SIFIVE
4-
bool "SiFive SoCs"
5-
select SERIAL_SIFIVE
6-
select SERIAL_SIFIVE_CONSOLE
7-
select CLK_SIFIVE
8-
select CLK_SIFIVE_FU540_PRCI
9-
select SIFIVE_PLIC
10-
help
11-
This enables support for SiFive SoC platform hardware.
4+
bool "SiFive SoCs"
5+
select SERIAL_SIFIVE
6+
select SERIAL_SIFIVE_CONSOLE
7+
select CLK_SIFIVE
8+
select CLK_SIFIVE_FU540_PRCI
9+
select SIFIVE_PLIC
10+
help
11+
This enables support for SiFive SoC platform hardware.
1212

1313
endmenu

arch/riscv/mm/init.c

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,37 @@ static void setup_zero_page(void)
4646
memset((void *)empty_zero_page, 0, PAGE_SIZE);
4747
}
4848

49+
#ifdef CONFIG_DEBUG_VM
50+
static inline void print_mlk(char *name, unsigned long b, unsigned long t)
51+
{
52+
pr_notice("%12s : 0x%08lx - 0x%08lx (%4ld kB)\n", name, b, t,
53+
(((t) - (b)) >> 10));
54+
}
55+
56+
static inline void print_mlm(char *name, unsigned long b, unsigned long t)
57+
{
58+
pr_notice("%12s : 0x%08lx - 0x%08lx (%4ld MB)\n", name, b, t,
59+
(((t) - (b)) >> 20));
60+
}
61+
62+
static void print_vm_layout(void)
63+
{
64+
pr_notice("Virtual kernel memory layout:\n");
65+
print_mlk("fixmap", (unsigned long)FIXADDR_START,
66+
(unsigned long)FIXADDR_TOP);
67+
print_mlm("pci io", (unsigned long)PCI_IO_START,
68+
(unsigned long)PCI_IO_END);
69+
print_mlm("vmemmap", (unsigned long)VMEMMAP_START,
70+
(unsigned long)VMEMMAP_END);
71+
print_mlm("vmalloc", (unsigned long)VMALLOC_START,
72+
(unsigned long)VMALLOC_END);
73+
print_mlm("lowmem", (unsigned long)PAGE_OFFSET,
74+
(unsigned long)high_memory);
75+
}
76+
#else
77+
static void print_vm_layout(void) { }
78+
#endif /* CONFIG_DEBUG_VM */
79+
4980
void __init mem_init(void)
5081
{
5182
#ifdef CONFIG_FLATMEM
@@ -56,6 +87,7 @@ void __init mem_init(void)
5687
memblock_free_all();
5788

5889
mem_init_print_info(NULL);
90+
print_vm_layout();
5991
}
6092

6193
#ifdef CONFIG_BLK_DEV_INITRD

0 commit comments

Comments
 (0)