]> git.itanic.dy.fi Git - linux-stable/commit
s390/mm: fix direct map accounting
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 9 May 2023 14:31:17 +0000 (16:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 12:02:08 +0000 (14:02 +0200)
commitf995f951eb3d3e4998899626eee5b2153d90adbf
tree27ef3f91935e7379149cbf110cbbcb7818bdabc3
parent4ad0867b2dbca2415ce5619363e11d38aa67ca41
s390/mm: fix direct map accounting

[ Upstream commit 81e8479649853ffafc714aca4a9c0262efd3160a ]

Commit bb1520d581a3 ("s390/mm: start kernel with DAT enabled") did not
implement direct map accounting in the early page table setup code. In
result the reported values are bogus now:

$cat /proc/meminfo
...
DirectMap4k:        5120 kB
DirectMap1M:    18446744073709546496 kB
DirectMap2G:           0 kB

Fix this by adding the missing accounting. The result looks sane again:

$cat /proc/meminfo
...
DirectMap4k:        6156 kB
DirectMap1M:     2091008 kB
DirectMap2G:     6291456 kB

Fixes: bb1520d581a3 ("s390/mm: start kernel with DAT enabled")
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/boot/vmem.c
arch/s390/include/asm/pgtable.h
arch/s390/mm/pageattr.c