Re: [PATCH V2 08/30] m68k/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

Anshuman Khandual
2022-02-25T09:35:45Z

On 2/25/22 2:32 PM, Geert Uytterhoeven wrote:
> Hi Anshuman, Andrew,
>
> On Mon, Feb 21, 2022 at 12:54 PM Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
>> On Mon, Feb 21, 2022 at 9:45 AM Anshuman Khandual
>> <anshuman.khandual@arm.com> wrote:
>>> This defines and exports a platform specific custom vm_get_page_prot() via
>>> subscribing ARCH_HAS_VM_GET_PAGE_PROT. Subsequently all __SXXX and __PXXX
>>> macros can be dropped which are no longer needed.
>>>
>>> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
>>> Cc: linux-m68k@lists.linux-m68k.org
>>> Cc: linux-kernel@vger.kernel.org
>>> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
>>
>> Thanks for your patch!
>>
>>> --- a/arch/m68k/mm/init.c
>>> +++ b/arch/m68k/mm/init.c
>>> @@ -128,3 +128,107 @@ void __init mem_init(void)
>>> memblock_free_all();
>>> init_pointer_tables();
>>> }
>>> +
>>> +#ifdef CONFIG_COLDFIRE
>>> +/*
>>> + * Page protections for initialising protection_map. See mm/mmap.c
>>> + * for use. In general, the bit positions are xwr, and P-items are
>>> + * private, the S-items are shared.
>>> + */
>>> +pgprot_t vm_get_page_prot(unsigned long vm_flags)
>>
>> Wouldn't it make more sense to add this to arch/m68k/mm/mcfmmu.c?
>
> It's not just about sense, but also about correctness.
> The CF_PAGE_* definitions below exist only if CONFIG_MMU=y,
> thus causing breakage for cfnommu in today's linux-next.
> http://kisskb.ellerman.id.au/kisskb/buildresult/14701640/

As mentioned before, will do all these necessary changes in the next
version probably sometime earlier next week. I was waiting for other
reviews (if any) till now.