Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport patches to 0.4 #106

Merged
merged 2 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ targets = ["x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu"]
errno = []
general = []
if_ether = []
if_packet = []
io_uring = []
ioctl = []
mempolicy = []
Expand Down
19 changes: 16 additions & 3 deletions gen/ioctl/csky-ioctls.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,22 @@
#define BLKSECDISCARD 0x127dul
#define BLKROTATIONAL 0x127eul
#define BLKZEROOUT 0x127ful
#define FIEMAP_MAX_OFFSET 0xfffffffful
#define FIEMAP_FLAG_SYNC 0x1ul
#define FIEMAP_FLAG_XATTR 0x2ul
#define FIEMAP_FLAG_CACHE 0x4ul
#define FIEMAP_FLAGS_COMPAT 0x3ul
#define FIEMAP_EXTENT_LAST 0x1ul
#define FIEMAP_EXTENT_UNKNOWN 0x2ul
#define FIEMAP_EXTENT_DELALLOC 0x4ul
#define FIEMAP_EXTENT_ENCODED 0x8ul
#define FIEMAP_EXTENT_DATA_ENCRYPTED 0x80ul
#define FIEMAP_EXTENT_NOT_ALIGNED 0x100ul
#define FIEMAP_EXTENT_DATA_INLINE 0x200ul
#define FIEMAP_EXTENT_DATA_TAIL 0x400ul
#define FIEMAP_EXTENT_UNWRITTEN 0x800ul
#define FIEMAP_EXTENT_MERGED 0x1000ul
#define FIEMAP_EXTENT_SHARED 0x2000ul
#define UFFDIO_REGISTER 0xc020aa00ul
#define UFFDIO_UNREGISTER 0x8010aa01ul
#define UFFDIO_WAKE 0x8010aa02ul
Expand Down Expand Up @@ -913,7 +929,6 @@
#define VIDIOC_G_DV_TIMINGS 0xc0845658ul
#define TUNSETIFINDEX 0x400454daul
#define CCISS_SETINTINFO 0x40084203ul
#define CM_IOSDBGLVL 0x400463faul
#define RTC_VL_CLR 0x7014ul
#define VIDIOC_REQBUFS 0xc0145608ul
#define USBDEVFS_REAPURBNDELAY32 0x4004550dul
Expand Down Expand Up @@ -1043,7 +1058,6 @@
#define VFIO_SET_IOMMU 0x3b66ul
#define VIDIOC_S_MODULATOR 0x40445637ul
#define TUNGETFILTER 0x800854dbul
#define MEYEIOC_SYNC 0xc00476c3ul
#define CCISS_SETNODENAME 0x40104205ul
#define FBIO_GETCONTROL2 0x80044689ul
#define TUNSETDEBUG 0x400454c9ul
Expand Down Expand Up @@ -1324,7 +1338,6 @@
#define VIDIOC_STREAMOFF 0x40045613ul
#define VDUSE_DESTROY_DEV 0x41008103ul
#define FDGETFDCSTAT 0x80200215ul
#define CM_IOCGATR 0xc0046301ul
#define VIDIOC_S_PRIORITY 0x40045644ul
#define SNAPSHOT_FREEZE 0x3301ul
#define VIDIOC_ENUMINPUT 0xc04c561aul
Expand Down
5 changes: 4 additions & 1 deletion gen/ioctl/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@ qemu-riscv64 -L /usr/riscv64-linux-gnu ./main.exe >> "$out"
s390x-linux-gnu-gcc -Iinclude -c list.c $cflags
s390x-linux-gnu-gcc main.c list.o -o main.exe $cflags
qemu-s390x -L /usr/s390x-linux-gnu ./main.exe >> "$out"
# As LoongArch cross toolchain is not yet packaged in mainstream distros yet,
# As LoongArch and CSKY cross toolchain is not yet packaged in mainstream distros yet,
# pre-generated output is used for the time being
cat loongarch-ioctls.txt >> "$out"
# csky-linux-gnuabiv2-gcc -Iinclude -I../linux/usr/include/ -c list.c $cflags
# csky-linux-gnuabiv2-gcc main.c list.o -o main.exe $cflags
# qemu-csky -L /usr/csky-linux-gnuabiv2 ./main.exe >> "$out"
cat csky-ioctls.txt >> "$out"

# Add any extra custom definitions at the end.
Expand Down
3 changes: 3 additions & 0 deletions gen/modules/if_packet.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "support.h"

#include <linux/if_packet.h>
19 changes: 16 additions & 3 deletions gen/modules/ioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -17207,6 +17207,22 @@
#define BLKSECDISCARD 0x127dul
#define BLKROTATIONAL 0x127eul
#define BLKZEROOUT 0x127ful
#define FIEMAP_MAX_OFFSET 0xfffffffful
#define FIEMAP_FLAG_SYNC 0x1ul
#define FIEMAP_FLAG_XATTR 0x2ul
#define FIEMAP_FLAG_CACHE 0x4ul
#define FIEMAP_FLAGS_COMPAT 0x3ul
#define FIEMAP_EXTENT_LAST 0x1ul
#define FIEMAP_EXTENT_UNKNOWN 0x2ul
#define FIEMAP_EXTENT_DELALLOC 0x4ul
#define FIEMAP_EXTENT_ENCODED 0x8ul
#define FIEMAP_EXTENT_DATA_ENCRYPTED 0x80ul
#define FIEMAP_EXTENT_NOT_ALIGNED 0x100ul
#define FIEMAP_EXTENT_DATA_INLINE 0x200ul
#define FIEMAP_EXTENT_DATA_TAIL 0x400ul
#define FIEMAP_EXTENT_UNWRITTEN 0x800ul
#define FIEMAP_EXTENT_MERGED 0x1000ul
#define FIEMAP_EXTENT_SHARED 0x2000ul
#define UFFDIO_REGISTER 0xc020aa00ul
#define UFFDIO_UNREGISTER 0x8010aa01ul
#define UFFDIO_WAKE 0x8010aa02ul
Expand Down Expand Up @@ -18017,7 +18033,6 @@
#define VIDIOC_G_DV_TIMINGS 0xc0845658ul
#define TUNSETIFINDEX 0x400454daul
#define CCISS_SETINTINFO 0x40084203ul
#define CM_IOSDBGLVL 0x400463faul
#define RTC_VL_CLR 0x7014ul
#define VIDIOC_REQBUFS 0xc0145608ul
#define USBDEVFS_REAPURBNDELAY32 0x4004550dul
Expand Down Expand Up @@ -18147,7 +18162,6 @@
#define VFIO_SET_IOMMU 0x3b66ul
#define VIDIOC_S_MODULATOR 0x40445637ul
#define TUNGETFILTER 0x800854dbul
#define MEYEIOC_SYNC 0xc00476c3ul
#define CCISS_SETNODENAME 0x40104205ul
#define FBIO_GETCONTROL2 0x80044689ul
#define TUNSETDEBUG 0x400454c9ul
Expand Down Expand Up @@ -18428,7 +18442,6 @@
#define VIDIOC_STREAMOFF 0x40045613ul
#define VDUSE_DESTROY_DEV 0x41008103ul
#define FDGETFDCSTAT 0x80200215ul
#define CM_IOCGATR 0xc0046301ul
#define VIDIOC_S_PRIORITY 0x40045644ul
#define SNAPSHOT_FREEZE 0x3301ul
#define VIDIOC_ENUMINPUT 0xc04c561aul
Expand Down
Loading