riscv: cleanup the parse_dtb calling conventions
authorChristoph Hellwig <hch@lst.de>
Mon, 15 Apr 2019 09:14:38 +0000 (11:14 +0200)
committerPalmer Dabbelt <palmer@sifive.com>
Thu, 25 Apr 2019 21:51:11 +0000 (14:51 -0700)
No need to pass the hartid, and the dtb address passed is a physical
address, so don't pretend it is a kernel pointer.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
arch/riscv/kernel/head.S
arch/riscv/kernel/setup.c

index 62d2c9c85433c2041cf40351cd6b4ab923e2cde6..478821d31bb3e1f2aa4718c7378c7d001453606b 100644 (file)
@@ -72,8 +72,7 @@ clear_bss_done:
        la sp, init_thread_union + THREAD_SIZE
 
        /* Start the kernel */
-       mv a0, s0
-       mv a1, s1
+       mv a0, s1
        call parse_dtb
        tail start_kernel
 
index 540a331d1376922c62ba17bf0d9c786714d89948..d93bcce004e3e5bda58040294fb102095a405bfe 100644 (file)
@@ -52,9 +52,11 @@ struct screen_info screen_info = {
 atomic_t hart_lottery;
 unsigned long boot_cpu_hartid;
 
-void __init parse_dtb(unsigned int hartid, void *dtb)
+void __init parse_dtb(phys_addr_t dtb_phys)
 {
-       if (early_init_dt_scan(__va(dtb)))
+       void *dtb = __va(dtb_phys);
+
+       if (early_init_dt_scan(dtb))
                return;
 
        pr_err("No DTB passed to the kernel\n");