All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] arm64: mm: Export __sync_icache_dcache() for xen-privcmd
@ 2018-07-11 23:18 Ben Hutchings
  2018-07-27 12:06 ` Catalin Marinas
  0 siblings, 1 reply; 5+ messages in thread
From: Ben Hutchings @ 2018-07-11 23:18 UTC (permalink / raw)
  To: linux-arm-kernel

The xen-privcmd driver, which can be modular, calls set_pte_at()
which in turn may call __sync_icache_dcache().

The call to __sync_icache_dcache() may be optimised out because it is
conditional on !pte_special(), and xen-privcmd calls pte_mkspecial().
But it seems unwise to rely on this optimisation.

Fixes: 3ad0876554ca ("xen/privcmd: add IOCTL_PRIVCMD_MMAP_RESOURCE")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
This is an RFC since I haven't found an actual build failure.  Using
Debian's gcc 7.3 with either CC_OPTIMIZE_FOR_PERFORMANCE or
CC_OPTIMIZE_FOR_SIZE, the call *is* optimised away.

Ben.

 arch/arm64/mm/flush.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/mm/flush.c b/arch/arm64/mm/flush.c
index 1059884f9a6f..a76f0b983294 100644
--- a/arch/arm64/mm/flush.c
+++ b/arch/arm64/mm/flush.c
@@ -66,6 +66,7 @@ void __sync_icache_dcache(pte_t pte)
 		sync_icache_aliases(page_address(page),
 				    PAGE_SIZE << compound_order(page));
 }
+EXPORT_SYMBOL_GPL(__sync_icache_dcache);
 
 /*
  * This function is called when a page has been modified by the kernel. Mark

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

end of thread, other threads:[~2018-07-30  6:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-11 23:18 [RFC PATCH] arm64: mm: Export __sync_icache_dcache() for xen-privcmd Ben Hutchings
2018-07-27 12:06 ` Catalin Marinas
2018-07-27 13:22   ` Will Deacon
2018-07-30  6:46     ` Geert Uytterhoeven
2018-07-30  6:50       ` Geert Uytterhoeven

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.