add support for loongarch#46
Open
wuruilong01 wants to merge 120 commits into
Open
Conversation
Still needs some cleanup, but this is a braindump of my private TODO that has a mix of old/new stuff.
These are usually only seen by libc, and never passed on to apps, but Trinity is doing raw syscalls, so we have to worry about these.
This patch brings perf_event_open() support up to date as of 4.14-rc6. Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
In file included from ioctls/autofs.c:4:0:
ioctls/autofs.c:241:8: error: 'AUTOFS_IOC_EXPIRE_INDIRECT' undeclared here (not in a function); did you mean 'AUTOFS_IOC_EXPIRE_CMD'?
IOCTL(AUTOFS_IOC_EXPIRE_INDIRECT),
^
include/ioctls.h:53:15: note: in definition of macro 'IOCTL'
{ .request = _request, .name = #_request, }
^~~~~~~~
ioctls/autofs.c:242:8: error: 'AUTOFS_IOC_EXPIRE_DIRECT' undeclared here (not in a function); did you mean 'AUTOFS_IOC_EXPIRE_INDIRECT'?
IOCTL(AUTOFS_IOC_EXPIRE_DIRECT),
^
include/ioctls.h:53:15: note: in definition of macro 'IOCTL'
{ .request = _request, .name = #_request, }
^~~~~~~~
Define them as AUTOFS_IOC_EXPIRE_MULTI as they used to be.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Commit 1f28c5d055032e7e8ee5e48198dca7e125d0eec6
("autofs: remove unused AUTOFS_IOC_EXPIRE_DIRECT/INDIRECT")
in the linux kernel removed the 2 defines
AUTOFS_IOC_EXPIRE_INDIRECT
AUTOFS_IOC_EXPIRE_DIRECT
Since they are used unconditionally the build fails.
To fix this add #ifdef/#endif around it.
Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Update and add some comments on the system call tables for s390x (64bit) and s390 (31bit). Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Add support for s390x (64 bit) and s390 (31 bit) support for system calls preadv2 and pwritev2. Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Add support for s390x (64 bit) and s390 (31 bit) support for system call statx. Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Add support for s390x (64 bit) and s390 (31 bit) support for system call mlock2. Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Add support for s390x (64 bit) and s390 (31 bit) support for system call copy_file_range. Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Add support for system call readdir on s390 (31 bit). Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
This patch adds support for the s390 specific system call runtime_instr() for 31 and 64 bit. Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Add support for s390 specific system calls s390_pci_mmio_read and 390_pci_mmio_write for 31 bit and 64 bit. Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Add support for s390 specific system call s390_guarded_storage for 31 bit and 64 bit. Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Add support for s390 specific system call s390_sthyi for 31 bit and 64 bit. Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Fix the following build failure with kernel >= 5.13:
In file included from /home/buildroot/autobuild/instance-2/output-1/host/powerpc-buildroot-linux-uclibc/sysroot/usr/include/linux/icmp.h:23,
from net/proto-ip-raw.c:1:
/home/buildroot/autobuild/instance-2/output-1/host/powerpc-buildroot-linux-uclibc/sysroot/usr/include/netinet/in.h:33:5: error: redeclaration of enumerator 'IPPROTO_IP'
33 | IPPROTO_IP = 0, /* Dummy protocol for TCP. */
| ^~~~~~~~~~
/home/buildroot/autobuild/instance-2/output-1/host/powerpc-buildroot-linux-uclibc/sysroot/usr/include/linux/in.h:29:3: note: previous definition of 'IPPROTO_IP' was here
29 | IPPROTO_IP = 0, /* Dummy protocol for TCP */
| ^~~~~~~~~~
Fixes:
- http://autobuild.buildroot.org/results/c58119baed8d7711da799e34a5ee1117f46b96f4
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Should fix:
In file included from /usr/include/bits/statx.h:31,
from /usr/include/sys/stat.h:446,
from include/files.h:3,
from include/shm.h:6,
from syscalls/x86/modify_ldt.c:12:
/usr/include/linux/stat.h:57:2: error: unknown type name ‘__s64’
__s64 tv_sec;
^~~~~
/usr/include/linux/stat.h:58:2: error: unknown type name ‘__u32’
__u32 tv_nsec;
^~~~~
/usr/include/linux/stat.h:59:2: error: unknown type name ‘__s32’
__s32 __reserved;
^~~~~
/usr/include/linux/stat.h:101:2: error: unknown type name ‘__u32’
__u32 stx_mask; /* What results were written [uncond] */
When one child is corrupt,we want to know who is corrupt. But when it corrupts other one's shm,we can not know who caused the corruption. So protect other children from corruption. Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn>
protect other children's shm from corruption
When a child process tests timer_create interface with sigev->sigev_signo equal to SIGINT, and then timer_settime let the timer go.When the timer has expired, a SIGINT would send to our child process. But SIGINT signal means ctrl-c is pressed,and then trinity-main will exit. To Avoid it, do not let timer_create create a timer with sigev->sigev_signo equal to SIGINT. Change-Id: I3aa1b99ff447a4a0a8bc2a9d33cf91f7e48cd275 Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn>
This only adds support for riscv64, riscv32 is not included. The riscv64 syscall table is very close to aarch64 with small difference. Signed-off-by: Changbin Du <changbin.du@gmail.com>
fds/drm.c: In function ‘drmfd_dump’:
fds/drm.c:31:49: warning: unused parameter ‘global’ [-Wunused-parameter]
31 | static void drmfd_dump(struct object *obj, bool global)
| ~~~~~^~~~~~
Print 'global' to fix warning.
Trinity on cpus which have many cores may open large number of child->pidstatfile, and may be reach the limition(1024 on most platforms), so just panic and warn user to increase the limition.
nukes those warnings like.. main.c:467:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] because it isn't 1990 any more.
this needs >10000 threads, but gcc has started warning, so this shuts it up
Both sockaddr_pn and sockaddr_pppox are defined as "packed"
on x86-64, unlike struct sockaddr, which generates warnings
like this:
net/proto-phonet.c: In function ‘phonet_gen_sockaddr’:
net/proto-phonet.c:22:18: warning: converting a packed ‘struct sockaddr_pn’ pointer (alignment 1) to a ‘struct sockaddr’ pointer (alignment 2) may result in an unaligned pointer value [-Waddress-of-packed-member]
22 | *addr = (struct sockaddr *) pn;
| ^~~~~~~~
In file included from net/proto-phonet.c:5:
/usr/include/linux/phonet.h:102:8: note: defined here
102 | struct sockaddr_pn {
| ^~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/socket.h:33,
from net/proto-phonet.c:2:
/usr/include/x86_64-linux-gnu/bits/socket.h:178:8: note: defined here
178 | struct sockaddr
| ^~~~~~~~
I'm pretty sure the alignment is fine as other things would
be broken if they weren't, so just ignore the warnings in
these two files.
Drop decnet as it has been removed since kernel 6.1 and torvalds/linux@1202cdd resulting in the following build failure: net/proto-decnet.c:5:10: fatal error: linux/dn.h: No such file or directory 5 | #include <linux/dn.h> | ^~~~~~~~~~~~ Fixes: - http://autobuild.buildroot.org/results/47e0a5e0b6fcf33ab4f9848d5d8c2be9e5283950 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
…te. I met this under mips64 debian
It was dropped in upstream in commit 61e15f871241 (KVM: Delete all references to removed KVM_SET_MEMORY_REGION ioctl). Co-authored-by: Jiri Slaby <jslaby@suse.cz>
…viders. (kernelslacker#43) Signed-off-by: Weisson <hanxiaobupt@bupt.cn> Co-authored-by: Weisson <wenshu.hx@alibaba-inc.com>
kernel v6.3-rc1 removed some drm drivers, so add the extra check to make the compile succeed. 7872bc2cb13e drm: Remove the obsolete driver-savage 28483b8666bf drm: Remove the obsolete driver-r128 96ed7db55bef drm: Remove the obsolete driver-mga cab18866fead drm: Remove the obsolete driver-i810 Signed-off-by: Chunyu Hu <chuhu@redhat.com>
Some IOCTL_NOUVEAU tests are checked under USE_DRM_MGA macro, this is not correct, correct it. Fixes: 6823bac (ioctls/drm: check i810,mga,r128 and savage support (kernelslacker#44)) Signed-off-by: Chunyu Hu <chuhu@redhat.com>
kernelslacker
requested changes
Sep 24, 2023
kernelslacker
left a comment
Owner
There was a problem hiding this comment.
loongarch bits look ok, the other bits should be broken out, with separate explanations/commits.
Owner
There was a problem hiding this comment.
this part should be a separate diff.
Owner
There was a problem hiding this comment.
separate diff, and some explanation why ?
Author
|
Other files have been fixed for bugs caused by SEGV and tested on LoongArch.
Sorry, I'm a beginner; perhaps fixing the errors should be done in the next submission. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.