2008-01-30 18:11:57

by Mike Travis

[permalink] [raw]
Subject: [PATCH 6/6] s390: Use generic percpu linux-2.6.git

Change s390 percpu.h to use asm-generic/percpu.h

Based on latest linux-2.6.git

Cc: Martin Schwidefsky <[email protected]>

Signed-off-by: Mike Travis <[email protected]>
---
linux-2.6.git:
- added back in missing pieces from x86.git merge
---
include/asm-s390/percpu.h | 33 +++++++++------------------------
1 file changed, 9 insertions(+), 24 deletions(-)

--- a/include/asm-s390/percpu.h
+++ b/include/asm-s390/percpu.h
@@ -13,40 +13,25 @@
*/
#if defined(__s390x__) && defined(MODULE)

-#define __reloc_hide(var,offset) (*({ \
+#define SHIFT_PERCPU_PTR(ptr,offset) (({ \
extern int simple_identifier_##var(void); \
unsigned long *__ptr; \
- asm ( "larl %0,per_cpu__"#var"@GOTENT" \
- : "=a" (__ptr) : "X" (per_cpu__##var) ); \
- (typeof(&per_cpu__##var))((*__ptr) + (offset)); }))
+ asm ( "larl %0, %1@GOTENT" \
+ : "=a" (__ptr) : "X" (ptr) ); \
+ (typeof(ptr))((*__ptr) + (offset)); }))

#else

-#define __reloc_hide(var, offset) (*({ \
+#define SHIFT_PERCPU_PTR(ptr, offset) (({ \
extern int simple_identifier_##var(void); \
unsigned long __ptr; \
- asm ( "" : "=a" (__ptr) : "0" (&per_cpu__##var) ); \
- (typeof(&per_cpu__##var)) (__ptr + (offset)); }))
+ asm ( "" : "=a" (__ptr) : "0" (ptr) ); \
+ (typeof(ptr)) (__ptr + (offset)); }))

#endif

-#ifdef CONFIG_SMP
+#define __my_cpu_offset S390_lowcore.percpu_offset

-extern unsigned long __per_cpu_offset[NR_CPUS];
-
-#define __get_cpu_var(var) __reloc_hide(var,S390_lowcore.percpu_offset)
-#define __raw_get_cpu_var(var) __reloc_hide(var,S390_lowcore.percpu_offset)
-#define per_cpu(var,cpu) __reloc_hide(var,__per_cpu_offset[cpu])
-#define per_cpu_offset(x) (__per_cpu_offset[x])
-
-#else /* ! SMP */
-
-#define __get_cpu_var(var) __reloc_hide(var,0)
-#define __raw_get_cpu_var(var) __reloc_hide(var,0)
-#define per_cpu(var,cpu) __reloc_hide(var,0)
-
-#endif /* SMP */
-
-#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
+#include <asm-generic/percpu.h>

#endif /* __ARCH_S390_PERCPU__ */

--


2008-01-30 21:54:24

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH 6/6] s390: Use generic percpu linux-2.6.git


* [email protected] <[email protected]> wrote:

> Change s390 percpu.h to use asm-generic/percpu.h

do the s390 maintainer agree with this change (Acks please), and has it
been tested on s390?

Ingo

2008-01-31 08:32:37

by Martin Schwidefsky

[permalink] [raw]
Subject: Re: [PATCH 6/6] s390: Use generic percpu linux-2.6.git

On Wed, 2008-01-30 at 22:53 +0100, Ingo Molnar wrote:
> * [email protected] <[email protected]> wrote:
>
> > Change s390 percpu.h to use asm-generic/percpu.h
>
> do the s390 maintainer agree with this change (Acks please), and has it
> been tested on s390?

Now I'm confused. The patch has been acked a few weeks ago and the last
5+ version of the patch had the acked line. The lastest version dropped
it for a reason I don't know. And more, the patch is already upstream
with the (correct) acked line, see git commit
f034347470e486835ccdcd7a5bb2ceb417be11c4.
So, what is the problem ?

--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.

2008-01-31 08:50:40

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH 6/6] s390: Use generic percpu linux-2.6.git


* Martin Schwidefsky <[email protected]> wrote:

> On Wed, 2008-01-30 at 22:53 +0100, Ingo Molnar wrote:
> > * [email protected] <[email protected]> wrote:
> >
> > > Change s390 percpu.h to use asm-generic/percpu.h
> >
> > do the s390 maintainer agree with this change (Acks please), and has it
> > been tested on s390?
>
> Now I'm confused. The patch has been acked a few weeks ago and the
> last 5+ version of the patch had the acked line. The lastest version
> dropped it for a reason I don't know. And more, the patch is already
> upstream with the (correct) acked line, see git commit
> f034347470e486835ccdcd7a5bb2ceb417be11c4. So, what is the problem ?

the latest patch was sent without your acked line and i asked about
that. But later on Mike told me that you acked it - so i restored the
ack and the patch, Linus pulled the fixes and it now all is upstream and
all architectures should be fine again now.

Ingo