Message ID | 20180911140631.18481-4-alex.bennee@linaro.org |
---|---|
State | New |
Headers | show |
Series | Add Nios II cross-compiler and enable tests/tcg | expand |
Le 11/09/2018 à 16:06, Alex Bennée a écrit : > This is to work around the limitations of the buildroot > qemu_nios2_10m50_defconfig which sets the base kernel version for > glibc. > > Signed-off-by: Alex Bennée <alex.bennee@linaro.org> > --- > linux-user/nios2/target_syscall.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/linux-user/nios2/target_syscall.h b/linux-user/nios2/target_syscall.h > index ca6b7e69f6..905b80d112 100644 > --- a/linux-user/nios2/target_syscall.h > +++ b/linux-user/nios2/target_syscall.h > @@ -2,7 +2,7 @@ > #define TARGET_SYSCALL_H > > #define UNAME_MACHINE "nios2" > -#define UNAME_MINIMUM_RELEASE "3.19.0" > +#define UNAME_MINIMUM_RELEASE "4.16.0" > > struct target_pt_regs { > unsigned long r8; /* r8-r15 Caller-saved GP registers */ > I have no objection. Perhaps you could ask NiosII Maintainers (cc). Laurent
On 09/11/2018 04:14 PM, Laurent Vivier wrote: > Le 11/09/2018 à 16:06, Alex Bennée a écrit : >> This is to work around the limitations of the buildroot >> qemu_nios2_10m50_defconfig which sets the base kernel version for >> glibc. >> >> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> >> --- >> linux-user/nios2/target_syscall.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/linux-user/nios2/target_syscall.h b/linux-user/nios2/target_syscall.h >> index ca6b7e69f6..905b80d112 100644 >> --- a/linux-user/nios2/target_syscall.h >> +++ b/linux-user/nios2/target_syscall.h >> @@ -2,7 +2,7 @@ >> #define TARGET_SYSCALL_H >> >> #define UNAME_MACHINE "nios2" >> -#define UNAME_MINIMUM_RELEASE "3.19.0" >> +#define UNAME_MINIMUM_RELEASE "4.16.0" >> >> struct target_pt_regs { >> unsigned long r8; /* r8-r15 Caller-saved GP registers */ >> > > I have no objection. Perhaps you could ask NiosII Maintainers (cc). If that's needed, so be it. The Linux 3.19 was required because some obscure ABI change happened at that point. -- Best regards, Marek Vasut
Laurent Vivier <laurent@vivier.eu> writes: > Le 11/09/2018 à 16:06, Alex Bennée a écrit: >> This is to work around the limitations of the buildroot >> qemu_nios2_10m50_defconfig which sets the base kernel version for >> glibc. >> >> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> >> --- >> linux-user/nios2/target_syscall.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/linux-user/nios2/target_syscall.h b/linux-user/nios2/target_syscall.h >> index ca6b7e69f6..905b80d112 100644 >> --- a/linux-user/nios2/target_syscall.h >> +++ b/linux-user/nios2/target_syscall.h >> @@ -2,7 +2,7 @@ >> #define TARGET_SYSCALL_H >> >> #define UNAME_MACHINE "nios2" >> -#define UNAME_MINIMUM_RELEASE "3.19.0" >> +#define UNAME_MINIMUM_RELEASE "4.16.0" >> >> struct target_pt_regs { >> unsigned long r8; /* r8-r15 Caller-saved GP registers */ >> > > I have no objection. Perhaps you could ask NiosII Maintainers (cc). Doh.. I had cccmd = scripts/get_maintainer.pl --nogit-fallback but of course as I didn't actually touch an nios2 files it didn't include them. Thanks. > > Laurent -- Alex Bennée -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1791796 Title: unimplemented thread syscalls in nios2 user-mode emulation Status in QEMU: New Bug description: This bug is reported against the 3.0 release. I noticed that the GCC test gcc.dg/torture/tls/tls-test.c is failing when run in user-mode qemu for nios2 target. The problem appears to be that the thread-related syscalls are unimplemented in qemu. Here is output from running with -strace: 22484 brk(NULL) = 0x00005000 22484 uname(0x7fffef5a) = 0 22484 faccessat(AT_FDCWD,"/etc/ld.so.preload",R_OK,0x5) = -1 errno=2 (No such file or directory) 22484 openat(AT_FDCWD,"/scratch/sandra/nios2-linux-trunk3/obj/test-2018.11-999999-nios2-linux-gnu/host-x86_64-linux-gnu/sourceryg++-2018.11/nios2-linux-gnu/libc/./lib/./tls/libm.so.6",O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 errno=2 (No such file or directory) 22484 fstatat64(AT_FDCWD,"/scratch/sandra/nios2-linux-trunk3/obj/test-2018.11-999999-nios2-linux-gnu/host-x86_64-linux-gnu/sourceryg++-2018.11/nios2-linux-gnu/libc/./lib/./tls",0x7fffe870,0) = -1 errno=2 (No such file or directory) 22484 openat(AT_FDCWD,"/scratch/sandra/nios2-linux-trunk3/obj/test-2018.11-999999-nios2-linux-gnu/host-x86_64-linux-gnu/sourceryg++-2018.11/nios2-linux-gnu/libc/./lib/./libm.so.6",O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3 22484 read(3,0x7fffe954,512) = 512 22484 fstat64(3,0x7fffe870) = 0 22484 mmap2(NULL,803596,PROT_EXEC|PROT_READ,MAP_PRIVATE|MAP_DENYWRITE,3,0) = 0x7f716000 22484 mmap2(0x7f7d8000,12288,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_DENYWRITE|MAP_FIXED,3,0xc1) = 0x7f7d8000 22484 close(3) = 0 22484 openat(AT_FDCWD,"/scratch/sandra/nios2-linux-trunk3/obj/test-2018.11-999999-nios2-linux-gnu/host-x86_64-linux-gnu/sourceryg++-2018.11/nios2-linux-gnu/libc/./lib/./libpthread.so.0",O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3 22484 read(3,0x7fffe948,512) = 512 22484 mmap2(NULL,8192,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x7f714000 22484 fstat64(3,0x7fffe864) = 0 22484 mmap2(NULL,120700,PROT_EXEC|PROT_READ,MAP_PRIVATE|MAP_DENYWRITE,3,0) = 0x7f6f6000 22484 mprotect(0x7f70e000,4096,PROT_NONE) = 0 22484 mmap2(0x7f70f000,12288,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_DENYWRITE|MAP_FIXED,3,0x18) = 0x7f70f000 22484 mmap2(0x7f712000,6012,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED,-1,0) = 0x7f712000 22484 close(3) = 0 22484 openat(AT_FDCWD,"/scratch/sandra/nios2-linux-trunk3/obj/test-2018.11-999999-nios2-linux-gnu/host-x86_64-linux-gnu/sourceryg++-2018.11/nios2-linux-gnu/libc/./lib/./libc.so.6",O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3 22484 read(3,0x7fffe93c,512) = 512 22484 fstat64(3,0x7fffe858) = 0 22484 mmap2(NULL,1491048,PROT_EXEC|PROT_READ,MAP_PRIVATE|MAP_DENYWRITE,3,0) = 0x7f589000 22484 mmap2(0x7f6de000,86016,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_DENYWRITE|MAP_FIXED,3,0x154) = 0x7f6de000 22484 mmap2(0x7f6f3000,8296,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED,-1,0) = 0x7f6f3000 22484 close(3) = 0 22484 mprotect(0x7f6de000,65536,PROT_READ) = 0 22484 mprotect(0x7f70f000,8192,PROT_READ) = 0 22484 mprotect(0x7f7d8000,4096,PROT_READ) = 0 22484 mprotect(0x00003000,4096,PROT_READ) = 0 22484 mprotect(0x7f7fc000,4096,PROT_READ) = 0 22484 set_tid_address(2138131700,2147480980,2147480988,2147480988,87148,47) = 22484 22484 set_robust_list(2138131708,12,2147480988,0,87148,47) = -1 errno=38 (Function not implemented) 22484 rt_sigaction(32,0x7ffff36c,NULL) = 0 22484 rt_sigaction(33,0x7ffff36c,NULL) = -1 errno=22 (Invalid argument) 22484 rt_sigprocmask(SIG_UNBLOCK,0x7ffff4a8,NULL) = 0 22484 getrlimit(3,2147480732,3,0,62512,47) = 0 22484 mmap2(NULL,8392704,PROT_NONE,MAP_PRIVATE|MAP_ANONYMOUS|0x20000,-1,0) = 0x7ed88000 22484 mprotect(0x7ed89000,8388608,PROT_READ|PROT_WRITE) = 0 22484 brk(NULL) = 0x00005000 22484 brk(0x00026000) = 0x00026000 22484 clone(CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID,child_stack=0x7f588018,parent_tidptr=0x7f5884fc,tls=0x7f58f928,child_tidptr=0x7f5884fc) = 22503 22484 io_setup(4001536,2136506392,2136507644,2136507644,2136537384,4100) = -1 errno=38 (Function not implemented) 22484 futex(0x7f5884fc,FUTEX_WAIT,22503,NULL,NULL,0)22484 set_robust_list(2136507652,12,0,4100,2136508076,4100) = -1 errno=38 (Function not implemented) 22484 madvise(2128117760,8372224,4,2136507672,528660,4100) = 0 22484 exit(0) = 0 22484 fstat64(1,0x7fffef48) = 0 22484 write(1,0x51e8,42)FAIL: a= 10, thr_a = 10 Addr = 0x7f715120 = 42 22484 exit_group(1) sandra@build2-trusty-cs:/scratch/sandra/nios2-linux-trunk3$ 22484 mmap2(NULL,1491048,PROT_EXEC|PROT_READ,MAP_PRIVATE|MAP_DENYWRITE,3,0) = 0x7f589000 22484 mmap2(0x7f6de000,86016,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_DENYWRITE|MAP_FIXED,3,0x154) = 0x7f6de000 22484 mmap2(0x7f6f3000,8296,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED,-1,0) = 0x7f6f3000 22484 close(3) = 0 22484 mprotect(0x7f6de000,65536,PROT_READ) = 0 22484 mprotect(0x7f70f000,8192,PROT_READ) = 0 22484 mprotect(0x7f7d8000,4096,PROT_READ) = 0 22484 mprotect(0x00003000,4096,PROT_READ) = 0 22484 mprotect(0x7f7fc000,4096,PROT_READ) = 0 22484 set_tid_address(2138131700,2147480980,2147480988,2147480988,87148,47) = 22484 22484 set_robust_list(2138131708,12,2147480988,0,87148,47) = -1 errno=38 (Function not implemented) 22484 rt_sigaction(32,0x7ffff36c,NULL) = 0 22484 rt_sigaction(33,0x7ffff36c,NULL) = -1 errno=22 (Invalid argument) 22484 rt_sigprocmask(SIG_UNBLOCK,0x7ffff4a8,NULL) = 0 22484 getrlimit(3,2147480732,3,0,62512,47) = 0 22484 mmap2(NULL,8392704,PROT_NONE,MAP_PRIVATE|MAP_ANONYMOUS|0x20000,-1,0) = 0x7ed88000 22484 mprotect(0x7ed89000,8388608,PROT_READ|PROT_WRITE) = 0 22484 brk(NULL) = 0x00005000 22484 brk(0x00026000) = 0x00026000 22484 clone(CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID,child_stack=0x7f588018,parent_tidptr=0x7f5884fc,tls=0x7f58f928,child_tidptr=0x7f5884fc) = 22503 22484 io_setup(4001536,2136506392,2136507644,2136507644,2136537384,4100) = -1 errno=38 (Function not implemented) 22484 futex(0x7f5884fc,FUTEX_WAIT,22503,NULL,NULL,0)22484 set_robust_list(2136507652,12,0,4100,2136508076,4100) = -1 errno=38 (Function not implemented) 22484 madvise(2128117760,8372224,4,2136507672,528660,4100) = 0 22484 exit(0) = 0 22484 fstat64(1,0x7fffef48) = 0 22484 write(1,0x51e8,42)FAIL: a= 10, thr_a = 10 Addr = 0x7f715120 = 42 22484 exit_group(1) sandra@build2-trusty-cs:/scratch/sandra/nios2-linux-trunk3$ 22484 mmap2(NULL,1491048,PROT_EXEC|PROT_READ,MAP_PRIVATE|MAP_DENYWRITE,3,0) = 0x7f589000 22484 mmap2(0x7f6de000,86016,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_DENYWRITE|MAP_FIXED,3,0x154) = 0x7f6de000 22484 mmap2(0x7f6f3000,8296,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED,-1,0) = 0x7f6f3000 22484 close(3) = 0 22484 mprotect(0x7f6de000,65536,PROT_READ) = 0 22484 mprotect(0x7f70f000,8192,PROT_READ) = 0 22484 mprotect(0x7f7d8000,4096,PROT_READ) = 0 22484 mprotect(0x00003000,4096,PROT_READ) = 0 22484 mprotect(0x7f7fc000,4096,PROT_READ) = 0 22484 set_tid_address(2138131700,2147480980,2147480988,2147480988,87148,47) = 22484 22484 set_robust_list(2138131708,12,2147480988,0,87148,47) = -1 errno=38 (Function not implemented) 22484 rt_sigaction(32,0x7ffff36c,NULL) = 0 22484 rt_sigaction(33,0x7ffff36c,NULL) = -1 errno=22 (Invalid argument) 22484 rt_sigprocmask(SIG_UNBLOCK,0x7ffff4a8,NULL) = 0 22484 getrlimit(3,2147480732,3,0,62512,47) = 0 22484 mmap2(NULL,8392704,PROT_NONE,MAP_PRIVATE|MAP_ANONYMOUS|0x20000,-1,0) = 0x7ed88000 22484 mprotect(0x7ed89000,8388608,PROT_READ|PROT_WRITE) = 0 22484 brk(NULL) = 0x00005000 22484 brk(0x00026000) = 0x00026000 22484 clone(CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID,child_stack=0x7f588018,parent_tidptr=0x7f5884fc,tls=0x7f58f928,child_tidptr=0x7f5884fc) = 22503 22484 io_setup(4001536,2136506392,2136507644,2136507644,2136537384,4100) = -1 errno=38 (Function not implemented) 22484 futex(0x7f5884fc,FUTEX_WAIT,22503,NULL,NULL,0)22484 set_robust_list(2136507652,12,0,4100,2136508076,4100) = -1 errno=38 (Function not implemented) 22484 madvise(2128117760,8372224,4,2136507672,528660,4100) = 0 22484 exit(0) = 0 22484 fstat64(1,0x7fffef48) = 0 22484 write(1,0x51e8,42)FAIL: a= 10, thr_a = 10 Addr = 0x7f715120 = 42 22484 exit_group(1) Note that set_robust_list and clone are reported as unimplemented. I've reported the problems with the signal syscalls separately here. https://bugs.launchpad.net/qemu/+bug/1791763 To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1791796/+subscriptions
Le 11/09/2018 à 16:40, Alex Bennée a écrit : > > Laurent Vivier <laurent@vivier.eu> writes: > >> Le 11/09/2018 à 16:06, Alex Bennée a écrit: >>> This is to work around the limitations of the buildroot >>> qemu_nios2_10m50_defconfig which sets the base kernel version for >>> glibc. >>> >>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> >>> --- >>> linux-user/nios2/target_syscall.h | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/linux-user/nios2/target_syscall.h b/linux-user/nios2/target_syscall.h >>> index ca6b7e69f6..905b80d112 100644 >>> --- a/linux-user/nios2/target_syscall.h >>> +++ b/linux-user/nios2/target_syscall.h >>> @@ -2,7 +2,7 @@ >>> #define TARGET_SYSCALL_H >>> >>> #define UNAME_MACHINE "nios2" >>> -#define UNAME_MINIMUM_RELEASE "3.19.0" >>> +#define UNAME_MINIMUM_RELEASE "4.16.0" >>> >>> struct target_pt_regs { >>> unsigned long r8; /* r8-r15 Caller-saved GP registers */ >>> >> >> I have no objection. Perhaps you could ask NiosII Maintainers (cc). > > Doh.. I had cccmd = scripts/get_maintainer.pl --nogit-fallback but of > course as I didn't actually touch an nios2 files it didn't include them. I also use "git blame" to know who to bother ;) Thanks, Laurent
Marek Vasut <marex@denx.de> writes: > On 09/11/2018 04:14 PM, Laurent Vivier wrote: >> Le 11/09/2018 à 16:06, Alex Bennée a écrit: >>> This is to work around the limitations of the buildroot >>> qemu_nios2_10m50_defconfig which sets the base kernel version for >>> glibc. >>> >>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> >>> --- >>> linux-user/nios2/target_syscall.h | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/linux-user/nios2/target_syscall.h b/linux-user/nios2/target_syscall.h >>> index ca6b7e69f6..905b80d112 100644 >>> --- a/linux-user/nios2/target_syscall.h >>> +++ b/linux-user/nios2/target_syscall.h >>> @@ -2,7 +2,7 @@ >>> #define TARGET_SYSCALL_H >>> >>> #define UNAME_MACHINE "nios2" >>> -#define UNAME_MINIMUM_RELEASE "3.19.0" >>> +#define UNAME_MINIMUM_RELEASE "4.16.0" >>> >>> struct target_pt_regs { >>> unsigned long r8; /* r8-r15 Caller-saved GP registers */ >>> >> >> I have no objection. Perhaps you could ask NiosII Maintainers (cc). > > If that's needed, so be it. The Linux 3.19 was required because some > obscure ABI change happened at that point. I don't think so - it's an artefact of the way the buildroot toolchain is built. But the real question which I address in the cover letter is does nios2-linux-user get much use? I tried enabled tests/tcg for it and it fails rather badly. -- Alex Bennée
On 09/11/2018 05:08 PM, Alex Bennée wrote: > > Marek Vasut <marex@denx.de> writes: > >> On 09/11/2018 04:14 PM, Laurent Vivier wrote: >>> Le 11/09/2018 à 16:06, Alex Bennée a écrit: >>>> This is to work around the limitations of the buildroot >>>> qemu_nios2_10m50_defconfig which sets the base kernel version for >>>> glibc. >>>> >>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> >>>> --- >>>> linux-user/nios2/target_syscall.h | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/linux-user/nios2/target_syscall.h b/linux-user/nios2/target_syscall.h >>>> index ca6b7e69f6..905b80d112 100644 >>>> --- a/linux-user/nios2/target_syscall.h >>>> +++ b/linux-user/nios2/target_syscall.h >>>> @@ -2,7 +2,7 @@ >>>> #define TARGET_SYSCALL_H >>>> >>>> #define UNAME_MACHINE "nios2" >>>> -#define UNAME_MINIMUM_RELEASE "3.19.0" >>>> +#define UNAME_MINIMUM_RELEASE "4.16.0" >>>> >>>> struct target_pt_regs { >>>> unsigned long r8; /* r8-r15 Caller-saved GP registers */ >>>> >>> >>> I have no objection. Perhaps you could ask NiosII Maintainers (cc). >> >> If that's needed, so be it. The Linux 3.19 was required because some >> obscure ABI change happened at that point. > > I don't think so - it's an artefact of the way the buildroot toolchain > is built. But the real question which I address in the cover letter is > does nios2-linux-user get much use? I tried enabled tests/tcg for it and > it fails rather badly. I used it around 2.10 and it worked for me. -- Best regards, Marek Vasut
Marek Vasut <marex@denx.de> writes: > On 09/11/2018 05:08 PM, Alex Bennée wrote: >> >> Marek Vasut <marex@denx.de> writes: >> >>> On 09/11/2018 04:14 PM, Laurent Vivier wrote: >>>> Le 11/09/2018 à 16:06, Alex Bennée a écrit: <snip> >> >> I don't think so - it's an artefact of the way the buildroot toolchain >> is built. But the real question which I address in the cover letter is >> does nios2-linux-user get much use? I tried enabled tests/tcg for it and >> it fails rather badly. > > I used it around 2.10 and it worked for me. I've just build 2.10.2 (with a patch for memfd and this one) and get the same failures on the tcg/tests tests. What testing where you running? -- Alex Bennée
diff --git a/linux-user/nios2/target_syscall.h b/linux-user/nios2/target_syscall.h index ca6b7e69f6..905b80d112 100644 --- a/linux-user/nios2/target_syscall.h +++ b/linux-user/nios2/target_syscall.h @@ -2,7 +2,7 @@ #define TARGET_SYSCALL_H #define UNAME_MACHINE "nios2" -#define UNAME_MINIMUM_RELEASE "3.19.0" +#define UNAME_MINIMUM_RELEASE "4.16.0" struct target_pt_regs { unsigned long r8; /* r8-r15 Caller-saved GP registers */
This is to work around the limitations of the buildroot qemu_nios2_10m50_defconfig which sets the base kernel version for glibc. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- linux-user/nios2/target_syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1