From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Reinecke Date: Thu, 15 Jul 2004 09:35:29 +0000 Subject: IA64 update for klibc-0.148 Message-Id: <40F64FE1.6020406@suse.de> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------060602050603090600080909" List-Id: To: linux-hotplug@vger.kernel.org This is a multi-part message in MIME format. --------------060602050603090600080909 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Hi all, these two patches - update the ia64 port of klibc and - adds the missing perl scripts for syscall stub generation on ia64 So with it the new klibc should be finally working on ia64. Kudos go to schwab@suse.de for the ia64 asm hackery. Cheers, Hannes --=20 Dr. Hannes Reinecke hare@suse.de SuSE Linux AG S390 & zSeries Maxfeldstra=DFe 5 +49 911 74053 688 90409 N=FCrnberg http://www.suse.de --------------060602050603090600080909 Content-Type: text/x-patch; name="klibc-0.115-ia64.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="klibc-0.115-ia64.patch" --- klibc-0.115/klibc/arch/ia64/vfork.S.orig 2004-03-19 14:19:08.890806347 +0100 +++ klibc-0.115/klibc/arch/ia64/vfork.S 2004-03-19 14:20:23.000000000 +0100 @@ -27,8 +27,8 @@ mov out0=CLONE_VM|CLONE_VFORK|SIGCHLD mov out1=0 ;; - __IA64_BREAK // Do the syscall - + break 0x100000 // Do the syscall + ;; addl r15=0,r1 cmp.eq p7,p6 = -1,r10 ;; --- klibc-0.115/klibc/arch/ia64/pipe.c.orig 2004-03-19 14:19:13.227660639 +0100 +++ klibc-0.115/klibc/arch/ia64/pipe.c 2004-03-19 15:09:45.201472497 +0100 @@ -27,7 +27,7 @@ long _retval; __asm __volatile (__IA64_BREAK : "=r" (_r8), "=r" (_r10), "=r" (_r15), - "=r" (_out0) + "=r" (_out0), "=r" (_r9) : "2" (_r15), "3" (_out0) : "memory" ASM_CLOBBERS); if (_r10 == -1) { --- klibc-0.115/klibc/arch/ia64/include/klibc/archsys.h.orig 2004-03-19 16:03:23.961172547 +0100 +++ klibc-0.115/klibc/arch/ia64/include/klibc/archsys.h 2004-03-19 16:03:54.000000000 +0100 @@ -26,7 +26,7 @@ errno = (_retval); \ _retval = -1; \ } \ - return _retval; \ + return (type)_retval; \ } #define _syscall1(type,name,type1,arg1) \ @@ -48,7 +48,7 @@ errno = (_retval); \ _retval = -1; \ } \ - return _retval; \ + return (type)_retval; \ } #define _syscall2(type,name,type1,arg1,type2,arg2) \ @@ -70,7 +70,7 @@ errno = (_retval); \ _retval = -1; \ } \ - return _retval; \ + return (type)_retval; \ } #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ @@ -92,7 +92,7 @@ errno = (_retval); \ _retval = -1; \ } \ - return _retval; \ + return (type)_retval; \ } #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ @@ -114,7 +114,7 @@ errno = (_retval); \ _retval = -1; \ } \ - return _retval; \ + return (type)_retval; \ } #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ @@ -136,7 +136,7 @@ errno = (_retval); \ _retval = -1; \ } \ - return _retval; \ + return (type)_retval; \ } #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \ @@ -158,7 +158,7 @@ errno = (_retval); \ _retval = -1; \ } \ - return _retval; \ + return (type)_retval; \ } --------------060602050603090600080909 Content-Type: text/x-patch; name="klibc-0.148.ia64.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="klibc-0.148.ia64.patch" --- klibc-0.148/klibc/arch/ia64/Makefile.inc +++ klibc-0.148/klibc/arch/ia64/Makefile.inc @@ -11,6 +11,7 @@ arch/$(ARCH)/vfork.o \ arch/$(ARCH)/setjmp.o \ arch/$(ARCH)/pipe.o \ + arch/$(ARCH)/syscall.o \ libgcc/__divdi3.o \ libgcc/__divsi3.o \ libgcc/__udivdi3.o \ --- klibc-0.148/klibc/arch/ia64/syscall.S +++ klibc-0.148/klibc/arch/ia64/syscall.S @@ -0,0 +1,19 @@ +# +# arch/ia64/syscall.S +# + +#include + + .text + .align 32 + .proc __syscall_error + .globl __syscall_error +__syscall_error: + addl r2 = @ltoffx(errno),gp + ld8.mov r3 = [r2],errno + ;; + st4 [r3] = r8 + mov r8 = -1 + br.ret.sptk.many b0 + .size __syscall_error, .-__syscall_error + .endp __syscall_error --- klibc-0.148/klibc/arch/ia64/sysstub.ph +++ klibc-0.148/klibc/arch/ia64/sysstub.ph @@ -0,0 +1,29 @@ +# -*- perl -*- +# +# arch/ia64/sysstub.ph +# +# Script to generate system call stubs +# + +sub make_sysstub($$$$@) { + my($fname, $type, $sname, $stype, @args) = @_; + + open(OUT, '>', "syscalls/${fname}.S"); + print OUT "#include \n"; + print OUT "\n"; + print OUT "\t.text\n"; + print OUT "\t.align 32\n"; + print OUT "\t.proc ${fname}\n"; + print OUT "\t.globl ${fname}\n"; + print OUT "${fname}:\n"; + print OUT "\tmov\tr15 = __NR_${sname}\n"; + print OUT "\tbreak __BREAK_SYSCALL\n"; + print OUT "\tcmp.eq p6,p0 = -1,r10\n"; + print OUT "(p6)\tbr.few __syscall_error\n"; + print OUT "\tbr.ret.sptk.many b0\n"; + print OUT "\t.size\t${fname},.-${fname}\n"; + print OUT "\t.endp\t${fname}\n"; + close(OUT); +} + +1; --------------060602050603090600080909-- ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel