Fix breakage caused by tlb flush batch changes
BenH's commit a741e67969577163a4cfc78d7fd2753219087ef1 in powerpc.git, although (AFAICT) only intended to affect ppc64, also has side-effects which break 44x. I think 40x, 8xx and Freescale Book E are also affected, though I haven't tested them.
The problem lies in unconditionally removing flush_tlb_pending() from the versions of flush_tlb_mm(), flush_tlb_range() and flush_tlb_kernel_range() used on ppc64 - which are also used the embedded platforms mentioned above.
The patch below restores the necessary flushes and fixes the breakage for 44x. They should also fix any breakage for the other platforms, but again I haven't tested those.
include/asm-powerpc/tlbflush.h +9 -0
@@ -104,6 +104,9 @@ extern void update_mmu_cache(struct vm_astatic inline void flush_tlb_mm (struct mm_struct *mm) { +#ifndef CONFIG_PPC64 +flush_tlb_pending (); +#endif } static inline void flush_tlb_page(struct vm_area_struct *vma,
@@ -125,11 +128,17 @@ static inline void flush_tlb_page_nohashstatic inline void flush_tlb_range (struct vm_area_struct *vma,unsigned long start,unsigned long end) { +#ifndef CONFIG_PPC64 +flush_tlb_pending (); +#endif }static inline void flush_tlb_kernel_range (unsigned long start,unsigned long end) { +#ifndef CONFIG_PPC64 +flush_tlb_pending (); +#endif }#else /* 6xx, 7xx, 7xxx cpus */
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 5 lines · David Gibson
BenH's commit
a741e67969577163a4cfc78d7fd2753219087ef1in powerpc.git, although (AFAICT) only intended to affect ppc64, also has side-effects which break 44x. I think 40x, 8xx and Freescale Book E are also affected, though I haven't tested them.
Quoted 8 lines
The problem lies in unconditionally removing
flush_tlb_pending()from the versions offlush_tlb_mm(),flush_tlb_range()andflush_tlb_kernel_range()used on ppc64 - which are also used the embedded platforms mentioned above.The patch below restores the necessary flushes and fixes the breakage for 44x. They should also fix any breakage for the other platforms, but again I haven't tested those.
Damn, do these things use a batch at all ? If not, they should defkine the whole set a functions separately rather than ifdef's like that... flush_tlb_pending is a bad name for that.
Ben.
Quoted 11 lines · Benjamin Herrenschmidt
Quoted 10 lines · David Gibson
BenH's commit
a741e67969577163a4cfc78d7fd2753219087ef1in powerpc.git, although (AFAICT) only intended to affect ppc64, also has side-effects which break 44x. I think 40x, 8xx and Freescale Book E are also affected, though I haven't tested them.The problem lies in unconditionally removing
flush_tlb_pending()from the versions offlush_tlb_mm(),flush_tlb_range()andflush_tlb_kernel_range()used on ppc64 - which are also used the embedded platforms mentioned above.
Quoted 7 lines
Quoted 3 lines
The patch below restores the necessary flushes and fixes the breakage for 44x. They should also fix any breakage for the other platforms, but again I haven't tested those.
Damn, do these things use a batch at all ? If not, they should defkine the whole set a functions separately rather than ifdef's like that...
flush_tlb_pendingis a bad name for that.
No they don't and yes they should. I was planning to do such a redefinition along with other cleanups related to splitting the MMU related .h files up by CPU/MMU family.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson