commit libaio for openSUSE:Factory
Hello community, here is the log from the commit of package libaio for openSUSE:Factory checked in at Thu Mar 24 09:43:33 CET 2011. -------- --- libaio/libaio.changes 2010-02-12 10:57:40.000000000 +0100 +++ /mounts/work_src_done/STABLE/libaio/libaio.changes 2011-03-15 14:50:09.000000000 +0100 @@ -1,0 +2,8 @@ +Tue Mar 15 13:44:15 UTC 2011 - jengelh@medozas.de + +- Update to libaio 0.3.109 +* add ARM architecture support (grabbed from Debian arches tree) +* replace check of __i386__ with __LP64__ in test harness +- refreshed patches + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- libaio-0.3.107.tar.bz2 New: ---- libaio-0.3.109.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libaio.spec ++++++ --- /var/tmp/diff_new_pack.NJgFCs/_old 2011-03-24 09:42:50.000000000 +0100 +++ /var/tmp/diff_new_pack.NJgFCs/_new 2011-03-24 09:42:50.000000000 +0100 @@ -1,7 +1,7 @@ # -# spec file for package libaio (Version 0.3.107) +# spec file for package libaio # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,9 +27,10 @@ Obsoletes: libaio-64bit %endif # -Version: 0.3.107 -Release: 2 +Version: 0.3.109 +Release: 1 Summary: Linux-Native Asynchronous I/O Access Library +Url: http://kernel.org/pub/linux/libs/aio/ Source: libaio-%{version}.tar.bz2 Source2: baselibs.conf Patch2: libaio-optflags.diff @@ -78,7 +79,7 @@ %endif %build -%{__make} %{?_smp_mflags} OPTFLAGS="$RPM_OPT_FLAGS" +make %{?_smp_mflags} OPTFLAGS="$RPM_OPT_FLAGS" %install make install prefix=%{buildroot}/usr libdir=%{buildroot}/%{_lib} ++++++ 00_arches.patch ++++++ --- /var/tmp/diff_new_pack.NJgFCs/_old 2011-03-24 09:42:50.000000000 +0100 +++ /var/tmp/diff_new_pack.NJgFCs/_new 2011-03-24 09:42:50.000000000 +0100 @@ -1,16 +1,72 @@ --- harness/main.c | 8 + - src/libaio.h | 34 +++++++ - src/syscall-arm.h | 116 ++++++++++++++++++++++++++ + src/libaio.h | 24 +++++ src/syscall-m68k.h | 78 +++++++++++++++++ src/syscall-mips.h | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/syscall-parisc.h | 146 +++++++++++++++++++++++++++++++++ src/syscall-sparc.h | 130 +++++++++++++++++++++++++++++ - src/syscall.h | 10 ++ - 8 files changed, 744 insertions(+), 1 deletion(-) + src/syscall.h | 8 + + 7 files changed, 617 insertions(+) +Index: libaio-0.3.109/harness/main.c +=================================================================== +--- libaio-0.3.109.orig/harness/main.c ++++ libaio-0.3.109/harness/main.c +@@ -12,7 +12,15 @@ + #include <libaio.h> + + #if __LP64__ == 0 ++#if defined(__i386__) || defined(__pwoerpc__) || defined(__mips__) + #define KERNEL_RW_POINTER ((void *)0xc0010000) ++#elif defined(__arm__) || defined(__m68k__) || defined(__s390__) ++#define KERNEL_RW_POINTER ((void *)0x00010000) ++#elif defined(__hppa__) ++#define KERNEL_RW_POINTER ((void *)0x10100000) ++#elif defined(__sparc__) ++#define KERNEL_RW_POINTER ((void *)0xf0010000) ++#endif + #else + //#warning Not really sure where kernel memory is. Guessing. + #define KERNEL_RW_POINTER ((void *)0xffffffff81000000) +Index: libaio-0.3.109/src/libaio.h +=================================================================== +--- libaio-0.3.109.orig/src/libaio.h ++++ libaio-0.3.109/src/libaio.h +@@ -83,6 +83,30 @@ typedef enum io_iocb_cmd { + #define PADDEDptr(x, y) x; unsigned y + #define PADDEDul(x, y) unsigned long x; unsigned y + # endif ++#elif defined(__m68k__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x ++#elif defined(__sparc__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x ++#elif defined(__hppa__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x ++#elif defined(__mips__) ++# if defined (__MIPSEB__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x ++# elif defined(__MIPSEL__) /* little endian, 32 bits */ ++#define PADDED(x, y) x; unsigned y ++#define PADDEDptr(x, y) x; unsigned y ++#define PADDEDul(x, y) unsigned long x; unsigned y ++# else ++# error "neither mipseb nor mipsel?" ++# endif + #else + #error endian? + #endif +Index: libaio-0.3.109/src/syscall-m68k.h +=================================================================== --- /dev/null -+++ b/src/syscall-m68k.h ++++ libaio-0.3.109/src/syscall-m68k.h @@ -0,0 +1,78 @@ +#define __NR_io_setup 241 +#define __NR_io_destroy 242 @@ -90,160 +146,10 @@ +return (type) __res; \ +} + +Index: libaio-0.3.109/src/syscall-mips.h +=================================================================== --- /dev/null -+++ b/src/syscall-sparc.h -@@ -0,0 +1,130 @@ -+/* $Id: unistd.h,v 1.74 2002/02/08 03:57:18 davem Exp $ */ -+ -+/* -+ * System calls under the Sparc. -+ * -+ * Don't be scared by the ugly clobbers, it is the only way I can -+ * think of right now to force the arguments into fixed registers -+ * before the trap into the system call with gcc 'asm' statements. -+ * -+ * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) -+ * -+ * SunOS compatibility based upon preliminary work which is: -+ * -+ * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) -+ */ -+ -+ -+#define __NR_io_setup 268 -+#define __NR_io_destroy 269 -+#define __NR_io_submit 270 -+#define __NR_io_cancel 271 -+#define __NR_io_getevents 272 -+ -+ -+#define io_syscall1(type,fname,sname,type1,arg1) \ -+type fname(type1 arg1) \ -+{ \ -+long __res; \ -+register long __g1 __asm__ ("g1") = __NR_##sname; \ -+register long __o0 __asm__ ("o0") = (long)(arg1); \ -+__asm__ __volatile__ ("t 0x10\n\t" \ -+ "bcc 1f\n\t" \ -+ "mov %%o0, %0\n\t" \ -+ "sub %%g0, %%o0, %0\n\t" \ -+ "1:\n\t" \ -+ : "=r" (__res), "=&r" (__o0) \ -+ : "1" (__o0), "r" (__g1) \ -+ : "cc"); \ -+if (__res < -255 || __res >= 0) \ -+ return (type) __res; \ -+return -1; \ -+} -+ -+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ -+type fname(type1 arg1,type2 arg2) \ -+{ \ -+long __res; \ -+register long __g1 __asm__ ("g1") = __NR_##sname; \ -+register long __o0 __asm__ ("o0") = (long)(arg1); \ -+register long __o1 __asm__ ("o1") = (long)(arg2); \ -+__asm__ __volatile__ ("t 0x10\n\t" \ -+ "bcc 1f\n\t" \ -+ "mov %%o0, %0\n\t" \ -+ "sub %%g0, %%o0, %0\n\t" \ -+ "1:\n\t" \ -+ : "=r" (__res), "=&r" (__o0) \ -+ : "1" (__o0), "r" (__o1), "r" (__g1) \ -+ : "cc"); \ -+if (__res < -255 || __res >= 0) \ -+ return (type) __res; \ -+return -1; \ -+} -+ -+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ -+type fname(type1 arg1,type2 arg2,type3 arg3) \ -+{ \ -+long __res; \ -+register long __g1 __asm__ ("g1") = __NR_##sname; \ -+register long __o0 __asm__ ("o0") = (long)(arg1); \ -+register long __o1 __asm__ ("o1") = (long)(arg2); \ -+register long __o2 __asm__ ("o2") = (long)(arg3); \ -+__asm__ __volatile__ ("t 0x10\n\t" \ -+ "bcc 1f\n\t" \ -+ "mov %%o0, %0\n\t" \ -+ "sub %%g0, %%o0, %0\n\t" \ -+ "1:\n\t" \ -+ : "=r" (__res), "=&r" (__o0) \ -+ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) \ -+ : "cc"); \ -+if (__res < -255 || __res>=0) \ -+ return (type) __res; \ -+return -1; \ -+} -+ -+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -+{ \ -+long __res; \ -+register long __g1 __asm__ ("g1") = __NR_##sname; \ -+register long __o0 __asm__ ("o0") = (long)(arg1); \ -+register long __o1 __asm__ ("o1") = (long)(arg2); \ -+register long __o2 __asm__ ("o2") = (long)(arg3); \ -+register long __o3 __asm__ ("o3") = (long)(arg4); \ -+__asm__ __volatile__ ("t 0x10\n\t" \ -+ "bcc 1f\n\t" \ -+ "mov %%o0, %0\n\t" \ -+ "sub %%g0, %%o0, %0\n\t" \ -+ "1:\n\t" \ -+ : "=r" (__res), "=&r" (__o0) \ -+ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__g1) \ -+ : "cc"); \ -+if (__res < -255 || __res>=0) \ -+ return (type) __res; \ -+return -1; \ -+} -+ -+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ -+ type5,arg5) \ -+type fname(type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ -+{ \ -+long __res; \ -+register long __g1 __asm__ ("g1") = __NR_##sname; \ -+register long __o0 __asm__ ("o0") = (long)(arg1); \ -+register long __o1 __asm__ ("o1") = (long)(arg2); \ -+register long __o2 __asm__ ("o2") = (long)(arg3); \ -+register long __o3 __asm__ ("o3") = (long)(arg4); \ -+register long __o4 __asm__ ("o4") = (long)(arg5); \ -+__asm__ __volatile__ ("t 0x10\n\t" \ -+ "bcc 1f\n\t" \ -+ "mov %%o0, %0\n\t" \ -+ "sub %%g0, %%o0, %0\n\t" \ -+ "1:\n\t" \ -+ : "=r" (__res), "=&r" (__o0) \ -+ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \ -+ : "cc"); \ -+if (__res < -255 || __res>=0) \ -+ return (type) __res; \ -+return -1; \ -+} -+ ---- a/src/syscall.h -+++ b/src/syscall.h -@@ -22,6 +22,16 @@ - #include "syscall-s390.h" - #elif defined(__alpha__) - #include "syscall-alpha.h" -+#elif defined(__arm__) -+#include "syscall-arm.h" -+#elif defined(__m68k__) -+#include "syscall-m68k.h" -+#elif defined(__sparc__) -+#include "syscall-sparc.h" -+#elif defined(__hppa__) -+#include "syscall-parisc.h" -+#elif defined(__mips__) -+#include "syscall-mips.h" - #else - #error "add syscall-arch.h" - #endif ---- /dev/null -+++ b/src/syscall-mips.h ++++ libaio-0.3.109/src/syscall-mips.h @@ -0,0 +1,223 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public @@ -468,51 +374,10 @@ + +#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */ + ---- a/src/libaio.h -+++ b/src/libaio.h -@@ -73,6 +73,40 @@ typedef enum io_iocb_cmd { - #define PADDED(x, y) unsigned y; x - #define PADDEDptr(x, y) unsigned y; x - #define PADDEDul(x, y) unsigned y; unsigned long x -+#elif defined(__arm__) -+# if defined (__ARMEB__) /* big endian, 32 bits */ -+#define PADDED(x, y) unsigned y; x -+#define PADDEDptr(x, y) unsigned y; x -+#define PADDEDul(x, y) unsigned y; unsigned long x -+# else /* little endian, 32 bits */ -+#define PADDED(x, y) x; unsigned y -+#define PADDEDptr(x, y) x; unsigned y -+#define PADDEDul(x, y) unsigned long x; unsigned y -+# endif -+#elif defined(__m68k__) /* big endian, 32 bits */ -+#define PADDED(x, y) unsigned y; x -+#define PADDEDptr(x, y) unsigned y; x -+#define PADDEDul(x, y) unsigned y; unsigned long x -+#elif defined(__sparc__) /* big endian, 32 bits */ -+#define PADDED(x, y) unsigned y; x -+#define PADDEDptr(x, y) unsigned y; x -+#define PADDEDul(x, y) unsigned y; unsigned long x -+#elif defined(__hppa__) /* big endian, 32 bits */ -+#define PADDED(x, y) unsigned y; x -+#define PADDEDptr(x, y) unsigned y; x -+#define PADDEDul(x, y) unsigned y; unsigned long x -+#elif defined(__mips__) -+# if defined (__MIPSEB__) /* big endian, 32 bits */ -+#define PADDED(x, y) unsigned y; x -+#define PADDEDptr(x, y) unsigned y; x -+#define PADDEDul(x, y) unsigned y; unsigned long x -+# elif defined(__MIPSEL__) /* little endian, 32 bits */ -+#define PADDED(x, y) x; unsigned y -+#define PADDEDptr(x, y) x; unsigned y -+#define PADDEDul(x, y) unsigned long x; unsigned y -+# else -+# error "neither mipseb nor mipsel?" -+# endif - #else - #error endian? - #endif +Index: libaio-0.3.109/src/syscall-parisc.h +=================================================================== --- /dev/null -+++ b/src/syscall-parisc.h ++++ libaio-0.3.109/src/syscall-parisc.h @@ -0,0 +1,146 @@ +/* + * Linux system call numbers. @@ -660,140 +525,157 @@ + return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5); \ +} + +Index: libaio-0.3.109/src/syscall-sparc.h +=================================================================== --- /dev/null -+++ b/src/syscall-arm.h -@@ -0,0 +1,116 @@ ++++ libaio-0.3.109/src/syscall-sparc.h +@@ -0,0 +1,130 @@ ++/* $Id: unistd.h,v 1.74 2002/02/08 03:57:18 davem Exp $ */ ++ +/* -+ * linux/include/asm-arm/unistd.h ++ * System calls under the Sparc. + * -+ * Copyright (C) 2001-2005 Russell King ++ * Don't be scared by the ugly clobbers, it is the only way I can ++ * think of right now to force the arguments into fixed registers ++ * before the trap into the system call with gcc 'asm' statements. ++ * ++ * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. ++ * SunOS compatibility based upon preliminary work which is: + * -+ * Please forward _all_ changes to this file to rmk@arm.linux.org.uk, -+ * no matter what the change is. Thanks! ++ * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) + */ + -+#define __NR_OABI_SYSCALL_BASE 0x900000 + -+#if defined(__thumb__) || defined(__ARM_EABI__) -+#define __NR_SYSCALL_BASE 0 -+#else -+#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE -+#endif ++#define __NR_io_setup 268 ++#define __NR_io_destroy 269 ++#define __NR_io_submit 270 ++#define __NR_io_cancel 271 ++#define __NR_io_getevents 272 + -+#define __NR_io_setup (__NR_SYSCALL_BASE+243) -+#define __NR_io_destroy (__NR_SYSCALL_BASE+244) -+#define __NR_io_getevents (__NR_SYSCALL_BASE+245) -+#define __NR_io_submit (__NR_SYSCALL_BASE+246) -+#define __NR_io_cancel (__NR_SYSCALL_BASE+247) -+ -+#define __sys2(x) #x -+#define __sys1(x) __sys2(x) -+ -+#if defined(__thumb__) || defined(__ARM_EABI__) -+#define __SYS_REG(name) register long __sysreg __asm__("r7") = __NR_##name; -+#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs -+#define __syscall(name) "swi\t0" -+#else -+#define __SYS_REG(name) -+#define __SYS_REG_LIST(regs...) regs -+#define __syscall(name) "swi\t" __sys1(__NR_##name) "" -+#endif + -+#define io_syscall1(type,fname,sname,type1,arg1) \ -+type fname(type1 arg1) { \ -+ __SYS_REG(sname) \ -+ register long __r0 __asm__("r0") = (long)arg1; \ -+ register long __res_r0 __asm__("r0"); \ -+ __asm__ __volatile__ ( \ -+ __syscall(sname) \ -+ : "=r" (__res_r0) \ -+ : __SYS_REG_LIST( "0" (__r0) ) \ -+ : "memory" ); \ -+ return (type) __res_r0; \ ++#define io_syscall1(type,fname,sname,type1,arg1) \ ++type fname(type1 arg1) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res >= 0) \ ++ return (type) __res; \ ++return -1; \ +} + -+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ -+type fname(type1 arg1,type2 arg2) { \ -+ __SYS_REG(sname) \ -+ register long __r0 __asm__("r0") = (long)arg1; \ -+ register long __r1 __asm__("r1") = (long)arg2; \ -+ register long __res_r0 __asm__("r0"); \ -+ __asm__ __volatile__ ( \ -+ __syscall(sname) \ -+ : "=r" (__res_r0) \ -+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) \ -+ : "memory" ); \ -+ return (type) __res_r0; \ ++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ ++type fname(type1 arg1,type2 arg2) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res >= 0) \ ++ return (type) __res; \ ++return -1; \ +} + -+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ -+type fname(type1 arg1,type2 arg2,type3 arg3) { \ -+ __SYS_REG(sname) \ -+ register long __r0 __asm__("r0") = (long)arg1; \ -+ register long __r1 __asm__("r1") = (long)arg2; \ -+ register long __r2 __asm__("r2") = (long)arg3; \ -+ register long __res_r0 __asm__("r0"); \ -+ __asm__ __volatile__ ( \ -+ __syscall(sname) \ -+ : "=r" (__res_r0) \ -+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) \ -+ : "memory" ); \ -+ return (type) __res_r0; \ -+} -+ -+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\ -+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ -+ __SYS_REG(sname) \ -+ register long __r0 __asm__("r0") = (long)arg1; \ -+ register long __r1 __asm__("r1") = (long)arg2; \ -+ register long __r2 __asm__("r2") = (long)arg3; \ -+ register long __r3 __asm__("r3") = (long)arg4; \ -+ register long __res_r0 __asm__("r0"); \ -+ __asm__ __volatile__ ( \ -+ __syscall(sname) \ -+ : "=r" (__res_r0) \ -+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) \ -+ : "memory" ); \ -+ return (type) __res_r0; \ -+} -+ -+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ -+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) {\ -+ __SYS_REG(sname) \ -+ register long __r0 __asm__("r0") = (long)arg1; \ -+ register long __r1 __asm__("r1") = (long)arg2; \ -+ register long __r2 __asm__("r2") = (long)arg3; \ -+ register long __r3 __asm__("r3") = (long)arg4; \ -+ register long __r4 __asm__("r4") = (long)arg5; \ -+ register long __res_r0 __asm__("r0"); \ -+ __asm__ __volatile__ ( \ -+ __syscall(sname) \ -+ : "=r" (__res_r0) \ -+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ -+ "r" (__r3), "r" (__r4) ) \ -+ : "memory" ); \ -+ return (type) __res_r0; \ -+} -+ ---- a/harness/main.c -+++ b/harness/main.c -@@ -11,8 +11,14 @@ - - #include <libaio.h> - --#if defined(__i386__) -+#if defined(__i386__) || defined(__powerpc__) || defined(__mips__) - #define KERNEL_RW_POINTER ((void *)0xc0010000) -+#elif defined(__arm__) || defined(__m68k__) || defined(__s390__) -+#define KERNEL_RW_POINTER ((void *)0x00010000) ++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ ++type fname(type1 arg1,type2 arg2,type3 arg3) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++register long __o2 __asm__ ("o2") = (long)(arg3); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res>=0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ ++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++register long __o2 __asm__ ("o2") = (long)(arg3); \ ++register long __o3 __asm__ ("o3") = (long)(arg4); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res>=0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ ++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ ++ type5,arg5) \ ++type fname(type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++register long __o2 __asm__ ("o2") = (long)(arg3); \ ++register long __o3 __asm__ ("o3") = (long)(arg4); \ ++register long __o4 __asm__ ("o4") = (long)(arg5); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res>=0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ +Index: libaio-0.3.109/src/syscall.h +=================================================================== +--- libaio-0.3.109.orig/src/syscall.h ++++ libaio-0.3.109/src/syscall.h +@@ -24,6 +24,14 @@ + #include "syscall-alpha.h" + #elif defined(__arm__) + #include "syscall-arm.h" ++#elif defined(__m68k__) ++#include "syscall-m68k.h" ++#elif defined(__sparc__) ++#include "syscall-sparc.h" +#elif defined(__hppa__) -+#define KERNEL_RW_POINTER ((void *)0x10100000) -+#elif defined(__sparc__) && !defined(__arch64__) -+#define KERNEL_RW_POINTER ((void *)0xf0010000) ++#include "syscall-parisc.h" ++#elif defined(__mips__) ++#include "syscall-mips.h" #else - //#warning Not really sure where kernel memory is. Guessing. - #define KERNEL_RW_POINTER ((void *)0xffffffffc0010000) + #error "add syscall-arch.h" + #endif ++++++ 00_arches_sh.patch ++++++ --- /var/tmp/diff_new_pack.NJgFCs/_old 2011-03-24 09:42:50.000000000 +0100 +++ /var/tmp/diff_new_pack.NJgFCs/_new 2011-03-24 09:42:50.000000000 +0100 @@ -6,23 +6,30 @@ <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535288> -diff --git a/harness/main.c b/harness/main.c -index f472da7..01fbb87 100644 ---- a/harness/main.c -+++ b/harness/main.c -@@ -13,7 +13,7 @@ - - #if defined(__i386__) || defined(__powerpc__) || defined(__mips__) +--- + harness/main.c | 2 - + src/libaio.h | 10 +++++++ + src/syscall-sh.h | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + src/syscall.h | 2 + + 4 files changed, 91 insertions(+), 1 deletion(-) + +Index: libaio-0.3.109/harness/main.c +=================================================================== +--- libaio-0.3.109.orig/harness/main.c ++++ libaio-0.3.109/harness/main.c +@@ -14,7 +14,7 @@ + #if __LP64__ == 0 + #if defined(__i386__) || defined(__pwoerpc__) || defined(__mips__) #define KERNEL_RW_POINTER ((void *)0xc0010000) -#elif defined(__arm__) || defined(__m68k__) || defined(__s390__) +#elif defined(__arm__) || defined(__m68k__) || defined(__s390__) || defined(__sh__) #define KERNEL_RW_POINTER ((void *)0x00010000) #elif defined(__hppa__) #define KERNEL_RW_POINTER ((void *)0x10100000) -diff --git a/src/libaio.h b/src/libaio.h -index 68e22ac..d306084 100644 ---- a/src/libaio.h -+++ b/src/libaio.h +Index: libaio-0.3.109/src/libaio.h +=================================================================== +--- libaio-0.3.109.orig/src/libaio.h ++++ libaio-0.3.109/src/libaio.h @@ -107,6 +107,16 @@ typedef enum io_iocb_cmd { # else # error "neither mipseb nor mipsel?" @@ -40,11 +47,10 @@ #else #error endian? #endif -diff --git a/src/syscall-sh.h b/src/syscall-sh.h -new file mode 100644 -index 0000000..9945ec6 +Index: libaio-0.3.109/src/syscall-sh.h +=================================================================== --- /dev/null -+++ b/src/syscall-sh.h ++++ libaio-0.3.109/src/syscall-sh.h @@ -0,0 +1,78 @@ +/* Copy from ./arch/sh/include/asm/unistd_32.h */ +#define __NR_io_setup 245 @@ -124,10 +130,10 @@ + : "memory" ); \ + return (type) __sc0;\ +} -diff --git a/src/syscall.h b/src/syscall.h -index b957bbe..ea0435e 100644 ---- a/src/syscall.h -+++ b/src/syscall.h +Index: libaio-0.3.109/src/syscall.h +=================================================================== +--- libaio-0.3.109.orig/src/syscall.h ++++ libaio-0.3.109/src/syscall.h @@ -32,6 +32,8 @@ #include "syscall-parisc.h" #elif defined(__mips__) @@ -137,6 +143,3 @@ #else #error "add syscall-arch.h" #endif --- -1.6.3.1 - ++++++ 02_libdevdir.patch ++++++ --- /var/tmp/diff_new_pack.NJgFCs/_old 2011-03-24 09:42:50.000000000 +0100 +++ /var/tmp/diff_new_pack.NJgFCs/_new 2011-03-24 09:42:50.000000000 +0100 @@ -3,10 +3,10 @@ src/Makefile | 12 +++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) -Index: libaio-0.3.107/Makefile +Index: libaio-0.3.109/Makefile =================================================================== ---- libaio-0.3.107.orig/Makefile -+++ libaio-0.3.107/Makefile +--- libaio-0.3.109.orig/Makefile ++++ libaio-0.3.109/Makefile @@ -5,9 +5,11 @@ RELEASE=$(shell awk '/Release:/ { print CVSTAG = $(NAME)_$(subst .,-,$(VERSION))_$(subst .,-,$(RELEASE)) RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm") @@ -17,9 +17,9 @@ libdir=$(prefix)/lib +libdevdir=$(prefix)/lib - default: all - -@@ -15,7 +17,12 @@ all: + pkgname := libaio + ver := $(shell cat .version) +@@ -23,7 +25,12 @@ all: @$(MAKE) -C src install: @@ -33,10 +33,10 @@ check: @$(MAKE) -C harness check -Index: libaio-0.3.107/src/Makefile +Index: libaio-0.3.109/src/Makefile =================================================================== ---- libaio-0.3.107.orig/src/Makefile -+++ libaio-0.3.107/src/Makefile +--- libaio-0.3.109.orig/src/Makefile ++++ libaio-0.3.109/src/Makefile @@ -1,6 +1,8 @@ +DESTDIR= prefix=/usr ++++++ libaio-0.3.107.tar.bz2 -> libaio-0.3.109.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libaio-0.3.107/.version new/libaio-0.3.109/.version --- old/libaio-0.3.107/.version 1970-01-01 01:00:00.000000000 +0100 +++ new/libaio-0.3.109/.version 2009-10-09 20:17:02.000000000 +0200 @@ -0,0 +1 @@ +0.3.109 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libaio-0.3.107/Makefile new/libaio-0.3.109/Makefile --- old/libaio-0.3.107/Makefile 2008-01-09 21:49:12.000000000 +0100 +++ new/libaio-0.3.109/Makefile 2009-10-09 20:17:02.000000000 +0200 @@ -9,6 +9,14 @@ includedir=$(prefix)/include libdir=$(prefix)/lib +pkgname := libaio +ver := $(shell cat .version) + +version_dirty := $(strip $(shell git diff | lsdiff | grep ".version")) +dirty := $(strip $(shell git whatchanged ${pkgname}-${ver}... 2>/dev/null)) +new_changes := $(strip $(shell git diff 2>/dev/null)) +tag_valid := $(strip $(shell git tag -l ${pkgname}-${ver})) + default: all all: @@ -27,21 +35,37 @@ @$(MAKE) -C src clean @$(MAKE) -C harness clean -tag-archive: - @cvs -Q tag -F $(CVSTAG) - -create-archive: tag-archive - @rm -rf /tmp/$(NAME) - @cd /tmp; cvs -Q -d $(CVSROOT) export -r$(CVSTAG) $(NAME) || echo GRRRrrrrr -- ignore [export aborted] - @mv /tmp/$(NAME) /tmp/$(NAME)-$(VERSION) - @cd /tmp; tar czSpf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION) - @rm -rf /tmp/$(NAME)-$(VERSION) - @cp /tmp/$(NAME)-$(VERSION).tar.gz . - @rm -f /tmp/$(NAME)-$(VERSION).tar.gz - @echo " " - @echo "The final archive is ./$(NAME)-$(VERSION).tar.gz." +tag: tag-checks + git tag ${pkgname}-${ver} -archive: clean tag-archive create-archive +archive: uptodate + @echo "Creating archive from version ${pkgname}-${ver}:" + git archive --format=tar --prefix=${pkgname}-${ver}/ \ + ${pkgname}-${ver} | gzip > ${pkgname}-${ver}.tar.gz +tag-checks: +ifneq (${version_dirty},) + @echo "Error: .version is not committed to the repository." + @exit 1 +endif +ifneq (${new_changes},) + @echo "Error: there are changes in this checkout that have not been" + @echo "committed to the repository." + @exit 1 +endif + +uptodate: tag-checks +ifneq (${dirty},) + @echo -n "Error: this branch contains changes that are not part of tag " + @echo "${pkgname}-${ver}." + @echo -n "Try running git-whatchanged ${pkgname}-${ver}... to see " + @echo "the changes." + @exit 1 +endif +ifeq (${tag_valid},) + @echo "Error: tag ${pkgname}-${ver} does not exist. Run 'make tag'" + @echo "and try again." + @exit 1 +endif -srpm: create-archive +srpm: archive $(RPMBUILD) --define "_sourcedir `pwd`" --define "_srcrpmdir `pwd`" --nodeps -bs $(SPECFILE) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libaio-0.3.107/harness/main.c new/libaio-0.3.109/harness/main.c --- old/libaio-0.3.107/harness/main.c 2008-01-09 21:49:12.000000000 +0100 +++ new/libaio-0.3.109/harness/main.c 2009-10-09 20:17:02.000000000 +0200 @@ -11,11 +11,11 @@ #include <libaio.h> -#if defined(__i386__) +#if __LP64__ == 0 #define KERNEL_RW_POINTER ((void *)0xc0010000) #else //#warning Not really sure where kernel memory is. Guessing. -#define KERNEL_RW_POINTER ((void *)0xffffffffc0010000) +#define KERNEL_RW_POINTER ((void *)0xffffffff81000000) #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libaio-0.3.107/libaio.spec new/libaio-0.3.109/libaio.spec --- old/libaio-0.3.107/libaio.spec 2008-01-09 21:49:12.000000000 +0100 +++ new/libaio-0.3.109/libaio.spec 2009-10-09 20:17:02.000000000 +0200 @@ -1,13 +1,13 @@ Name: libaio -Version: 0.3.107 +Version: 0.3.109 Release: 1 Summary: Linux-native asynchronous I/O access library -Copyright: LGPL +License: LGPL Group: System Environment/Libraries Source: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-root # Fix ExclusiveArch as we implement this functionality on more architectures -ExclusiveArch: i386 x86_64 ia64 s390 s390x ppc ppc64 ppc64pseries ppc64iseries alpha alphaev6 +ExclusiveArch: i386 x86_64 ia64 s390 s390x ppc ppc64 ppc64pseries ppc64iseries alpha alphaev6 %{arm} %description The Linux-native asynchronous I/O facility ("async I/O", or "aio") has a @@ -59,6 +59,11 @@ %attr(0644,root,root) %{_libdir}/libaio.a %changelog +* Tue Jun 9 2009 Jeff Moyer <jmoyer@redhat.com> - 0.3.108-1 +- add ARM architecture support (grabbed from Debian arches tree) +- replace check of __i386__ with __LP64__ in test harness (Jeff Moyer) +- change the .spec's copyright tag to license + * Wed Jan 9 2008 Jeff Moyer <jmoyer@redhat.com> - 0.3.107-1 - Fix the test harness (Rusty Russell) - Add eventfd support (Rusty Russell) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libaio-0.3.107/src/libaio.h new/libaio-0.3.109/src/libaio.h --- old/libaio-0.3.107/src/libaio.h 2008-01-09 21:49:12.000000000 +0100 +++ new/libaio-0.3.109/src/libaio.h 2009-10-09 20:17:02.000000000 +0200 @@ -73,6 +73,16 @@ #define PADDED(x, y) unsigned y; x #define PADDEDptr(x, y) unsigned y; x #define PADDEDul(x, y) unsigned y; unsigned long x +#elif defined(__arm__) +# if defined (__ARMEB__) /* big endian, 32 bits */ +#define PADDED(x, y) unsigned y; x +#define PADDEDptr(x, y) unsigned y; x +#define PADDEDul(x, y) unsigned y; unsigned long x +# else /* little endian, 32 bits */ +#define PADDED(x, y) x; unsigned y +#define PADDEDptr(x, y) x; unsigned y +#define PADDEDul(x, y) unsigned long x; unsigned y +# endif #else #error endian? #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libaio-0.3.107/src/syscall-arm.h new/libaio-0.3.109/src/syscall-arm.h --- old/libaio-0.3.107/src/syscall-arm.h 1970-01-01 01:00:00.000000000 +0100 +++ new/libaio-0.3.109/src/syscall-arm.h 2009-10-09 20:17:02.000000000 +0200 @@ -0,0 +1,116 @@ +/* + * linux/include/asm-arm/unistd.h + * + * Copyright (C) 2001-2005 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Please forward _all_ changes to this file to rmk@arm.linux.org.uk, + * no matter what the change is. Thanks! + */ + +#define __NR_OABI_SYSCALL_BASE 0x900000 + +#if defined(__thumb__) || defined(__ARM_EABI__) +#define __NR_SYSCALL_BASE 0 +#else +#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE +#endif + +#define __NR_io_setup (__NR_SYSCALL_BASE+243) +#define __NR_io_destroy (__NR_SYSCALL_BASE+244) +#define __NR_io_getevents (__NR_SYSCALL_BASE+245) +#define __NR_io_submit (__NR_SYSCALL_BASE+246) +#define __NR_io_cancel (__NR_SYSCALL_BASE+247) + +#define __sys2(x) #x +#define __sys1(x) __sys2(x) + +#if defined(__thumb__) || defined(__ARM_EABI__) +#define __SYS_REG(name) register long __sysreg __asm__("r7") = __NR_##name; +#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs +#define __syscall(name) "swi\t0" +#else +#define __SYS_REG(name) +#define __SYS_REG_LIST(regs...) regs +#define __syscall(name) "swi\t" __sys1(__NR_##name) "" +#endif + +#define io_syscall1(type,fname,sname,type1,arg1) \ +type fname(type1 arg1) { \ + __SYS_REG(sname) \ + register long __r0 __asm__("r0") = (long)arg1; \ + register long __res_r0 __asm__("r0"); \ + __asm__ __volatile__ ( \ + __syscall(sname) \ + : "=r" (__res_r0) \ + : __SYS_REG_LIST( "0" (__r0) ) \ + : "memory" ); \ + return (type) __res_r0; \ +} + +#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ +type fname(type1 arg1,type2 arg2) { \ + __SYS_REG(sname) \ + register long __r0 __asm__("r0") = (long)arg1; \ + register long __r1 __asm__("r1") = (long)arg2; \ + register long __res_r0 __asm__("r0"); \ + __asm__ __volatile__ ( \ + __syscall(sname) \ + : "=r" (__res_r0) \ + : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) \ + : "memory" ); \ + return (type) __res_r0; \ +} + +#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ +type fname(type1 arg1,type2 arg2,type3 arg3) { \ + __SYS_REG(sname) \ + register long __r0 __asm__("r0") = (long)arg1; \ + register long __r1 __asm__("r1") = (long)arg2; \ + register long __r2 __asm__("r2") = (long)arg3; \ + register long __res_r0 __asm__("r0"); \ + __asm__ __volatile__ ( \ + __syscall(sname) \ + : "=r" (__res_r0) \ + : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) \ + : "memory" ); \ + return (type) __res_r0; \ +} + +#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\ +type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ + __SYS_REG(sname) \ + register long __r0 __asm__("r0") = (long)arg1; \ + register long __r1 __asm__("r1") = (long)arg2; \ + register long __r2 __asm__("r2") = (long)arg3; \ + register long __r3 __asm__("r3") = (long)arg4; \ + register long __res_r0 __asm__("r0"); \ + __asm__ __volatile__ ( \ + __syscall(sname) \ + : "=r" (__res_r0) \ + : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) \ + : "memory" ); \ + return (type) __res_r0; \ +} + +#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ +type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) {\ + __SYS_REG(sname) \ + register long __r0 __asm__("r0") = (long)arg1; \ + register long __r1 __asm__("r1") = (long)arg2; \ + register long __r2 __asm__("r2") = (long)arg3; \ + register long __r3 __asm__("r3") = (long)arg4; \ + register long __r4 __asm__("r4") = (long)arg5; \ + register long __res_r0 __asm__("r0"); \ + __asm__ __volatile__ ( \ + __syscall(sname) \ + : "=r" (__res_r0) \ + : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ + "r" (__r3), "r" (__r4) ) \ + : "memory" ); \ + return (type) __res_r0; \ +} + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libaio-0.3.107/src/syscall.h new/libaio-0.3.109/src/syscall.h --- old/libaio-0.3.107/src/syscall.h 2005-04-01 22:31:32.000000000 +0200 +++ new/libaio-0.3.109/src/syscall.h 2009-10-09 20:17:02.000000000 +0200 @@ -22,6 +22,8 @@ #include "syscall-s390.h" #elif defined(__alpha__) #include "syscall-alpha.h" +#elif defined(__arm__) +#include "syscall-arm.h" #else #error "add syscall-arch.h" #endif ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de