riscv: implement Zicbom-based CMO instructions + the t-head variant
[sfrench/cifs-2.6.git] / arch / riscv / mm / dma-noncoherent.c
index a8dc0bd9078d7eedadfeefb7b4b4c052c821a2ff..cd2225304c82e2c4efd349a04e93f41a2adfa005 100644 (file)
@@ -83,9 +83,13 @@ void riscv_init_cbom_blocksize(void)
        u32 val;
 
        for_each_of_cpu_node(node) {
-               int hartid = riscv_of_processor_hartid(node);
+               unsigned long hartid;
                int cbom_hartid;
 
+               ret = riscv_of_processor_hartid(node, &hartid);
+               if (ret)
+                       continue;
+
                if (hartid < 0)
                        continue;
 
@@ -99,7 +103,7 @@ void riscv_init_cbom_blocksize(void)
                        cbom_hartid = hartid;
                } else {
                        if (riscv_cbom_block_size != val)
-                               pr_warn("cbom-block-size mismatched between harts %d and %d\n",
+                               pr_warn("cbom-block-size mismatched between harts %d and %lu\n",
                                        cbom_hartid, hartid);
                }
        }