From mboxrd@z Thu Jan 1 00:00:00 1970 From: ard.biesheuvel@linaro.org (Ard Biesheuvel) Date: Tue, 21 Apr 2015 15:28:14 +0200 Subject: your mail In-Reply-To: <20150421132139.GE3996@e103592.cambridge.arm.com> References: <20150421104634.GA3996@e103592.cambridge.arm.com> <20150421111042.GB3996@e103592.cambridge.arm.com> <20150421112420.GV12732@n2100.arm.linux.org.uk> <20150421125049.GW12732@n2100.arm.linux.org.uk> <20150421132139.GE3996@e103592.cambridge.arm.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 21 April 2015 at 15:21, Dave P Martin wrote: > On Tue, Apr 21, 2015 at 02:10:42PM +0100, Ard Biesheuvel wrote: >> On 21 April 2015 at 14:50, Russell King - ARM Linux >> wrote: >> > On Tue, Apr 21, 2015 at 12:24:20PM +0100, Russell King - ARM Linux wrote: >> >> We should probably create a badr macro to complement the adr pseudo-op >> >> which incorporates the BSYM thing so make this clearer - and a comment >> >> before it. This is really the case where BSYM should be used. >> > >> > Something like this. Note that I've also removed the BSYM() usage in >> > the KVM code. >> > >> >> Yes, that is much better. It is a pity that we still can't use '| 1' >> but the fact that you are forced to use 'adr' now probably mostly >> eliminates the risk regarding that. >> >> I did notice that are are 4 or 5 instances (commented inline) of an >> ARM to thumb mode switch which can just as easily be implemented as >> 'blx 1f' instead of using this badr macro (whose use we want to >> discourage, I assume, since the address arithmetic is still slightly >> dodgy). Do you think we should do something about that as well? > > Err, probably. That just looks like an oversight -- I think I'm > responsible for at least some of those. > > There's no good reason not to replace adr+BSYM+bx. > > For switches from ARM, this could be replaced with bx