Re: [RFC PATCH 2/2] mm: mmu_notifier fix for tlb_end_vma (build failures)

2018-08-24 Thread Palmer Dabbelt
On Fri, 24 Aug 2018 06:50:48 PDT (-0700), Will Deacon wrote: On Fri, Aug 24, 2018 at 02:34:27PM +0100, Will Deacon wrote: On Fri, Aug 24, 2018 at 06:24:19AM -0700, Guenter Roeck wrote: > On Fri, Aug 24, 2018 at 02:10:27PM +0100, Will Deacon wrote: > > On Fri, Aug 24, 2018 at 06:07:22AM -0700, Gu

Re: [RFC PATCH 2/2] mm: mmu_notifier fix for tlb_end_vma (build failures)

2018-08-24 Thread Guenter Roeck
On Fri, Aug 24, 2018 at 03:25:33PM +0100, Will Deacon wrote: > On Fri, Aug 24, 2018 at 07:06:51AM -0700, Guenter Roeck wrote: > > On 08/24/2018 06:50 AM, Will Deacon wrote: > > > > >>-#include > > >>+struct mmu_gather; > > >> static inline void tlb_flush(struct mmu_gather *tlb) > > >> { > > >>

Re: [RFC PATCH 2/2] mm: mmu_notifier fix for tlb_end_vma (build failures)

2018-08-24 Thread Will Deacon
On Fri, Aug 24, 2018 at 07:06:51AM -0700, Guenter Roeck wrote: > On 08/24/2018 06:50 AM, Will Deacon wrote: > > >>-#include > >>+struct mmu_gather; > >> static inline void tlb_flush(struct mmu_gather *tlb) > >> { > >>flush_tlb_mm(tlb->mm); > > > >Bah, didn't spot the dereference so this won

Re: [RFC PATCH 2/2] mm: mmu_notifier fix for tlb_end_vma (build failures)

2018-08-24 Thread Guenter Roeck
On 08/24/2018 06:50 AM, Will Deacon wrote: -#include +struct mmu_gather; static inline void tlb_flush(struct mmu_gather *tlb) { flush_tlb_mm(tlb->mm); Bah, didn't spot the dereference so this won't work either. You basically just need to copy what I did for arm64 in d475fac957

Re: [RFC PATCH 2/2] mm: mmu_notifier fix for tlb_end_vma (build failures)

2018-08-24 Thread Guenter Roeck
On Fri, Aug 24, 2018 at 02:50:48PM +0100, Will Deacon wrote: > > > > Sorry, I was a bit quick of the mark there. You'll need a forward > > declaration for the paramater type. Here it is with a commit message, > > although still untested because I haven't got round to setting up a riscv > > toolcha

Re: [RFC PATCH 2/2] mm: mmu_notifier fix for tlb_end_vma (build failures)

2018-08-24 Thread Will Deacon
On Fri, Aug 24, 2018 at 02:34:27PM +0100, Will Deacon wrote: > On Fri, Aug 24, 2018 at 06:24:19AM -0700, Guenter Roeck wrote: > > On Fri, Aug 24, 2018 at 02:10:27PM +0100, Will Deacon wrote: > > > On Fri, Aug 24, 2018 at 06:07:22AM -0700, Guenter Roeck wrote: > > > > On Thu, Aug 23, 2018 at 06:47:0

Re: [RFC PATCH 2/2] mm: mmu_notifier fix for tlb_end_vma (build failures)

2018-08-24 Thread Will Deacon
On Fri, Aug 24, 2018 at 06:24:19AM -0700, Guenter Roeck wrote: > On Fri, Aug 24, 2018 at 02:10:27PM +0100, Will Deacon wrote: > > On Fri, Aug 24, 2018 at 06:07:22AM -0700, Guenter Roeck wrote: > > > On Thu, Aug 23, 2018 at 06:47:09PM +1000, Nicholas Piggin wrote: > > > > The generic tlb_end_vma doe

Re: [RFC PATCH 2/2] mm: mmu_notifier fix for tlb_end_vma (build failures)

2018-08-24 Thread Guenter Roeck
On Fri, Aug 24, 2018 at 02:10:27PM +0100, Will Deacon wrote: > On Fri, Aug 24, 2018 at 06:07:22AM -0700, Guenter Roeck wrote: > > On Thu, Aug 23, 2018 at 06:47:09PM +1000, Nicholas Piggin wrote: > > > The generic tlb_end_vma does not call invalidate_range mmu notifier, > > > and it resets resets th

Re: [RFC PATCH 2/2] mm: mmu_notifier fix for tlb_end_vma (build failures)

2018-08-24 Thread Will Deacon
On Fri, Aug 24, 2018 at 06:07:22AM -0700, Guenter Roeck wrote: > On Thu, Aug 23, 2018 at 06:47:09PM +1000, Nicholas Piggin wrote: > > The generic tlb_end_vma does not call invalidate_range mmu notifier, > > and it resets resets the mmu_gather range, which means the notifier > > won't be called on p

Re: [RFC PATCH 2/2] mm: mmu_notifier fix for tlb_end_vma (build failures)

2018-08-24 Thread Guenter Roeck
On Thu, Aug 23, 2018 at 06:47:09PM +1000, Nicholas Piggin wrote: > The generic tlb_end_vma does not call invalidate_range mmu notifier, > and it resets resets the mmu_gather range, which means the notifier > won't be called on part of the range in case of an unmap that spans > multiple vmas. > > A

Re: [RFC PATCH 2/2] mm: mmu_notifier fix for tlb_end_vma

2018-08-23 Thread Will Deacon
On Thu, Aug 23, 2018 at 06:47:09PM +1000, Nicholas Piggin wrote: > The generic tlb_end_vma does not call invalidate_range mmu notifier, > and it resets resets the mmu_gather range, which means the notifier > won't be called on part of the range in case of an unmap that spans > multiple vmas. > > A

Re: [RFC PATCH 2/2] mm: mmu_notifier fix for tlb_end_vma

2018-08-23 Thread Catalin Marinas
On Thu, Aug 23, 2018 at 06:47:09PM +1000, Nicholas Piggin wrote: > The generic tlb_end_vma does not call invalidate_range mmu notifier, > and it resets resets the mmu_gather range, which means the notifier > won't be called on part of the range in case of an unmap that spans > multiple vmas. > > A

[RFC PATCH 2/2] mm: mmu_notifier fix for tlb_end_vma

2018-08-23 Thread Nicholas Piggin
The generic tlb_end_vma does not call invalidate_range mmu notifier, and it resets resets the mmu_gather range, which means the notifier won't be called on part of the range in case of an unmap that spans multiple vmas. ARM64 seems to be the only arch I could see that has notifiers and uses the ge