From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: benh@kernel.crashing.org, paulus@samba.org
Cc: linuxppc-dev@lists.ozlabs.org,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: [PATCH -V7 09/12] arch/powerpc: Use the required number of VSID bits in slbmte
Date: Tue, 4 Sep 2012 14:31:26 +0530 [thread overview]
Message-ID: <1346749289-16986-10-git-send-email-aneesh.kumar@linux.vnet.ibm.com> (raw)
In-Reply-To: <1346749289-16986-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
ASM_VSID_SCRAMBLE can leave non-zero bits in the high 28 bits of the result
for 256MB segment (40 bits for 1T segment). Properly mask them before using
the values in slbmte
Reviewed-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
arch/powerpc/mm/slb_low.S | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S
index e132dc6..3b75f19 100644
--- a/arch/powerpc/mm/slb_low.S
+++ b/arch/powerpc/mm/slb_low.S
@@ -223,7 +223,11 @@ _GLOBAL(slb_allocate_user)
*/
slb_finish_load:
ASM_VSID_SCRAMBLE(r10,r9,256M)
- rldimi r11,r10,SLB_VSID_SHIFT,16 /* combine VSID and flags */
+ /*
+ * bits above VSID_BITS_256M need to be ignored from r10
+ * also combine VSID and flags
+ */
+ rldimi r11,r10,SLB_VSID_SHIFT,(64 - (SLB_VSID_SHIFT + VSID_BITS_256M))
/* r3 = EA, r11 = VSID data */
/*
@@ -287,7 +291,11 @@ _GLOBAL(slb_compare_rr_to_size)
slb_finish_load_1T:
srdi r10,r10,40-28 /* get 1T ESID */
ASM_VSID_SCRAMBLE(r10,r9,1T)
- rldimi r11,r10,SLB_VSID_SHIFT_1T,16 /* combine VSID and flags */
+ /*
+ * bits above VSID_BITS_1T need to be ignored from r10
+ * also combine VSID and flags
+ */
+ rldimi r11,r10,SLB_VSID_SHIFT_1T,(64 - (SLB_VSID_SHIFT_1T + VSID_BITS_1T))
li r10,MMU_SEGSIZE_1T
rldimi r11,r10,SLB_VSID_SSIZE_SHIFT,0 /* insert segment size */
--
1.7.10
next prev parent reply other threads:[~2012-09-04 9:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-04 9:01 [PATCH -V7 0/12] arch/powerpc: Add 64TB support to ppc64 Aneesh Kumar K.V
2012-09-04 9:01 ` [PATCH -V7 01/12] arch/powerpc: Replace open coded CONTEXT_BITS value Aneesh Kumar K.V
2012-09-04 9:01 ` [PATCH -V7 02/12] arch/powerpc: Use hpt_va to compute virtual address Aneesh Kumar K.V
2012-09-04 9:01 ` [PATCH -V7 03/12] arch/powerpc: Simplify hpte_decode Aneesh Kumar K.V
2012-09-04 9:01 ` [PATCH -V7 04/12] arch/powerpc: Convert virtual address to vpn Aneesh Kumar K.V
2012-09-05 8:26 ` Paul Mackerras
2012-09-05 14:45 ` Aneesh Kumar K.V
2012-09-06 1:24 ` Paul Mackerras
2012-09-04 9:01 ` [PATCH -V7 05/12] arch/powerpc: Rename va " Aneesh Kumar K.V
2012-09-04 9:01 ` [PATCH -V7 06/12] arch/powerpc: Make KERN_VIRT_SIZE not dependend on PGTABLE_RANGE Aneesh Kumar K.V
2012-09-04 9:01 ` [PATCH -V7 07/12] arch/powerpc: Increase the slice range to 64TB Aneesh Kumar K.V
2012-09-05 23:47 ` Paul Mackerras
2012-09-04 9:01 ` [PATCH -V7 08/12] arch/powerpc: Make some of the PGTABLE_RANGE dependency explicit Aneesh Kumar K.V
2012-09-04 9:01 ` Aneesh Kumar K.V [this message]
2012-09-04 9:01 ` [PATCH -V7 10/12] arch/powerpc: Use 32bit array for slb cache Aneesh Kumar K.V
2012-09-04 9:01 ` [PATCH -V7 11/12] arch/powerpc: Add 64TB support Aneesh Kumar K.V
2012-09-06 1:21 ` Paul Mackerras
2012-09-04 9:01 ` [PATCH -V7 12/12] arch/powerpc: Update VSID allocation documentation Aneesh Kumar K.V
2012-09-06 1:23 ` Paul Mackerras
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=1346749289-16986-10-git-send-email-aneesh.kumar@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).