[PATCH v3 4/5] RISC-V: Add kdump support
Nick Kossifidis
mick at ics.forth.gr
Fri Apr 9 11:21:48 BST 2021
Στις 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 !
More information about the linux-riscv
mailing list