Linux IA64 platform development
 help / color / mirror / Atom feed
* [PATCH] Fix missing parameter for local_add
@ 2005-12-07 18:54 Christoph Lameter
  2005-12-07 19:02 ` Luck, Tony
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Christoph Lameter @ 2005-12-07 18:54 UTC (permalink / raw)
  To: linux-ia64

Local add needs to have a parameter that specifies how much to add
to a local_t. atomic64_add also requires two parameters.

Signed-off-by: Christoph Lameter <clameter@sgi.com>

Index: linux-2.6.15-rc5/include/asm-ia64/local.h
=================================--- linux-2.6.15-rc5.orig/include/asm-ia64/local.h	2005-12-03 21:10:42.000000000 -0800
+++ linux-2.6.15-rc5/include/asm-ia64/local.h	2005-12-06 14:39:47.000000000 -0800
@@ -17,7 +17,7 @@ typedef struct {
 #define local_set(l, i)	atomic64_set(&(l)->val, i)
 #define local_inc(l)	atomic64_inc(&(l)->val)
 #define local_dec(l)	atomic64_dec(&(l)->val)
-#define local_add(l)	atomic64_add(&(l)->val)
+#define local_add(i, l)	atomic64_add((i), &(l)->val)
 #define local_sub(l)	atomic64_sub(&(l)->val)
 
 /* Non-atomic variants, i.e., preemption disabled and won't be touched in interrupt, etc.  */

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] Fix missing parameter for local_add
  2005-12-07 18:54 [PATCH] Fix missing parameter for local_add Christoph Lameter
@ 2005-12-07 19:02 ` Luck, Tony
  2005-12-07 19:24 ` Christoph Lameter
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Luck, Tony @ 2005-12-07 19:02 UTC (permalink / raw)
  To: linux-ia64


-#define local_add(l)	atomic64_add(&(l)->val)
+#define local_add(i, l)	atomic64_add((i), &(l)->val)
 #define local_sub(l)	atomic64_sub(&(l)->val)
 
 
local_sub() looks like it could use the same treatment?

-Tony

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] Fix missing parameter for local_add
  2005-12-07 18:54 [PATCH] Fix missing parameter for local_add Christoph Lameter
  2005-12-07 19:02 ` Luck, Tony
@ 2005-12-07 19:24 ` Christoph Lameter
  2005-12-07 19:29 ` Bjorn Helgaas
  2005-12-07 19:36 ` Christoph Lameter
  3 siblings, 0 replies; 5+ messages in thread
From: Christoph Lameter @ 2005-12-07 19:24 UTC (permalink / raw)
  To: linux-ia64

On Wed, 7 Dec 2005, Luck, Tony wrote:

> 
> -#define local_add(l)	atomic64_add(&(l)->val)
> +#define local_add(i, l)	atomic64_add((i), &(l)->val)
>  #define local_sub(l)	atomic64_sub(&(l)->val)
>  
>  
> local_sub() looks like it could use the same treatment?

yes. So:

Index: linux-2.6.15-rc5/include/asm-ia64/local.h
=================================--- linux-2.6.15-rc5.orig/include/asm-ia64/local.h	2005-12-03 21:10:42.000000000 -0800
+++ linux-2.6.15-rc5/include/asm-ia64/local.h	2005-12-07 11:23:51.000000000 -0800
@@ -17,8 +17,8 @@ typedef struct {
 #define local_set(l, i)	atomic64_set(&(l)->val, i)
 #define local_inc(l)	atomic64_inc(&(l)->val)
 #define local_dec(l)	atomic64_dec(&(l)->val)
-#define local_add(l)	atomic64_add(&(l)->val)
-#define local_sub(l)	atomic64_sub(&(l)->val)
+#define local_add(i, l)	atomic64_add((i), &(l)->val)
+#define local_sub(i, l)	atomic64_sub((i), &(l)->val)
 
 /* Non-atomic variants, i.e., preemption disabled and won't be touched in interrupt, etc.  */
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix missing parameter for local_add
  2005-12-07 18:54 [PATCH] Fix missing parameter for local_add Christoph Lameter
  2005-12-07 19:02 ` Luck, Tony
  2005-12-07 19:24 ` Christoph Lameter
@ 2005-12-07 19:29 ` Bjorn Helgaas
  2005-12-07 19:36 ` Christoph Lameter
  3 siblings, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2005-12-07 19:29 UTC (permalink / raw)
  To: linux-ia64

On Wednesday 07 December 2005 11:54 am, Christoph Lameter wrote:
> Local add needs to have a parameter that specifies how much to add
> to a local_t. atomic64_add also requires two parameters.

AOL: what about local_sub()?

> Index: linux-2.6.15-rc5/include/asm-ia64/local.h
> =================================> --- linux-2.6.15-rc5.orig/include/asm-ia64/local.h	2005-12-03 21:10:42.000000000 -0800
> +++ linux-2.6.15-rc5/include/asm-ia64/local.h	2005-12-06 14:39:47.000000000 -0800
> @@ -17,7 +17,7 @@ typedef struct {
>  #define local_set(l, i)	atomic64_set(&(l)->val, i)
>  #define local_inc(l)	atomic64_inc(&(l)->val)
>  #define local_dec(l)	atomic64_dec(&(l)->val)
> -#define local_add(l)	atomic64_add(&(l)->val)
> +#define local_add(i, l)	atomic64_add((i), &(l)->val)
>  #define local_sub(l)	atomic64_sub(&(l)->val)
>  
>  /* Non-atomic variants, i.e., preemption disabled and won't be touched in interrupt, etc.  */
> -

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix missing parameter for local_add
  2005-12-07 18:54 [PATCH] Fix missing parameter for local_add Christoph Lameter
                   ` (2 preceding siblings ...)
  2005-12-07 19:29 ` Bjorn Helgaas
@ 2005-12-07 19:36 ` Christoph Lameter
  3 siblings, 0 replies; 5+ messages in thread
From: Christoph Lameter @ 2005-12-07 19:36 UTC (permalink / raw)
  To: linux-ia64

On Wed, 7 Dec 2005, Bjorn Helgaas wrote:

> On Wednesday 07 December 2005 11:54 am, Christoph Lameter wrote:
> > Local add needs to have a parameter that specifies how much to add
> > to a local_t. atomic64_add also requires two parameters.
> 
> AOL: what about local_sub()?

Tony alrady noticed and I send him this fixed up patch:

Index: linux-2.6.15-rc5/include/asm-ia64/local.h
=================================--- linux-2.6.15-rc5.orig/include/asm-ia64/local.h	2005-12-03 21:10:42.000000000 -0800
+++ linux-2.6.15-rc5/include/asm-ia64/local.h	2005-12-07 11:23:51.000000000 -0800
@@ -17,8 +17,8 @@ typedef struct {
 #define local_set(l, i)	atomic64_set(&(l)->val, i)
 #define local_inc(l)	atomic64_inc(&(l)->val)
 #define local_dec(l)	atomic64_dec(&(l)->val)
-#define local_add(l)	atomic64_add(&(l)->val)
-#define local_sub(l)	atomic64_sub(&(l)->val)
+#define local_add(i, l)	atomic64_add((i), &(l)->val)
+#define local_sub(i, l)	atomic64_sub((i), &(l)->val)
 
 /* Non-atomic variants, i.e., preemption disabled and won't be touched in interrupt, etc.  */
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-12-07 19:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-07 18:54 [PATCH] Fix missing parameter for local_add Christoph Lameter
2005-12-07 19:02 ` Luck, Tony
2005-12-07 19:24 ` Christoph Lameter
2005-12-07 19:29 ` Bjorn Helgaas
2005-12-07 19:36 ` Christoph Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox