From mboxrd@z Thu Jan 1 00:00:00 1970 From: rabin@rab.in (Rabin Vincent) Date: Tue, 16 Mar 2010 00:02:58 +0530 Subject: [PATCH 06/10] ARM: ftrace: add Thumb-2 support In-Reply-To: <1268605815.2168.6.camel@e102109-lin.cambridge.arm.com> References: <1268462987-8271-1-git-send-email-rabin@rab.in> <1268462987-8271-7-git-send-email-rabin@rab.in> <1268605815.2168.6.camel@e102109-lin.cambridge.arm.com> Message-ID: <20100315183258.GA2141@debian> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Sun, Mar 14, 2010 at 10:30:15PM +0000, Catalin Marinas wrote: > On Sat, 2010-03-13 at 06:49 +0000, Rabin Vincent wrote: > > - The problem with the "mov lr, pc", is that it does not set the lsb when > > storing the pc in lr. The called function returns with "bx lr", and the > > mode changes to ARM. The blx is to avoid this. > > I'm not familiar with ftrace but why does the called function returns > using "bx lr". Is this generated by the compiler? I had the impression > that if we don't enable interworking, we wouldn't get this instruction > (but haven't tried this yet). There's nothing special about the called function: it's just a regular C function. GCC uses "bx lr" for the return. Rabin