aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/book3s/64/mmu-hash.h
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>2019-04-17 18:29:17 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2019-04-21 23:12:40 +1000
commit1c946c1b7f2ba40bc9b521219ad34e5da3fc3088 (patch)
tree17e48a3b636c8479cd97c42cc33a5770f5e788ec /arch/powerpc/include/asm/book3s/64/mmu-hash.h
parentpowerpc/mm: Drop the unnecessary region check (diff)
downloadlinux-dev-1c946c1b7f2ba40bc9b521219ad34e5da3fc3088.tar.xz
linux-dev-1c946c1b7f2ba40bc9b521219ad34e5da3fc3088.zip
powerpc/mm/hash: Simplify the region id calculation.
This reduces multiple comparisons in get_region_id to a bit shift operation. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to '')
-rw-r--r--arch/powerpc/include/asm/book3s/64/mmu-hash.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/book3s/64/mmu-hash.h b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
index 8a30bf189f10..9a9adbeef070 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu-hash.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
@@ -823,7 +823,7 @@ static inline unsigned long get_kernel_context(unsigned long ea)
*/
ctx = 1 + ((ea & EA_MASK) >> MAX_EA_BITS_PER_CONTEXT);
} else
- ctx = region_id + MAX_KERNEL_CTX_CNT - 2;
+ ctx = region_id + MAX_KERNEL_CTX_CNT - 1;
return ctx;
}