* [PATCH] s390 (1/4): core s390.
@ 2004-06-02 10:52 Martin Schwidefsky
0 siblings, 0 replies; 2+ messages in thread
From: Martin Schwidefsky @ 2004-06-02 10:52 UTC (permalink / raw)
To: akpm, linux-kernel
[PATCH] s390: core changes.
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
s390 core changes:
- Make use of the ipte instruction for ptep_set_access_flags
- Fix atomic64_inc_and_test primitive as well.
- Fix return type handler for __copy_in_user.
- New default configuration.
diffstat:
arch/s390/defconfig | 9 +++------
include/asm-s390/atomic.h | 2 +-
include/asm-s390/pgtable.h | 4 ++++
include/asm-s390/uaccess.h | 4 ++--
4 files changed, 10 insertions(+), 9 deletions(-)
diff -urN linux-2.6/arch/s390/defconfig linux-2.6-s390/arch/s390/defconfig
--- linux-2.6/arch/s390/defconfig Wed Jun 2 11:29:01 2004
+++ linux-2.6-s390/arch/s390/defconfig Wed Jun 2 11:29:25 2004
@@ -28,6 +28,7 @@
CONFIG_IKCONFIG_PROC=y
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_IOSCHED_NOOP=y
@@ -112,7 +113,6 @@
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
CONFIG_SCSI_MULTI_LUN=y
-# CONFIG_SCSI_REPORT_LUNS is not set
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
@@ -126,6 +126,7 @@
# SCSI low-level drivers
#
# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_SATA is not set
# CONFIG_SCSI_EATA_PIO is not set
# CONFIG_SCSI_DEBUG is not set
@@ -310,11 +311,7 @@
# CONFIG_MII is not set
#
-# Ethernet (1000 Mbit)
-#
-
-#
-# Ethernet (10000 Mbit)
+# Gigabit Ethernet (1000/10000 Mbit)
#
#
diff -urN linux-2.6/include/asm-s390/atomic.h linux-2.6-s390/include/asm-s390/atomic.h
--- linux-2.6/include/asm-s390/atomic.h Wed Jun 2 11:29:07 2004
+++ linux-2.6-s390/include/asm-s390/atomic.h Wed Jun 2 11:29:25 2004
@@ -145,7 +145,7 @@
}
static __inline__ long long atomic64_inc_and_test(volatile atomic64_t * v)
{
- return __CSG_LOOP(v, 1, "agr") != 0;
+ return __CSG_LOOP(v, 1, "agr") == 0;
}
static __inline__ void atomic64_dec(volatile atomic64_t * v)
{
diff -urN linux-2.6/include/asm-s390/pgtable.h linux-2.6-s390/include/asm-s390/pgtable.h
--- linux-2.6/include/asm-s390/pgtable.h Wed Jun 2 11:29:08 2004
+++ linux-2.6-s390/include/asm-s390/pgtable.h Wed Jun 2 11:29:25 2004
@@ -587,6 +587,9 @@
set_pte(ptep, entry);
}
+#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
+ ptep_establish(__vma, __address, __ptep, __entry)
+
/*
* Test and clear dirty bit in storage key.
* We can't clear the changed bit atomically. This is a potential
@@ -784,6 +787,7 @@
#define pgtable_cache_init() do { } while (0)
#define __HAVE_ARCH_PTEP_ESTABLISH
+#define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
#define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
diff -urN linux-2.6/include/asm-s390/uaccess.h linux-2.6-s390/include/asm-s390/uaccess.h
--- linux-2.6/include/asm-s390/uaccess.h Wed Jun 2 11:29:08 2004
+++ linux-2.6-s390/include/asm-s390/uaccess.h Wed Jun 2 11:29:25 2004
@@ -326,12 +326,12 @@
return n;
}
-extern long __copy_in_user_asm(const void *from, long n, void *to);
+extern unsigned long __copy_in_user_asm(const void *from, long n, void *to);
static inline unsigned long
__copy_in_user(void __user *to, const void __user *from, unsigned long n)
{
- __copy_in_user_asm(from, n, to);
+ return __copy_in_user_asm(from, n, to);
}
static inline unsigned long
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] s390 (1/4): core s390.
@ 2004-05-19 11:01 Martin Schwidefsky
0 siblings, 0 replies; 2+ messages in thread
From: Martin Schwidefsky @ 2004-05-19 11:01 UTC (permalink / raw)
To: akpm, linux-kernel
[PATCH] s390: core changes.
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
s390 core changes:
- Fix atomic_inc_and_test primitive.
- Fix system call trace / audit interface.
- Fix find_first_bit / find_next_bit inlines assembly constraints.
diffstat:
arch/s390/kernel/entry.S | 8 ++++----
arch/s390/kernel/entry64.S | 8 ++++----
include/asm-s390/atomic.h | 2 +-
include/asm-s390/bitops.h | 25 +++++++++++++++++++------
4 files changed, 28 insertions(+), 15 deletions(-)
diff -urN linux-2.6/arch/s390/kernel/entry.S linux-2.6-s390/arch/s390/kernel/entry.S
--- linux-2.6/arch/s390/kernel/entry.S Wed May 19 12:46:51 2004
+++ linux-2.6-s390/arch/s390/kernel/entry.S Wed May 19 12:47:27 2004
@@ -239,7 +239,7 @@
sysc_do_restart:
tm __TI_flags+3(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
l %r8,sys_call_table-system_call(%r7,%r13) # get system call addr.
- bo BASED(sysc_tracesys)
+ bnz BASED(sysc_tracesys)
basr %r14,%r8 # call sys_xxxx
st %r2,SP_R2(%r15) # store return value (change R2 on stack)
# ATTENTION: check sys_execve_glue before
@@ -328,7 +328,7 @@
st %r2,SP_R2(%r15) # store return value
sysc_tracenogo:
tm __TI_flags+3(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
- bno BASED(sysc_return)
+ bz BASED(sysc_return)
l %r1,BASED(.Ltrace)
la %r2,SP_PTREGS(%r15) # load pt_regs
la %r3,1
@@ -512,7 +512,7 @@
pgm_svcstd:
tm __TI_flags+3(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
l %r8,sys_call_table-system_call(%r7,%r13) # get system call addr.
- bo BASED(pgm_tracesys)
+ bnz BASED(pgm_tracesys)
basr %r14,%r8 # call sys_xxxx
st %r2,SP_R2(%r15) # store return value (change R2 on stack)
# ATTENTION: check sys_execve_glue before
@@ -554,7 +554,7 @@
st %r2,SP_R2(%r15) # store return value
pgm_svc_nogo:
tm __TI_flags+3(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
- bno BASED(pgm_svcret)
+ bz BASED(pgm_svcret)
l %r1,BASED(.Ltrace)
la %r2,SP_PTREGS(%r15) # load pt_regs
la %r3,1
diff -urN linux-2.6/arch/s390/kernel/entry64.S linux-2.6-s390/arch/s390/kernel/entry64.S
--- linux-2.6/arch/s390/kernel/entry64.S Wed May 19 12:46:51 2004
+++ linux-2.6-s390/arch/s390/kernel/entry64.S Wed May 19 12:47:27 2004
@@ -231,7 +231,7 @@
#endif
tm __TI_flags+7(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
lgf %r8,0(%r7,%r10) # load address of system call routine
- jo sysc_tracesys
+ jnz sysc_tracesys
basr %r14,%r8 # call sys_xxxx
stg %r2,SP_R2(%r15) # store return value (change R2 on stack)
# ATTENTION: check sys_execve_glue before
@@ -319,7 +319,7 @@
stg %r2,SP_R2(%r15) # store return value
sysc_tracenogo:
tm __TI_flags+7(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
- jno sysc_return
+ jz sysc_return
la %r2,SP_PTREGS(%r15) # load pt_regs
la %r3,1
larl %r14,sysc_return # return point is sysc_return
@@ -551,7 +551,7 @@
#endif
tm __TI_flags+7(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
lgf %r8,0(%r7,%r10) # load address of system call routine
- jo pgm_tracesys
+ jnz pgm_tracesys
basr %r14,%r8 # call sys_xxxx
stg %r2,SP_R2(%r15) # store return value (change R2 on stack)
# ATTENTION: check sys_execve_glue before
@@ -592,7 +592,7 @@
stg %r2,SP_R2(%r15) # store return value
pgm_svc_nogo:
tm __TI_flags+7(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
- jno pgm_svcret
+ jz pgm_svcret
la %r2,SP_PTREGS(%r15) # load pt_regs
la %r3,1
larl %r14,pgm_svcret # return point is sysc_return
diff -urN linux-2.6/include/asm-s390/atomic.h linux-2.6-s390/include/asm-s390/atomic.h
--- linux-2.6/include/asm-s390/atomic.h Wed May 19 12:47:10 2004
+++ linux-2.6-s390/include/asm-s390/atomic.h Wed May 19 12:47:27 2004
@@ -72,7 +72,7 @@
static __inline__ int atomic_inc_and_test(volatile atomic_t * v)
{
- return __CS_LOOP(v, 1, "ar") != 0;
+ return __CS_LOOP(v, 1, "ar") == 0;
}
static __inline__ void atomic_dec(volatile atomic_t * v)
{
diff -urN linux-2.6/include/asm-s390/bitops.h linux-2.6-s390/include/asm-s390/bitops.h
--- linux-2.6/include/asm-s390/bitops.h Mon May 10 04:31:59 2004
+++ linux-2.6-s390/include/asm-s390/bitops.h Wed May 19 12:47:27 2004
@@ -110,6 +110,7 @@
#endif /* __s390x__ */
+#define __BITOPS_WORDS(bits) (((bits)+__BITOPS_WORDSIZE-1)/__BITOPS_WORDSIZE)
#define __BITOPS_BARRIER() __asm__ __volatile__ ( "" : : : "memory" )
#ifdef CONFIG_SMP
@@ -534,6 +535,7 @@
static inline int
find_first_zero_bit(const unsigned long * addr, unsigned int size)
{
+ typedef struct { long _[__BITOPS_WORDS(size)]; } addrtype;
unsigned long cmp, count;
unsigned int res;
@@ -566,13 +568,15 @@
" alr %0,%2\n"
"4:"
: "=&a" (res), "=&d" (cmp), "=&a" (count)
- : "a" (size), "a" (addr), "a" (&_zb_findmap) : "cc" );
+ : "a" (size), "a" (addr), "a" (&_zb_findmap),
+ "m" (*(addrtype *) addr) : "cc" );
return (res < size) ? res : size;
}
static inline int
find_first_bit(const unsigned long * addr, unsigned int size)
{
+ typedef struct { long _[__BITOPS_WORDS(size)]; } addrtype;
unsigned long cmp, count;
unsigned int res;
@@ -605,7 +609,8 @@
" alr %0,%2\n"
"4:"
: "=&a" (res), "=&d" (cmp), "=&a" (count)
- : "a" (size), "a" (addr), "a" (&_sb_findmap) : "cc" );
+ : "a" (size), "a" (addr), "a" (&_sb_findmap),
+ "m" (*(addrtype *) addr) : "cc" );
return (res < size) ? res : size;
}
@@ -695,6 +700,7 @@
static inline unsigned long
find_first_zero_bit(const unsigned long * addr, unsigned long size)
{
+ typedef struct { long _[__BITOPS_WORDS(size)]; } addrtype;
unsigned long res, cmp, count;
if (!size)
@@ -730,13 +736,15 @@
" algr %0,%2\n"
"5:"
: "=&a" (res), "=&d" (cmp), "=&a" (count)
- : "a" (size), "a" (addr), "a" (&_zb_findmap) : "cc" );
+ : "a" (size), "a" (addr), "a" (&_zb_findmap),
+ "m" (*(addrtype *) addr) : "cc" );
return (res < size) ? res : size;
}
static inline unsigned long
find_first_bit(const unsigned long * addr, unsigned long size)
{
+ typedef struct { long _[__BITOPS_WORDS(size)]; } addrtype;
unsigned long res, cmp, count;
if (!size)
@@ -772,7 +780,8 @@
" algr %0,%2\n"
"5:"
: "=&a" (res), "=&d" (cmp), "=&a" (count)
- : "a" (size), "a" (addr), "a" (&_sb_findmap) : "cc" );
+ : "a" (size), "a" (addr), "a" (&_sb_findmap),
+ "m" (*(addrtype *) addr) : "cc" );
return (res < size) ? res : size;
}
@@ -983,6 +992,7 @@
static inline int
ext2_find_first_zero_bit(void *vaddr, unsigned int size)
{
+ typedef struct { long _[__BITOPS_WORDS(size)]; } addrtype;
unsigned long cmp, count;
unsigned int res;
@@ -1016,7 +1026,8 @@
" alr %0,%2\n"
"4:"
: "=&a" (res), "=&d" (cmp), "=&a" (count)
- : "a" (size), "a" (vaddr), "a" (&_zb_findmap) : "cc" );
+ : "a" (size), "a" (vaddr), "a" (&_zb_findmap),
+ "m" (*(addrtype *) vaddr) : "cc" );
return (res < size) ? res : size;
}
@@ -1068,6 +1079,7 @@
static inline unsigned long
ext2_find_first_zero_bit(void *vaddr, unsigned long size)
{
+ typedef struct { long _[__BITOPS_WORDS(size)]; } addrtype;
unsigned long res, cmp, count;
if (!size)
@@ -1103,7 +1115,8 @@
" algr %0,%2\n"
"5:"
: "=&a" (res), "=&d" (cmp), "=&a" (count)
- : "a" (size), "a" (vaddr), "a" (&_zb_findmap) : "cc" );
+ : "a" (size), "a" (vaddr), "a" (&_zb_findmap),
+ "m" (*(addrtype *) vaddr) : "cc" );
return (res < size) ? res : size;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-02 10:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-02 10:52 [PATCH] s390 (1/4): core s390 Martin Schwidefsky
-- strict thread matches above, loose matches on Subject: below --
2004-05-19 11:01 Martin Schwidefsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®