Skip to content

Commit 03f5439

Browse files
Ian Munsiempe
authored andcommitted
powerpc/mm: Use appropriate ESID mask in copro_calculate_slb()
This patch makes copro_calculate_slb() mask the ESID by the correct mask for 1T vs 256M segments. This has no effect by itself as the extra bits were ignored, but it makes debugging the segment table entries easier and means that we can directly compare the ESID values for duplicates without needing to worry about masking in the comparison. This will be used to simplify a comparison in the following patch. Signed-off-by: Ian Munsie <[email protected]> Reviewed-by: Aneesh Kumar K.V <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent b03a7f5 commit 03f5439

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/powerpc/mm/copro_fault.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ int copro_calculate_slb(struct mm_struct *mm, u64 ea, struct copro_slb *slb)
9999
u64 vsid;
100100
int psize, ssize;
101101

102-
slb->esid = (ea & ESID_MASK) | SLB_ESID_V;
103-
104102
switch (REGION_ID(ea)) {
105103
case USER_REGION_ID:
106104
pr_devel("%s: 0x%llx -- USER_REGION_ID\n", __func__, ea);
@@ -133,6 +131,7 @@ int copro_calculate_slb(struct mm_struct *mm, u64 ea, struct copro_slb *slb)
133131
vsid |= mmu_psize_defs[psize].sllp |
134132
((ssize == MMU_SEGSIZE_1T) ? SLB_VSID_B_1T : 0);
135133

134+
slb->esid = (ea & (ssize == MMU_SEGSIZE_1T ? ESID_MASK_1T : ESID_MASK)) | SLB_ESID_V;
136135
slb->vsid = vsid;
137136

138137
return 0;

0 commit comments

Comments
 (0)