]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: mm: Make map_fdt() return mapped pointer
authorSam Edwards <cfsworks@gmail.com>
Thu, 4 Sep 2025 00:52:08 +0000 (17:52 -0700)
committerWill Deacon <will@kernel.org>
Tue, 16 Sep 2025 19:39:49 +0000 (20:39 +0100)
commitc56aa9a67a0853ffcf64ebe7f1dbe5a5a7c315cc
tree0f10b0281bfce5959552c4627d0306692b2d5679
parent030b3ffbdac75005ef73af752a42cd48c7bba155
arm64: mm: Make map_fdt() return mapped pointer

Currently map_fdt() accepts a physical address and relies on the caller
to keep using the same value after mapping, since the implementation
happens to install an identity mapping. This obscures the fact that the
usable pointer is defined by the mapping, not by the input value. Since
the mapping determines pointer validity, it is more natural to produce
the pointer at mapping time.

Change map_fdt() to return a void * pointing to the mapped FDT. This
clarifies the data flow, removes the implicit identity assumption, and
prepares for making map_fdt() accept a phys_addr_t in a follow-up
change.

Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/pi/map_kernel.c