Re: [PATCH v2] MIPS: Make check condition for SDBBP consistent with EJTAG spec
From: "Maciej W. Rozycki" <macro@orcam.me.uk>
Date: 2021-02-16 14:08:37
Also in:
lkml
From: "Maciej W. Rozycki" <macro@orcam.me.uk>
Date: 2021-02-16 14:08:37
Also in:
lkml
On Tue, 9 Feb 2021, Thomas Bogendoerfer wrote:
quoted
quoted
quoted
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_returnIMHO 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