Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-16 Thread Will Deacon
On Mon, Jun 09, 2014 at 02:38:59PM +0100, Catalin Marinas wrote: > On Mon, Jun 09, 2014 at 02:24:29PM +0100, Leif Lindholm wrote: > > On Mon, Jun 09, 2014 at 12:03:56PM +0100, Catalin Marinas wrote: > > > A quick grep through the kernel shows that we have other set_pte() calls > > > without

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-16 Thread Will Deacon
On Mon, Jun 09, 2014 at 02:24:29PM +0100, Leif Lindholm wrote: > On Mon, Jun 09, 2014 at 12:03:56PM +0100, Catalin Marinas wrote: > > So I'm proposing an alternative patch (which needs some benchmarking as > > well to see if anything is affected, maybe application startup time). I don't like the

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-16 Thread Will Deacon
On Mon, Jun 09, 2014 at 02:24:29PM +0100, Leif Lindholm wrote: On Mon, Jun 09, 2014 at 12:03:56PM +0100, Catalin Marinas wrote: So I'm proposing an alternative patch (which needs some benchmarking as well to see if anything is affected, maybe application startup time). I don't like the

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-16 Thread Will Deacon
On Mon, Jun 09, 2014 at 02:38:59PM +0100, Catalin Marinas wrote: On Mon, Jun 09, 2014 at 02:24:29PM +0100, Leif Lindholm wrote: On Mon, Jun 09, 2014 at 12:03:56PM +0100, Catalin Marinas wrote: A quick grep through the kernel shows that we have other set_pte() calls without additional

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-10 Thread Catalin Marinas
On Mon, Jun 09, 2014 at 05:40:05PM +0100, Steve Capper wrote: > On Mon, Jun 09, 2014 at 02:38:59PM +0100, Catalin Marinas wrote: > > On Mon, Jun 09, 2014 at 02:24:29PM +0100, Leif Lindholm wrote: > > > On Mon, Jun 09, 2014 at 12:03:56PM +0100, Catalin Marinas wrote: > > > > A quick grep through

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-10 Thread Catalin Marinas
On Mon, Jun 09, 2014 at 05:40:05PM +0100, Steve Capper wrote: On Mon, Jun 09, 2014 at 02:38:59PM +0100, Catalin Marinas wrote: On Mon, Jun 09, 2014 at 02:24:29PM +0100, Leif Lindholm wrote: On Mon, Jun 09, 2014 at 12:03:56PM +0100, Catalin Marinas wrote: A quick grep through the kernel

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-09 Thread Steve Capper
On Mon, Jun 09, 2014 at 02:38:59PM +0100, Catalin Marinas wrote: > On Mon, Jun 09, 2014 at 02:24:29PM +0100, Leif Lindholm wrote: > > On Mon, Jun 09, 2014 at 12:03:56PM +0100, Catalin Marinas wrote: > > > A quick grep through the kernel shows that we have other set_pte() calls > > > without

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-09 Thread Catalin Marinas
On Mon, Jun 09, 2014 at 02:24:29PM +0100, Leif Lindholm wrote: > On Mon, Jun 09, 2014 at 12:03:56PM +0100, Catalin Marinas wrote: > > A quick grep through the kernel shows that we have other set_pte() calls > > without additional dsb() like create_mapping(), I think kvm_set_pte() as > > well. > >

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-09 Thread Leif Lindholm
On Mon, Jun 09, 2014 at 12:03:56PM +0100, Catalin Marinas wrote: > > > > > __early_set_fixmap does not do any synchronization when called to set > > > > > a > > > > > fixmap entry. Add call to flush_vmap_cache(). > > Did you hit a problem or it was just for safety? This fixes an abort when

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-09 Thread Catalin Marinas
On Fri, Jun 06, 2014 at 04:09:33PM +0100, Mark Salter wrote: > On Fri, 2014-06-06 at 15:53 +0100, Leif Lindholm wrote: > > On Fri, Jun 06, 2014 at 10:37:29AM -0400, Mark Salter wrote: > > > On Fri, 2014-06-06 at 11:29 +0100, Leif Lindholm wrote: > > > > __early_set_fixmap does not do any

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-09 Thread Catalin Marinas
On Fri, Jun 06, 2014 at 04:09:33PM +0100, Mark Salter wrote: On Fri, 2014-06-06 at 15:53 +0100, Leif Lindholm wrote: On Fri, Jun 06, 2014 at 10:37:29AM -0400, Mark Salter wrote: On Fri, 2014-06-06 at 11:29 +0100, Leif Lindholm wrote: __early_set_fixmap does not do any synchronization

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-09 Thread Leif Lindholm
On Mon, Jun 09, 2014 at 12:03:56PM +0100, Catalin Marinas wrote: __early_set_fixmap does not do any synchronization when called to set a fixmap entry. Add call to flush_vmap_cache(). Did you hit a problem or it was just for safety? This fixes an abort when accessing early UEFI

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-09 Thread Catalin Marinas
On Mon, Jun 09, 2014 at 02:24:29PM +0100, Leif Lindholm wrote: On Mon, Jun 09, 2014 at 12:03:56PM +0100, Catalin Marinas wrote: A quick grep through the kernel shows that we have other set_pte() calls without additional dsb() like create_mapping(), I think kvm_set_pte() as well. So I'm

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-09 Thread Steve Capper
On Mon, Jun 09, 2014 at 02:38:59PM +0100, Catalin Marinas wrote: On Mon, Jun 09, 2014 at 02:24:29PM +0100, Leif Lindholm wrote: On Mon, Jun 09, 2014 at 12:03:56PM +0100, Catalin Marinas wrote: A quick grep through the kernel shows that we have other set_pte() calls without additional

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-06 Thread Mark Salter
On Fri, 2014-06-06 at 15:53 +0100, Leif Lindholm wrote: > On Fri, Jun 06, 2014 at 10:37:29AM -0400, Mark Salter wrote: > > On Fri, 2014-06-06 at 11:29 +0100, Leif Lindholm wrote: > > > __early_set_fixmap does not do any synchronization when called to set a > > > fixmap entry. Add call to

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-06 Thread Leif Lindholm
On Fri, Jun 06, 2014 at 10:37:29AM -0400, Mark Salter wrote: > On Fri, 2014-06-06 at 11:29 +0100, Leif Lindholm wrote: > > __early_set_fixmap does not do any synchronization when called to set a > > fixmap entry. Add call to flush_vmap_cache(). > > > > Tested on hardware. > > > > Signed-off-by:

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-06 Thread Mark Salter
On Fri, 2014-06-06 at 11:29 +0100, Leif Lindholm wrote: > __early_set_fixmap does not do any synchronization when called to set a > fixmap entry. Add call to flush_vmap_cache(). > > Tested on hardware. > > Signed-off-by: Leif Lindholm > Tested-by: Graeme Gregory > Cc: Steve Capper > --- >

[PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-06 Thread Leif Lindholm
__early_set_fixmap does not do any synchronization when called to set a fixmap entry. Add call to flush_vmap_cache(). Tested on hardware. Signed-off-by: Leif Lindholm Tested-by: Graeme Gregory Cc: Steve Capper --- arch/arm64/mm/ioremap.c |5 +++-- 1 file changed, 3 insertions(+), 2

[PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-06 Thread Leif Lindholm
__early_set_fixmap does not do any synchronization when called to set a fixmap entry. Add call to flush_vmap_cache(). Tested on hardware. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Tested-by: Graeme Gregory graeme.greg...@linaro.org Cc: Steve Capper steve.cap...@linaro.org ---

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-06 Thread Mark Salter
On Fri, 2014-06-06 at 11:29 +0100, Leif Lindholm wrote: __early_set_fixmap does not do any synchronization when called to set a fixmap entry. Add call to flush_vmap_cache(). Tested on hardware. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Tested-by: Graeme Gregory

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-06 Thread Leif Lindholm
On Fri, Jun 06, 2014 at 10:37:29AM -0400, Mark Salter wrote: On Fri, 2014-06-06 at 11:29 +0100, Leif Lindholm wrote: __early_set_fixmap does not do any synchronization when called to set a fixmap entry. Add call to flush_vmap_cache(). Tested on hardware. Signed-off-by: Leif Lindholm

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-06 Thread Mark Salter
On Fri, 2014-06-06 at 15:53 +0100, Leif Lindholm wrote: On Fri, Jun 06, 2014 at 10:37:29AM -0400, Mark Salter wrote: On Fri, 2014-06-06 at 11:29 +0100, Leif Lindholm wrote: __early_set_fixmap does not do any synchronization when called to set a fixmap entry. Add call to