diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2022-01-21 11:06:27 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-02-12 14:47:42 +0300 |
commit | 67484e0de9c93b4a9187bb49f45dfdaa8dc03c0b (patch) | |
tree | 20d80575a178024a7a2bd0c8a99318062a7fe67c /arch/powerpc/lib/sstep.c | |
parent | 9d44d1bd93b9a881f407b3202dc13fbd85fb5f1a (diff) | |
download | linux-67484e0de9c93b4a9187bb49f45dfdaa8dc03c0b.tar.xz |
powerpc/lib/sstep: Use l1_dcache_bytes() instead of opencoding
Don't opencode dcache size retrieval based on whether that's ppc32 or ppc64.
Use l1_dcache_bytes()
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/6c608fd4795e2d8ea1a0a449405a0087f76d8bb3.1642752375.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/lib/sstep.c')
-rw-r--r-- | arch/powerpc/lib/sstep.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c index a94b0cd0bdc5..b7316d697d80 100644 --- a/arch/powerpc/lib/sstep.c +++ b/arch/powerpc/lib/sstep.c @@ -1065,14 +1065,11 @@ Efault: int emulate_dcbz(unsigned long ea, struct pt_regs *regs) { int err; - unsigned long size; + unsigned long size = l1_dcache_bytes(); #ifdef __powerpc64__ - size = ppc64_caches.l1d.block_size; if (!(regs->msr & MSR_64BIT)) ea &= 0xffffffffUL; -#else - size = L1_CACHE_BYTES; #endif ea &= ~(size - 1); if (!address_ok(regs, ea, size)) |