projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d44d1b
)
powerpc/lib/sstep: Use l1_dcache_bytes() instead of opencoding
author
Christophe Leroy
<christophe.leroy@csgroup.eu>
Fri, 21 Jan 2022 08:06:27 +0000
(08:06 +0000)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Sat, 12 Feb 2022 11:47:42 +0000
(22:47 +1100)
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
arch/powerpc/lib/sstep.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/lib/sstep.c
b/arch/powerpc/lib/sstep.c
index a94b0cd0bdc5ca61cc085b726c9fd9730dc056ef..b7316d697d80bf9131da7a816ebc2c8262ab00f7 100644
(file)
--- 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))