* [PATCH] parisc: Implement flush_cache_vmap_vunmap
@ 2022-03-30 14:39 John David Anglin
0 siblings, 0 replies; only message in thread
From: John David Anglin @ 2022-03-30 14:39 UTC (permalink / raw)
To: linux-parisc; +Cc: Helge Deller, Deller, James Bottomley
[-- Attachment #1: Type: text/plain, Size: 1765 bytes --]
Revise flush_cache_vmap and flush_cache_vunmap calls to use
flush_cache_vmap_vunmap. It flushes tlb to inhibit move-in
and checks that interrupts are disabled on SMP builds.
Signed-off-by: John David Anglin <dave.anglin@bell.net>
---
diff --git a/arch/parisc/include/asm/cacheflush.h b/arch/parisc/include/asm/cacheflush.h
index e8b4a03343d3..fa40709698de 100644
--- a/arch/parisc/include/asm/cacheflush.h
+++ b/arch/parisc/include/asm/cacheflush.h
@@ -37,8 +37,9 @@ void flush_kernel_dcache_page_addr(void *addr);
flush_kernel_dcache_range_asm((start), (start)+(size));
#define ARCH_IMPLEMENTS_FLUSH_KERNEL_VMAP_RANGE 1
-void flush_kernel_vmap_range(void *vaddr, int size);
-void invalidate_kernel_vmap_range(void *vaddr, int size);
+void flush_cache_vmap_vunmap(unsigned long start, unsigned long end);
+#define flush_cache_vmap(start,end) flush_cache_vmap_vunmap(start,end)
+#define flush_cache_vunmap(start,end) flush_cache_vmap_vunmap(start,end)
#define flush_cache_vmap(start, end) flush_cache_all()
#define flush_cache_vunmap(start, end) flush_cache_all()
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
index 91d218953b5c..533c5643c3fe 100644
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -653,3 +653,15 @@ void invalidate_kernel_vmap_range(void *vaddr, int size)
flush_tlb_kernel_range(start, end);
}
EXPORT_SYMBOL(invalidate_kernel_vmap_range);
+
+void flush_cache_vmap_vunmap(unsigned long start, unsigned long end)
+{
+ BUG_ON(IS_ENABLED(CONFIG_SMP) && arch_irqs_disabled());
+
+ /* Inhibit cache move-in */
+ flush_tlb_all();
+
+ /* Flush the entire cache to remove all aliases */
+ flush_cache_all();
+}
+EXPORT_SYMBOL(flush_cache_vmap_vunmap);
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-30 14:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-30 14:39 [PATCH] parisc: Implement flush_cache_vmap_vunmap John David Anglin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox