All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] percpu: remove this_cpu_xor()
@ 2013-10-21 11:25 Heiko Carstens
  2013-10-21 11:25 ` [PATCH 1/2] percpu: remove this_cpu_xor() implementation Heiko Carstens
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Heiko Carstens @ 2013-10-21 11:25 UTC (permalink / raw)
  To: Andrew Morton, Christoph Lameter, Tejun Heo
  Cc: H. Peter Anvin, Ingo Molnar, Thomas Gleixner, linux-kernel,
	Heiko Carstens

While optimizing and testing s390's this_cpu ops I realized that
this_cpu_xor() generates broken code ("or" instead of "xor").

Since there is not a single user in the whole kernel tree it seems
to be a good opportunity to simply remove it instead of fixing it.

These two patches only remove the generic and x86 variant. It doesn't
touch s390 since it would only generate a merge conflict later on.
I will take care of s390 anyway if the consensus is that it should be
removed.

Heiko Carstens (2):
  percpu: remove this_cpu_xor() implementation
  x86: remove this_cpu_xor() implementation

 arch/x86/include/asm/percpu.h |  8 --------
 include/linux/percpu.h        | 32 --------------------------------
 2 files changed, 40 deletions(-)

-- 
1.8.3.4


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

* [PATCH 1/2] percpu: remove this_cpu_xor() implementation
  2013-10-21 11:25 [PATCH 0/2] percpu: remove this_cpu_xor() Heiko Carstens
@ 2013-10-21 11:25 ` Heiko Carstens
  2013-10-21 14:59   ` Ingo Molnar
  2013-10-21 11:25 ` [PATCH 2/2] x86: " Heiko Carstens
  2013-10-27 13:04 ` [PATCH 0/2] percpu: remove this_cpu_xor() Tejun Heo
  2 siblings, 1 reply; 5+ messages in thread
From: Heiko Carstens @ 2013-10-21 11:25 UTC (permalink / raw)
  To: Andrew Morton, Christoph Lameter, Tejun Heo
  Cc: H. Peter Anvin, Ingo Molnar, Thomas Gleixner, linux-kernel,
	Heiko Carstens

There is not a single user in the whole kernel.
Besides that this_cpu_xor() is broken anyway since it gets
translated to this_cpu_or() (see __pcpu_size_call() line).

So instead of fixing an unused definition just remove it.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 include/linux/percpu.h | 32 --------------------------------
 1 file changed, 32 deletions(-)

diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index cc88172..fd6ffe4 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -375,22 +375,6 @@ do {									\
 # define this_cpu_or(pcp, val)		__pcpu_size_call(this_cpu_or_, (pcp), (val))
 #endif
 
-#ifndef this_cpu_xor
-# ifndef this_cpu_xor_1
-#  define this_cpu_xor_1(pcp, val)	_this_cpu_generic_to_op((pcp), (val), ^=)
-# endif
-# ifndef this_cpu_xor_2
-#  define this_cpu_xor_2(pcp, val)	_this_cpu_generic_to_op((pcp), (val), ^=)
-# endif
-# ifndef this_cpu_xor_4
-#  define this_cpu_xor_4(pcp, val)	_this_cpu_generic_to_op((pcp), (val), ^=)
-# endif
-# ifndef this_cpu_xor_8
-#  define this_cpu_xor_8(pcp, val)	_this_cpu_generic_to_op((pcp), (val), ^=)
-# endif
-# define this_cpu_xor(pcp, val)		__pcpu_size_call(this_cpu_or_, (pcp), (val))
-#endif
-
 #define _this_cpu_generic_add_return(pcp, val)				\
 ({									\
 	typeof(pcp) ret__;						\
@@ -629,22 +613,6 @@ do {									\
 # define __this_cpu_or(pcp, val)	__pcpu_size_call(__this_cpu_or_, (pcp), (val))
 #endif
 
-#ifndef __this_cpu_xor
-# ifndef __this_cpu_xor_1
-#  define __this_cpu_xor_1(pcp, val)	__this_cpu_generic_to_op((pcp), (val), ^=)
-# endif
-# ifndef __this_cpu_xor_2
-#  define __this_cpu_xor_2(pcp, val)	__this_cpu_generic_to_op((pcp), (val), ^=)
-# endif
-# ifndef __this_cpu_xor_4
-#  define __this_cpu_xor_4(pcp, val)	__this_cpu_generic_to_op((pcp), (val), ^=)
-# endif
-# ifndef __this_cpu_xor_8
-#  define __this_cpu_xor_8(pcp, val)	__this_cpu_generic_to_op((pcp), (val), ^=)
-# endif
-# define __this_cpu_xor(pcp, val)	__pcpu_size_call(__this_cpu_xor_, (pcp), (val))
-#endif
-
 #define __this_cpu_generic_add_return(pcp, val)				\
 ({									\
 	__this_cpu_add(pcp, val);					\
-- 
1.8.3.4


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

* [PATCH 2/2] x86: remove this_cpu_xor() implementation
  2013-10-21 11:25 [PATCH 0/2] percpu: remove this_cpu_xor() Heiko Carstens
  2013-10-21 11:25 ` [PATCH 1/2] percpu: remove this_cpu_xor() implementation Heiko Carstens
@ 2013-10-21 11:25 ` Heiko Carstens
  2013-10-27 13:04 ` [PATCH 0/2] percpu: remove this_cpu_xor() Tejun Heo
  2 siblings, 0 replies; 5+ messages in thread
From: Heiko Carstens @ 2013-10-21 11:25 UTC (permalink / raw)
  To: Andrew Morton, Christoph Lameter, Tejun Heo
  Cc: H. Peter Anvin, Ingo Molnar, Thomas Gleixner, linux-kernel,
	Heiko Carstens

Remove the unused x86 implementation of this_cpu_xor().

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 arch/x86/include/asm/percpu.h | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h
index 0da5200..604e13d 100644
--- a/arch/x86/include/asm/percpu.h
+++ b/arch/x86/include/asm/percpu.h
@@ -377,9 +377,6 @@ do {									\
 #define __this_cpu_or_1(pcp, val)	percpu_to_op("or", (pcp), val)
 #define __this_cpu_or_2(pcp, val)	percpu_to_op("or", (pcp), val)
 #define __this_cpu_or_4(pcp, val)	percpu_to_op("or", (pcp), val)
-#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)
 #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)
@@ -399,9 +396,6 @@ do {									\
 #define this_cpu_or_1(pcp, val)		percpu_to_op("or", (pcp), val)
 #define this_cpu_or_2(pcp, val)		percpu_to_op("or", (pcp), val)
 #define this_cpu_or_4(pcp, val)		percpu_to_op("or", (pcp), val)
-#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)
 #define this_cpu_xchg_1(pcp, nval)	percpu_xchg_op(pcp, nval)
 #define this_cpu_xchg_2(pcp, nval)	percpu_xchg_op(pcp, nval)
 #define this_cpu_xchg_4(pcp, nval)	percpu_xchg_op(pcp, nval)
@@ -446,7 +440,6 @@ do {									\
 #define __this_cpu_add_8(pcp, val)	percpu_add_op((pcp), val)
 #define __this_cpu_and_8(pcp, val)	percpu_to_op("and", (pcp), val)
 #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)
@@ -456,7 +449,6 @@ do {									\
 #define this_cpu_add_8(pcp, val)	percpu_add_op((pcp), val)
 #define this_cpu_and_8(pcp, val)	percpu_to_op("and", (pcp), val)
 #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)
-- 
1.8.3.4


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

* Re: [PATCH 1/2] percpu: remove this_cpu_xor() implementation
  2013-10-21 11:25 ` [PATCH 1/2] percpu: remove this_cpu_xor() implementation Heiko Carstens
@ 2013-10-21 14:59   ` Ingo Molnar
  0 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2013-10-21 14:59 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Andrew Morton, Christoph Lameter, Tejun Heo, H. Peter Anvin,
	Ingo Molnar, Thomas Gleixner, linux-kernel


* Heiko Carstens <heiko.carstens@de.ibm.com> wrote:

> There is not a single user in the whole kernel.
> Besides that this_cpu_xor() is broken anyway since it gets
> translated to this_cpu_or() (see __pcpu_size_call() line).
> 
> So instead of fixing an unused definition just remove it.

Acked-by: Ingo Molnar <mingo@kernel.org>

Thanks,

	Ingo

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

* Re: [PATCH 0/2] percpu: remove this_cpu_xor()
  2013-10-21 11:25 [PATCH 0/2] percpu: remove this_cpu_xor() Heiko Carstens
  2013-10-21 11:25 ` [PATCH 1/2] percpu: remove this_cpu_xor() implementation Heiko Carstens
  2013-10-21 11:25 ` [PATCH 2/2] x86: " Heiko Carstens
@ 2013-10-27 13:04 ` Tejun Heo
  2 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2013-10-27 13:04 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Andrew Morton, Christoph Lameter, H. Peter Anvin, Ingo Molnar,
	Thomas Gleixner, linux-kernel

On Mon, Oct 21, 2013 at 01:25:35PM +0200, Heiko Carstens wrote:
> While optimizing and testing s390's this_cpu ops I realized that
> this_cpu_xor() generates broken code ("or" instead of "xor").
> 
> Since there is not a single user in the whole kernel tree it seems
> to be a good opportunity to simply remove it instead of fixing it.
> 
> These two patches only remove the generic and x86 variant. It doesn't
> touch s390 since it would only generate a merge conflict later on.
> I will take care of s390 anyway if the consensus is that it should be
> removed.
> 
> Heiko Carstens (2):
>   percpu: remove this_cpu_xor() implementation
>   x86: remove this_cpu_xor() implementation

Applied to percpu/for-3.13.

Thanks.

-- 
tejun

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

end of thread, other threads:[~2013-10-27 13:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-21 11:25 [PATCH 0/2] percpu: remove this_cpu_xor() Heiko Carstens
2013-10-21 11:25 ` [PATCH 1/2] percpu: remove this_cpu_xor() implementation Heiko Carstens
2013-10-21 14:59   ` Ingo Molnar
2013-10-21 11:25 ` [PATCH 2/2] x86: " Heiko Carstens
2013-10-27 13:04 ` [PATCH 0/2] percpu: remove this_cpu_xor() 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.