All of lore.kernel.org
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Use definition for cmpxchg swi
Date: Mon, 9 Nov 2009 19:14:20 +0000	[thread overview]
Message-ID: <20091109191420.GA24833@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20091109190852.GD3808@shareable.org>

On Mon, Nov 09, 2009 at 07:08:52PM +0000, Jamie Lokier wrote:
> Russell King - ARM Linux wrote:
> > I'll add a comment then.
> > 
> > Note, however, that the original code was buggy - it resulted in
> > the '0xfff0' syscall being called instead of '0xffff0' - note the
> > extra 4 bits there.
> 
> Meaning that nobody has ever actually used the original code? :-)

Correct, because SMP on ARM architectures prior to V6 is rather rare.
My only implementation of that is a pile of FPGAs implementing a 4-way
ARM926 SMP system.

> I notice that it loads the syscall number register for EABI
> compatibility, but that instruction could be trivially omitted with
> OABI-compatible kernels, couldn't it?

It could.

> By the way, did you change it to LDR to make it faster?  (I.e. does
> that make it faster?)

Well, we could use one mov and two orr instructions to load the minimum
20 bits of syscall number (which equates to a minimum of 3 cycles) or
one ldr, which can be 1 cycle if the cache is warm.  Since the result
is not used in the following two instructions, there is no impact from
result delays.

  reply	other threads:[~2009-11-09 19:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-08 20:04 [PATCH] Use definition for cmpxchg swi Russell King - ARM Linux
2009-11-09  1:42 ` Nicolas Pitre
2009-11-09  8:51   ` Russell King - ARM Linux
2009-11-09 14:56     ` Nicolas Pitre
2009-11-09 17:30       ` Russell King - ARM Linux
2009-11-09 19:08         ` Jamie Lokier
2009-11-09 19:14           ` Russell King - ARM Linux [this message]
2009-11-09 19:31           ` Nicolas Pitre
2009-11-09 23:52             ` Russell King - ARM Linux
2009-11-09 23:58               ` Nicolas Pitre

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=20091109191420.GA24833@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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.