All of lore.kernel.org
 help / color / mirror / Atom feed
* percpu: Fixup __this_cpu_xchg* operations
@ 2011-05-20 15:29 Christoph Lameter
  2011-07-06 17:58 ` Christoph Lameter
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Lameter @ 2011-05-20 15:29 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-kernel

This patch has been in my tree for awhile now.


Subject: percpu: Fixup __this_cpu_xchg* operations

Somehow we got into a situation where the __this_cpu_xchg() operations were
not defined in the same way as this_cpu_xchg() and friends. I had some build
failures under 32 bit that were addressed by these fixes.

Signed-off-by: Christoph Lameter <cl@linux.com>


---
 arch/x86/include/asm/percpu.h |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Index: linux-2.6/arch/x86/include/asm/percpu.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/percpu.h	2011-03-30 14:09:28.000000000 -0500
+++ linux-2.6/arch/x86/include/asm/percpu.h	2011-03-30 14:10:16.000000000 -0500
@@ -388,12 +388,9 @@ do {									\
 #define __this_cpu_xor_1(pcp, val)	percpu_to_op("xor", (pcp), val)
 #define __this_cpu_xor_2(pcp, val)	percpu_to_op("xor", (pcp), val)
 #define __this_cpu_xor_4(pcp, val)	percpu_to_op("xor", (pcp), val)
-/*
- * Generic fallback operations for __this_cpu_xchg_[1-4] are okay and much
- * faster than an xchg with forced lock semantics.
- */
-#define __this_cpu_xchg_8(pcp, nval)	percpu_xchg_op(pcp, nval)
-#define __this_cpu_cmpxchg_8(pcp, oval, nval)	percpu_cmpxchg_op(pcp, oval, nval)
+#define __this_cpu_xchg_1(pcp, val)	percpu_xchg_op(pcp, val)
+#define __this_cpu_xchg_2(pcp, val)	percpu_xchg_op(pcp, val)
+#define __this_cpu_xchg_4(pcp, val)	percpu_xchg_op(pcp, val)

 #define this_cpu_read_1(pcp)		percpu_from_op("mov", (pcp), "m"(pcp))
 #define this_cpu_read_2(pcp)		percpu_from_op("mov", (pcp), "m"(pcp))
@@ -471,6 +468,7 @@ do {									\
 #define __this_cpu_cmpxchg_double_4(pcp1, pcp2, o1, o2, n1, n2)		percpu_cmpxchg8b_double(pcp1, o1, o2, n1, n2)
 #define this_cpu_cmpxchg_double_4(pcp1, pcp2, o1, o2, n1, n2)		percpu_cmpxchg8b_double(pcp1, o1, o2, n1, n2)
 #define irqsafe_cpu_cmpxchg_double_4(pcp1, pcp2, o1, o2, n1, n2)	percpu_cmpxchg8b_double(pcp1, o1, o2, n1, n2)
+
 #endif /* CONFIG_X86_CMPXCHG64 */

 /*
@@ -485,6 +483,8 @@ do {									\
 #define __this_cpu_or_8(pcp, val)	percpu_to_op("or", (pcp), val)
 #define __this_cpu_xor_8(pcp, val)	percpu_to_op("xor", (pcp), val)
 #define __this_cpu_add_return_8(pcp, val) percpu_add_return_op(pcp, val)
+#define __this_cpu_xchg_8(pcp, nval)	percpu_xchg_op(pcp, nval)
+#define __this_cpu_cmpxchg_8(pcp, oval, nval)	percpu_cmpxchg_op(pcp, oval, nval)

 #define this_cpu_read_8(pcp)		percpu_from_op("mov", (pcp), "m"(pcp))
 #define this_cpu_write_8(pcp, val)	percpu_to_op("mov", (pcp), val)

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

* Re: percpu: Fixup __this_cpu_xchg* operations
  2011-05-20 15:29 percpu: Fixup __this_cpu_xchg* operations Christoph Lameter
@ 2011-07-06 17:58 ` Christoph Lameter
  2011-07-06 20:27   ` Tejun Heo
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Lameter @ 2011-07-06 17:58 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-kernel

Could you pick up this patch? Have not gotten a reply so far.

On Fri, 20 May 2011, Christoph Lameter wrote:

> Subject: percpu: Fixup __this_cpu_xchg* operations
>
> Somehow we got into a situation where the __this_cpu_xchg() operations were
> not defined in the same way as this_cpu_xchg() and friends. I had some build
> failures under 32 bit that were addressed by these fixes.
>
> Signed-off-by: Christoph Lameter <cl@linux.com>
>
>
> ---
>  arch/x86/include/asm/percpu.h |   12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> Index: linux-2.6/arch/x86/include/asm/percpu.h
> ===================================================================
> --- linux-2.6.orig/arch/x86/include/asm/percpu.h	2011-03-30 14:09:28.000000000 -0500
> +++ linux-2.6/arch/x86/include/asm/percpu.h	2011-03-30 14:10:16.000000000 -0500
> @@ -388,12 +388,9 @@ do {									\
>  #define __this_cpu_xor_1(pcp, val)	percpu_to_op("xor", (pcp), val)
>  #define __this_cpu_xor_2(pcp, val)	percpu_to_op("xor", (pcp), val)
>  #define __this_cpu_xor_4(pcp, val)	percpu_to_op("xor", (pcp), val)
> -/*
> - * Generic fallback operations for __this_cpu_xchg_[1-4] are okay and much
> - * faster than an xchg with forced lock semantics.
> - */
> -#define __this_cpu_xchg_8(pcp, nval)	percpu_xchg_op(pcp, nval)
> -#define __this_cpu_cmpxchg_8(pcp, oval, nval)	percpu_cmpxchg_op(pcp, oval, nval)
> +#define __this_cpu_xchg_1(pcp, val)	percpu_xchg_op(pcp, val)
> +#define __this_cpu_xchg_2(pcp, val)	percpu_xchg_op(pcp, val)
> +#define __this_cpu_xchg_4(pcp, val)	percpu_xchg_op(pcp, val)
>
>  #define this_cpu_read_1(pcp)		percpu_from_op("mov", (pcp), "m"(pcp))
>  #define this_cpu_read_2(pcp)		percpu_from_op("mov", (pcp), "m"(pcp))
> @@ -471,6 +468,7 @@ do {									\
>  #define __this_cpu_cmpxchg_double_4(pcp1, pcp2, o1, o2, n1, n2)		percpu_cmpxchg8b_double(pcp1, o1, o2, n1, n2)
>  #define this_cpu_cmpxchg_double_4(pcp1, pcp2, o1, o2, n1, n2)		percpu_cmpxchg8b_double(pcp1, o1, o2, n1, n2)
>  #define irqsafe_cpu_cmpxchg_double_4(pcp1, pcp2, o1, o2, n1, n2)	percpu_cmpxchg8b_double(pcp1, o1, o2, n1, n2)
> +
>  #endif /* CONFIG_X86_CMPXCHG64 */
>
>  /*
> @@ -485,6 +483,8 @@ do {									\
>  #define __this_cpu_or_8(pcp, val)	percpu_to_op("or", (pcp), val)
>  #define __this_cpu_xor_8(pcp, val)	percpu_to_op("xor", (pcp), val)
>  #define __this_cpu_add_return_8(pcp, val) percpu_add_return_op(pcp, val)
> +#define __this_cpu_xchg_8(pcp, nval)	percpu_xchg_op(pcp, nval)
> +#define __this_cpu_cmpxchg_8(pcp, oval, nval)	percpu_cmpxchg_op(pcp, oval, nval)
>
>  #define this_cpu_read_8(pcp)		percpu_from_op("mov", (pcp), "m"(pcp))
>  #define this_cpu_write_8(pcp, val)	percpu_to_op("mov", (pcp), val)
>

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

* Re: percpu: Fixup __this_cpu_xchg* operations
  2011-07-06 17:58 ` Christoph Lameter
@ 2011-07-06 20:27   ` Tejun Heo
  2011-07-12 11:48     ` Tejun Heo
  0 siblings, 1 reply; 4+ messages in thread
From: Tejun Heo @ 2011-07-06 20:27 UTC (permalink / raw)
  To: Christoph Lameter; +Cc: linux-kernel

Hello, Christoph.

On Wed, Jul 6, 2011 at 7:58 PM, Christoph Lameter <cl@linux.com> wrote:
> Could you pick up this patch? Have not gotten a reply so far.

Sure, will take care of it tomorrow.

-- 
tejun

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

* Re: percpu: Fixup __this_cpu_xchg* operations
  2011-07-06 20:27   ` Tejun Heo
@ 2011-07-12 11:48     ` Tejun Heo
  0 siblings, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2011-07-12 11:48 UTC (permalink / raw)
  To: Christoph Lameter; +Cc: linux-kernel

On Wed, Jul 6, 2011 at 10:27 PM, Tejun Heo <tj@kernel.org> wrote:
> Hello, Christoph.
>
> On Wed, Jul 6, 2011 at 7:58 PM, Christoph Lameter <cl@linux.com> wrote:
>> Could you pick up this patch? Have not gotten a reply so far.
>
> Sure, will take care of it tomorrow.

Will be pushed upstream once -rc1 opens.

Thank you.

-- 
tejun

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

end of thread, other threads:[~2011-07-12 11:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-20 15:29 percpu: Fixup __this_cpu_xchg* operations Christoph Lameter
2011-07-06 17:58 ` Christoph Lameter
2011-07-06 20:27   ` Tejun Heo
2011-07-12 11:48     ` Tejun Heo

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.