All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anshuman Khandual <anshuman.khandual@arm.com>
To: linux-mm@kvack.org, akpm@linux-foundation.org
Cc: Anshuman Khandual <anshuman.khandual@arm.com>,
	Christoph Hellwig <hch@infradead.org>,
	linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org, sparclinux@vger.kernel.org,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH V4 7/7] mm/mmap: Drop arch_vm_get_page_pgprot()
Date: Thu,  7 Apr 2022 16:02:51 +0530	[thread overview]
Message-ID: <20220407103251.1209606-8-anshuman.khandual@arm.com> (raw)
In-Reply-To: <20220407103251.1209606-1-anshuman.khandual@arm.com>

There are no platforms left which use arch_vm_get_page_prot(). Just drop
generic arch_vm_get_page_prot().

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
 include/linux/mman.h | 4 ----
 mm/mmap.c            | 3 +--
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/include/linux/mman.h b/include/linux/mman.h
index b66e91b8176c..58b3abd457a3 100644
--- a/include/linux/mman.h
+++ b/include/linux/mman.h
@@ -93,10 +93,6 @@ static inline void vm_unacct_memory(long pages)
 #define arch_calc_vm_flag_bits(flags) 0
 #endif
 
-#ifndef arch_vm_get_page_prot
-#define arch_vm_get_page_prot(vm_flags) __pgprot(0)
-#endif
-
 #ifndef arch_validate_prot
 /*
  * This is called from mprotect().  PROT_GROWSDOWN and PROT_GROWSUP have
diff --git a/mm/mmap.c b/mm/mmap.c
index edf2a5e38f4d..db7f33154206 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -110,8 +110,7 @@ pgprot_t protection_map[16] __ro_after_init = {
 pgprot_t vm_get_page_prot(unsigned long vm_flags)
 {
 	pgprot_t ret = __pgprot(pgprot_val(protection_map[vm_flags &
-				(VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]) |
-			pgprot_val(arch_vm_get_page_prot(vm_flags)));
+				(VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]));
 
 	return ret;
 }
-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Anshuman Khandual <anshuman.khandual@arm.com>
To: linux-mm@kvack.org, akpm@linux-foundation.org
Cc: linux-arch@vger.kernel.org,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>,
	sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH V4 7/7] mm/mmap: Drop arch_vm_get_page_pgprot()
Date: Thu,  7 Apr 2022 16:02:51 +0530	[thread overview]
Message-ID: <20220407103251.1209606-8-anshuman.khandual@arm.com> (raw)
In-Reply-To: <20220407103251.1209606-1-anshuman.khandual@arm.com>

There are no platforms left which use arch_vm_get_page_prot(). Just drop
generic arch_vm_get_page_prot().

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
 include/linux/mman.h | 4 ----
 mm/mmap.c            | 3 +--
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/include/linux/mman.h b/include/linux/mman.h
index b66e91b8176c..58b3abd457a3 100644
--- a/include/linux/mman.h
+++ b/include/linux/mman.h
@@ -93,10 +93,6 @@ static inline void vm_unacct_memory(long pages)
 #define arch_calc_vm_flag_bits(flags) 0
 #endif
 
-#ifndef arch_vm_get_page_prot
-#define arch_vm_get_page_prot(vm_flags) __pgprot(0)
-#endif
-
 #ifndef arch_validate_prot
 /*
  * This is called from mprotect().  PROT_GROWSDOWN and PROT_GROWSUP have
diff --git a/mm/mmap.c b/mm/mmap.c
index edf2a5e38f4d..db7f33154206 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -110,8 +110,7 @@ pgprot_t protection_map[16] __ro_after_init = {
 pgprot_t vm_get_page_prot(unsigned long vm_flags)
 {
 	pgprot_t ret = __pgprot(pgprot_val(protection_map[vm_flags &
-				(VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]) |
-			pgprot_val(arch_vm_get_page_prot(vm_flags)));
+				(VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]));
 
 	return ret;
 }
-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Anshuman Khandual <anshuman.khandual@arm.com>
To: linux-mm@kvack.org, akpm@linux-foundation.org
Cc: Anshuman Khandual <anshuman.khandual@arm.com>,
	Christoph Hellwig <hch@infradead.org>,
	linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org, sparclinux@vger.kernel.org,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH V4 7/7] mm/mmap: Drop arch_vm_get_page_pgprot()
Date: Thu,  7 Apr 2022 16:02:51 +0530	[thread overview]
Message-ID: <20220407103251.1209606-8-anshuman.khandual@arm.com> (raw)
In-Reply-To: <20220407103251.1209606-1-anshuman.khandual@arm.com>

There are no platforms left which use arch_vm_get_page_prot(). Just drop
generic arch_vm_get_page_prot().

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
 include/linux/mman.h | 4 ----
 mm/mmap.c            | 3 +--
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/include/linux/mman.h b/include/linux/mman.h
index b66e91b8176c..58b3abd457a3 100644
--- a/include/linux/mman.h
+++ b/include/linux/mman.h
@@ -93,10 +93,6 @@ static inline void vm_unacct_memory(long pages)
 #define arch_calc_vm_flag_bits(flags) 0
 #endif
 
-#ifndef arch_vm_get_page_prot
-#define arch_vm_get_page_prot(vm_flags) __pgprot(0)
-#endif
-
 #ifndef arch_validate_prot
 /*
  * This is called from mprotect().  PROT_GROWSDOWN and PROT_GROWSUP have
diff --git a/mm/mmap.c b/mm/mmap.c
index edf2a5e38f4d..db7f33154206 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -110,8 +110,7 @@ pgprot_t protection_map[16] __ro_after_init = {
 pgprot_t vm_get_page_prot(unsigned long vm_flags)
 {
 	pgprot_t ret = __pgprot(pgprot_val(protection_map[vm_flags &
-				(VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]) |
-			pgprot_val(arch_vm_get_page_prot(vm_flags)));
+				(VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]));
 
 	return ret;
 }
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-04-07 10:35 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07 10:32 [PATCH V4 0/7] mm/mmap: Drop arch_vm_get_page_prot() and arch_filter_pgprot() Anshuman Khandual
2022-04-07 10:32 ` Anshuman Khandual
2022-04-07 10:32 ` Anshuman Khandual
2022-04-07 10:32 ` [PATCH V4 1/7] mm/mmap: Add new config ARCH_HAS_VM_GET_PAGE_PROT Anshuman Khandual
2022-04-07 10:32   ` Anshuman Khandual
2022-04-07 10:32   ` Anshuman Khandual
2022-04-08  9:58   ` Catalin Marinas
2022-04-08  9:58     ` Catalin Marinas
2022-04-08  9:58     ` Catalin Marinas
2022-04-07 10:32 ` [PATCH V4 2/7] powerpc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT Anshuman Khandual
2022-04-07 10:32   ` Anshuman Khandual
2022-04-07 10:32   ` Anshuman Khandual
2022-04-08 12:53   ` Christophe Leroy
2022-04-08 12:53     ` Christophe Leroy
2022-04-09 11:36     ` Christophe Leroy
2022-04-09 11:36       ` Christophe Leroy
2022-04-11  5:31       ` Anshuman Khandual
2022-04-11  5:31         ` Anshuman Khandual
2022-04-11  5:44         ` Christophe Leroy
2022-04-11  5:44           ` Christophe Leroy
2022-04-07 10:32 ` [PATCH V4 3/7] arm64/mm: " Anshuman Khandual
2022-04-07 10:32   ` Anshuman Khandual
2022-04-07 10:32   ` Anshuman Khandual
2022-04-08 10:28   ` Catalin Marinas
2022-04-08 10:28     ` Catalin Marinas
2022-04-08 10:28     ` Catalin Marinas
2022-04-08 11:19     ` Anshuman Khandual
2022-04-08 11:19       ` Anshuman Khandual
2022-04-08 11:19       ` Anshuman Khandual
2022-04-07 10:32 ` [PATCH V4 4/7] sparc/mm: " Anshuman Khandual
2022-04-07 10:32   ` Anshuman Khandual
2022-04-07 10:32   ` Anshuman Khandual
2022-04-07 15:22   ` Khalid Aziz
2022-04-07 15:22     ` Khalid Aziz
2022-04-07 15:22     ` Khalid Aziz
2022-04-07 10:32 ` [PATCH V4 5/7] x86/mm: " Anshuman Khandual
2022-04-07 10:32   ` Anshuman Khandual
2022-04-07 10:32   ` Anshuman Khandual
2022-04-07 10:32 ` [PATCH V4 6/7] mm/mmap: Drop arch_filter_pgprot() Anshuman Khandual
2022-04-07 10:32   ` Anshuman Khandual
2022-04-07 10:32   ` Anshuman Khandual
2022-04-08 10:28   ` Catalin Marinas
2022-04-08 10:28     ` Catalin Marinas
2022-04-08 10:28     ` Catalin Marinas
2022-04-07 10:32 ` Anshuman Khandual [this message]
2022-04-07 10:32   ` [PATCH V4 7/7] mm/mmap: Drop arch_vm_get_page_pgprot() Anshuman Khandual
2022-04-07 10:32   ` Anshuman Khandual
2022-04-08 10:29   ` Catalin Marinas
2022-04-08 10:29     ` Catalin Marinas
2022-04-08 10:29     ` Catalin Marinas
2022-04-07 23:20 ` [PATCH V4 0/7] mm/mmap: Drop arch_vm_get_page_prot() and arch_filter_pgprot() Andrew Morton
2022-04-07 23:20   ` Andrew Morton
2022-04-07 23:20   ` Andrew Morton
2022-04-08  2:41   ` Anshuman Khandual
2022-04-08  2:41     ` Anshuman Khandual
2022-04-08  2:41     ` Anshuman Khandual

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220407103251.1209606-8-anshuman.khandual@arm.com \
    --to=anshuman.khandual@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.