Commit 83383b73 authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Benjamin Herrenschmidt

powerpc/mm: Fix fallthrough bug in hpte_decode

We should not fallthrough different case statements in hpte_decode. Add
break statement to break out of the switch. The regression is introduced by
dcda287a "powerpc/mm: Simplify hpte_decode"
Reported-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent ad92c615
...@@ -554,6 +554,7 @@ static void hpte_decode(struct hash_pte *hpte, unsigned long slot, ...@@ -554,6 +554,7 @@ static void hpte_decode(struct hash_pte *hpte, unsigned long slot,
seg_off |= vpi << shift; seg_off |= vpi << shift;
} }
*vpn = vsid << (SID_SHIFT - VPN_SHIFT) | seg_off >> VPN_SHIFT; *vpn = vsid << (SID_SHIFT - VPN_SHIFT) | seg_off >> VPN_SHIFT;
break;
case MMU_SEGSIZE_1T: case MMU_SEGSIZE_1T:
/* We only have 40 - 23 bits of seg_off in avpn */ /* We only have 40 - 23 bits of seg_off in avpn */
seg_off = (avpn & 0x1ffff) << 23; seg_off = (avpn & 0x1ffff) << 23;
...@@ -563,6 +564,7 @@ static void hpte_decode(struct hash_pte *hpte, unsigned long slot, ...@@ -563,6 +564,7 @@ static void hpte_decode(struct hash_pte *hpte, unsigned long slot,
seg_off |= vpi << shift; seg_off |= vpi << shift;
} }
*vpn = vsid << (SID_SHIFT_1T - VPN_SHIFT) | seg_off >> VPN_SHIFT; *vpn = vsid << (SID_SHIFT_1T - VPN_SHIFT) | seg_off >> VPN_SHIFT;
break;
default: default:
*vpn = size = 0; *vpn = size = 0;
} }
......
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