summaryrefslogtreecommitdiff
path: root/arch/powerpc/mm
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2014-05-22 21:10:35 (GMT)
committerRichard Schmitt <richard.schmitt@freescale.com>2014-05-26 14:08:07 (GMT)
commit66458337a43ac940a1c6add44ffcc3fdfee20ee8 (patch)
tree676fb96dc43e70ebf7e65fce88ca6bb9762cf587 /arch/powerpc/mm
parent99a5e1c100c6dd6330f000fae498f077ad85c84a (diff)
downloadlinux-fsl-qoriq-66458337a43ac940a1c6add44ffcc3fdfee20ee8.tar.xz
powerpc/e6500: hw tablewalk: fix recursive tlb lock on cpu 0
Commit e2929e1e0ab910995090ce0714beab75618db694 "powerpc/e6500: Make TLB lock recursive" introduced a bug whereby cpu 0 uses the same value for "lock held" as is used to indicate that the lock is free. This means that cpu 1 can acquire the lock whenever it wants, regardless of whether cpu 0 has it locked, which in turn means we can get duplicate TLB entries. Add one to the CPU value to ensure we do not use zero as a "lock held" value. Signed-off-by: Scott Wood <scottwood@freescale.com> Change-Id: I8c8013adc2e153f19d780a3b202c993054feb47f Reviewed-on: http://git.am.freescale.net:8181/12823 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Mihai Claudiu Caraman <mihai.caraman@freescale.com> Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r--arch/powerpc/mm/tlb_low_64e.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/mm/tlb_low_64e.S b/arch/powerpc/mm/tlb_low_64e.S
index 6bc4015..3c21307 100644
--- a/arch/powerpc/mm/tlb_low_64e.S
+++ b/arch/powerpc/mm/tlb_low_64e.S
@@ -374,6 +374,7 @@ BEGIN_FTR_SECTION
lhz r10,PACAPACAINDEX(r13)
cmpdi r15,0
cmpdi cr1,r15,1 /* set cr1.eq = 0 for non-recursive */
+ addi r10,r10,1
bne 3f
stbcx. r10,0,r11
bne 2b