All of lore.kernel.org
 help / color / mirror / Atom feed
From: dave.martin@linaro.org (Dave Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: make head.S register assignments more convenient
Date: Tue, 6 Dec 2011 11:11:05 +0000	[thread overview]
Message-ID: <20111206111105.GA2270@linaro.org> (raw)
In-Reply-To: <alpine.LFD.2.02.1112051528200.2357@xanadu.home>

On Mon, Dec 05, 2011 at 03:31:43PM -0500, Nicolas Pitre wrote:
> 
> The r1 (machine ID) and r2 (boot data pointer) values are getting
> in the way of standard procedure calls as those registers are normally
> clobbered by function calls.  This is especially obnoxious when using
> the printascii et cie debugging routines..  This non-standard register
> allocation is even leaking into code far away from head.S i.e. the *_setup
> routines in mm/proc-*.S.
> 
> Move the machine ID / boot data pointer  to r6 and r7 respectively, and
> adjust the surrounding/affected code accordingly.
> 
> Minor fixes to some comments are also included.
> 
> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> ---
>  arch/arm/kernel/head-common.S |  101 +++++++++---------
>  arch/arm/kernel/head-nommu.S  |    4 +-
>  arch/arm/kernel/head.S        |  207 ++++++++++++++++++-----------------
>  arch/arm/mm/proc-arm1020.S    |    8 +-
>  arch/arm/mm/proc-arm1020e.S   |    8 +-
>  arch/arm/mm/proc-arm1022.S    |    8 +-
>  arch/arm/mm/proc-arm1026.S    |    8 +-
>  arch/arm/mm/proc-arm720.S     |   16 ++--
>  arch/arm/mm/proc-arm920.S     |    8 +-
>  arch/arm/mm/proc-arm922.S     |    8 +-
>  arch/arm/mm/proc-arm925.S     |    8 +-
>  arch/arm/mm/proc-arm926.S     |    6 +-
>  arch/arm/mm/proc-feroceon.S   |    8 +-
>  arch/arm/mm/proc-mohawk.S     |    8 +-
>  arch/arm/mm/proc-sa110.S      |   16 ++--
>  arch/arm/mm/proc-sa1100.S     |    8 +-
>  arch/arm/mm/proc-v6.S         |   22 ++--
>  arch/arm/mm/proc-v7.S         |  130 +++++++++++-----------
>  arch/arm/mm/proc-xsc3.S       |   10 +-
>  arch/arm/mm/proc-xscale.S     |    8 +-
>  20 files changed, 302 insertions(+), 298 deletions(-)

Is it also worth changing the other proc-*.S setup rountines to be PCS
compliant too?  This would clean up the calling convention further, and
help avoid future sutprises.

Cheers
---Dave

  reply	other threads:[~2011-12-06 11:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-05 20:31 [PATCH] ARM: make head.S register assignments more convenient Nicolas Pitre
2011-12-06 11:11 ` Dave Martin [this message]
2011-12-06 11:29   ` Russell King - ARM Linux
2011-12-06 13:23     ` Dave Martin
2011-12-06 19:01       ` Nicolas Pitre
2011-12-07 11:43         ` Dave Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111206111105.GA2270@linaro.org \
    --to=dave.martin@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.