[PATCH] riscv: Don't use hugepage mappings for vmemmap if it's not supported

Alexandre Ghiti alex at ghiti.fr
Fri May 24 13:07:40 PDT 2024


Hi Nam,

On 08/05/2024 20:46, Nam Cao wrote:
> On Wed, May 08, 2024 at 08:22:43PM +0200, Alexandre Ghiti wrote:
>> Hi Nam,
> Hi Alex,
>
>>> Commit ff172d4818ad ("riscv: Use hugepage mappings for vmemmap") broke XIP
>>> kernel, because huge pages are not supported on XIP kernel.
>> I don't understand why XIP kernels can't support huge vmalloc mappings,
> Me neither.
>
>> so I
>> think the right fix would be to enable such mappings on XIP. WDYT?
> I agree that is the ideal solution. But I don't want to send any new
> feature to the stable trees (stable folks may even reject such patch).
> So I intend that to be in another patch.


I have been thinking about that, and I actually think that the real fix 
is enabling huge vmalloc mappings for XIP as it was an oversight/mistake 
in the first place. On 64-bit kernels, there are no reasons we can't use 
PMD mappings for vmalloc. So I'd rather not go with this fix.

Thanks,

Alex


>
> Best regards,
> Nam



More information about the linux-riscv mailing list