Re: [PATCH v4 2/2] RISC-V: Implement sparsemem

From: Logan Gunthorpe
Date: Wed Aug 14 2019 - 13:46:32 EST




On 2019-08-14 11:40 a.m., Paul Walmsley wrote:
> On Wed, 14 Aug 2019, Logan Gunthorpe wrote:
>
>> On 2019-08-14 7:35 a.m., Greentime Hu wrote:
>>
>>> Maybe this commit explains why it used HAVE_ARCH_PFN_VALID instead of SPARSEMEM.
>>> https://github.com/torvalds/linux/commit/7b7bf499f79de3f6c85a340c8453a78789523f85
>>>
>>> BTW, I found another issue here.
>>> #define FIXADDR_TOP (VMALLOC_START)
>>> #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
>>> #define VMEMMAP_END (VMALLOC_START - 1)
>>> #define VMEMMAP_START (VMALLOC_START - VMEMMAP_SIZE)
>>> These 2 regions are overlapped.
>>>
>>> How about this fix? Not sure if it is good for everyone.
>>
>> Yes, this looks good to me. I can fold these changes into my patch and
>> send a v5 to the list.
>
> The change to FIXADDR_TOP should be separated out into its own patch - it
> probably needs to go up as a fix.

I don't think so... VMEMMAP_START doesn't exist until the sparsemem
patch so it can't be changed until after the sparsemem patch and no
sense adding a bug in the sparsemem patch...

Logan