Commit 3368d091 authored by Jaewon Kim's avatar Jaewon Kim Committed by jaewon31.kim@samsung.com
Browse files

FROMLIST: memblock: introduce memsize showing reserved memory



Some of memory regions can be reserved for a specific purpose. They are
usually defined through reserved-memory in device tree. If only size
without address is specified in device tree, the address of the region
will be determined at boot time.

We may find the address of the memory regions through booting log, but
it does not show all. And it could be hard to catch the very beginning
log. The memblock_dump_all shows all memblock status but it does not
show region name and its information is difficult to summarize.

This patch introduce a debugfs node, memblock/memsize, to see reserved
memory easily.

The first patch here will show the only reserved-memory in device tree
like following example. The next patches will show more information.

There is a case in which the reserved memory region name has @ staring
string at the end. That information is not actually needed. Let's remove
those string.

$ cat debugfs/memblock/memsize
0x0f9000000-0x0fb000000 0x02000000 (   32768 KB )   map reusable linux,cma
0x0b1900000-0x0b1b00000 0x00200000 (    2048 KB ) nomap unusable test1
0x0b0200000-0x0b0400000 0x00200000 (    2048 KB )   map unusable test2

.unusable  :   4096 KB
.reusable  :  32768 KB

Bug: 340432773
Signed-off-by: default avatarJaewon Kim <jaewon31.kim@samsung.com>
Link: https://lore.kernel.org/linux-mm/20240521023957.2587005-2-jaewon31.kim@samsung.com/
Change-Id: I1cec3edfeb5a25cb6b5141c28efa9da01677d279
parent ab624114
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment