]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
riscv: Fix wrong usage of __pa() on a fixmap address
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Mon, 9 Dec 2024 07:45:08 +0000 (08:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Dec 2024 17:13:00 +0000 (18:13 +0100)
commit c796e187201242992d6d292bfeff41aadfdf3f29 upstream.

riscv uses fixmap addresses to map the dtb so we can't use __pa() which
is reserved for linear mapping addresses.

Fixes: b2473a359763 ("of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20241209074508.53037-1-alexghiti@rivosinc.com
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/riscv/kernel/setup.c

index 26c886db4fb3d1d3837c5081a4e1dfa8666a6bcc..2b3c152d3c91f598c62632c3436bfe1c1fd16298 100644 (file)
@@ -227,7 +227,7 @@ static void __init init_resources(void)
 static void __init parse_dtb(void)
 {
        /* Early scan of device tree from init memory */
-       if (early_init_dt_scan(dtb_early_va, __pa(dtb_early_va))) {
+       if (early_init_dt_scan(dtb_early_va, dtb_early_pa)) {
                const char *name = of_flat_dt_get_machine_name();
 
                if (name) {