Commit b38fd42f authored by Kumar Gala's avatar Kumar Gala

powerpc/fsl-booke: Fixup 64-bit PTE reading for SMP support

We need to create a false data dependency to ensure the loads of
the pte are done in the right order.
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent 33a7f122
...@@ -579,12 +579,18 @@ interrupt_base: ...@@ -579,12 +579,18 @@ interrupt_base:
FIND_PTE FIND_PTE
andc. r13,r13,r11 /* Check permission */ andc. r13,r13,r11 /* Check permission */
bne 2f /* Bail if permission mismach */
#ifdef CONFIG_PTE_64BIT #ifdef CONFIG_PTE_64BIT
lwz r13, 0(r12) #ifdef CONFIG_SMP
subf r10,r11,r12 /* create false data dep */
lwzx r13,r11,r10 /* Get upper pte bits */
#else
lwz r13,0(r12) /* Get upper pte bits */
#endif
#endif #endif
bne 2f /* Bail if permission/valid mismach */
/* Jump to common tlb load */ /* Jump to common tlb load */
b finish_tlb_load b finish_tlb_load
2: 2:
...@@ -640,10 +646,20 @@ interrupt_base: ...@@ -640,10 +646,20 @@ interrupt_base:
FIND_PTE FIND_PTE
andc. r13,r13,r11 /* Check permission */ andc. r13,r13,r11 /* Check permission */
#ifdef CONFIG_PTE_64BIT
#ifdef CONFIG_SMP
subf r10,r11,r12 /* create false data dep */
lwzx r13,r11,r10 /* Get upper pte bits */
#else
lwz r13,0(r12) /* Get upper pte bits */
#endif
#endif
bne 2f /* Bail if permission mismach */ bne 2f /* Bail if permission mismach */
#ifdef CONFIG_PTE_64BIT #ifdef CONFIG_PTE_64BIT
lwz r13, 0(r12) lwz r13,0(r12)
#endif #endif
/* Jump to common TLB load point */ /* Jump to common TLB load point */
...@@ -702,7 +718,7 @@ interrupt_base: ...@@ -702,7 +718,7 @@ interrupt_base:
/* /*
* Both the instruction and data TLB miss get to this * Both the instruction and data TLB miss get to this
* point to load the TLB. * point to load the TLB.
* r10 - EA of fault * r10 - available to use
* r11 - TLB (info from Linux PTE) * r11 - TLB (info from Linux PTE)
* r12 - available to use * r12 - available to use
* r13 - upper bits of PTE (if PTE_64BIT) or available to use * r13 - upper bits of PTE (if PTE_64BIT) or available to use
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment