arm64: map FDT as RW for early_init_dt_scan()
authorHsin-Yi Wang <hsinyi@chromium.org>
Fri, 23 Aug 2019 06:24:50 +0000 (14:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:23:57 +0000 (10:23 +0200)
commit3e930a2deac2ea232965fd6650ebc7d0cbc782dd
tree5b02d53869788e5073d739c71aca8c9b7660d13b
parent8569b4ada1e0b9bfaa125bd0c0967918b6560fa2
arm64: map FDT as RW for early_init_dt_scan()

commit e112b032a72c78f15d0c803c5dc6be444c2e6c66 upstream.

Currently in arm64, FDT is mapped to RO before it's passed to
early_init_dt_scan(). However, there might be some codes
(eg. commit "fdt: add support for rng-seed") that need to modify FDT
during init. Map FDT to RO after early fixups are done.

Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Will Deacon <will@kernel.org>
[mkbestas: fixed trivial conflicts for 4.9 backport]
Signed-off-by: Michael Bestas <mkbestas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/include/asm/mmu.h
arch/arm64/kernel/kaslr.c
arch/arm64/kernel/setup.c
arch/arm64/mm/mmu.c