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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 64FEEC433EF for ; Wed, 6 Jul 2022 11:16:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OmFPypT5FzPCYqXrztbyYq//+NQ+DFz4LWiUAfTu8Bs=; b=UENTOoxART1Yg1 x7e2qSc0/ByruK6wD8h3C4SMq39Z+aC0rEbKMG4F349XHz7y8YvdWvXRpfrqJDAZ/EPWxQFmSTZPE F2dUpk+Bl7ca7j5n1iypFzcrwE9NQaxO2C/yxeAdw/VJonIkBFdX/rGrUHbjP/nQvEc5Ldvx7C8ZS uRiqPjhoD2CZ6GaqyRS6FTFnjRTCqXH6t95R3oMAwucXly+/2H96swebsNQ2PRpBmlvDeEfi2sCe0 HgeekfxpQBEWdS0j5if0EcEnxVJnPAvaZEE7mDnMMzd4zlcMsWirJib97jpsl78A8GoorfInFj7GV +rJrGXkLQ+zmcfb/9alw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o930b-009JUK-6S; Wed, 06 Jul 2022 11:15:53 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o930P-009JG4-Rx; Wed, 06 Jul 2022 11:15:43 +0000 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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220706_041542_085826_B82C0A8C X-CRM114-Status: GOOD ( 26.35 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.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 > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv