mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 16:15:11 +00:00
powerpc/breakpoint: Cleanup
cache_op_size() does exactly the same as l1_dcache_bytes(). Remove it. MSR_64BIT already exists, no need to enclode the check around #ifdef __powerpc64__ Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/6184b08088312a7d787d450eb902584e4ae77f7a.1632317816.git.christophe.leroy@csgroup.eu
This commit is contained in:
parent
fdacae8a84
commit
a61ec782a7
1 changed files with 3 additions and 12 deletions
|
@ -127,15 +127,6 @@ bool wp_check_constraints(struct pt_regs *regs, struct ppc_inst instr,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cache_op_size(void)
|
|
||||||
{
|
|
||||||
#ifdef __powerpc64__
|
|
||||||
return ppc64_caches.l1d.block_size;
|
|
||||||
#else
|
|
||||||
return L1_CACHE_BYTES;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void wp_get_instr_detail(struct pt_regs *regs, struct ppc_inst *instr,
|
void wp_get_instr_detail(struct pt_regs *regs, struct ppc_inst *instr,
|
||||||
int *type, int *size, unsigned long *ea)
|
int *type, int *size, unsigned long *ea)
|
||||||
{
|
{
|
||||||
|
@ -147,14 +138,14 @@ void wp_get_instr_detail(struct pt_regs *regs, struct ppc_inst *instr,
|
||||||
analyse_instr(&op, regs, *instr);
|
analyse_instr(&op, regs, *instr);
|
||||||
*type = GETTYPE(op.type);
|
*type = GETTYPE(op.type);
|
||||||
*ea = op.ea;
|
*ea = op.ea;
|
||||||
#ifdef __powerpc64__
|
|
||||||
if (!(regs->msr & MSR_64BIT))
|
if (!(regs->msr & MSR_64BIT))
|
||||||
*ea &= 0xffffffffUL;
|
*ea &= 0xffffffffUL;
|
||||||
#endif
|
|
||||||
|
|
||||||
*size = GETSIZE(op.type);
|
*size = GETSIZE(op.type);
|
||||||
if (*type == CACHEOP) {
|
if (*type == CACHEOP) {
|
||||||
*size = cache_op_size();
|
*size = l1_dcache_bytes();
|
||||||
*ea &= ~(*size - 1);
|
*ea &= ~(*size - 1);
|
||||||
} else if (*type == LOAD_VMX || *type == STORE_VMX) {
|
} else if (*type == LOAD_VMX || *type == STORE_VMX) {
|
||||||
*ea &= ~(*size - 1);
|
*ea &= ~(*size - 1);
|
||||||
|
|
Loading…
Reference in a new issue