From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A962DCCA482 for ; Wed, 6 Jul 2022 11:15:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233263AbiGFLPn (ORCPT ); Wed, 6 Jul 2022 07:15:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233243AbiGFLPk (ORCPT ); Wed, 6 Jul 2022 07:15:40 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E2E2427FCE; Wed, 6 Jul 2022 04:15:39 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CFE831042; Wed, 6 Jul 2022 04:15:39 -0700 (PDT) Received: from [10.163.43.16] (unknown [10.163.43.16]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 60BFD3F66F; Wed, 6 Jul 2022 04:15:31 -0700 (PDT) Message-ID: Date: Wed, 6 Jul 2022 16:45:27 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH V6 21/26] m68k/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT Content-Language: en-US To: Geert Uytterhoeven Cc: Linux MM , Andrew Morton , "linux-ia64@vger.kernel.org" , Linux-sh list , Linux Kernel Mailing List , linux-csky@vger.kernel.org, sparclinux , linux-riscv , linux-s390 , "open list:QUALCOMM HEXAGON..." , the arch/x86 maintainers , Christophe Leroy , Christoph Hellwig , arcml , "open list:TENSILICA XTENSA PORT (xtensa)" , linux-um , linux-m68k , Openrisc , Linux ARM , Thomas Bogendoerfer , Parisc List , "open list:BROADCOM NVRAM DRIVER" , alpha , linuxppc-dev References: <20220630051630.1718927-1-anshuman.khandual@arm.com> <20220630051630.1718927-22-anshuman.khandual@arm.com> From: Anshuman Khandual In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-s390@vger.kernel.org On 7/6/22 15:33, Geert Uytterhoeven wrote: > Hi Anshuman, > > On Thu, Jun 30, 2022 at 7:19 AM Anshuman Khandual > wrote: >> This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard >> vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks >> up a private and static protection_map[] array. Subsequently all __SXXX and >> __PXXX macros can be dropped which are no longer needed. >> >> Cc: Thomas Bogendoerfer >> Cc: linux-m68k@lists.linux-m68k.org >> Cc: linux-kernel@vger.kernel.org >> Signed-off-by: Anshuman Khandual > > Thanks for your patch! > >> --- a/arch/m68k/include/asm/mcf_pgtable.h >> +++ b/arch/m68k/include/asm/mcf_pgtable.h >> @@ -91,60 +91,6 @@ >> * for use. In general, the bit positions are xwr, and P-items are >> * private, the S-items are shared. >> */ > > The comment above should be removed, too. Sure, will do. > >> -#define __P000 PAGE_NONE >> -#define __P001 __pgprot(CF_PAGE_VALID \ >> - | CF_PAGE_ACCESSED \ >> - | CF_PAGE_READABLE) > >> --- a/arch/m68k/include/asm/motorola_pgtable.h >> +++ b/arch/m68k/include/asm/motorola_pgtable.h >> @@ -83,28 +83,6 @@ extern unsigned long mm_cachebits; >> #define PAGE_COPY_C __pgprot(_PAGE_PRESENT | _PAGE_RONLY | _PAGE_ACCESSED) >> #define PAGE_READONLY_C __pgprot(_PAGE_PRESENT | _PAGE_RONLY | _PAGE_ACCESSED) > > You might move the *_C definitions above into arch/m68k/mm/motorola.c > as well, as they are only used in the latter. Okay, will do. > >> >> -/* >> - * The m68k can't do page protection for execute, and considers that the same are read. >> - * Also, write permissions imply read permissions. This is the closest we can get.. >> - */ >> -#define __P000 PAGE_NONE_C >> -#define __P001 PAGE_READONLY_C >> -#define __P010 PAGE_COPY_C >> -#define __P011 PAGE_COPY_C >> -#define __P100 PAGE_READONLY_C >> -#define __P101 PAGE_READONLY_C >> -#define __P110 PAGE_COPY_C >> -#define __P111 PAGE_COPY_C >> - >> -#define __S000 PAGE_NONE_C >> -#define __S001 PAGE_READONLY_C >> -#define __S010 PAGE_SHARED_C >> -#define __S011 PAGE_SHARED_C >> -#define __S100 PAGE_READONLY_C >> -#define __S101 PAGE_READONLY_C >> -#define __S110 PAGE_SHARED_C >> -#define __S111 PAGE_SHARED_C >> - >> #define pmd_pgtable(pmd) ((pgtable_t)pmd_page_vaddr(pmd)) >> >> /* >> diff --git a/arch/m68k/include/asm/sun3_pgtable.h b/arch/m68k/include/asm/sun3_pgtable.h >> index 5e4e753f0d24..9d919491765b 100644 >> --- a/arch/m68k/include/asm/sun3_pgtable.h >> +++ b/arch/m68k/include/asm/sun3_pgtable.h >> @@ -71,23 +71,6 @@ >> * protection settings, valid (implying read and execute) and writeable. These >> * are as close as we can get... >> */ > > The comment above should be removed, too. Sure, will do. > >> -#define __P000 PAGE_NONE >> -#define __P001 PAGE_READONLY > > With the above fixed: > Reviewed-by: Geert Uytterhoeven > Acked-by: Geert Uytterhoeven > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds >