From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754314Ab0CNWbt (ORCPT ); Sun, 14 Mar 2010 18:31:49 -0400 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:39651 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751592Ab0CNWbq (ORCPT ); Sun, 14 Mar 2010 18:31:46 -0400 Subject: Re: [PATCH 06/10] ARM: ftrace: add Thumb-2 support From: Catalin Marinas To: Rabin Vincent Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Steven Rostedt , Frederic Weisbecker , Ingo Molnar , Abhishek Sagar , Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= In-Reply-To: <1268462987-8271-7-git-send-email-rabin@rab.in> References: <1268462987-8271-1-git-send-email-rabin@rab.in> <1268462987-8271-7-git-send-email-rabin@rab.in> Content-Type: text/plain; charset="UTF-8" Organization: ARM Limited Date: Sun, 14 Mar 2010 22:30:15 +0000 Message-ID: <1268605815.2168.6.camel@e102109-lin.cambridge.arm.com> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 14 Mar 2010 22:30:16.0833 (UTC) FILETIME=[EBF7A710:01CAC3C5] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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). -- Catalin From mboxrd@z Thu Jan 1 00:00:00 1970 From: catalin.marinas@arm.com (Catalin Marinas) Date: Sun, 14 Mar 2010 22:30:15 +0000 Subject: [PATCH 06/10] ARM: ftrace: add Thumb-2 support In-Reply-To: <1268462987-8271-7-git-send-email-rabin@rab.in> References: <1268462987-8271-1-git-send-email-rabin@rab.in> <1268462987-8271-7-git-send-email-rabin@rab.in> Message-ID: <1268605815.2168.6.camel@e102109-lin.cambridge.arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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). -- Catalin