Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751597AbbEYGhF (ORCPT ); Mon, 25 May 2015 02:37:05 -0400 Received: from mail-wg0-f54.google.com ([74.125.82.54]:34165 "EHLO mail-wg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750839AbbEYGhC (ORCPT ); Mon, 25 May 2015 02:37:02 -0400 Message-ID: <5562C30C.20900@gmail.com> Date: Mon, 25 May 2015 08:37:00 +0200 From: Maxime Coquelin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Stefan Agner , linux@arm.linux.org.uk CC: arnd@arndb.de, will.deacon@arm.com, u.kleine-koenig@pengutronix.de, manabian@gmail.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] ARM: nommu: avoid deprecated source register on mov References: <1432337148-9894-1-git-send-email-stefan@agner.ch> In-Reply-To: <1432337148-9894-1-git-send-email-stefan@agner.ch> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1418 Lines: 40 Hi Stefan, On 05/23/2015 01:25 AM, Stefan Agner wrote: > In Thumb2 mode, the stack register r13 is deprecated if the > destination register is the program counter (r15). Similar to > head.S, head-nommu.S uses r13 to store the return address used > after configuring the CPU's CP15 register. However, since we do > not enable a MMU, there will be no address switch and it is > possible to use branch with link instruction to call > __after_proc_init. > > Avoid using r13 completely by using bl to call __after_proc_init > and get rid of __secondary_switched. > > Beside removing unnecessary complexity, this also fixes a > compiler warning when compiling a !MMU kernel: > Warning: Use of r13 as a source register is deprecated when r15 > is the destination register. > > Suggested-by: Russell King > Signed-off-by: Stefan Agner > --- > Changes in v2: > - Load r7 outside CONFIG_ARM_MPU since its used outside later on > > arch/arm/kernel/head-nommu.S | 21 ++++++++------------- > 1 file changed, 8 insertions(+), 13 deletions(-) > > You can add my: Tested-by: Maxime Coquelin Thanks! Maxime -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/