Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [ltt-dev] [PATCH] arm: remove useless declarations
@ 2011-06-09 13:57 Paolo Bonzini
  2011-06-09 14:21 ` Mathieu Desnoyers
       [not found] ` <BLU0-SMTP84C8B5894BECC3A6D9BB7C96650@phx.gbl>
  0 siblings, 2 replies; 6+ messages in thread
From: Paolo Bonzini @ 2011-06-09 13:57 UTC (permalink / raw)


Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
---
 urcu/uatomic_arch_arm.h |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/urcu/uatomic_arch_arm.h b/urcu/uatomic_arch_arm.h
index bcd21d2..fee3040 100644
--- a/urcu/uatomic_arch_arm.h
+++ b/urcu/uatomic_arch_arm.h
@@ -34,13 +34,6 @@ extern "C" {
 /* xchg */
 #define uatomic_xchg(addr, v) __sync_lock_test_and_set(addr, v)
 
-/* cmpxchg */
-#define uatomic_cmpxchg(addr, old, _new) \
-	__sync_val_compare_and_swap(addr, old, _new)
-
-/* uatomic_add_return */
-#define uatomic_add_return(addr, v) __sync_add_and_fetch(addr, v)
-
 #ifdef __cplusplus 
 }
 #endif
-- 
1.7.4.4




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

* [ltt-dev] [PATCH] arm: remove useless declarations
  2011-06-09 13:57 [ltt-dev] [PATCH] arm: remove useless declarations Paolo Bonzini
@ 2011-06-09 14:21 ` Mathieu Desnoyers
       [not found] ` <BLU0-SMTP84C8B5894BECC3A6D9BB7C96650@phx.gbl>
  1 sibling, 0 replies; 6+ messages in thread
From: Mathieu Desnoyers @ 2011-06-09 14:21 UTC (permalink / raw)


* Paolo Bonzini (pbonzini at redhat.com) wrote:
> Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
> ---
>  urcu/uatomic_arch_arm.h |    7 -------
>  1 files changed, 0 insertions(+), 7 deletions(-)
> 
> diff --git a/urcu/uatomic_arch_arm.h b/urcu/uatomic_arch_arm.h
> index bcd21d2..fee3040 100644
> --- a/urcu/uatomic_arch_arm.h
> +++ b/urcu/uatomic_arch_arm.h
> @@ -34,13 +34,6 @@ extern "C" {
>  /* xchg */
>  #define uatomic_xchg(addr, v) __sync_lock_test_and_set(addr, v)
>  
> -/* cmpxchg */
> -#define uatomic_cmpxchg(addr, old, _new) \
> -	__sync_val_compare_and_swap(addr, old, _new)
> -
> -/* uatomic_add_return */
> -#define uatomic_add_return(addr, v) __sync_add_and_fetch(addr, v)

I'd first like to understand why Paul chose to override the generic
versions of these macros. There is a change in what you map to:

__sync_val_compare_and_swap -> __sync_val_compare_and_swap_1/2/4/8

__sync_add_and_fetch -> __sync_add_and_fetch_1/2/4/8

Were there any problems with the _N variants on some ARM compilers ?

Thanks,

Mathieu

> -
>  #ifdef __cplusplus 
>  }
>  #endif
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




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

* [ltt-dev] [PATCH] arm: remove useless declarations
       [not found] ` <BLU0-SMTP84C8B5894BECC3A6D9BB7C96650@phx.gbl>
@ 2011-06-09 14:25   ` Paolo Bonzini
  2011-06-09 16:43     ` Paul E. McKenney
  0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2011-06-09 14:25 UTC (permalink / raw)


On 06/09/2011 04:21 PM, Mathieu Desnoyers wrote:
> I'd first like to understand why Paul chose to override the generic
> versions of these macros. There is a change in what you map to:
>
> __sync_val_compare_and_swap ->  __sync_val_compare_and_swap_1/2/4/8
>
> __sync_add_and_fetch ->  __sync_add_and_fetch_1/2/4/8
>
> Were there any problems with the _N variants on some ARM compilers ?

The non-"_N" variants do not exist outside the back-end (they are mapped 
to the "_N" variants by target-independent parts of the compiler), but I 
agree that Paul's ack is good to have.

Paolo




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

* [ltt-dev] [PATCH] arm: remove useless declarations
  2011-06-09 14:25   ` Paolo Bonzini
@ 2011-06-09 16:43     ` Paul E. McKenney
  2011-06-09 16:50       ` Mathieu Desnoyers
       [not found]       ` <BLU0-SMTP515252C09A7991113F85D96650@phx.gbl>
  0 siblings, 2 replies; 6+ messages in thread
From: Paul E. McKenney @ 2011-06-09 16:43 UTC (permalink / raw)


On Thu, Jun 09, 2011 at 04:25:44PM +0200, Paolo Bonzini wrote:
> On 06/09/2011 04:21 PM, Mathieu Desnoyers wrote:
> >I'd first like to understand why Paul chose to override the generic
> >versions of these macros. There is a change in what you map to:
> >
> >__sync_val_compare_and_swap ->  __sync_val_compare_and_swap_1/2/4/8
> >
> >__sync_add_and_fetch ->  __sync_add_and_fetch_1/2/4/8
> >
> >Were there any problems with the _N variants on some ARM compilers ?
> 
> The non-"_N" variants do not exist outside the back-end (they are
> mapped to the "_N" variants by target-independent parts of the
> compiler), but I agree that Paul's ack is good to have.

In some of the older versions of ARM Linux and toolchain, many of which
are unfortunately still in heavy use, the __sync_synchronize() primitive
was broken (as in was a no-op), but from what I can see the others worked
just fine.

							Thanx, Paul



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

* [ltt-dev] [PATCH] arm: remove useless declarations
  2011-06-09 16:43     ` Paul E. McKenney
@ 2011-06-09 16:50       ` Mathieu Desnoyers
       [not found]       ` <BLU0-SMTP515252C09A7991113F85D96650@phx.gbl>
  1 sibling, 0 replies; 6+ messages in thread
From: Mathieu Desnoyers @ 2011-06-09 16:50 UTC (permalink / raw)


* Paul E. McKenney (paulmck at linux.vnet.ibm.com) wrote:
> On Thu, Jun 09, 2011 at 04:25:44PM +0200, Paolo Bonzini wrote:
> > On 06/09/2011 04:21 PM, Mathieu Desnoyers wrote:
> > >I'd first like to understand why Paul chose to override the generic
> > >versions of these macros. There is a change in what you map to:
> > >
> > >__sync_val_compare_and_swap ->  __sync_val_compare_and_swap_1/2/4/8
> > >
> > >__sync_add_and_fetch ->  __sync_add_and_fetch_1/2/4/8
> > >
> > >Were there any problems with the _N variants on some ARM compilers ?
> > 
> > The non-"_N" variants do not exist outside the back-end (they are
> > mapped to the "_N" variants by target-independent parts of the
> > compiler), but I agree that Paul's ack is good to have.
> 
> In some of the older versions of ARM Linux and toolchain, many of which
> are unfortunately still in heavy use, the __sync_synchronize() primitive
> was broken (as in was a no-op), but from what I can see the others worked
> just fine.

OK, I'll pull Paolo's patch with your acked-by then.

Thanks!

Mathieu


-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




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

* [ltt-dev] [PATCH] arm: remove useless declarations
       [not found]       ` <BLU0-SMTP515252C09A7991113F85D96650@phx.gbl>
@ 2011-06-09 17:17         ` Paul E. McKenney
  0 siblings, 0 replies; 6+ messages in thread
From: Paul E. McKenney @ 2011-06-09 17:17 UTC (permalink / raw)


On Thu, Jun 09, 2011 at 12:50:36PM -0400, Mathieu Desnoyers wrote:
> * Paul E. McKenney (paulmck at linux.vnet.ibm.com) wrote:
> > On Thu, Jun 09, 2011 at 04:25:44PM +0200, Paolo Bonzini wrote:
> > > On 06/09/2011 04:21 PM, Mathieu Desnoyers wrote:
> > > >I'd first like to understand why Paul chose to override the generic
> > > >versions of these macros. There is a change in what you map to:
> > > >
> > > >__sync_val_compare_and_swap ->  __sync_val_compare_and_swap_1/2/4/8
> > > >
> > > >__sync_add_and_fetch ->  __sync_add_and_fetch_1/2/4/8
> > > >
> > > >Were there any problems with the _N variants on some ARM compilers ?
> > > 
> > > The non-"_N" variants do not exist outside the back-end (they are
> > > mapped to the "_N" variants by target-independent parts of the
> > > compiler), but I agree that Paul's ack is good to have.
> > 
> > In some of the older versions of ARM Linux and toolchain, many of which
> > are unfortunately still in heavy use, the __sync_synchronize() primitive
> > was broken (as in was a no-op), but from what I can see the others worked
> > just fine.
> 
> OK, I'll pull Paolo's patch with your acked-by then.

Sounds good!

							Thanx, Paul



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

end of thread, other threads:[~2011-06-09 17:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-09 13:57 [ltt-dev] [PATCH] arm: remove useless declarations Paolo Bonzini
2011-06-09 14:21 ` Mathieu Desnoyers
     [not found] ` <BLU0-SMTP84C8B5894BECC3A6D9BB7C96650@phx.gbl>
2011-06-09 14:25   ` Paolo Bonzini
2011-06-09 16:43     ` Paul E. McKenney
2011-06-09 16:50       ` Mathieu Desnoyers
     [not found]       ` <BLU0-SMTP515252C09A7991113F85D96650@phx.gbl>
2011-06-09 17:17         ` Paul E. McKenney

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