[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.21.1905101706440.12665@eddie.linux-mips.org>
Date: Fri, 10 May 2019 17:16:56 +0100 (BST)
From: "Maciej W. Rozycki" <macro@...ux-mips.org>
To: Paul Burton <paul.burton@...s.com>
cc: Valentin Schneider <valentin.schneider@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ralf Baechle <ralf@...ux-mips.org>,
James Hogan <jhogan@...nel.org>,
"linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>
Subject: Re: [PATCH 06/14] MIPS: entry: Remove unneeded need_resched() loop
On Thu, 14 Mar 2019, Paul Burton wrote:
> > @@ -66,7 +65,7 @@ need_resched:
> > andi t0, 1
> > beqz t0, restore_all
> > jal preempt_schedule_irq
> > - b need_resched
> > + j restore_all
>
> One nit - why change from branch to jump? It's not a big deal, but I'd
> prefer we stick with the branch ("b") instruction for a few reasons:
>
> - restore_all is nearby so there's no issue with it being out of range
> of a branch in any variation of the MIPS ISA.
FYI, if it does go out of range for whatever reason, then for non-PIC
code GAS will relax it to a jump anyway (with a relocation attached); for
the regular MIPS ISA that is, where it has been doing that since forever
(I meant to implement this for the microMIPS ISA too, but IIRC there was a
complication there, probably coming from the existing more complex branch
relaxation code and/or slightly different use of relocations, and then it
fell through the cracks).
Maciej
Powered by blists - more mailing lists