]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
powerpc/e6500: hw tablewalk: make sure we invalidate and write to the same tlb entry
authorKevin Hao <haokexin@gmail.com>
Thu, 22 Oct 2015 12:23:48 +0000 (20:23 +0800)
committerScott Wood <scottwood@freescale.com>
Tue, 27 Oct 2015 23:14:40 +0000 (18:14 -0500)
commite1f580e8ced56d7c0a2b096e00e8b8e861d13671
tree5f3195381d584c766113abf63eac85e74508dc9d
parentda414bb923d95f1f59fbf534a0e2ef9f52ffc667
powerpc/e6500: hw tablewalk: make sure we invalidate and write to the same tlb entry

In order to workaround Erratum A-008139, we have to invalidate the
tlb entry with tlbilx before overwriting. Due to the performance
consideration, we don't add any memory barrier when acquire/release
the tcd lock. This means the two load instructions for esel_next do
have the possibility to return different value. This is definitely
not acceptable due to the Erratum A-008139. We have two options to
fix this issue:
  a) Add memory barrier when acquire/release tcd lock to order the
     load/store to esel_next.
  b) Just make sure to invalidate and write to the same tlb entry and
     tolerate the race that we may get the wrong value and overwrite
     the tlb entry just updated by the other thread.

We observe better performance using option b. So reserve an additional
register to save the value of the esel_next.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
arch/powerpc/include/asm/exception-64e.h
arch/powerpc/mm/tlb_low_64e.S