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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8EFFEC43334 for ; Wed, 6 Jul 2022 11:16:40 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4LdH6v0dmHz3bs2 for ; Wed, 6 Jul 2022 21:16:39 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=arm.com (client-ip=217.140.110.172; helo=foss.arm.com; envelope-from=anshuman.khandual@arm.com; receiver=) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lists.ozlabs.org (Postfix) with ESMTP id 4LdH6R3ftMz3bkW for ; Wed, 6 Jul 2022 21:16:12 +1000 (AEST) 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 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 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-ia64@vger.kernel.org" , Linux-sh list , "open list:BROADCOM NVRAM DRIVER" , Linux MM , sparclinux , linux-riscv , linux-s390 , "open list:QUALCOMM HEXAGON..." , the arch/x86 maintainers , linux-csky@vger.kernel.org, Christoph Hellwig , arcml , "open list:TENSILICA XTENSA PORT \(xtensa\)" , linux-um , linux-m68k , Openrisc , Linux ARM , Thomas Bogendoerfer , Parisc List , Linux Kernel Mailing List , alpha , Andre w Morton , linuxppc-dev Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 >