diff options
Diffstat (limited to 'arch/ppc64/mm/slb_low.S')
-rw-r--r-- | arch/ppc64/mm/slb_low.S | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/arch/ppc64/mm/slb_low.S b/arch/ppc64/mm/slb_low.S index 8379d678f70f..698d6b9ed6d1 100644 --- a/arch/ppc64/mm/slb_low.S +++ b/arch/ppc64/mm/slb_low.S | |||
@@ -89,32 +89,29 @@ END_FTR_SECTION_IFSET(CPU_FTR_16M_PAGE) | |||
89 | b 9f | 89 | b 9f |
90 | 90 | ||
91 | 0: /* user address: proto-VSID = context<<15 | ESID */ | 91 | 0: /* user address: proto-VSID = context<<15 | ESID */ |
92 | li r11,SLB_VSID_USER | 92 | srdi. r9,r3,USER_ESID_BITS |
93 | |||
94 | srdi. r9,r3,13 | ||
95 | bne- 8f /* invalid ea bits set */ | 93 | bne- 8f /* invalid ea bits set */ |
96 | 94 | ||
97 | #ifdef CONFIG_HUGETLB_PAGE | 95 | #ifdef CONFIG_HUGETLB_PAGE |
98 | BEGIN_FTR_SECTION | 96 | BEGIN_FTR_SECTION |
99 | /* check against the hugepage ranges */ | 97 | lhz r9,PACAHIGHHTLBAREAS(r13) |
100 | cmpldi r3,(TASK_HPAGE_END>>SID_SHIFT) | 98 | srdi r11,r3,(HTLB_AREA_SHIFT-SID_SHIFT) |
101 | bge 6f /* >= TASK_HPAGE_END */ | 99 | srd r9,r9,r11 |
102 | cmpldi r3,(TASK_HPAGE_BASE>>SID_SHIFT) | 100 | lhz r11,PACALOWHTLBAREAS(r13) |
103 | bge 5f /* TASK_HPAGE_BASE..TASK_HPAGE_END */ | 101 | srd r11,r11,r3 |
104 | cmpldi r3,16 | 102 | or r9,r9,r11 |
105 | bge 6f /* 4GB..TASK_HPAGE_BASE */ | 103 | END_FTR_SECTION_IFSET(CPU_FTR_16M_PAGE) |
106 | 104 | #endif /* CONFIG_HUGETLB_PAGE */ | |
107 | lhz r9,PACAHTLBSEGS(r13) | 105 | |
108 | srd r9,r9,r3 | 106 | li r11,SLB_VSID_USER |
109 | andi. r9,r9,1 | 107 | |
110 | beq 6f | 108 | #ifdef CONFIG_HUGETLB_PAGE |
111 | 109 | BEGIN_FTR_SECTION | |
112 | 5: /* this is a hugepage user address */ | 110 | rldimi r11,r9,8,55 /* shift masked bit into SLB_VSID_L */ |
113 | li r11,(SLB_VSID_USER|SLB_VSID_L) | ||
114 | END_FTR_SECTION_IFSET(CPU_FTR_16M_PAGE) | 111 | END_FTR_SECTION_IFSET(CPU_FTR_16M_PAGE) |
115 | #endif /* CONFIG_HUGETLB_PAGE */ | 112 | #endif /* CONFIG_HUGETLB_PAGE */ |
116 | 113 | ||
117 | 6: ld r9,PACACONTEXTID(r13) | 114 | ld r9,PACACONTEXTID(r13) |
118 | rldimi r3,r9,USER_ESID_BITS,0 | 115 | rldimi r3,r9,USER_ESID_BITS,0 |
119 | 116 | ||
120 | 9: /* r3 = protovsid, r11 = flags, r10 = esid_data, cr7 = <>KERNELBASE */ | 117 | 9: /* r3 = protovsid, r11 = flags, r10 = esid_data, cr7 = <>KERNELBASE */ |