LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 07/10] local_t : powerpc extension
Date: Thu, 15 Feb 2007 08:50:20 -0600	[thread overview]
Message-ID: <27EC3349-5FD8-47BD-B909-E1180B86AF40@kernel.crashing.org> (raw)
In-Reply-To: <20070215072024.GA9137@Krystal>


On Feb 15, 2007, at 1:20 AM, Mathieu Desnoyers wrote:

> * Andrew Morton (akpm@linux-foundation.org) wrote:
>> On Sun, 11 Feb 2007 14:18:12 -0500 Mathieu Desnoyers  
>> <mathieu.desnoyers@polymtl.ca> wrote:
>>
>>> local_t : powerpc extension
>>
>> This diff contains changes which are also present in "[PATCH 07/10]
>> atomic.h : Add atomic64 cmpxchg, xchg and add_unless to powerpc",  
>> resulting
>> in rather a mess.
>>
>> I dropped the duplicated hunks from the later patch rather than  
>> this one,
>> but I haven't tried to compile the result yet.
>>
>
> Yes, sorry about that : the atomic.h diff has been duplicated in both
> the local and atomic changes.
>
> The change to system.h for local.h is to add the xchg_local and
> cmpxchg_local, while the change for atomic.h is to simply remove the
> #include <asm/atomic.h> from system.h.
>
> Here is a proper local.h diff, if it happens to become necessary, but
> simply removing the duplicated asm-powerpc/system.h hunks will be ok.
>
> Thanks,
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
>
> --- a/include/asm-powerpc/local.h
> +++ b/include/asm-powerpc/local.h
> @@ -1 +1,342 @@
> -#include <asm-generic/local.h>
> +#ifndef _ARCH_POWERPC_LOCAL_H
> +#define _ARCH_POWERPC_LOCAL_H
> +
> +#include <linux/percpu.h>
> +#include <asm/atomic.h>
> +
> +typedef struct
> +{
> +	atomic_long_t a;
> +} local_t;
> +
> +#define LOCAL_INIT(i)	{ ATOMIC_LONG_INIT(i) }
> +
> +#define local_read(l)	atomic_long_read(&(l)->a)
> +#define local_set(l,i)	atomic_long_set(&(l)->a, (i))
> +
> +#define local_add(i,l)	atomic_long_add((i),(&(l)->a))
> +#define local_sub(i,l)	atomic_long_sub((i),(&(l)->a))
> +#define local_inc(l)	atomic_long_inc(&(l)->a)
> +#define local_dec(l)	atomic_long_dec(&(l)->a)
> +
> +#ifndef __powerpc64__
> +
> +static __inline__ int local_add_return(int a, local_t *l)
> +{

is there a reason this isn't local_add_return(long a, local_t *l) on  
ppc32?

(same comment for other functions)

- k




  reply	other threads:[~2007-02-15 14:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-11 19:18 [PATCH 00/10] local_t : adding and standardising local atomic primitives Mathieu Desnoyers
2007-02-11 19:18 ` [PATCH 01/10] local_t : architecture independant extension Mathieu Desnoyers
2007-02-11 19:18 ` [PATCH 02/10] local_t : alpha extension Mathieu Desnoyers
2007-02-11 19:18 ` [PATCH 03/10] local_t : i386 extension Mathieu Desnoyers
2007-02-11 19:18 ` [PATCH 04/10] local_t : ia64 extension Mathieu Desnoyers
2007-02-11 19:18 ` [PATCH 05/10] local_t : mips extension Mathieu Desnoyers
2007-02-11 19:18 ` [PATCH 06/10] local_t : parisc cleanup Mathieu Desnoyers
2007-02-11 19:18 ` [PATCH 07/10] local_t : powerpc extension Mathieu Desnoyers
2007-02-15  6:56   ` Andrew Morton
2007-02-15  7:20     ` Mathieu Desnoyers
2007-02-15 14:50       ` Kumar Gala [this message]
2007-02-15 20:02         ` [PATCH] local_t : powerpc extension - use long for powerpc32 Mathieu Desnoyers
2007-02-15 20:35           ` Kumar Gala
2007-02-15 21:23             ` Mathieu Desnoyers
2007-02-15 21:29               ` Kumar Gala
2007-02-15 21:32             ` Mathieu Desnoyers
2007-02-15 21:43             ` [PATCH] local_t : powerpc extension - shrink powerpc local.h Mathieu Desnoyers
2007-02-11 19:18 ` [PATCH 08/10] local_t : s390 cleanup Mathieu Desnoyers
2007-02-11 19:18 ` [PATCH 09/10] local_t : sparc64 cleanup Mathieu Desnoyers
2007-02-11 19:18 ` [PATCH 10/10] local_t : x86_64 extension Mathieu Desnoyers
  -- strict thread matches above, loose matches on Subject: below --
2007-01-25 16:16 [PATCH 00/10] local_t : adding and standardising local atomic primitives Mathieu Desnoyers
2007-01-25 16:16 ` [PATCH 07/10] local_t : powerpc extension Mathieu Desnoyers
2007-01-12  1:42 [PATCH 00/10] local_t : adding and standardising local atomic primitives Mathieu Desnoyers
2007-01-12  1:42 ` [PATCH 07/10] local_t : powerpc extension Mathieu Desnoyers

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=27EC3349-5FD8-47BD-B909-E1180B86AF40@kernel.crashing.org \
    --to=galak@kernel.crashing.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --subject='Re: [PATCH 07/10] local_t : powerpc extension' \
    /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

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).