From: Kumar Gala <galak@kernel.crashing.org>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH v2 3/4] powerpc/fsl-booke: Fixup 64-bit PTE reading for SMP support
Date: Fri, 29 Aug 2008 08:56:52 -0500 [thread overview]
Message-ID: <1220018213-12959-3-git-send-email-galak@kernel.crashing.org> (raw)
In-Reply-To: <1220018213-12959-2-git-send-email-galak@kernel.crashing.org>
We need to create a false data dependency to ensure the loads of
the pte are done in the right order.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/kernel/head_fsl_booke.S | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index 3cb52fa..fa39cce 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -579,13 +579,19 @@ interrupt_base:
FIND_PTE
andc. r13,r13,r11 /* Check permission */
- bne 2f /* Bail if permission mismach */
#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
+
+ bne 2f /* Bail if permission/valid mismach */
- /* Jump to common tlb load */
+ /* Jump to common tlb load */
b finish_tlb_load
2:
/* The bailout. Restore registers to pre-exception conditions
@@ -640,6 +646,16 @@ interrupt_base:
FIND_PTE
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 */
#ifdef CONFIG_PTE_64BIT
@@ -702,7 +718,7 @@ interrupt_base:
/*
* Both the instruction and data TLB miss get to this
* point to load the TLB.
- * r10 - EA of fault
+ * r10 - available to use
* r11 - TLB (info from Linux PTE)
* r12 - available to use
* r13 - upper bits of PTE (if PTE_64BIT) or available to use
--
1.5.5.1
next prev parent reply other threads:[~2008-08-29 13:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-29 13:56 [PATCH v2 1/4] powerpc: Introduce local (non-broadcast) forms of tlb invalidates Kumar Gala
2008-08-29 13:56 ` [PATCH v2 2/4] powerpc: Fixes for CONFIG_PTE_64BIT for SMP support Kumar Gala
2008-08-29 13:56 ` Kumar Gala [this message]
2008-08-29 13:56 ` [PATCH v2 4/4] powerpc/mm: Implement _PAGE_SPECIAL & pte_special() for 32-bit Kumar Gala
2008-08-29 15:50 ` [PATCH v2 2/4] powerpc: Fixes for CONFIG_PTE_64BIT for SMP support Becky Bruce
2008-09-03 17:54 ` Becky Bruce
2008-08-29 15:20 ` [PATCH v2 1/4] powerpc: Introduce local (non-broadcast) forms of tlb invalidates Becky Bruce
2008-09-03 16:12 ` Scott Wood
2008-09-03 18:51 ` Kumar Gala
2008-09-04 3:06 ` Benjamin Herrenschmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1220018213-12959-3-git-send-email-galak@kernel.crashing.org \
--to=galak@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.