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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 412D2C43334 for ; Wed, 6 Jul 2022 11:15:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D5BF38E0003; Wed, 6 Jul 2022 07:15:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CE44A8E0001; Wed, 6 Jul 2022 07:15:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B5E258E0003; Wed, 6 Jul 2022 07:15:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id A355B8E0001 for ; Wed, 6 Jul 2022 07:15:41 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 7F7DD322B8 for ; Wed, 6 Jul 2022 11:15:41 +0000 (UTC) X-FDA: 79656419682.17.C79D8C3 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf01.hostedemail.com (Postfix) with ESMTP id 64F6B40010 for ; Wed, 6 Jul 2022 11:15:40 +0000 (UTC) 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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657106141; a=rsa-sha256; cv=none; b=CzcgKL/LITycDWoj3iG2ys10q6WZHzyHwqXunc8iyh9TpxzUz77n2s/GBHJxa2zzXp6Yb4 SEFG7S6a9iqfRdJA0oUmZ5+fMKqumLgwpgvdAUr6pogB9AHuNS9dbikIBU+KpiV47eOvO+ DstXvrer79WfJGQ4m0ra9gOfh9IU0DA= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657106141; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dvC7Nr1dbgbOcFwTXI8sqr13DdMNQ8ExTWqNmVBMF18=; b=bJKF5Tk3N+ohJiOvkk4d1dnU/BasaIIztzCHhW0fifxayczfQQYltqeLjmIJmtszitDrn/ 18O2Iq2wA/uqSPRRopv0g/E3g8yTo2/ktlacRGtNONoIGB7Bx8ii3e1HatBH7eQi2ZcDVp 3j1MhODcloU6uUFteF7eGubVbqKlRHc= X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 64F6B40010 X-Rspam-User: Authentication-Results: imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com; dmarc=pass (policy=none) header.from=arm.com X-Stat-Signature: zmqerwtpohkbssxzj1ru7fzzrjk894k7 X-HE-Tag: 1657106140-747024 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 >