Re: [PATCH 3/3] powerpc/mm/radix: Flush page walk cache when freeing page table

2016-06-02 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > On Thu, 2016-06-02 at 15:16 +0530, Aneesh Kumar K.V wrote: >> >> >> +/* >> + * flush the page walk cache for the address >> + */ >> +void flush_tlb_pgtable(struct mmu_gather *tlb, unsigned long address) >> +{ >> +   struct mm_struct *mm = tlb->mm; >> +  

Re: [PATCH 3/3] powerpc/mm/radix: Flush page walk cache when freeing page table

2016-06-02 Thread Benjamin Herrenschmidt
On Thu, 2016-06-02 at 15:16 +0530, Aneesh Kumar K.V wrote: > > > +/* > + * flush the page walk cache for the address > + */ > +void flush_tlb_pgtable(struct mmu_gather *tlb, unsigned long address) > +{ > +   struct mm_struct *mm = tlb->mm; > +   /* > +    * flush the page table walk c

[PATCH 3/3] powerpc/mm/radix: Flush page walk cache when freeing page table

2016-06-02 Thread Aneesh Kumar K.V
Even though a tlb_flush() does a flush with invalidate all cache, we can end up doing an RCU page table free, before calling tlb_flush(). That means we can have page walk cache entries even after we free the page table pages. This can result in us doing wrong page table walk. Avoid this by doing p