linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Add atomic64 routines for ARMv6k and above.
Date: Tue, 15 Dec 2009 09:24:24 +0100	[thread overview]
Message-ID: <20091215082424.GB20571@pengutronix.de> (raw)
In-Reply-To: <1260555237-18825-1-git-send-email-will.deacon@arm.com>

Hello,

On Fri, Dec 11, 2009 at 06:13:57PM +0000, Will Deacon wrote:
> In preparation for perf-events support, ARM needs to support atomic64_t
> operations. v6k and above support the ldrexd and strexd instructions to do
> just that.
> 
> This patch adds atomic64 support to the ARM architecture. v6k and above
> make use of new instructions whilst older cores fall back on the generic
> solution using spinlocks. If and when v7-M cores are supported by Linux, they
> will need to fall back on the spinlock implementation too.
> 
> Signed-off-by: Will Deacon <will.deacon@arm.com>
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Jamie Iles <jamie.iles@picochip.com>
> ---
>  arch/arm/Kconfig              |    1 +
>  arch/arm/include/asm/atomic.h |  228 +++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 229 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 1c4119c..5fdc032 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -18,6 +18,7 @@ config ARM
>  	select HAVE_KRETPROBES if (HAVE_KPROBES)
>  	select HAVE_FUNCTION_TRACER if (!XIP_KERNEL)
>  	select HAVE_GENERIC_DMA_COHERENT
> +	select GENERIC_ATOMIC64 if (!CPU_32v6K)
If a kernel supports say a v5 and a v6 then IIRC CPU_32v6K is enabled,
but GENERIC_ATOMIC64 is needed, too.

Maybe I missed something.

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-K?nig            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

  parent reply	other threads:[~2009-12-15  8:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-11 18:13 [PATCH] ARM: Add atomic64 routines for ARMv6k and above Will Deacon
2009-12-11 19:22 ` Jamie Iles
2009-12-15  8:24 ` Uwe Kleine-König [this message]
2009-12-15 10:16   ` Catalin Marinas
2009-12-15 13:16     ` Uwe Kleine-König
2010-01-08 16:49       ` Russell King - ARM Linux

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=20091215082424.GB20571@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).