[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5332bb98-0d65-c51f-8514-04d76bf448c4@csgroup.eu>
Date: Mon, 11 Jan 2021 07:57:13 +0100
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Nicholas Piggin <npiggin@...il.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Michael Ellerman <mpe@...erman.id.au>,
Paul Mackerras <paulus@...ba.org>
Cc: linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v1 06/15] powerpc: Remove address and errorcode arguments
from do_break()
Le 27/12/2020 à 04:25, Nicholas Piggin a écrit :
> Excerpts from Christophe Leroy's message of December 22, 2020 11:28 pm:
>> Let do_break() retrieve address and errorcode from regs.
>>
>> This simplifies the code and shouldn't impeed performance as
>> address and errorcode are likely still hot in the cache.
>>
>> Suggested-by: Nicholas Piggin <npiggin@...il.com>
>> Signed-off-by: Christophe Leroy <christophe.leroy@...roup.eu>
>> ---
>> arch/powerpc/include/asm/debug.h | 3 +--
>> arch/powerpc/kernel/exceptions-64s.S | 2 --
>> arch/powerpc/kernel/head_8xx.S | 5 -----
>> arch/powerpc/kernel/process.c | 8 +++-----
>> 4 files changed, 4 insertions(+), 14 deletions(-)
>>
>> diff --git a/arch/powerpc/include/asm/debug.h b/arch/powerpc/include/asm/debug.h
>> index ec57daf87f40..0550eceab3ca 100644
>> --- a/arch/powerpc/include/asm/debug.h
>> +++ b/arch/powerpc/include/asm/debug.h
>> @@ -52,8 +52,7 @@ extern void do_send_trap(struct pt_regs *regs, unsigned long address,
>> unsigned long error_code, int brkpt);
>> #else
>>
>> -extern void do_break(struct pt_regs *regs, unsigned long address,
>> - unsigned long error_code);
>> +void do_break(struct pt_regs *regs);
>> #endif
>>
>> #endif /* _ASM_POWERPC_DEBUG_H */
>> diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
>> index cfbd1d690033..3ea067bcbb95 100644
>> --- a/arch/powerpc/kernel/exceptions-64s.S
>> +++ b/arch/powerpc/kernel/exceptions-64s.S
>> @@ -3262,8 +3262,6 @@ handle_page_fault:
>>
>> /* We have a data breakpoint exception - handle it */
>> handle_dabr_fault:
>> - ld r4,_DAR(r1)
>> - ld r5,_DSISR(r1)
>> addi r3,r1,STACK_FRAME_OVERHEAD
>> bl do_break
>> /*
>> diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
>> index 52702f3db6df..81f3c984f50c 100644
>> --- a/arch/powerpc/kernel/head_8xx.S
>> +++ b/arch/powerpc/kernel/head_8xx.S
>> @@ -364,11 +364,6 @@ do_databreakpoint:
>> addi r3,r1,STACK_FRAME_OVERHEAD
>> mfspr r4,SPRN_BAR
>> stw r4,_DAR(r11)
>> -#ifdef CONFIG_VMAP_STACK
>> - lwz r5,_DSISR(r11)
>> -#else
>> - mfspr r5,SPRN_DSISR
>> -#endif
>
> I didn't think you can do this (at leastuntil after your patch 10). I have my
> !VMAP path doing mfspr r5,DSISR ; stw r3,_DSISR(r11);
>
Yes you are right, I went too quick.
Christophe
Powered by blists - more mailing lists