Στις 2021-04-06 21:36, Alex Ghiti έγραψε:

+       /* Switch to physical addressing */
+       la      s4, 1f
+       sub     s4, s4, s3
+       csrw    stvec, s4
+       csrw    sptbr, zero

satp is used everywhere instead of sptbr. And maybe you could CSR_****
naming, like you did in riscv_crash_save_regs and like it's done in
head.S too.


ACK

+               crash_base = memblock_find_in_range(search_start, search_end,
+#ifdef CONFIG_64BIT
+                                                   crash_size, SZ_2M);
+#else
+                                                   crash_size, SZ_4M);
+#endif

You can use PMD_SIZE here and get rid of #ifdef.

+
+#ifdef CONFIG_64BIT
+               if (!IS_ALIGNED(crash_base, SZ_2M)) {
+#else
+               if (!IS_ALIGNED(crash_base, SZ_4M)) {
+#endif

Ditto here.


Will do.

Thanks a lot for your review !

Reply via email to