lkml.org 
[lkml]   [2021]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] MIPS: Make check condition for SDBBP consistent with EJTAG spec
On Tue, 9 Feb 2021, Thomas Bogendoerfer wrote:

> > > > diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S
> > > > index bcce32a..743d759 100644
> > > > --- a/arch/mips/kernel/genex.S
> > > > +++ b/arch/mips/kernel/genex.S
> > > > @@ -349,8 +349,8 @@ NESTED(ejtag_debug_handler, PT_SIZE, sp)
> > > > MTC0 k0, CP0_DESAVE
> > > > mfc0 k0, CP0_DEBUG
> > > > - sll k0, k0, 30 # Check for SDBBP.
> > > > - bgez k0, ejtag_return
> > > > + andi k0, k0, MIPS_DEBUG_DBP # Check for SDBBP.
> > > > + beqz k0, ejtag_return
> > > IMHO both implementations are doing the same thing.
> >
> > When I read the original code, it looks a little confusing
> > at first glance, the initial aim of this patch is to make the code
> > more readable and easier to understand.
>
> which your version is, but the description sounds like there is a semantic
> change somewhere (at least to me). So with a little bit rewording I'm
> fine with applying your patch.

Why is it confusing? This is assembly and you're supposed to understand
this stuff when looking into it. Don't fix what ain't broke!

Maciej

\
 
 \ /
  Last update: 2021-02-17 11:37    [W:0.178 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site