public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xtensa: noMMU: fix vm_get_page_prot definition
@ 2022-07-05 22:14 Max Filippov
  2022-07-06  4:50 ` Anshuman Khandual
  0 siblings, 1 reply; 2+ messages in thread
From: Max Filippov @ 2022-07-05 22:14 UTC (permalink / raw)
  To: linux-xtensa
  Cc: Chris Zankel, linux-kernel, linux-next, Anshuman Khandual,
	Andrew Morton, Max Filippov

Don't define protection_map and don't use DECLARE_VM_GET_PAGE_PROT in
noMMU configs, because in that case the definition for vm_get_page_prot
is provided by the include/linux/mm.h

Fixes: 61ab8053710f ("xtensa/mm: enable ARCH_HAS_VM_GET_PAGE_PROT")
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 arch/xtensa/mm/init.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c
index fb830ec8183c..b2587a1a7c46 100644
--- a/arch/xtensa/mm/init.c
+++ b/arch/xtensa/mm/init.c
@@ -217,6 +217,7 @@ static int __init parse_memmap_opt(char *str)
 }
 early_param("memmap", parse_memmap_opt);
 
+#ifdef CONFIG_MMU
 static const pgprot_t protection_map[16] = {
 	[VM_NONE]					= PAGE_NONE,
 	[VM_READ]					= PAGE_READONLY,
@@ -236,3 +237,4 @@ static const pgprot_t protection_map[16] = {
 	[VM_SHARED | VM_EXEC | VM_WRITE | VM_READ]	= PAGE_SHARED_EXEC
 };
 DECLARE_VM_GET_PAGE_PROT
+#endif
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-06  4:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-05 22:14 [PATCH] xtensa: noMMU: fix vm_get_page_prot definition Max Filippov
2022-07-06  4:50 ` Anshuman Khandual

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox