From mboxrd@z Thu Jan 1 00:00:00 1970 From: will.deacon@arm.com (Will Deacon) Date: Fri, 27 Jul 2018 14:22:44 +0100 Subject: [RFC PATCH] arm64: mm: Export __sync_icache_dcache() for xen-privcmd In-Reply-To: <20180727120633.bjpfqswuxcy2ibqu@armageddon.cambridge.arm.com> References: <20180711231822.GG14131@decadent.org.uk> <20180727120633.bjpfqswuxcy2ibqu@armageddon.cambridge.arm.com> Message-ID: <20180727132243.GA28549@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Jul 27, 2018 at 01:06:33PM +0100, Catalin Marinas wrote: > On Thu, Jul 12, 2018 at 12:18:22AM +0100, Ben Hutchings wrote: > > 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 > > --- > > 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. > > Since apply_to_page_range() is EXPORT_SYMBOL_GPL() and a > pte_fn_t function would likely use set_pte_at(), I'm fine with this > patch for consistency. > > Acked-by: Catalin Marinas Okey doke, I'll pick this up for 4.19. Will