On 6/18/19 12:01 PM, Christophe Leroy wrote:
>> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
>> index f002d2ffff86..265fac9fb3a4 100644
>> --- a/arch/powerpc/kernel/process.c
>> +++ b/arch/powerpc/kernel/process.c
>> @@ -793,10 +793,22 @@ static inline int set_dabr(struct arch_hw_breakpoint
>> *brk)
>> return __set_dabr(dabr, dabrx);
>> }
>> +static int disable_dawr(void)
>> +{
>> + if (ppc_md.set_dawr)
>> + return ppc_md.set_dawr(0, 0);
>> +
>> + mtspr(SPRN_DAWRX, 0);
>
> And SPRN_DAWR ?
Setting DAWRx with 0 should be enough to disable the breakpoint.
- Re: [PATCH 2/5] Powerpc/hw-breakpoint: Refactor hw_b... Christophe Leroy
- Re: [PATCH 2/5] Powerpc/hw-breakpoint: Refactor ... Ravi Bangoria
- [PATCH 3/5] Powerpc/hw-breakpoint: Refactor set_dawr() Ravi Bangoria
- Re: [PATCH 3/5] Powerpc/hw-breakpoint: Refactor set_... Michael Neuling
- Re: [PATCH 3/5] Powerpc/hw-breakpoint: Refactor ... Ravi Bangoria
- Re: [PATCH 3/5] Powerpc/hw-breakpoint: Refactor set_... Christophe Leroy
- [PATCH 4/5] Powerpc/hw-breakpoint: Optimize disable path Ravi Bangoria
- Re: [PATCH 4/5] Powerpc/hw-breakpoint: Optimize disa... Michael Neuling
- Re: [PATCH 4/5] Powerpc/hw-breakpoint: Optimize ... Ravi Bangoria
- Re: [PATCH 4/5] Powerpc/hw-breakpoint: Optimize disa... Christophe Leroy
- Re: [PATCH 4/5] Powerpc/hw-breakpoint: Optimize ... Ravi Bangoria
- [PATCH 5/5] Powerpc/Watchpoint: Fix length calculation fo... Ravi Bangoria
- Re: [PATCH 5/5] Powerpc/Watchpoint: Fix length calcu... Christophe Leroy
- Re: [PATCH 5/5] Powerpc/Watchpoint: Fix length c... Ravi Bangoria
- Re: [PATCH 5/5] Powerpc/Watchpoint: Fix length calcu... Michael Neuling
- Re: [PATCH 5/5] Powerpc/Watchpoint: Fix length c... Ravi Bangoria
- Re: [PATCH 0/5] Powerpc/hw-breakpoint: Fixes plus Code re... Christophe Leroy
- Re: [PATCH 0/5] Powerpc/hw-breakpoint: Fixes plus Co... Michael Neuling
- Re: [PATCH 0/5] Powerpc/hw-breakpoint: Fixes plu... Ravi Bangoria
