mirror of
https://github.com/Fishwaldo/xuantie-gnu-toolchain.git
synced 2025-03-16 04:01:35 +00:00
Update to THead V2.6.1
This commit is contained in:
parent
00a23af2e1
commit
23fdf1028b
326 changed files with 13741 additions and 1990 deletions
.gitattributes.gitignoreMakefile.inconfigureconfigure.ac
linux-headers/include
asm-generic
asm
drm
amdgpu_drm.hdrm.hdrm_fourcc.hdrm_mode.hexynos_drm.hi915_drm.hlima_drm.hmsm_drm.hnouveau_drm.homap_drm.hv3d_drm.hvmwgfx_drm.h
linux
acct.h
android
atmioc.haudit.hauto_dev-ioctl.hb1lli.hbatadv_packet.hbatman_adv.hbcache.hblkzoned.hbpf.hbtf.hbtrfs.hbtrfs_tree.hcaif
can
capability.hcdrom.hcec-funcs.hcec.hchio.hclose_range.hcoresight-stm.hcyclades.hdcbnl.hdevlink.hdm-ioctl.hdma-buf.hdma-heap.hdqblk_xfs.helf.helfcore.herrqueue.hethtool.hethtool_netlink.hfanotify.hfb.hfcntl.hfd.hfdreg.hfirewire-cdev.hfpga-dfl.hfs.hfscrypt.hfuse.hgen_stats.hgenetlink.hgfs2_ondisk.hgigaset_dev.hgpio.hgtp.hhdlc
hidraw.hhsr_netlink.hhyperv.hhysdn_if.hicmp.hicmpv6.hidxd.hif.hif_alg.hif_bonding.hif_bridge.hif_ether.hif_link.hif_macsec.h
11
.gitattributes
vendored
Normal file
11
.gitattributes
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
.gitmodules merge=ours
|
||||
linux-headers merge=ours
|
||||
|
||||
riscv-binutils merge=ours
|
||||
riscv-dejagnu merge=ours
|
||||
riscv-gcc merge=ours
|
||||
riscv-gdb merge=ours
|
||||
riscv-glibc merge=ours
|
||||
riscv-newlib merge=ours
|
||||
riscv-qemu merge=ours
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -5,3 +5,6 @@ config.status
|
|||
Makefile
|
||||
.DS_Store
|
||||
!/regression/Makefile
|
||||
/build-*/
|
||||
/install-newlib-nano/
|
||||
/stamps/
|
||||
|
|
149
Makefile.in
149
Makefile.in
|
@ -33,6 +33,7 @@ WITH_ARCH ?= @WITH_ARCH@
|
|||
WITH_ABI ?= @WITH_ABI@
|
||||
WITH_TUNE ?= @WITH_TUNE@
|
||||
SYSROOT := $(INSTALL_DIR)/sysroot
|
||||
ENABLE_LIBSANITIZER ?= @enable_libsanitizer@
|
||||
|
||||
SHELL := /bin/sh
|
||||
AWK := @GAWK@
|
||||
|
@ -61,6 +62,8 @@ NEWLIB_MULTILIB_NAMES := $(shell echo "$(MULTILIB_GEN)" | $(SED) 's/;/\n/g'| $(A
|
|||
GCC_MULTILIB_FLAGS := $(MULTILIB_FLAGS) --with-multilib-generator="$(MULTILIB_GEN)"
|
||||
endif
|
||||
GLIBC_MULTILIB_NAMES := @glibc_multilib_names@
|
||||
MUSL32_MULTILIB_NAMES := @musl32_multilib_names@
|
||||
MUSL64_MULTILIB_NAMES := @musl64_multilib_names@
|
||||
GCC_CHECKING_FLAGS := @gcc_checking@
|
||||
|
||||
XLEN := $(shell echo $(WITH_ARCH) | tr A-Z a-z | sed 's/.*rv\([0-9]*\).*/\1/')
|
||||
|
@ -79,7 +82,7 @@ ASFLAGS_FOR_TARGET := $(ASFLAGS_FOR_TARGET_EXTRA) @cmodel@
|
|||
# --with-expat is required to enable XML support used by OpenOCD.
|
||||
BINUTILS_TARGET_FLAGS := --with-expat=yes $(BINUTILS_TARGET_FLAGS_EXTRA)
|
||||
BINUTILS_NATIVE_FLAGS := $(BINUTILS_NATIVE_FLAGS_EXTRA)
|
||||
GDB_TARGET_FLAGS := --with-expat=yes $(GDB_TARGET_FLAGS_EXTRA)
|
||||
GDB_TARGET_FLAGS := --with-expat=yes --with-python=no $(GDB_TARGET_FLAGS_EXTRA)
|
||||
GDB_NATIVE_FLAGS := $(GDB_NATIVE_FLAGS_EXTRA)
|
||||
|
||||
GLIBC_TARGET_FLAGS := $(GLIBC_TARGET_FLAGS_EXTRA)
|
||||
|
@ -95,10 +98,12 @@ NEWLIB_NANO_TARGET_BOARDS ?= $(shell echo "$(NEWLIB_MULTILIB_NAMES)" | sed 's!\(
|
|||
MUSL_TARGET_FLAGS := $(MUSL_TARGET_FLAGS_EXTRA)
|
||||
MUSL_CC_FOR_TARGET ?= $(MUSL_TUPLE)-gcc
|
||||
MUSL_CXX_FOR_TARGET ?= $(MUSL_TUPLE)-g++
|
||||
MUSL_TARGET_BOARDS ?= $(shell echo "$(MUSL$(XLEN)_MULTILIB_NAMES)" | sed 's!\([_a-z0-9]*\)-\([_a-z0-9]*\)!riscv-sim/-march=\1/-mabi=\2/@cmodel@!g')
|
||||
|
||||
CONFIGURE_HOST = @configure_host@
|
||||
CONFIGURE_GCC_DEP_LIBS = @configure_gcc_dep_libs@
|
||||
CONFIGURE_PKGVERSION = @configure_pkgversion@
|
||||
GCC_CXXFLAGS = "-g -O2 $(GCC_CXXFLAGS_EXTRA)"
|
||||
|
||||
INSTALL = @enable_install_strip@
|
||||
|
||||
|
@ -109,6 +114,7 @@ musl: stamps/build-gcc-musl-stage2
|
|||
ifeq (@enable_gdb@,--enable-gdb)
|
||||
newlib: stamps/build-gdb-newlib
|
||||
linux: stamps/build-gdb-linux
|
||||
musl: stamps/build-gdb-musl
|
||||
endif
|
||||
linux-native: stamps/build-gcc-linux-native
|
||||
|
||||
|
@ -166,6 +172,15 @@ report-binutils: report-binutils-@default_target@
|
|||
.PHONY: report-gdb
|
||||
report-gdb: report-gdb-@default_target@
|
||||
|
||||
.PHONY: check-musl
|
||||
check-musl: $(patsubst %,check-%-musl,$(REGRESSION_TEST_LIST))
|
||||
.PHONY: check-gcc-musl
|
||||
check-gcc-musl: stamps/check-gcc-musl
|
||||
.PHONY: check-binutils-musl
|
||||
check-binutils-musl: stamps/check-binutils-musl
|
||||
.PHONY: report-musl
|
||||
report-musl: $(patsubst %,report-%-musl,$(REGRESSION_TEST_LIST))
|
||||
|
||||
.PHONY: build-sim
|
||||
ifeq ($(SIM),qemu)
|
||||
SIM_PATH:=$(srcdir)/scripts/wrapper/qemu
|
||||
|
@ -248,6 +263,12 @@ else
|
|||
GLIBC_SRC_GIT :=
|
||||
endif
|
||||
|
||||
ifeq ($(findstring $(srcdir),$(MUSL_SRCDIR)),$(srcdir))
|
||||
MUSL_SRC_GIT := $(MUSL_SRCDIR)/.git
|
||||
else
|
||||
MUSL_SRC_GIT :=
|
||||
endif
|
||||
|
||||
$(srcdir)/%/.git:
|
||||
cd $(srcdir)
|
||||
|
||||
|
@ -324,7 +345,7 @@ else
|
|||
$(eval $@_ARCH := )
|
||||
$(eval $@_ABI := )
|
||||
endif
|
||||
$(eval $@_LIBDIRSUFFIX := $(if $($@_ABI), $(shell if [ `echo $($@_ARCH) | grep "vxtheadc" ` ] ;then echo $($@_ARCH) | sed 's/.*rv\([0-9]*\).*/\1vxthead/'; elif [ `echo $($@_ARCH) | grep "xtheadc" ` ] ;then echo $($@_ARCH) | sed 's/.*rv\([0-9]*\).*/\1xthead/'; else echo $($@_ARCH) | sed 's/.*rv\([0-9]*\).*/\1/';fi )/$($@_ABI),))
|
||||
$(eval $@_LIBDIRSUFFIX := $(if $($@_ABI), $(shell if [ `echo $($@_ARCH) | grep "v0p7_zfh_xtheadc" ` ] ;then echo $($@_ARCH) | sed 's/.*rv\([0-9]*\).*/\1v0p7_xthead/'; elif [ `echo $($@_ARCH) | grep "v_zfh_xtheadc" ` ] ;then echo $($@_ARCH) | sed 's/.*rv\([0-9]*\).*/\1v_xthead/'; elif [ `echo $($@_ARCH) | grep "xtheadc" ` ] ;then echo $($@_ARCH) | sed 's/.*rv\([0-9]*\).*/\1xthead/'; else echo $($@_ARCH) | sed 's/.*rv\([0-9]*\).*/\1/';fi )/$($@_ABI),))
|
||||
$(eval $@_XLEN := $(if $($@_ABI),$(shell echo $($@_ARCH) | sed 's/.*rv\([0-9]*\).*/\1/'),$(XLEN)))
|
||||
$(eval $@_CFLAGS := $(if $($@_ABI),-march=$($@_ARCH) -mabi=$($@_ABI),))
|
||||
$(eval $@_LIBDIROPTS := $(if $@_LIBDIRSUFFIX,--libdir=/usr/lib$($@_LIBDIRSUFFIX) libc_cv_slibdir=/lib$($@_LIBDIRSUFFIX) libc_cv_rtlddir=/lib,))
|
||||
|
@ -348,8 +369,7 @@ endif
|
|||
$(GLIBC_TARGET_FLAGS) \
|
||||
$($@_LIBDIROPTS)
|
||||
$(MAKE) -C $(notdir $@)
|
||||
#+flock $(SYSROOT)/.lock $(MAKE) -C $(notdir $@) install install_root=$(SYSROOT)
|
||||
+$(MAKE) -C $(notdir $@) install install_root=$(SYSROOT)
|
||||
+flock $(SYSROOT)/.lock $(MAKE) -C $(notdir $@) install install_root=$(SYSROOT)
|
||||
mkdir -p $(dir $@) && touch $@
|
||||
|
||||
stamps/build-gcc-linux-stage1: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-binutils-linux \
|
||||
|
@ -395,14 +415,12 @@ stamps/build-gcc-linux-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) $(addprefix stamps/b
|
|||
stamps/build-glibc-linux-headers
|
||||
rm -rf $@ $(notdir $@)
|
||||
mkdir $(notdir $@)
|
||||
# libsanitizer not supported rv32,
|
||||
# but it will break the rv64 multi-lib build, so we disable that
|
||||
# temporally untill rv32 supported.
|
||||
cd $(notdir $@) && $</configure \
|
||||
--target=$(LINUX_TUPLE) \
|
||||
$(CONFIGURE_HOST) \
|
||||
$(CONFIGURE_GCC_DEP_LIBS) \
|
||||
$(CONFIGURE_PKGVERSION) \
|
||||
CXXFLAGS=$(GCC_CXXFLAGS) \
|
||||
--prefix=$(INSTALL_DIR) \
|
||||
--with-sysroot=$(SYSROOT) \
|
||||
@with_system_zlib@ \
|
||||
|
@ -412,7 +430,7 @@ stamps/build-gcc-linux-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) $(addprefix stamps/b
|
|||
--disable-libmudflap \
|
||||
--disable-libssp \
|
||||
--disable-libquadmath \
|
||||
--disable-libsanitizer \
|
||||
$(ENABLE_LIBSANITIZER) \
|
||||
--disable-nls \
|
||||
--disable-bootstrap \
|
||||
--src=$(gccsrcdir) \
|
||||
|
@ -459,6 +477,7 @@ stamps/build-gcc-linux-native: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-gcc-lin
|
|||
$(CONFIGURE_HOST) \
|
||||
$(CONFIGURE_GCC_DEP_LIBS) \
|
||||
$(CONFIGURE_PKGVERSION) \
|
||||
CXXFLAGS=$(GCC_CXXFLAGS) \
|
||||
--prefix=$(INSTALL_DIR)/native \
|
||||
--without-system-zlib \
|
||||
--enable-shared \
|
||||
|
@ -571,6 +590,7 @@ stamps/build-newlib: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/build-gcc-newlib-
|
|||
--enable-newlib-io-long-long \
|
||||
--enable-newlib-io-c99-formats \
|
||||
--enable-newlib-register-fini \
|
||||
--enable-newlib-retargetable-locking \
|
||||
CFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE $(CFLAGS_FOR_TARGET)" \
|
||||
CXXFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE $(CXXFLAGS_FOR_TARGET)"
|
||||
$(MAKE) -C $(notdir $@)
|
||||
|
@ -595,6 +615,7 @@ stamps/build-newlib-nano: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/build-gcc-ne
|
|||
--enable-newlib-nano-formatted-io \
|
||||
--disable-newlib-supplied-syscalls \
|
||||
--disable-nls \
|
||||
--enable-newlib-retargetable-locking \
|
||||
CFLAGS_FOR_TARGET="-Os -ffunction-sections -fdata-sections $(CFLAGS_FOR_TARGET)" \
|
||||
CXXFLAGS_FOR_TARGET="-Os -ffunction-sections -fdata-sections $(CXXFLAGS_FOR_TARGET)"
|
||||
$(MAKE) -C $(notdir $@)
|
||||
|
@ -633,9 +654,11 @@ stamps/build-gcc-newlib-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-newlib
|
|||
$(CONFIGURE_HOST) \
|
||||
$(CONFIGURE_GCC_DEP_LIBS) \
|
||||
$(CONFIGURE_PKGVERSION) \
|
||||
CXXFLAGS=$(GCC_CXXFLAGS) \
|
||||
--disable-libgcctf \
|
||||
--prefix=$(INSTALL_DIR) \
|
||||
--disable-shared \
|
||||
--disable-threads \
|
||||
--enable-threads=posix \
|
||||
--enable-languages=c,c++ \
|
||||
@with_system_zlib@ \
|
||||
--enable-tls \
|
||||
|
@ -686,6 +709,32 @@ stamps/build-binutils-musl: $(BINUTILS_SRCDIR) $(BINUTILS_SRC_GIT) stamps/check-
|
|||
$(MAKE) -C $(notdir $@) $(INSTALL)
|
||||
mkdir -p $(dir $@) && touch $@
|
||||
|
||||
stamps/build-gdb-musl: $(GDB_SRCDIR) $(GDB_SRC_GIT)
|
||||
rm -rf $@ $(notdir $@)
|
||||
mkdir $(notdir $@)
|
||||
# CC_FOR_TARGET is required for the ld testsuite.
|
||||
cd $(notdir $@) && CC_FOR_TARGET=$(GLIBC_CC_FOR_TARGET) $</configure \
|
||||
--target=$(MUSL_TUPLE) \
|
||||
$(CONFIGURE_HOST) \
|
||||
$(CONFIGURE_GCC_DEP_LIBS) \
|
||||
$(CONFIGURE_PKGVERSION) \
|
||||
--prefix=$(INSTALL_DIR) \
|
||||
--with-sysroot=$(SYSROOT) \
|
||||
$(MULTILIB_FLAGS) \
|
||||
@with_guile@ \
|
||||
--disable-werror \
|
||||
--disable-nls \
|
||||
$(GDB_TARGET_FLAGS) \
|
||||
--enable-gdb \
|
||||
--disable-gas \
|
||||
--disable-binutils \
|
||||
--disable-ld \
|
||||
--disable-gold \
|
||||
--disable-gprof
|
||||
$(MAKE) -C $(notdir $@)
|
||||
$(MAKE) -C $(notdir $@) $(INSTALL)
|
||||
mkdir -p $(dir $@) && touch $@
|
||||
|
||||
stamps/build-gcc-musl-stage1: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-binutils-musl \
|
||||
stamps/build-linux-headers
|
||||
if test -f $</contrib/download_prerequisites && test "@NEED_GCC_EXTERNAL_LIBRARIES@" = "true"; then cd $< && ./contrib/download_prerequisites; fi
|
||||
|
@ -711,7 +760,7 @@ stamps/build-gcc-musl-stage1: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-binutils
|
|||
--disable-bootstrap \
|
||||
--src=$(gccsrcdir) \
|
||||
$(GCC_CHECKING_FLAGS) \
|
||||
--disable-multilib \
|
||||
$(GCC_MULTILIB_FLAGS) \
|
||||
$(WITH_ABI) \
|
||||
$(WITH_ARCH) \
|
||||
$(WITH_TUNE) \
|
||||
|
@ -736,7 +785,18 @@ stamps/build-musl-linux-headers: $(MUSL_SRCDIR) stamps/build-gcc-musl-stage1
|
|||
$(MAKE) -C $(notdir $@) install-headers
|
||||
mkdir -p $(dir $@) && touch $@
|
||||
|
||||
stamps/build-musl-linux: $(MUSL_SRCDIR) stamps/build-gcc-musl-stage1
|
||||
stamps/build-musl-linux-%: $(MUSL_SRCDIR) $(MUSL_SRC_GIT) stamps/build-gcc-musl-stage1
|
||||
ifeq ($(MULTILIB_FLAGS),--enable-multilib)
|
||||
$(eval $@_ARCH := $(word 4,$(subst -, ,$@)))
|
||||
$(eval $@_ABI := $(word 5,$(subst -, ,$@)))
|
||||
else
|
||||
$(eval $@_ARCH := )
|
||||
$(eval $@_ABI := )
|
||||
endif
|
||||
$(eval $@_LIBDIRSUFFIX := $(if $($@_ABI), $(shell if [ `echo $($@_ARCH) | grep "v0p7_zfh_xtheadc" ` ] ;then echo $($@_ARCH) | sed 's/.*rv\([0-9]*\).*/\1v0p7_xthead/'; elif [ `echo $($@_ARCH) | grep "v_zfh_xtheadc" ` ] ;then echo $($@_ARCH) | sed 's/.*rv\([0-9]*\).*/\1v_xthead/'; elif [ `echo $($@_ARCH) | grep "xtheadc" ` ] ;then echo $($@_ARCH) | sed 's/.*rv\([0-9]*\).*/\1xthead/'; else echo $($@_ARCH) | sed 's/.*rv\([0-9]*\).*/\1/';fi )/$($@_ABI),))
|
||||
$(eval $@_XLEN := $(if $($@_ABI),$(shell echo $($@_ARCH) | sed 's/.*rv\([0-9]*\).*/\1/'),$(XLEN)))
|
||||
$(eval $@_CFLAGS := $(if $($@_ABI),-march=$($@_ARCH) -mabi=$($@_ABI),))
|
||||
$(eval $@_LIBDIROPTS := $(if $@_LIBDIRSUFFIX,--libdir=/usr/lib$($@_LIBDIRSUFFIX) --syslibdir=/lib,))
|
||||
rm -rf $@ $(notdir $@)
|
||||
mkdir $(notdir $@)
|
||||
cd $(notdir $@) && \
|
||||
|
@ -745,18 +805,20 @@ stamps/build-musl-linux: $(MUSL_SRCDIR) stamps/build-gcc-musl-stage1
|
|||
CFLAGS="$(CFLAGS_FOR_TARGET) -g -O2 $($@_CFLAGS)" \
|
||||
CXXFLAGS="$(CXXFLAGS_FOR_TARGET) -g -O2 $($@_CFLAGS)" \
|
||||
ASFLAGS="$(ASFLAGS_FOR_TARGET) $($@_CFLAGS)" \
|
||||
CROSS_COMPILE="$(MUSL_TUPLE)-" \
|
||||
$</configure \
|
||||
--host=$(MUSL_TUPLE) \
|
||||
--prefix=$(SYSROOT) \
|
||||
--host=$(call make_tuple,$($@_XLEN),linux-musl) \
|
||||
--prefix=/usr \
|
||||
--ldsoreldir=../ \
|
||||
--disable-werror \
|
||||
--enable-shared \
|
||||
$(MUSL_TARGET_FLAGS)
|
||||
$(MUSL_TARGET_FLAGS) \
|
||||
$($@_LIBDIROPTS)
|
||||
$(MAKE) -C $(notdir $@)
|
||||
#+flock $(SYSROOT)/.lock $(MAKE) -C $(notdir $@) install
|
||||
+$(MAKE) -C $(notdir $@) install
|
||||
+flock $(SYSROOT)/.lock $(MAKE) -C $(notdir $@) install DESTDIR=$(SYSROOT)
|
||||
mkdir -p $(dir $@) && touch $@
|
||||
|
||||
stamps/build-gcc-musl-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-musl-linux \
|
||||
stamps/build-gcc-musl-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) $(addprefix stamps/build-musl-linux-,$(MUSL$(XLEN)_MULTILIB_NAMES)) \
|
||||
stamps/build-musl-linux-headers
|
||||
rm -rf $@ $(notdir $@)
|
||||
mkdir $(notdir $@)
|
||||
|
@ -767,6 +829,7 @@ stamps/build-gcc-musl-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-musl-lin
|
|||
$(CONFIGURE_HOST) \
|
||||
$(CONFIGURE_GCC_DEP_LIBS) \
|
||||
$(CONFIGURE_PKGVERSION) \
|
||||
CXXFLAGS=$(GCC_CXXFLAGS) \
|
||||
--prefix=$(INSTALL_DIR) \
|
||||
--with-sysroot=$(SYSROOT) \
|
||||
@with_system_zlib@ \
|
||||
|
@ -781,7 +844,7 @@ stamps/build-gcc-musl-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-musl-lin
|
|||
--disable-bootstrap \
|
||||
--src=$(gccsrcdir) \
|
||||
$(GCC_CHECKING_FLAGS) \
|
||||
--disable-multilib \
|
||||
$(GCC_MULTILIB_FLAGS) \
|
||||
$(WITH_ABI) \
|
||||
$(WITH_ARCH) \
|
||||
$(WITH_TUNE) \
|
||||
|
@ -792,6 +855,25 @@ stamps/build-gcc-musl-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-musl-lin
|
|||
cp -a $(INSTALL_DIR)/$(MUSL_TUPLE)/lib* $(SYSROOT)
|
||||
mkdir -p $(dir $@) && touch $@
|
||||
|
||||
.PHONY: report-gcc-musl
|
||||
report-gcc-musl: stamps/check-gcc-musl
|
||||
$(srcdir)/scripts/testsuite-filter gcc musl $(srcdir)/test/allowlist `find build-gcc-musl-stage2/gcc/testsuite/ -name *.sum |paste -sd "," -`
|
||||
|
||||
.PHONY: report-binutils-musl
|
||||
report-binutils-musl: stamps/check-binutils-musl
|
||||
$(srcdir)/scripts/testsuite-filter binutils musl \
|
||||
$(srcdir)/test/allowlist \
|
||||
`find build-binutils-musl/ -name *.sum |paste -sd "," -`
|
||||
|
||||
stamps/check-gcc-musl: stamps/build-gcc-musl-stage2 $(SIM_STAMP) stamps/build-dejagnu
|
||||
$(SIM_PREPARE) $(MAKE) -C build-gcc-musl-stage2 check-gcc "RUNTESTFLAGS=--target_board='$(MUSL_TARGET_BOARDS)' $(REGRESSION_TEST_LIST_GCC)"
|
||||
mkdir -p $(dir $@)
|
||||
date > $@
|
||||
|
||||
stamps/check-binutils-musl: stamps/build-gcc-musl-stage2 $(SIM_STAMP) stamps/build-dejagnu
|
||||
$(SIM_PREPARE) $(MAKE) -C build-binutils-musl check-binutils check-gas check-ld -k "RUNTESTFLAGS=--target_board='$(MUSL_TARGET_BOARDS)'" || true
|
||||
date > $@
|
||||
|
||||
spike-src:
|
||||
git clone https://github.com/riscv/riscv-isa-sim.git -b $(SPIKE_BRANCH) $@
|
||||
|
||||
|
@ -836,6 +918,7 @@ stamps/build-qemu: $(srcdir)/qemu $(srcdir)/qemu/.git
|
|||
rm -rf $@ $(notdir $@)
|
||||
mkdir $(notdir $@)
|
||||
cd $(notdir $@) && $</configure \
|
||||
--disable-docs \
|
||||
--prefix=$(INSTALL_DIR) \
|
||||
--target-list=riscv64-linux-user,riscv32-linux-user \
|
||||
--interp-prefix=$(INSTALL_DIR)/sysroot \
|
||||
|
@ -935,6 +1018,36 @@ report-gcc-newlib: stamps/check-gcc-newlib
|
|||
report-gcc-newlib-nano: stamps/check-gcc-newlib-nano
|
||||
$(srcdir)/scripts/testsuite-filter gcc newlib-nano $(srcdir)/test/allowlist `find build-gcc-newlib-stage2/gcc/testsuite/ -name *.sum |paste -sd "," -`
|
||||
|
||||
stamps/build-libcc-runtime: $(srcdir)/riscv-libcc-runtime stamps/build-gcc-newlib-stage2
|
||||
rm -rf $@ $(notdir $@)
|
||||
mkdir $(notdir $@)
|
||||
set -e; \
|
||||
for ml in `$(NEWLIB_TUPLE)-gcc --print-multi-lib`; \
|
||||
do \
|
||||
mld=`echo $${ml} | sed -e 's/;.*$$//'`; \
|
||||
if [ "$$mld" = "." ]; then \
|
||||
arch=`$(NEWLIB_TUPLE)-gcc -Q --help=target | grep "\-march= " | awk '{print $$2}'`; \
|
||||
abi=`$(NEWLIB_TUPLE)-gcc -Q --help=target | grep "\-mabi= " | awk '{print $$2}'`; \
|
||||
else \
|
||||
arch=`echo $$ml | awk -F '@' '{print $$2}' | awk -F '=' '{print $$2}'`; \
|
||||
abi=`echo $$ml | awk -F '@' '{print $$3}' | awk -F '=' '{print $$2}'`; \
|
||||
fi; \
|
||||
if [ "$${arch}" > "rv32" ]; then \
|
||||
cd $(notdir $@) && cmake \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$</cmake/config/config_rv32.cmake $< \
|
||||
-DCMAKE_C_COMPILER=$(NEWLIB_TUPLE)-gcc \
|
||||
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}/$(NEWLIB_TUPLE)/lib/$$mld \
|
||||
-DMARCH=$$arch -DMABI=$$abi; \
|
||||
$(MAKE); \
|
||||
$(MAKE) install; \
|
||||
rm -rf *; \
|
||||
cd -; \
|
||||
else \
|
||||
continue; \
|
||||
fi \
|
||||
done
|
||||
mkdir -p $(dir $@) && touch $@
|
||||
|
||||
.PHONY: report-gcc-linux
|
||||
report-gcc-linux: stamps/check-gcc-linux
|
||||
$(srcdir)/scripts/testsuite-filter gcc glibc $(srcdir)/test/allowlist `find build-gcc-linux-stage2/gcc/testsuite/ -name *.sum |paste -sd "," -`
|
||||
|
|
56
configure
vendored
56
configure
vendored
|
@ -585,6 +585,7 @@ PACKAGE_URL=''
|
|||
ac_subst_vars='LTLIBOBJS
|
||||
LIBOBJS
|
||||
with_linux_headers_src
|
||||
enable_libsanitizer
|
||||
with_gdb_src
|
||||
with_musl_src
|
||||
with_glibc_src
|
||||
|
@ -603,6 +604,8 @@ target_cflags
|
|||
cmodel
|
||||
gcc_checking
|
||||
newlib_multilib_names
|
||||
musl32_multilib_names
|
||||
musl64_multilib_names
|
||||
glibc_multilib_names
|
||||
multilib_flags
|
||||
multilib_gen
|
||||
|
@ -693,6 +696,7 @@ with_glibc_src
|
|||
with_musl_src
|
||||
with_gdb_src
|
||||
with_linux_headers_src
|
||||
enable_libsanitizer
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
host_alias
|
||||
|
@ -1331,6 +1335,7 @@ Optional Features:
|
|||
[--disable-gcc-checking]
|
||||
--disable-install-strip Don't strip the executable file
|
||||
--disable-gdb Don't build GDB, as it's not upstream
|
||||
--enable-libsanitizer Build libsanitizer, which only supports rv64
|
||||
|
||||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
|
@ -3303,7 +3308,7 @@ fi
|
|||
if test "${with_tune+set}" = set; then :
|
||||
withval=$with_tune;
|
||||
else
|
||||
with_tune=rocket
|
||||
with_tune=default
|
||||
|
||||
fi
|
||||
|
||||
|
@ -3335,6 +3340,13 @@ WITH_ARCH=--with-arch=$with_arch
|
|||
WITH_ABI=--with-abi=$with_abi
|
||||
|
||||
|
||||
if test "x$with_tune" != xdefault; then :
|
||||
WITH_TUNE=--with-tune=$with_tune
|
||||
|
||||
else
|
||||
WITH_TUNE=""
|
||||
|
||||
fi
|
||||
|
||||
# Check whether --enable-multilib was given.
|
||||
if test "${enable_multilib+set}" = set; then :
|
||||
|
@ -3373,17 +3385,36 @@ else
|
|||
fi
|
||||
|
||||
if test "x$enable_multilib" != xno; then :
|
||||
glibc_multilib_names="rv64imac-lp64 rv64imacxtheadc-lp64 rv64imafdc-lp64d rv64imafdcxtheadc-lp64d rv64imafdcvxtheadc-lp64d rv64imafdcvxtheadc-lp64v rv64imafdcvxtheadc-lp64dv"
|
||||
glibc_multilib_names="rv64imac-lp64 rv64imac_xtheadc-lp64 rv64imafdc-lp64d rv64imafdc_zfh_xtheadc-lp64d rv64imafdcv_zfh_xtheadc-lp64d \
|
||||
rv64imafdc_v0p7_zfh_xtheadc-lp64d rv32imafdc-ilp32d rv32imafdc_zfh_xtheadc-ilp32d rv32imafdcv_zfh_xtheadc-ilp32d"
|
||||
|
||||
else
|
||||
glibc_multilib_names="$with_arch-$with_abi"
|
||||
|
||||
fi
|
||||
|
||||
if test "x$enable_multilib" != xno; then :
|
||||
musl64_multilib_names="rv64imac-lp64 rv64imac_xtheadc-lp64 rv64imafdc-lp64d rv64imafdc_zfh_xtheadc-lp64d rv64imafdcv_zfh_xtheadc-lp64d \
|
||||
rv64imafdc_v0p7_zfh_xtheadc-lp64d"
|
||||
|
||||
else
|
||||
musl64_multilib_names="$with_arch-$with_abi"
|
||||
|
||||
fi
|
||||
|
||||
if test "x$enable_multilib" != xno; then :
|
||||
musl32_multilib_names="rv32imafdc-ilp32d rv32imafdc_zfh_xtheadc-ilp32d rv32imafdcv_zfh_xtheadc-ilp32d"
|
||||
|
||||
else
|
||||
musl32_multilib_names="$with_arch-$with_abi"
|
||||
|
||||
fi
|
||||
|
||||
if test "x$enable_multilib" != xno; then :
|
||||
newlib_multilib_names="rv32ec-ilp32e rv32emc-ilp32e rv32i-ilp32 rv32im-ilp32 rv32iac-ilp32 rv32imac-ilp32 rv32imafc-ilp32f \
|
||||
rv32imafdc-ilp32d rv32imafdcxtheade-ilp32d rv64imac-lp64 rv64imacxtheadc-lp64 rv64imafdc-lp64d rv64imafdcxtheadc-lp64d \
|
||||
rv64imafdcvxtheadc-lp64d rv64imafdcvxtheadc-lp64v rv64imafdcvxtheadc-lp64dv"
|
||||
rv32imafdc-ilp32d rv32imafdc_xtheade-ilp32d rv32imafdc_zfh_xtheadc-ilp32d \
|
||||
rv64imac-lp64 rv64imac_xtheadc-lp64 rv64imafdc-lp64d rv64imafdc_zfh_xtheadc-lp64d \
|
||||
rv64imafdcv_zfh_xtheadc-lp64d rv64imafdc_v0p7_zfh_xtheadc-lp64d"
|
||||
|
||||
else
|
||||
newlib_multilib_names="$with_arch-$with_abi"
|
||||
|
@ -3694,6 +3725,23 @@ else
|
|||
fi
|
||||
|
||||
|
||||
# Check whether --enable-libsanitizer was given.
|
||||
if test "${enable_libsanitizer+set}" = set; then :
|
||||
enableval=$enable_libsanitizer;
|
||||
else
|
||||
enable_libsanitizer=yes
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if test "x$enable_libsanitizer" != xno; then :
|
||||
enable_libsanitizer=--enable-libsanitizer
|
||||
|
||||
else
|
||||
enable_libsanitizer=--disable-libsanitizer
|
||||
|
||||
fi
|
||||
|
||||
if test "x$with_linux_headers_src" != xdefault; then :
|
||||
with_linux_headers_src=$with_linux_headers_src
|
||||
|
||||
|
|
33
configure.ac
33
configure.ac
|
@ -68,7 +68,7 @@ AC_ARG_WITH(tune,
|
|||
[AS_HELP_STRING([--with-tune=rocket],
|
||||
[Set the base RISC-V CPU, defaults to rocket])],
|
||||
[],
|
||||
[with_tune=rocket]
|
||||
[with_tune=default]
|
||||
)
|
||||
|
||||
AS_IF([test "x$with_abi" = xdefault],
|
||||
|
@ -86,6 +86,9 @@ AS_IF([test "x$with_abi" = xdefault],
|
|||
AC_SUBST(WITH_ARCH, --with-arch=$with_arch)
|
||||
AC_SUBST(WITH_ABI, --with-abi=$with_abi)
|
||||
AC_SUBST(WITH_TUNE,)
|
||||
AS_IF([test "x$with_tune" != xdefault],
|
||||
[AC_SUBST(WITH_TUNE, --with-tune=$with_tune)],
|
||||
[AC_SUBST(WITH_TUNE, "")])
|
||||
|
||||
AC_ARG_ENABLE(multilib,
|
||||
[AS_HELP_STRING([--enable-multilib],
|
||||
|
@ -111,13 +114,24 @@ AS_IF([test "x$enable_multilib" != xno || test "x$with_multilib_generator" != xn
|
|||
[AC_SUBST(multilib_flags,--disable-multilib)])
|
||||
|
||||
AS_IF([test "x$enable_multilib" != xno],
|
||||
[AC_SUBST(glibc_multilib_names,"rv64imac-lp64 rv64imacxtheadc-lp64 rv64imafdc-lp64d rv64imafdcxtheadc-lp64d rv64imafdcvxtheadc-lp64d rv64imafdcvxtheadc-lp64v rv64imafdcvxtheadc-lp64dv")],
|
||||
[AC_SUBST(glibc_multilib_names,"rv64imac-lp64 rv64imac_xtheadc-lp64 rv64imafdc-lp64d rv64imafdc_zfh_xtheadc-lp64d rv64imafdcv_zfh_xtheadc-lp64d \
|
||||
rv64imafdc_v0p7_zfh_xtheadc-lp64d rv32imafdc-ilp32d rv32imafdc_zfh_xtheadc-ilp32d rv32imafdcv_zfh_xtheadc-ilp32d")],
|
||||
[AC_SUBST(glibc_multilib_names,"$with_arch-$with_abi")])
|
||||
|
||||
AS_IF([test "x$enable_multilib" != xno],
|
||||
[AC_SUBST(musl64_multilib_names,"rv64imac-lp64 rv64imac_xtheadc-lp64 rv64imafdc-lp64d rv64imafdc_zfh_xtheadc-lp64d rv64imafdcv_zfh_xtheadc-lp64d \
|
||||
rv64imafdc_v0p7_zfh_xtheadc-lp64d")],
|
||||
[AC_SUBST(musl64_multilib_names,"$with_arch-$with_abi")])
|
||||
|
||||
AS_IF([test "x$enable_multilib" != xno],
|
||||
[AC_SUBST(musl32_multilib_names,"rv32imafdc-ilp32d rv32imafdc_zfh_xtheadc-ilp32d rv32imafdcv_zfh_xtheadc-ilp32d")],
|
||||
[AC_SUBST(musl32_multilib_names,"$with_arch-$with_abi")])
|
||||
|
||||
AS_IF([test "x$enable_multilib" != xno],
|
||||
[AC_SUBST(newlib_multilib_names,"rv32ec-ilp32e rv32emc-ilp32e rv32i-ilp32 rv32im-ilp32 rv32iac-ilp32 rv32imac-ilp32 rv32imafc-ilp32f \
|
||||
rv32imafdc-ilp32d rv32imafdcxtheade-ilp32d rv64imac-lp64 rv64imacxtheadc-lp64 rv64imafdc-lp64d rv64imafdcxtheadc-lp64d \
|
||||
rv64imafdcvxtheadc-lp64d rv64imafdcvxtheadc-lp64v rv64imafdcvxtheadc-lp64dv")],
|
||||
rv32imafdc-ilp32d rv32imafdc_xtheade-ilp32d rv32imafdc_zfh_xtheadc-ilp32d \
|
||||
rv64imac-lp64 rv64imac_xtheadc-lp64 rv64imafdc-lp64d rv64imafdc_zfh_xtheadc-lp64d \
|
||||
rv64imafdcv_zfh_xtheadc-lp64d rv64imafdc_v0p7_zfh_xtheadc-lp64d")],
|
||||
[AC_SUBST(newlib_multilib_names,"$with_arch-$with_abi")])
|
||||
|
||||
AC_ARG_ENABLE(gcc-checking,
|
||||
|
@ -265,6 +279,17 @@ AC_ARG_WITH(linux-headers-src,
|
|||
[with_linux_headers_src=default]
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(libsanitizer,
|
||||
[AS_HELP_STRING([--enable-libsanitizer],
|
||||
[Build libsanitizer, which only supports rv64])],
|
||||
[],
|
||||
[enable_libsanitizer=yes]
|
||||
)
|
||||
|
||||
AS_IF([test "x$enable_libsanitizer" != xno],
|
||||
[AC_SUBST(enable_libsanitizer, --enable-libsanitizer)],
|
||||
[AC_SUBST(enable_libsanitizer, --disable-libsanitizer)])
|
||||
|
||||
AS_IF([test "x$with_linux_headers_src" != xdefault],
|
||||
[AC_SUBST(with_linux_headers_src,$with_linux_headers_src)],
|
||||
[AC_SUBST(with_linux_headers_src,"\$(srcdir)/linux-headers/include")])
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#define HUGETLB_FLAG_ENCODE_SHIFT 26
|
||||
#define HUGETLB_FLAG_ENCODE_MASK 0x3f
|
||||
|
||||
#define HUGETLB_FLAG_ENCODE_16KB (14 << HUGETLB_FLAG_ENCODE_SHIFT)
|
||||
#define HUGETLB_FLAG_ENCODE_64KB (16 << HUGETLB_FLAG_ENCODE_SHIFT)
|
||||
#define HUGETLB_FLAG_ENCODE_512KB (19 << HUGETLB_FLAG_ENCODE_SHIFT)
|
||||
#define HUGETLB_FLAG_ENCODE_1MB (20 << HUGETLB_FLAG_ENCODE_SHIFT)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#ifndef __ASM_GENERIC_IPCBUF_H
|
||||
#define __ASM_GENERIC_IPCBUF_H
|
||||
|
||||
#include <linux/posix_types.h>
|
||||
|
||||
/*
|
||||
* The generic ipc64_perm structure:
|
||||
* Note extra padding because this structure is passed back and forth
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#define PROT_WRITE 0x2 /* page can be written */
|
||||
#define PROT_EXEC 0x4 /* page can be executed */
|
||||
#define PROT_SEM 0x8 /* page may be used for atomic ops */
|
||||
/* 0x10 reserved for arch-specific use */
|
||||
/* 0x20 reserved for arch-specific use */
|
||||
#define PROT_NONE 0x0 /* page can not be accessed */
|
||||
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
|
||||
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define __ASM_GENERIC_MSGBUF_H
|
||||
|
||||
#include <asm/bitsperlong.h>
|
||||
#include <asm/ipcbuf.h>
|
||||
|
||||
/*
|
||||
* generic msqid64_ds structure.
|
||||
*
|
||||
|
@ -13,9 +15,9 @@
|
|||
* everyone just ended up making identical copies without specific
|
||||
* optimizations, so we may just as well all use the same one.
|
||||
*
|
||||
* 64 bit architectures typically define a 64 bit __kernel_time_t,
|
||||
* so they do not need the first three padding words.
|
||||
* On big-endian systems, the padding is in the wrong place.
|
||||
* 64 bit architectures use a 64-bit long time field here, while
|
||||
* 32 bit architectures have a pair of unsigned long values.
|
||||
* On big-endian systems, the lower half is in the wrong place.
|
||||
*
|
||||
* Pad space is left for:
|
||||
* - 2 miscellaneous 32-bit values
|
||||
|
@ -24,9 +26,9 @@
|
|||
struct msqid64_ds {
|
||||
struct ipc64_perm msg_perm;
|
||||
#if __BITS_PER_LONG == 64
|
||||
__kernel_time_t msg_stime; /* last msgsnd time */
|
||||
__kernel_time_t msg_rtime; /* last msgrcv time */
|
||||
__kernel_time_t msg_ctime; /* last change time */
|
||||
long msg_stime; /* last msgsnd time */
|
||||
long msg_rtime; /* last msgrcv time */
|
||||
long msg_ctime; /* last change time */
|
||||
#else
|
||||
unsigned long msg_stime; /* last msgsnd time */
|
||||
unsigned long msg_stime_high;
|
||||
|
|
|
@ -86,6 +86,7 @@ typedef struct {
|
|||
*/
|
||||
typedef __kernel_long_t __kernel_off_t;
|
||||
typedef long long __kernel_loff_t;
|
||||
typedef __kernel_long_t __kernel_old_time_t;
|
||||
typedef __kernel_long_t __kernel_time_t;
|
||||
typedef long long __kernel_time64_t;
|
||||
typedef __kernel_long_t __kernel_clock_t;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#define __ASM_GENERIC_SEMBUF_H
|
||||
|
||||
#include <asm/bitsperlong.h>
|
||||
#include <asm/ipcbuf.h>
|
||||
|
||||
/*
|
||||
* The semid64_ds structure for x86 architecture.
|
||||
|
@ -13,9 +14,8 @@
|
|||
* everyone just ended up making identical copies without specific
|
||||
* optimizations, so we may just as well all use the same one.
|
||||
*
|
||||
* 64 bit architectures use a 64-bit __kernel_time_t here, while
|
||||
* 64 bit architectures use a 64-bit long time field here, while
|
||||
* 32 bit architectures have a pair of unsigned long values.
|
||||
* so they do not need the first two padding words.
|
||||
*
|
||||
* On big-endian systems, the padding is in the wrong place for
|
||||
* historic reasons, so user space has to reconstruct a time_t
|
||||
|
@ -29,8 +29,8 @@
|
|||
struct semid64_ds {
|
||||
struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
|
||||
#if __BITS_PER_LONG == 64
|
||||
__kernel_time_t sem_otime; /* last semop time */
|
||||
__kernel_time_t sem_ctime; /* last change time */
|
||||
long sem_otime; /* last semop time */
|
||||
long sem_ctime; /* last change time */
|
||||
#else
|
||||
unsigned long sem_otime; /* last semop time */
|
||||
unsigned long sem_otime_high;
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
* everyone just ended up making identical copies without specific
|
||||
* optimizations, so we may just as well all use the same one.
|
||||
*
|
||||
* 64 bit architectures typically define a 64 bit __kernel_time_t,
|
||||
* so they do not need the first two padding words.
|
||||
* On big-endian systems, the padding is in the wrong place.
|
||||
* 64 bit architectures use a 64-bit long time field here, while
|
||||
* 32 bit architectures have a pair of unsigned long values.
|
||||
* On big-endian systems, the lower half is in the wrong place.
|
||||
*
|
||||
*
|
||||
* Pad space is left for:
|
||||
|
@ -26,9 +26,9 @@ struct shmid64_ds {
|
|||
struct ipc64_perm shm_perm; /* operation perms */
|
||||
size_t shm_segsz; /* size of segment (bytes) */
|
||||
#if __BITS_PER_LONG == 64
|
||||
__kernel_time_t shm_atime; /* last attach time */
|
||||
__kernel_time_t shm_dtime; /* last detach time */
|
||||
__kernel_time_t shm_ctime; /* last change time */
|
||||
long shm_atime; /* last attach time */
|
||||
long shm_dtime; /* last detach time */
|
||||
long shm_ctime; /* last change time */
|
||||
#else
|
||||
unsigned long shm_atime; /* last attach time */
|
||||
unsigned long shm_atime_high;
|
||||
|
|
|
@ -229,7 +229,9 @@ typedef struct siginfo {
|
|||
#define SEGV_ACCADI 5 /* ADI not enabled for mapped object */
|
||||
#define SEGV_ADIDERR 6 /* Disrupting MCD error */
|
||||
#define SEGV_ADIPERR 7 /* Precise MCD exception */
|
||||
#define NSIGSEGV 7
|
||||
#define SEGV_MTEAERR 8 /* Asynchronous ARM MTE error */
|
||||
#define SEGV_MTESERR 9 /* Synchronous ARM MTE exception */
|
||||
#define NSIGSEGV 9
|
||||
|
||||
/*
|
||||
* SIGBUS si_codes
|
||||
|
|
|
@ -140,7 +140,7 @@ __SYSCALL(__NR_renameat, sys_renameat)
|
|||
#define __NR_umount2 39
|
||||
__SYSCALL(__NR_umount2, sys_umount)
|
||||
#define __NR_mount 40
|
||||
__SC_COMP(__NR_mount, sys_mount, compat_sys_mount)
|
||||
__SYSCALL(__NR_mount, sys_mount)
|
||||
#define __NR_pivot_root 41
|
||||
__SYSCALL(__NR_pivot_root, sys_pivot_root)
|
||||
|
||||
|
@ -207,9 +207,9 @@ __SYSCALL(__NR_read, sys_read)
|
|||
#define __NR_write 64
|
||||
__SYSCALL(__NR_write, sys_write)
|
||||
#define __NR_readv 65
|
||||
__SC_COMP(__NR_readv, sys_readv, compat_sys_readv)
|
||||
__SC_COMP(__NR_readv, sys_readv, sys_readv)
|
||||
#define __NR_writev 66
|
||||
__SC_COMP(__NR_writev, sys_writev, compat_sys_writev)
|
||||
__SC_COMP(__NR_writev, sys_writev, sys_writev)
|
||||
#define __NR_pread64 67
|
||||
__SC_COMP(__NR_pread64, sys_pread64, compat_sys_pread64)
|
||||
#define __NR_pwrite64 68
|
||||
|
@ -237,7 +237,7 @@ __SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4)
|
|||
|
||||
/* fs/splice.c */
|
||||
#define __NR_vmsplice 75
|
||||
__SC_COMP(__NR_vmsplice, sys_vmsplice, compat_sys_vmsplice)
|
||||
__SYSCALL(__NR_vmsplice, sys_vmsplice)
|
||||
#define __NR_splice 76
|
||||
__SYSCALL(__NR_splice, sys_splice)
|
||||
#define __NR_tee 77
|
||||
|
@ -606,9 +606,9 @@ __SYSCALL(__NR_sendto, sys_sendto)
|
|||
#define __NR_recvfrom 207
|
||||
__SC_COMP(__NR_recvfrom, sys_recvfrom, compat_sys_recvfrom)
|
||||
#define __NR_setsockopt 208
|
||||
__SC_COMP(__NR_setsockopt, sys_setsockopt, compat_sys_setsockopt)
|
||||
__SC_COMP(__NR_setsockopt, sys_setsockopt, sys_setsockopt)
|
||||
#define __NR_getsockopt 209
|
||||
__SC_COMP(__NR_getsockopt, sys_getsockopt, compat_sys_getsockopt)
|
||||
__SC_COMP(__NR_getsockopt, sys_getsockopt, sys_getsockopt)
|
||||
#define __NR_shutdown 210
|
||||
__SYSCALL(__NR_shutdown, sys_shutdown)
|
||||
#define __NR_sendmsg 211
|
||||
|
@ -727,11 +727,9 @@ __SYSCALL(__NR_setns, sys_setns)
|
|||
#define __NR_sendmmsg 269
|
||||
__SC_COMP(__NR_sendmmsg, sys_sendmmsg, compat_sys_sendmmsg)
|
||||
#define __NR_process_vm_readv 270
|
||||
__SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \
|
||||
compat_sys_process_vm_readv)
|
||||
__SYSCALL(__NR_process_vm_readv, sys_process_vm_readv)
|
||||
#define __NR_process_vm_writev 271
|
||||
__SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \
|
||||
compat_sys_process_vm_writev)
|
||||
__SYSCALL(__NR_process_vm_writev, sys_process_vm_writev)
|
||||
#define __NR_kcmp 272
|
||||
__SYSCALL(__NR_kcmp, sys_kcmp)
|
||||
#define __NR_finit_module 273
|
||||
|
@ -850,9 +848,20 @@ __SYSCALL(__NR_pidfd_open, sys_pidfd_open)
|
|||
#define __NR_clone3 435
|
||||
__SYSCALL(__NR_clone3, sys_clone3)
|
||||
#endif
|
||||
#define __NR_close_range 436
|
||||
__SYSCALL(__NR_close_range, sys_close_range)
|
||||
|
||||
#define __NR_openat2 437
|
||||
__SYSCALL(__NR_openat2, sys_openat2)
|
||||
#define __NR_pidfd_getfd 438
|
||||
__SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd)
|
||||
#define __NR_faccessat2 439
|
||||
__SYSCALL(__NR_faccessat2, sys_faccessat2)
|
||||
#define __NR_process_madvise 440
|
||||
__SYSCALL(__NR_process_madvise, sys_process_madvise)
|
||||
|
||||
#undef __NR_syscalls
|
||||
#define __NR_syscalls 436
|
||||
#define __NR_syscalls 441
|
||||
|
||||
/*
|
||||
* 32 bit systems traditionally used different
|
||||
|
|
|
@ -10,4 +10,28 @@
|
|||
/* vDSO location */
|
||||
#define AT_SYSINFO_EHDR 33
|
||||
|
||||
/*
|
||||
* The set of entries below represent more extensive information
|
||||
* about the caches, in the form of two entry per cache type,
|
||||
* one entry containing the cache size in bytes, and the other
|
||||
* containing the cache line size in bytes in the bottom 16 bits
|
||||
* and the cache associativity in the next 16 bits.
|
||||
*
|
||||
* The associativity is such that if N is the 16-bit value, the
|
||||
* cache is N way set associative. A value if 0xffff means fully
|
||||
* associative, a value of 1 means directly mapped.
|
||||
*
|
||||
* For all these fields, a value of 0 means that the information
|
||||
* is not known.
|
||||
*/
|
||||
#define AT_L1I_CACHESIZE 40
|
||||
#define AT_L1I_CACHEGEOMETRY 41
|
||||
#define AT_L1D_CACHESIZE 42
|
||||
#define AT_L1D_CACHEGEOMETRY 43
|
||||
#define AT_L2_CACHESIZE 44
|
||||
#define AT_L2_CACHEGEOMETRY 45
|
||||
|
||||
/* entries in ARCH_DLINFO */
|
||||
#define AT_VECTOR_SIZE_ARCH 7
|
||||
|
||||
#endif /* _ASM_RISCV_AUXVEC_H */
|
||||
|
|
|
@ -1 +1,9 @@
|
|||
#include <asm-generic/bpf_perf_event.h>
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef __ASM_BPF_PERF_EVENT_H__
|
||||
#define __ASM_BPF_PERF_EVENT_H__
|
||||
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
typedef struct user_regs_struct bpf_user_pt_regs_t;
|
||||
|
||||
#endif /* __ASM_BPF_PERF_EVENT_H__ */
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef _ASM_ELF_H
|
||||
#define _ASM_ELF_H
|
||||
#ifndef _ASM_RISCV_ELF_H
|
||||
#define _ASM_RISCV_ELF_H
|
||||
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
|
@ -97,4 +97,4 @@ typedef union __riscv_fp_state elf_fpregset_t;
|
|||
#define R_RISCV_32_PCREL 57
|
||||
|
||||
|
||||
#endif /* _ASM_ELF_H */
|
||||
#endif /* _ASM_RISCV_ELF_H */
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
* Copyright (C) 2012 ARM Ltd.
|
||||
* Copyright (C) 2017 SiFive
|
||||
*/
|
||||
#ifndef __UAPI_ASM_HWCAP_H
|
||||
#define __UAPI_ASM_HWCAP_H
|
||||
#ifndef _ASM_RISCV_HWCAP_H
|
||||
#define _ASM_RISCV_HWCAP_H
|
||||
|
||||
/*
|
||||
* Linux saves the floating-point registers according to the ISA Linux is
|
||||
* executing on, as opposed to the ISA the user program is compiled for. This
|
||||
* is necessary for a handful of esoteric use cases: for example, userpsace
|
||||
* is necessary for a handful of esoteric use cases: for example, userspace
|
||||
* threading libraries must be able to examine the actual machine state in
|
||||
* order to fully reconstruct the state of a thread.
|
||||
*/
|
||||
|
@ -23,4 +23,4 @@
|
|||
#define COMPAT_HWCAP_ISA_C (1 << ('C' - 'A'))
|
||||
#define COMPAT_HWCAP_ISA_V (1 << ('V' - 'A'))
|
||||
|
||||
#endif
|
||||
#endif /* _ASM_RISCV_HWCAP_H */
|
||||
|
|
|
@ -78,13 +78,17 @@ union __riscv_fp_state {
|
|||
};
|
||||
|
||||
struct __riscv_v_state {
|
||||
#if __riscv_xlen == 32
|
||||
__u64 v[64];
|
||||
#else
|
||||
__uint128_t v[32];
|
||||
#endif
|
||||
unsigned long vstart;
|
||||
unsigned long vxsat;
|
||||
unsigned long vxrm;
|
||||
unsigned long vl;
|
||||
unsigned long vtype;
|
||||
};
|
||||
} __attribute__((aligned(16)));
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
*
|
||||
* This file was copied from arch/arm64/include/uapi/asm/ucontext.h
|
||||
*/
|
||||
#ifndef __ASM_UCONTEXT_H
|
||||
#define __ASM_UCONTEXT_H
|
||||
#ifndef _ASM_RISCV_UCONTEXT_H
|
||||
#define _ASM_RISCV_UCONTEXT_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
|
@ -31,4 +31,4 @@ struct ucontext {
|
|||
struct sigcontext uc_mcontext;
|
||||
};
|
||||
|
||||
#endif /* __ASM_UCONTEXT_H */
|
||||
#endif /* _ASM_RISCV_UCONTEXT_H */
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef __LP64__
|
||||
|
|
|
@ -125,13 +125,19 @@ extern "C" {
|
|||
/* Flag that BO sharing will be explicitly synchronized */
|
||||
#define AMDGPU_GEM_CREATE_EXPLICIT_SYNC (1 << 7)
|
||||
/* Flag that indicates allocating MQD gart on GFX9, where the mtype
|
||||
* for the second page onward should be set to NC.
|
||||
* for the second page onward should be set to NC. It should never
|
||||
* be used by user space applications.
|
||||
*/
|
||||
#define AMDGPU_GEM_CREATE_MQD_GFX9 (1 << 8)
|
||||
#define AMDGPU_GEM_CREATE_CP_MQD_GFX9 (1 << 8)
|
||||
/* Flag that BO may contain sensitive data that must be wiped before
|
||||
* releasing the memory
|
||||
*/
|
||||
#define AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE (1 << 9)
|
||||
/* Flag that BO will be encrypted and that the TMZ bit should be
|
||||
* set in the PTEs when mapping this buffer via GPUVM or
|
||||
* accessing it with various hw blocks
|
||||
*/
|
||||
#define AMDGPU_GEM_CREATE_ENCRYPTED (1 << 10)
|
||||
|
||||
struct drm_amdgpu_gem_create_in {
|
||||
/** the requested memory size */
|
||||
|
@ -345,6 +351,10 @@ struct drm_amdgpu_gem_userptr {
|
|||
#define AMDGPU_TILING_DCC_PITCH_MAX_MASK 0x3FFF
|
||||
#define AMDGPU_TILING_DCC_INDEPENDENT_64B_SHIFT 43
|
||||
#define AMDGPU_TILING_DCC_INDEPENDENT_64B_MASK 0x1
|
||||
#define AMDGPU_TILING_DCC_INDEPENDENT_128B_SHIFT 44
|
||||
#define AMDGPU_TILING_DCC_INDEPENDENT_128B_MASK 0x1
|
||||
#define AMDGPU_TILING_SCANOUT_SHIFT 63
|
||||
#define AMDGPU_TILING_SCANOUT_MASK 0x1
|
||||
|
||||
/* Set/Get helpers for tiling flags. */
|
||||
#define AMDGPU_TILING_SET(field, value) \
|
||||
|
@ -492,14 +502,16 @@ struct drm_amdgpu_gem_op {
|
|||
#define AMDGPU_VM_MTYPE_MASK (0xf << 5)
|
||||
/* Default MTYPE. Pre-AI must use this. Recommended for newer ASICs. */
|
||||
#define AMDGPU_VM_MTYPE_DEFAULT (0 << 5)
|
||||
/* Use NC MTYPE instead of default MTYPE */
|
||||
/* Use Non Coherent MTYPE instead of default MTYPE */
|
||||
#define AMDGPU_VM_MTYPE_NC (1 << 5)
|
||||
/* Use WC MTYPE instead of default MTYPE */
|
||||
/* Use Write Combine MTYPE instead of default MTYPE */
|
||||
#define AMDGPU_VM_MTYPE_WC (2 << 5)
|
||||
/* Use CC MTYPE instead of default MTYPE */
|
||||
/* Use Cache Coherent MTYPE instead of default MTYPE */
|
||||
#define AMDGPU_VM_MTYPE_CC (3 << 5)
|
||||
/* Use UC MTYPE instead of default MTYPE */
|
||||
/* Use UnCached MTYPE instead of default MTYPE */
|
||||
#define AMDGPU_VM_MTYPE_UC (4 << 5)
|
||||
/* Use Read Write MTYPE instead of default MTYPE */
|
||||
#define AMDGPU_VM_MTYPE_RW (5 << 5)
|
||||
|
||||
struct drm_amdgpu_gem_va {
|
||||
/** GEM object handle */
|
||||
|
@ -552,7 +564,7 @@ struct drm_amdgpu_cs_in {
|
|||
/** Handle of resource list associated with CS */
|
||||
__u32 bo_list_handle;
|
||||
__u32 num_chunks;
|
||||
__u32 _pad;
|
||||
__u32 flags;
|
||||
/** this points to __u64 * which point to cs chunks */
|
||||
__u64 chunks;
|
||||
};
|
||||
|
@ -586,6 +598,14 @@ union drm_amdgpu_cs {
|
|||
*/
|
||||
#define AMDGPU_IB_FLAG_RESET_GDS_MAX_WAVE_ID (1 << 4)
|
||||
|
||||
/* Flag the IB as secure (TMZ)
|
||||
*/
|
||||
#define AMDGPU_IB_FLAGS_SECURE (1 << 5)
|
||||
|
||||
/* Tell KMD to flush and invalidate caches
|
||||
*/
|
||||
#define AMDGPU_IB_FLAG_EMIT_MEM_SYNC (1 << 6)
|
||||
|
||||
struct drm_amdgpu_cs_chunk_ib {
|
||||
__u32 _pad;
|
||||
/** AMDGPU_IB_FLAG_* */
|
||||
|
@ -653,6 +673,7 @@ struct drm_amdgpu_cs_chunk_data {
|
|||
*/
|
||||
#define AMDGPU_IDS_FLAGS_FUSION 0x1
|
||||
#define AMDGPU_IDS_FLAGS_PREEMPTION 0x2
|
||||
#define AMDGPU_IDS_FLAGS_TMZ 0x4
|
||||
|
||||
/* indicate if acceleration can be working */
|
||||
#define AMDGPU_INFO_ACCEL_WORKING 0x00
|
||||
|
@ -701,6 +722,9 @@ struct drm_amdgpu_cs_chunk_data {
|
|||
/* Subquery id: Query DMCU firmware version */
|
||||
#define AMDGPU_INFO_FW_DMCU 0x12
|
||||
#define AMDGPU_INFO_FW_TA 0x13
|
||||
/* Subquery id: Query DMCUB firmware version */
|
||||
#define AMDGPU_INFO_FW_DMCUB 0x14
|
||||
|
||||
/* number of bytes moved for TTM migration */
|
||||
#define AMDGPU_INFO_NUM_BYTES_MOVED 0x0f
|
||||
/* the used VRAM size */
|
||||
|
|
|
@ -772,11 +772,12 @@ struct drm_syncobj_array {
|
|||
__u32 pad;
|
||||
};
|
||||
|
||||
#define DRM_SYNCOBJ_QUERY_FLAGS_LAST_SUBMITTED (1 << 0) /* last available point on timeline syncobj */
|
||||
struct drm_syncobj_timeline_array {
|
||||
__u64 handles;
|
||||
__u64 points;
|
||||
__u32 count_handles;
|
||||
__u32 pad;
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
|
||||
|
@ -941,6 +942,8 @@ extern "C" {
|
|||
#define DRM_IOCTL_SYNCOBJ_TRANSFER DRM_IOWR(0xCC, struct drm_syncobj_transfer)
|
||||
#define DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL DRM_IOWR(0xCD, struct drm_syncobj_timeline_array)
|
||||
|
||||
#define DRM_IOCTL_MODE_GETFB2 DRM_IOWR(0xCE, struct drm_mode_fb_cmd2)
|
||||
|
||||
/**
|
||||
* Device specific ioctls should only be in their respective headers
|
||||
* The device specific ioctl range is from 0x40 to 0x9f.
|
||||
|
|
|
@ -69,7 +69,7 @@ extern "C" {
|
|||
#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \
|
||||
((__u32)(c) << 16) | ((__u32)(d) << 24))
|
||||
|
||||
#define DRM_FORMAT_BIG_ENDIAN (1<<31) /* format is big endian instead of little endian */
|
||||
#define DRM_FORMAT_BIG_ENDIAN (1U<<31) /* format is big endian instead of little endian */
|
||||
|
||||
/* Reserve 0 for the invalid format specifier */
|
||||
#define DRM_FORMAT_INVALID 0
|
||||
|
@ -236,6 +236,12 @@ extern "C" {
|
|||
#define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */
|
||||
#define DRM_FORMAT_NV24 fourcc_code('N', 'V', '2', '4') /* non-subsampled Cr:Cb plane */
|
||||
#define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */
|
||||
/*
|
||||
* 2 plane YCbCr
|
||||
* index 0 = Y plane, [39:0] Y3:Y2:Y1:Y0 little endian
|
||||
* index 1 = Cr:Cb plane, [39:0] Cr1:Cb1:Cr0:Cb0 little endian
|
||||
*/
|
||||
#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5') /* 2x2 subsampled Cr:Cb plane */
|
||||
|
||||
/*
|
||||
* 2 plane YCbCr MSB aligned
|
||||
|
@ -265,6 +271,22 @@ extern "C" {
|
|||
*/
|
||||
#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cr:Cb plane 16 bits per channel */
|
||||
|
||||
/* 3 plane non-subsampled (444) YCbCr
|
||||
* 16 bits per component, but only 10 bits are used and 6 bits are padded
|
||||
* index 0: Y plane, [15:0] Y:x [10:6] little endian
|
||||
* index 1: Cb plane, [15:0] Cb:x [10:6] little endian
|
||||
* index 2: Cr plane, [15:0] Cr:x [10:6] little endian
|
||||
*/
|
||||
#define DRM_FORMAT_Q410 fourcc_code('Q', '4', '1', '0')
|
||||
|
||||
/* 3 plane non-subsampled (444) YCrCb
|
||||
* 16 bits per component, but only 10 bits are used and 6 bits are padded
|
||||
* index 0: Y plane, [15:0] Y:x [10:6] little endian
|
||||
* index 1: Cr plane, [15:0] Cr:x [10:6] little endian
|
||||
* index 2: Cb plane, [15:0] Cb:x [10:6] little endian
|
||||
*/
|
||||
#define DRM_FORMAT_Q401 fourcc_code('Q', '4', '0', '1')
|
||||
|
||||
/*
|
||||
* 3 plane YCbCr
|
||||
* index 0: Y plane, [7:0] Y
|
||||
|
@ -309,6 +331,7 @@ extern "C" {
|
|||
#define DRM_FORMAT_MOD_VENDOR_BROADCOM 0x07
|
||||
#define DRM_FORMAT_MOD_VENDOR_ARM 0x08
|
||||
#define DRM_FORMAT_MOD_VENDOR_ALLWINNER 0x09
|
||||
#define DRM_FORMAT_MOD_VENDOR_AMLOGIC 0x0a
|
||||
|
||||
/* add more to the end as needed */
|
||||
|
||||
|
@ -323,8 +346,33 @@ extern "C" {
|
|||
* When adding a new token please document the layout with a code comment,
|
||||
* similar to the fourcc codes above. drm_fourcc.h is considered the
|
||||
* authoritative source for all of these.
|
||||
*
|
||||
* Generic modifier names:
|
||||
*
|
||||
* DRM_FORMAT_MOD_GENERIC_* definitions are used to provide vendor-neutral names
|
||||
* for layouts which are common across multiple vendors. To preserve
|
||||
* compatibility, in cases where a vendor-specific definition already exists and
|
||||
* a generic name for it is desired, the common name is a purely symbolic alias
|
||||
* and must use the same numerical value as the original definition.
|
||||
*
|
||||
* Note that generic names should only be used for modifiers which describe
|
||||
* generic layouts (such as pixel re-ordering), which may have
|
||||
* independently-developed support across multiple vendors.
|
||||
*
|
||||
* In future cases where a generic layout is identified before merging with a
|
||||
* vendor-specific modifier, a new 'GENERIC' vendor or modifier using vendor
|
||||
* 'NONE' could be considered. This should only be for obvious, exceptional
|
||||
* cases to avoid polluting the 'GENERIC' namespace with modifiers which only
|
||||
* apply to a single vendor.
|
||||
*
|
||||
* Generic names should not be used for cases where multiple hardware vendors
|
||||
* have implementations of the same standardised compression scheme (such as
|
||||
* AFBC). In those cases, all implementations should use the same format
|
||||
* modifier(s), reflecting the vendor of the standard.
|
||||
*/
|
||||
|
||||
#define DRM_FORMAT_MOD_GENERIC_16_16_TILE DRM_FORMAT_MOD_SAMSUNG_16_16_TILE
|
||||
|
||||
/*
|
||||
* Invalid Modifier
|
||||
*
|
||||
|
@ -354,9 +402,12 @@ extern "C" {
|
|||
* a platform-dependent stride. On top of that the memory can apply
|
||||
* platform-depending swizzling of some higher address bits into bit6.
|
||||
*
|
||||
* This format is highly platforms specific and not useful for cross-driver
|
||||
* sharing. It exists since on a given platform it does uniquely identify the
|
||||
* layout in a simple way for i915-specific userspace.
|
||||
* Note that this layout is only accurate on intel gen 8+ or valleyview chipsets.
|
||||
* On earlier platforms the is highly platforms specific and not useful for
|
||||
* cross-driver sharing. It exists since on a given platform it does uniquely
|
||||
* identify the layout in a simple way for i915-specific userspace, which
|
||||
* facilitated conversion of userspace to modifiers. Additionally the exact
|
||||
* format on some really old platforms is not known.
|
||||
*/
|
||||
#define I915_FORMAT_MOD_X_TILED fourcc_mod_code(INTEL, 1)
|
||||
|
||||
|
@ -369,9 +420,12 @@ extern "C" {
|
|||
* memory can apply platform-depending swizzling of some higher address bits
|
||||
* into bit6.
|
||||
*
|
||||
* This format is highly platforms specific and not useful for cross-driver
|
||||
* sharing. It exists since on a given platform it does uniquely identify the
|
||||
* layout in a simple way for i915-specific userspace.
|
||||
* Note that this layout is only accurate on intel gen 8+ or valleyview chipsets.
|
||||
* On earlier platforms the is highly platforms specific and not useful for
|
||||
* cross-driver sharing. It exists since on a given platform it does uniquely
|
||||
* identify the layout in a simple way for i915-specific userspace, which
|
||||
* facilitated conversion of userspace to modifiers. Additionally the exact
|
||||
* format on some really old platforms is not known.
|
||||
*/
|
||||
#define I915_FORMAT_MOD_Y_TILED fourcc_mod_code(INTEL, 2)
|
||||
|
||||
|
@ -410,6 +464,30 @@ extern "C" {
|
|||
#define I915_FORMAT_MOD_Y_TILED_CCS fourcc_mod_code(INTEL, 4)
|
||||
#define I915_FORMAT_MOD_Yf_TILED_CCS fourcc_mod_code(INTEL, 5)
|
||||
|
||||
/*
|
||||
* Intel color control surfaces (CCS) for Gen-12 render compression.
|
||||
*
|
||||
* The main surface is Y-tiled and at plane index 0, the CCS is linear and
|
||||
* at index 1. A 64B CCS cache line corresponds to an area of 4x1 tiles in
|
||||
* main surface. In other words, 4 bits in CCS map to a main surface cache
|
||||
* line pair. The main surface pitch is required to be a multiple of four
|
||||
* Y-tile widths.
|
||||
*/
|
||||
#define I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS fourcc_mod_code(INTEL, 6)
|
||||
|
||||
/*
|
||||
* Intel color control surfaces (CCS) for Gen-12 media compression
|
||||
*
|
||||
* The main surface is Y-tiled and at plane index 0, the CCS is linear and
|
||||
* at index 1. A 64B CCS cache line corresponds to an area of 4x1 tiles in
|
||||
* main surface. In other words, 4 bits in CCS map to a main surface cache
|
||||
* line pair. The main surface pitch is required to be a multiple of four
|
||||
* Y-tile widths. For semi-planar formats like NV12, CCS planes follow the
|
||||
* Y and UV planes i.e., planes 0 and 1 are used for Y and UV surfaces,
|
||||
* planes 2 and 3 for the respective CCS.
|
||||
*/
|
||||
#define I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS fourcc_mod_code(INTEL, 7)
|
||||
|
||||
/*
|
||||
* Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks
|
||||
*
|
||||
|
@ -497,7 +575,113 @@ extern "C" {
|
|||
#define DRM_FORMAT_MOD_NVIDIA_TEGRA_TILED fourcc_mod_code(NVIDIA, 1)
|
||||
|
||||
/*
|
||||
* 16Bx2 Block Linear layout, used by desktop GPUs, and Tegra K1 and later
|
||||
* Generalized Block Linear layout, used by desktop GPUs starting with NV50/G80,
|
||||
* and Tegra GPUs starting with Tegra K1.
|
||||
*
|
||||
* Pixels are arranged in Groups of Bytes (GOBs). GOB size and layout varies
|
||||
* based on the architecture generation. GOBs themselves are then arranged in
|
||||
* 3D blocks, with the block dimensions (in terms of GOBs) always being a power
|
||||
* of two, and hence expressible as their log2 equivalent (E.g., "2" represents
|
||||
* a block depth or height of "4").
|
||||
*
|
||||
* Chapter 20 "Pixel Memory Formats" of the Tegra X1 TRM describes this format
|
||||
* in full detail.
|
||||
*
|
||||
* Macro
|
||||
* Bits Param Description
|
||||
* ---- ----- -----------------------------------------------------------------
|
||||
*
|
||||
* 3:0 h log2(height) of each block, in GOBs. Placed here for
|
||||
* compatibility with the existing
|
||||
* DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK()-based modifiers.
|
||||
*
|
||||
* 4:4 - Must be 1, to indicate block-linear layout. Necessary for
|
||||
* compatibility with the existing
|
||||
* DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK()-based modifiers.
|
||||
*
|
||||
* 8:5 - Reserved (To support 3D-surfaces with variable log2(depth) block
|
||||
* size). Must be zero.
|
||||
*
|
||||
* Note there is no log2(width) parameter. Some portions of the
|
||||
* hardware support a block width of two gobs, but it is impractical
|
||||
* to use due to lack of support elsewhere, and has no known
|
||||
* benefits.
|
||||
*
|
||||
* 11:9 - Reserved (To support 2D-array textures with variable array stride
|
||||
* in blocks, specified via log2(tile width in blocks)). Must be
|
||||
* zero.
|
||||
*
|
||||
* 19:12 k Page Kind. This value directly maps to a field in the page
|
||||
* tables of all GPUs >= NV50. It affects the exact layout of bits
|
||||
* in memory and can be derived from the tuple
|
||||
*
|
||||
* (format, GPU model, compression type, samples per pixel)
|
||||
*
|
||||
* Where compression type is defined below. If GPU model were
|
||||
* implied by the format modifier, format, or memory buffer, page
|
||||
* kind would not need to be included in the modifier itself, but
|
||||
* since the modifier should define the layout of the associated
|
||||
* memory buffer independent from any device or other context, it
|
||||
* must be included here.
|
||||
*
|
||||
* 21:20 g GOB Height and Page Kind Generation. The height of a GOB changed
|
||||
* starting with Fermi GPUs. Additionally, the mapping between page
|
||||
* kind and bit layout has changed at various points.
|
||||
*
|
||||
* 0 = Gob Height 8, Fermi - Volta, Tegra K1+ Page Kind mapping
|
||||
* 1 = Gob Height 4, G80 - GT2XX Page Kind mapping
|
||||
* 2 = Gob Height 8, Turing+ Page Kind mapping
|
||||
* 3 = Reserved for future use.
|
||||
*
|
||||
* 22:22 s Sector layout. On Tegra GPUs prior to Xavier, there is a further
|
||||
* bit remapping step that occurs at an even lower level than the
|
||||
* page kind and block linear swizzles. This causes the layout of
|
||||
* surfaces mapped in those SOC's GPUs to be incompatible with the
|
||||
* equivalent mapping on other GPUs in the same system.
|
||||
*
|
||||
* 0 = Tegra K1 - Tegra Parker/TX2 Layout.
|
||||
* 1 = Desktop GPU and Tegra Xavier+ Layout
|
||||
*
|
||||
* 25:23 c Lossless Framebuffer Compression type.
|
||||
*
|
||||
* 0 = none
|
||||
* 1 = ROP/3D, layout 1, exact compression format implied by Page
|
||||
* Kind field
|
||||
* 2 = ROP/3D, layout 2, exact compression format implied by Page
|
||||
* Kind field
|
||||
* 3 = CDE horizontal
|
||||
* 4 = CDE vertical
|
||||
* 5 = Reserved for future use
|
||||
* 6 = Reserved for future use
|
||||
* 7 = Reserved for future use
|
||||
*
|
||||
* 55:25 - Reserved for future use. Must be zero.
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(c, s, g, k, h) \
|
||||
fourcc_mod_code(NVIDIA, (0x10 | \
|
||||
((h) & 0xf) | \
|
||||
(((k) & 0xff) << 12) | \
|
||||
(((g) & 0x3) << 20) | \
|
||||
(((s) & 0x1) << 22) | \
|
||||
(((c) & 0x7) << 23)))
|
||||
|
||||
/* To grandfather in prior block linear format modifiers to the above layout,
|
||||
* the page kind "0", which corresponds to "pitch/linear" and hence is unusable
|
||||
* with block-linear layouts, is remapped within drivers to the value 0xfe,
|
||||
* which corresponds to the "generic" kind used for simple single-sample
|
||||
* uncompressed color formats on Fermi - Volta GPUs.
|
||||
*/
|
||||
static __inline__ __u64
|
||||
drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
|
||||
{
|
||||
if (!(modifier & 0x10) || (modifier & (0xff << 12)))
|
||||
return modifier;
|
||||
else
|
||||
return modifier | (0xfe << 12);
|
||||
}
|
||||
|
||||
/*
|
||||
* 16Bx2 Block Linear layout, used by Tegra K1 and later
|
||||
*
|
||||
* Pixels are arranged in 64x8 Groups Of Bytes (GOBs). GOBs are then stacked
|
||||
* vertically by a power of 2 (1 to 32 GOBs) to form a block.
|
||||
|
@ -518,20 +702,20 @@ extern "C" {
|
|||
* in full detail.
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(v) \
|
||||
fourcc_mod_code(NVIDIA, 0x10 | ((v) & 0xf))
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 0, 0, 0, (v))
|
||||
|
||||
#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_ONE_GOB \
|
||||
fourcc_mod_code(NVIDIA, 0x10)
|
||||
DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(0)
|
||||
#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_TWO_GOB \
|
||||
fourcc_mod_code(NVIDIA, 0x11)
|
||||
DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(1)
|
||||
#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_FOUR_GOB \
|
||||
fourcc_mod_code(NVIDIA, 0x12)
|
||||
DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(2)
|
||||
#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_EIGHT_GOB \
|
||||
fourcc_mod_code(NVIDIA, 0x13)
|
||||
DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(3)
|
||||
#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_SIXTEEN_GOB \
|
||||
fourcc_mod_code(NVIDIA, 0x14)
|
||||
DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(4)
|
||||
#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_THIRTYTWO_GOB \
|
||||
fourcc_mod_code(NVIDIA, 0x15)
|
||||
DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(5)
|
||||
|
||||
/*
|
||||
* Some Broadcom modifiers take parameters, for example the number of
|
||||
|
@ -648,7 +832,21 @@ extern "C" {
|
|||
* Further information on the use of AFBC modifiers can be found in
|
||||
* Documentation/gpu/afbc.rst
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_ARM_AFBC(__afbc_mode) fourcc_mod_code(ARM, __afbc_mode)
|
||||
|
||||
/*
|
||||
* The top 4 bits (out of the 56 bits alloted for specifying vendor specific
|
||||
* modifiers) denote the category for modifiers. Currently we have only two
|
||||
* categories of modifiers ie AFBC and MISC. We can have a maximum of sixteen
|
||||
* different categories.
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_ARM_CODE(__type, __val) \
|
||||
fourcc_mod_code(ARM, ((__u64)(__type) << 52) | ((__val) & 0x000fffffffffffffULL))
|
||||
|
||||
#define DRM_FORMAT_MOD_ARM_TYPE_AFBC 0x00
|
||||
#define DRM_FORMAT_MOD_ARM_TYPE_MISC 0x01
|
||||
|
||||
#define DRM_FORMAT_MOD_ARM_AFBC(__afbc_mode) \
|
||||
DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_AFBC, __afbc_mode)
|
||||
|
||||
/*
|
||||
* AFBC superblock size
|
||||
|
@ -742,6 +940,28 @@ extern "C" {
|
|||
*/
|
||||
#define AFBC_FORMAT_MOD_BCH (1ULL << 11)
|
||||
|
||||
/* AFBC uncompressed storage mode
|
||||
*
|
||||
* Indicates that the buffer is using AFBC uncompressed storage mode.
|
||||
* In this mode all superblock payloads in the buffer use the uncompressed
|
||||
* storage mode, which is usually only used for data which cannot be compressed.
|
||||
* The buffer layout is the same as for AFBC buffers without USM set, this only
|
||||
* affects the storage mode of the individual superblocks. Note that even a
|
||||
* buffer without USM set may use uncompressed storage mode for some or all
|
||||
* superblocks, USM just guarantees it for all.
|
||||
*/
|
||||
#define AFBC_FORMAT_MOD_USM (1ULL << 12)
|
||||
|
||||
/*
|
||||
* Arm 16x16 Block U-Interleaved modifier
|
||||
*
|
||||
* This is used by Arm Mali Utgard and Midgard GPUs. It divides the image
|
||||
* into 16x16 pixel blocks. Blocks are stored linearly in order, but pixels
|
||||
* in the block are reordered.
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED \
|
||||
DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 1ULL)
|
||||
|
||||
/*
|
||||
* Allwinner tiled modifier
|
||||
*
|
||||
|
@ -756,6 +976,86 @@ extern "C" {
|
|||
*/
|
||||
#define DRM_FORMAT_MOD_ALLWINNER_TILED fourcc_mod_code(ALLWINNER, 1)
|
||||
|
||||
/*
|
||||
* Amlogic Video Framebuffer Compression modifiers
|
||||
*
|
||||
* Amlogic uses a proprietary lossless image compression protocol and format
|
||||
* for their hardware video codec accelerators, either video decoders or
|
||||
* video input encoders.
|
||||
*
|
||||
* It considerably reduces memory bandwidth while writing and reading
|
||||
* frames in memory.
|
||||
*
|
||||
* The underlying storage is considered to be 3 components, 8bit or 10-bit
|
||||
* per component YCbCr 420, single plane :
|
||||
* - DRM_FORMAT_YUV420_8BIT
|
||||
* - DRM_FORMAT_YUV420_10BIT
|
||||
*
|
||||
* The first 8 bits of the mode defines the layout, then the following 8 bits
|
||||
* defines the options changing the layout.
|
||||
*
|
||||
* Not all combinations are valid, and different SoCs may support different
|
||||
* combinations of layout and options.
|
||||
*/
|
||||
#define __fourcc_mod_amlogic_layout_mask 0xf
|
||||
#define __fourcc_mod_amlogic_options_shift 8
|
||||
#define __fourcc_mod_amlogic_options_mask 0xf
|
||||
|
||||
#define DRM_FORMAT_MOD_AMLOGIC_FBC(__layout, __options) \
|
||||
fourcc_mod_code(AMLOGIC, \
|
||||
((__layout) & __fourcc_mod_amlogic_layout_mask) | \
|
||||
(((__options) & __fourcc_mod_amlogic_options_mask) \
|
||||
<< __fourcc_mod_amlogic_options_shift))
|
||||
|
||||
/* Amlogic FBC Layouts */
|
||||
|
||||
/*
|
||||
* Amlogic FBC Basic Layout
|
||||
*
|
||||
* The basic layout is composed of:
|
||||
* - a body content organized in 64x32 superblocks with 4096 bytes per
|
||||
* superblock in default mode.
|
||||
* - a 32 bytes per 128x64 header block
|
||||
*
|
||||
* This layout is transferrable between Amlogic SoCs supporting this modifier.
|
||||
*/
|
||||
#define AMLOGIC_FBC_LAYOUT_BASIC (1ULL)
|
||||
|
||||
/*
|
||||
* Amlogic FBC Scatter Memory layout
|
||||
*
|
||||
* Indicates the header contains IOMMU references to the compressed
|
||||
* frames content to optimize memory access and layout.
|
||||
*
|
||||
* In this mode, only the header memory address is needed, thus the
|
||||
* content memory organization is tied to the current producer
|
||||
* execution and cannot be saved/dumped neither transferrable between
|
||||
* Amlogic SoCs supporting this modifier.
|
||||
*
|
||||
* Due to the nature of the layout, these buffers are not expected to
|
||||
* be accessible by the user-space clients, but only accessible by the
|
||||
* hardware producers and consumers.
|
||||
*
|
||||
* The user-space clients should expect a failure while trying to mmap
|
||||
* the DMA-BUF handle returned by the producer.
|
||||
*/
|
||||
#define AMLOGIC_FBC_LAYOUT_SCATTER (2ULL)
|
||||
|
||||
/* Amlogic FBC Layout Options Bit Mask */
|
||||
|
||||
/*
|
||||
* Amlogic FBC Memory Saving mode
|
||||
*
|
||||
* Indicates the storage is packed when pixel size is multiple of word
|
||||
* boudaries, i.e. 8bit should be stored in this mode to save allocation
|
||||
* memory.
|
||||
*
|
||||
* This mode reduces body layout to 3072 bytes per 64x32 superblock with
|
||||
* the basic layout and 3200 bytes per 64x32 superblock combined with
|
||||
* the scatter layout.
|
||||
*/
|
||||
#define AMLOGIC_FBC_OPTION_MEM_SAVING (1ULL << 0)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -332,14 +332,19 @@ struct drm_mode_get_encoder {
|
|||
/* This is for connectors with multiple signal types. */
|
||||
/* Try to match DRM_MODE_CONNECTOR_X as closely as possible. */
|
||||
enum drm_mode_subconnector {
|
||||
DRM_MODE_SUBCONNECTOR_Automatic = 0,
|
||||
DRM_MODE_SUBCONNECTOR_Unknown = 0,
|
||||
DRM_MODE_SUBCONNECTOR_DVID = 3,
|
||||
DRM_MODE_SUBCONNECTOR_DVIA = 4,
|
||||
DRM_MODE_SUBCONNECTOR_Composite = 5,
|
||||
DRM_MODE_SUBCONNECTOR_SVIDEO = 6,
|
||||
DRM_MODE_SUBCONNECTOR_Component = 8,
|
||||
DRM_MODE_SUBCONNECTOR_SCART = 9,
|
||||
DRM_MODE_SUBCONNECTOR_Automatic = 0, /* DVI-I, TV */
|
||||
DRM_MODE_SUBCONNECTOR_Unknown = 0, /* DVI-I, TV, DP */
|
||||
DRM_MODE_SUBCONNECTOR_VGA = 1, /* DP */
|
||||
DRM_MODE_SUBCONNECTOR_DVID = 3, /* DVI-I DP */
|
||||
DRM_MODE_SUBCONNECTOR_DVIA = 4, /* DVI-I */
|
||||
DRM_MODE_SUBCONNECTOR_Composite = 5, /* TV */
|
||||
DRM_MODE_SUBCONNECTOR_SVIDEO = 6, /* TV */
|
||||
DRM_MODE_SUBCONNECTOR_Component = 8, /* TV */
|
||||
DRM_MODE_SUBCONNECTOR_SCART = 9, /* TV */
|
||||
DRM_MODE_SUBCONNECTOR_DisplayPort = 10, /* DP */
|
||||
DRM_MODE_SUBCONNECTOR_HDMIA = 11, /* DP */
|
||||
DRM_MODE_SUBCONNECTOR_Native = 15, /* DP */
|
||||
DRM_MODE_SUBCONNECTOR_Wireless = 18, /* DP */
|
||||
};
|
||||
|
||||
#define DRM_MODE_CONNECTOR_Unknown 0
|
||||
|
@ -497,7 +502,7 @@ struct drm_mode_fb_cmd2 {
|
|||
* In case of planar formats, this ioctl allows up to 4
|
||||
* buffer objects with offsets and pitches per plane.
|
||||
* The pitch and offset order is dictated by the fourcc,
|
||||
* e.g. NV12 (http://fourcc.org/yuv.php#NV12) is described as:
|
||||
* e.g. NV12 (https://fourcc.org/yuv.php#NV12) is described as:
|
||||
*
|
||||
* YUV 4:2:0 image with a plane of 8 bit Y samples
|
||||
* followed by an interleaved U/V plane containing
|
||||
|
|
|
@ -68,7 +68,7 @@ struct drm_exynos_gem_info {
|
|||
/**
|
||||
* A structure for user connection request of virtual display.
|
||||
*
|
||||
* @connection: indicate whether doing connetion or not by user.
|
||||
* @connection: indicate whether doing connection or not by user.
|
||||
* @extensions: if this value is 1 then the vidi driver would need additional
|
||||
* 128bytes edid data.
|
||||
* @edid: the edid data pointer from user side.
|
||||
|
@ -394,7 +394,7 @@ struct drm_exynos_ioctl_ipp_commit {
|
|||
#define DRM_IOCTL_EXYNOS_IPP_COMMIT DRM_IOWR(DRM_COMMAND_BASE + \
|
||||
DRM_EXYNOS_IPP_COMMIT, struct drm_exynos_ioctl_ipp_commit)
|
||||
|
||||
/* EXYNOS specific events */
|
||||
/* Exynos specific events */
|
||||
#define DRM_EXYNOS_G2D_EVENT 0x80000000
|
||||
#define DRM_EXYNOS_IPP_EVENT 0x80000002
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ extern "C" {
|
|||
* cause the related events to not be seen.
|
||||
*
|
||||
* I915_RESET_UEVENT - Event is generated just before an attempt to reset the
|
||||
* the GPU. The value supplied with the event is always 1. NOTE: Disable
|
||||
* GPU. The value supplied with the event is always 1. NOTE: Disable
|
||||
* reset via module parameter will cause this event to not be seen.
|
||||
*/
|
||||
#define I915_L3_PARITY_UEVENT "L3_PARITY_ERROR"
|
||||
|
@ -395,6 +395,7 @@ typedef struct _drm_i915_sarea {
|
|||
#define DRM_IOCTL_I915_GEM_PWRITE DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_PWRITE, struct drm_i915_gem_pwrite)
|
||||
#define DRM_IOCTL_I915_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP, struct drm_i915_gem_mmap)
|
||||
#define DRM_IOCTL_I915_GEM_MMAP_GTT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP_GTT, struct drm_i915_gem_mmap_gtt)
|
||||
#define DRM_IOCTL_I915_GEM_MMAP_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP_GTT, struct drm_i915_gem_mmap_offset)
|
||||
#define DRM_IOCTL_I915_GEM_SET_DOMAIN DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_SET_DOMAIN, struct drm_i915_gem_set_domain)
|
||||
#define DRM_IOCTL_I915_GEM_SW_FINISH DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_SW_FINISH, struct drm_i915_gem_sw_finish)
|
||||
#define DRM_IOCTL_I915_GEM_SET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_SET_TILING, struct drm_i915_gem_set_tiling)
|
||||
|
@ -611,6 +612,19 @@ typedef struct drm_i915_irq_wait {
|
|||
* See I915_EXEC_FENCE_OUT and I915_EXEC_FENCE_SUBMIT.
|
||||
*/
|
||||
#define I915_PARAM_HAS_EXEC_SUBMIT_FENCE 53
|
||||
|
||||
/*
|
||||
* Revision of the i915-perf uAPI. The value returned helps determine what
|
||||
* i915-perf features are available. See drm_i915_perf_property_id.
|
||||
*/
|
||||
#define I915_PARAM_PERF_REVISION 54
|
||||
|
||||
/* Query whether DRM_I915_GEM_EXECBUFFER2 supports supplying an array of
|
||||
* timeline syncobj through drm_i915_gem_execbuffer_ext_timeline_fences. See
|
||||
* I915_EXEC_USE_EXTENSIONS.
|
||||
*/
|
||||
#define I915_PARAM_HAS_EXEC_TIMELINE_FENCES 55
|
||||
|
||||
/* Must be kept compact -- no holes and well documented */
|
||||
|
||||
typedef struct drm_i915_getparam {
|
||||
|
@ -786,6 +800,37 @@ struct drm_i915_gem_mmap_gtt {
|
|||
__u64 offset;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_mmap_offset {
|
||||
/** Handle for the object being mapped. */
|
||||
__u32 handle;
|
||||
__u32 pad;
|
||||
/**
|
||||
* Fake offset to use for subsequent mmap call
|
||||
*
|
||||
* This is a fixed-size type for 32/64 compatibility.
|
||||
*/
|
||||
__u64 offset;
|
||||
|
||||
/**
|
||||
* Flags for extended behaviour.
|
||||
*
|
||||
* It is mandatory that one of the MMAP_OFFSET types
|
||||
* (GTT, WC, WB, UC, etc) should be included.
|
||||
*/
|
||||
__u64 flags;
|
||||
#define I915_MMAP_OFFSET_GTT 0
|
||||
#define I915_MMAP_OFFSET_WC 1
|
||||
#define I915_MMAP_OFFSET_WB 2
|
||||
#define I915_MMAP_OFFSET_UC 3
|
||||
|
||||
/*
|
||||
* Zero-terminated chain of extensions.
|
||||
*
|
||||
* No current extensions defined; mbz.
|
||||
*/
|
||||
__u64 extensions;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_set_domain {
|
||||
/** Handle for the object */
|
||||
__u32 handle;
|
||||
|
@ -1007,6 +1052,38 @@ struct drm_i915_gem_exec_fence {
|
|||
__u32 flags;
|
||||
};
|
||||
|
||||
/**
|
||||
* See drm_i915_gem_execbuffer_ext_timeline_fences.
|
||||
*/
|
||||
#define DRM_I915_GEM_EXECBUFFER_EXT_TIMELINE_FENCES 0
|
||||
|
||||
/**
|
||||
* This structure describes an array of drm_syncobj and associated points for
|
||||
* timeline variants of drm_syncobj. It is invalid to append this structure to
|
||||
* the execbuf if I915_EXEC_FENCE_ARRAY is set.
|
||||
*/
|
||||
struct drm_i915_gem_execbuffer_ext_timeline_fences {
|
||||
struct i915_user_extension base;
|
||||
|
||||
/**
|
||||
* Number of element in the handles_ptr & value_ptr arrays.
|
||||
*/
|
||||
__u64 fence_count;
|
||||
|
||||
/**
|
||||
* Pointer to an array of struct drm_i915_gem_exec_fence of length
|
||||
* fence_count.
|
||||
*/
|
||||
__u64 handles_ptr;
|
||||
|
||||
/**
|
||||
* Pointer to an array of u64 values of length fence_count. Values
|
||||
* must be 0 for a binary drm_syncobj. A Value of 0 for a timeline
|
||||
* drm_syncobj is invalid as it turns a drm_syncobj into a binary one.
|
||||
*/
|
||||
__u64 values_ptr;
|
||||
};
|
||||
|
||||
struct drm_i915_gem_execbuffer2 {
|
||||
/**
|
||||
* List of gem_exec_object2 structs
|
||||
|
@ -1023,8 +1100,14 @@ struct drm_i915_gem_execbuffer2 {
|
|||
__u32 num_cliprects;
|
||||
/**
|
||||
* This is a struct drm_clip_rect *cliprects if I915_EXEC_FENCE_ARRAY
|
||||
* is not set. If I915_EXEC_FENCE_ARRAY is set, then this is a
|
||||
* struct drm_i915_gem_exec_fence *fences.
|
||||
* & I915_EXEC_USE_EXTENSIONS are not set.
|
||||
*
|
||||
* If I915_EXEC_FENCE_ARRAY is set, then this is a pointer to an array
|
||||
* of struct drm_i915_gem_exec_fence and num_cliprects is the length
|
||||
* of the array.
|
||||
*
|
||||
* If I915_EXEC_USE_EXTENSIONS is set, then this is a pointer to a
|
||||
* single struct i915_user_extension and num_cliprects is 0.
|
||||
*/
|
||||
__u64 cliprects_ptr;
|
||||
#define I915_EXEC_RING_MASK (0x3f)
|
||||
|
@ -1142,7 +1225,16 @@ struct drm_i915_gem_execbuffer2 {
|
|||
*/
|
||||
#define I915_EXEC_FENCE_SUBMIT (1 << 20)
|
||||
|
||||
#define __I915_EXEC_UNKNOWN_FLAGS (-(I915_EXEC_FENCE_SUBMIT << 1))
|
||||
/*
|
||||
* Setting I915_EXEC_USE_EXTENSIONS implies that
|
||||
* drm_i915_gem_execbuffer2.cliprects_ptr is treated as a pointer to an linked
|
||||
* list of i915_user_extension. Each i915_user_extension node is the base of a
|
||||
* larger structure. The list of supported structures are listed in the
|
||||
* drm_i915_gem_execbuffer_ext enum.
|
||||
*/
|
||||
#define I915_EXEC_USE_EXTENSIONS (1 << 21)
|
||||
|
||||
#define __I915_EXEC_UNKNOWN_FLAGS (-(I915_EXEC_USE_EXTENSIONS << 1))
|
||||
|
||||
#define I915_EXEC_CONTEXT_ID_MASK (0xffffffff)
|
||||
#define i915_execbuffer2_set_context_id(eb2, context) \
|
||||
|
@ -1565,6 +1657,42 @@ struct drm_i915_gem_context_param {
|
|||
* i915_context_engines_bond (I915_CONTEXT_ENGINES_EXT_BOND)
|
||||
*/
|
||||
#define I915_CONTEXT_PARAM_ENGINES 0xa
|
||||
|
||||
/*
|
||||
* I915_CONTEXT_PARAM_PERSISTENCE:
|
||||
*
|
||||
* Allow the context and active rendering to survive the process until
|
||||
* completion. Persistence allows fire-and-forget clients to queue up a
|
||||
* bunch of work, hand the output over to a display server and then quit.
|
||||
* If the context is marked as not persistent, upon closing (either via
|
||||
* an explicit DRM_I915_GEM_CONTEXT_DESTROY or implicitly from file closure
|
||||
* or process termination), the context and any outstanding requests will be
|
||||
* cancelled (and exported fences for cancelled requests marked as -EIO).
|
||||
*
|
||||
* By default, new contexts allow persistence.
|
||||
*/
|
||||
#define I915_CONTEXT_PARAM_PERSISTENCE 0xb
|
||||
|
||||
/*
|
||||
* I915_CONTEXT_PARAM_RINGSIZE:
|
||||
*
|
||||
* Sets the size of the CS ringbuffer to use for logical ring contexts. This
|
||||
* applies a limit of how many batches can be queued to HW before the caller
|
||||
* is blocked due to lack of space for more commands.
|
||||
*
|
||||
* Only reliably possible to be set prior to first use, i.e. during
|
||||
* construction. At any later point, the current execution must be flushed as
|
||||
* the ring can only be changed while the context is idle. Note, the ringsize
|
||||
* can be specified as a constructor property, see
|
||||
* I915_CONTEXT_CREATE_EXT_SETPARAM, but can also be set later if required.
|
||||
*
|
||||
* Only applies to the current set of engine and lost when those engines
|
||||
* are replaced by a new mapping (see I915_CONTEXT_PARAM_ENGINES).
|
||||
*
|
||||
* Must be between 4 - 512 KiB, in intervals of page size [4 KiB].
|
||||
* Default is 16 KiB.
|
||||
*/
|
||||
#define I915_CONTEXT_PARAM_RINGSIZE 0xc
|
||||
/* Must be kept compact -- no holes and well documented */
|
||||
|
||||
__u64 value;
|
||||
|
@ -1844,23 +1972,31 @@ enum drm_i915_perf_property_id {
|
|||
* Open the stream for a specific context handle (as used with
|
||||
* execbuffer2). A stream opened for a specific context this way
|
||||
* won't typically require root privileges.
|
||||
*
|
||||
* This property is available in perf revision 1.
|
||||
*/
|
||||
DRM_I915_PERF_PROP_CTX_HANDLE = 1,
|
||||
|
||||
/**
|
||||
* A value of 1 requests the inclusion of raw OA unit reports as
|
||||
* part of stream samples.
|
||||
*
|
||||
* This property is available in perf revision 1.
|
||||
*/
|
||||
DRM_I915_PERF_PROP_SAMPLE_OA,
|
||||
|
||||
/**
|
||||
* The value specifies which set of OA unit metrics should be
|
||||
* be configured, defining the contents of any OA unit reports.
|
||||
* configured, defining the contents of any OA unit reports.
|
||||
*
|
||||
* This property is available in perf revision 1.
|
||||
*/
|
||||
DRM_I915_PERF_PROP_OA_METRICS_SET,
|
||||
|
||||
/**
|
||||
* The value specifies the size and layout of OA unit reports.
|
||||
*
|
||||
* This property is available in perf revision 1.
|
||||
*/
|
||||
DRM_I915_PERF_PROP_OA_FORMAT,
|
||||
|
||||
|
@ -1870,9 +2006,46 @@ enum drm_i915_perf_property_id {
|
|||
* from this exponent as follows:
|
||||
*
|
||||
* 80ns * 2^(period_exponent + 1)
|
||||
*
|
||||
* This property is available in perf revision 1.
|
||||
*/
|
||||
DRM_I915_PERF_PROP_OA_EXPONENT,
|
||||
|
||||
/**
|
||||
* Specifying this property is only valid when specify a context to
|
||||
* filter with DRM_I915_PERF_PROP_CTX_HANDLE. Specifying this property
|
||||
* will hold preemption of the particular context we want to gather
|
||||
* performance data about. The execbuf2 submissions must include a
|
||||
* drm_i915_gem_execbuffer_ext_perf parameter for this to apply.
|
||||
*
|
||||
* This property is available in perf revision 3.
|
||||
*/
|
||||
DRM_I915_PERF_PROP_HOLD_PREEMPTION,
|
||||
|
||||
/**
|
||||
* Specifying this pins all contexts to the specified SSEU power
|
||||
* configuration for the duration of the recording.
|
||||
*
|
||||
* This parameter's value is a pointer to a struct
|
||||
* drm_i915_gem_context_param_sseu.
|
||||
*
|
||||
* This property is available in perf revision 4.
|
||||
*/
|
||||
DRM_I915_PERF_PROP_GLOBAL_SSEU,
|
||||
|
||||
/**
|
||||
* This optional parameter specifies the timer interval in nanoseconds
|
||||
* at which the i915 driver will check the OA buffer for available data.
|
||||
* Minimum allowed value is 100 microseconds. A default value is used by
|
||||
* the driver if this parameter is not specified. Note that larger timer
|
||||
* values will reduce cpu consumption during OA perf captures. However,
|
||||
* excessively large values would potentially result in OA buffer
|
||||
* overwrites as captures reach end of the OA buffer.
|
||||
*
|
||||
* This property is available in perf revision 5.
|
||||
*/
|
||||
DRM_I915_PERF_PROP_POLL_OA_PERIOD,
|
||||
|
||||
DRM_I915_PERF_PROP_MAX /* non-ABI */
|
||||
};
|
||||
|
||||
|
@ -1901,6 +2074,8 @@ struct drm_i915_perf_open_param {
|
|||
* to close and re-open a stream with the same configuration.
|
||||
*
|
||||
* It's undefined whether any pending data for the stream will be lost.
|
||||
*
|
||||
* This ioctl is available in perf revision 1.
|
||||
*/
|
||||
#define I915_PERF_IOCTL_ENABLE _IO('i', 0x0)
|
||||
|
||||
|
@ -1908,9 +2083,24 @@ struct drm_i915_perf_open_param {
|
|||
* Disable data capture for a stream.
|
||||
*
|
||||
* It is an error to try and read a stream that is disabled.
|
||||
*
|
||||
* This ioctl is available in perf revision 1.
|
||||
*/
|
||||
#define I915_PERF_IOCTL_DISABLE _IO('i', 0x1)
|
||||
|
||||
/**
|
||||
* Change metrics_set captured by a stream.
|
||||
*
|
||||
* If the stream is bound to a specific context, the configuration change
|
||||
* will performed __inline__ with that context such that it takes effect before
|
||||
* the next execbuf submission.
|
||||
*
|
||||
* Returns the previously bound metrics set id, or a negative error code.
|
||||
*
|
||||
* This ioctl is available in perf revision 2.
|
||||
*/
|
||||
#define I915_PERF_IOCTL_CONFIG _IO('i', 0x2)
|
||||
|
||||
/**
|
||||
* Common to all i915 perf records
|
||||
*/
|
||||
|
@ -1984,6 +2174,7 @@ struct drm_i915_query_item {
|
|||
__u64 query_id;
|
||||
#define DRM_I915_QUERY_TOPOLOGY_INFO 1
|
||||
#define DRM_I915_QUERY_ENGINE_INFO 2
|
||||
#define DRM_I915_QUERY_PERF_CONFIG 3
|
||||
/* Must be kept compact -- no holes and well documented */
|
||||
|
||||
/*
|
||||
|
@ -1995,9 +2186,18 @@ struct drm_i915_query_item {
|
|||
__s32 length;
|
||||
|
||||
/*
|
||||
* Unused for now. Must be cleared to zero.
|
||||
* When query_id == DRM_I915_QUERY_TOPOLOGY_INFO, must be 0.
|
||||
*
|
||||
* When query_id == DRM_I915_QUERY_PERF_CONFIG, must be one of the
|
||||
* following :
|
||||
* - DRM_I915_QUERY_PERF_CONFIG_LIST
|
||||
* - DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID
|
||||
* - DRM_I915_QUERY_PERF_CONFIG_FOR_UUID
|
||||
*/
|
||||
__u32 flags;
|
||||
#define DRM_I915_QUERY_PERF_CONFIG_LIST 1
|
||||
#define DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID 2
|
||||
#define DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_ID 3
|
||||
|
||||
/*
|
||||
* Data will be written at the location pointed by data_ptr when the
|
||||
|
@ -2033,8 +2233,10 @@ struct drm_i915_query {
|
|||
* (data[X / 8] >> (X % 8)) & 1
|
||||
*
|
||||
* - the subslice mask for each slice with one bit per subslice telling
|
||||
* whether a subslice is available. The availability of subslice Y in slice
|
||||
* X can be queried with the following formula :
|
||||
* whether a subslice is available. Gen12 has dual-subslices, which are
|
||||
* similar to two gen11 subslices. For gen12, this array represents dual-
|
||||
* subslices. The availability of subslice Y in slice X can be queried
|
||||
* with the following formula :
|
||||
*
|
||||
* (data[subslice_offset +
|
||||
* X * subslice_stride +
|
||||
|
@ -2123,6 +2325,56 @@ struct drm_i915_query_engine_info {
|
|||
struct drm_i915_engine_info engines[];
|
||||
};
|
||||
|
||||
/*
|
||||
* Data written by the kernel with query DRM_I915_QUERY_PERF_CONFIG.
|
||||
*/
|
||||
struct drm_i915_query_perf_config {
|
||||
union {
|
||||
/*
|
||||
* When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_LIST, i915 sets
|
||||
* this fields to the number of configurations available.
|
||||
*/
|
||||
__u64 n_configs;
|
||||
|
||||
/*
|
||||
* When query_id == DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_ID,
|
||||
* i915 will use the value in this field as configuration
|
||||
* identifier to decide what data to write into config_ptr.
|
||||
*/
|
||||
__u64 config;
|
||||
|
||||
/*
|
||||
* When query_id == DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID,
|
||||
* i915 will use the value in this field as configuration
|
||||
* identifier to decide what data to write into config_ptr.
|
||||
*
|
||||
* String formatted like "%08x-%04x-%04x-%04x-%012x"
|
||||
*/
|
||||
char uuid[36];
|
||||
};
|
||||
|
||||
/*
|
||||
* Unused for now. Must be cleared to zero.
|
||||
*/
|
||||
__u32 flags;
|
||||
|
||||
/*
|
||||
* When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_LIST, i915 will
|
||||
* write an array of __u64 of configuration identifiers.
|
||||
*
|
||||
* When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_DATA, i915 will
|
||||
* write a struct drm_i915_perf_oa_config. If the following fields of
|
||||
* drm_i915_perf_oa_config are set not set to 0, i915 will write into
|
||||
* the associated pointers the values of submitted when the
|
||||
* configuration was created :
|
||||
*
|
||||
* - n_mux_regs
|
||||
* - n_boolean_regs
|
||||
* - n_flex_regs
|
||||
*/
|
||||
__u8 data[];
|
||||
};
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -32,12 +32,19 @@ struct drm_lima_get_param {
|
|||
__u64 value; /* out, parameter value */
|
||||
};
|
||||
|
||||
/*
|
||||
* heap buffer dynamically increase backup memory size when GP task fail
|
||||
* due to lack of heap memory. size field of heap buffer is an up bound of
|
||||
* the backup memory which can be set to a fairly large value.
|
||||
*/
|
||||
#define LIMA_BO_FLAG_HEAP (1 << 0)
|
||||
|
||||
/**
|
||||
* create a buffer for used by GPU
|
||||
*/
|
||||
struct drm_lima_gem_create {
|
||||
__u32 size; /* in, buffer size */
|
||||
__u32 flags; /* in, currently no flags, must be zero */
|
||||
__u32 flags; /* in, buffer flags */
|
||||
__u32 handle; /* out, GEM buffer handle */
|
||||
__u32 pad; /* pad, must be zero */
|
||||
};
|
||||
|
|
|
@ -217,13 +217,28 @@ struct drm_msm_gem_submit_bo {
|
|||
#define MSM_SUBMIT_FENCE_FD_IN 0x40000000 /* enable input fence_fd */
|
||||
#define MSM_SUBMIT_FENCE_FD_OUT 0x20000000 /* enable output fence_fd */
|
||||
#define MSM_SUBMIT_SUDO 0x10000000 /* run submitted cmds from RB */
|
||||
#define MSM_SUBMIT_SYNCOBJ_IN 0x08000000 /* enable input syncobj */
|
||||
#define MSM_SUBMIT_SYNCOBJ_OUT 0x04000000 /* enable output syncobj */
|
||||
#define MSM_SUBMIT_FLAGS ( \
|
||||
MSM_SUBMIT_NO_IMPLICIT | \
|
||||
MSM_SUBMIT_FENCE_FD_IN | \
|
||||
MSM_SUBMIT_FENCE_FD_OUT | \
|
||||
MSM_SUBMIT_SUDO | \
|
||||
MSM_SUBMIT_SYNCOBJ_IN | \
|
||||
MSM_SUBMIT_SYNCOBJ_OUT | \
|
||||
0)
|
||||
|
||||
#define MSM_SUBMIT_SYNCOBJ_RESET 0x00000001 /* Reset syncobj after wait. */
|
||||
#define MSM_SUBMIT_SYNCOBJ_FLAGS ( \
|
||||
MSM_SUBMIT_SYNCOBJ_RESET | \
|
||||
0)
|
||||
|
||||
struct drm_msm_gem_submit_syncobj {
|
||||
__u32 handle; /* in, syncobj handle. */
|
||||
__u32 flags; /* in, from MSM_SUBMIT_SYNCOBJ_FLAGS */
|
||||
__u64 point; /* in, timepoint for timeline syncobjs. */
|
||||
};
|
||||
|
||||
/* Each cmdstream submit consists of a table of buffers involved, and
|
||||
* one or more cmdstream buffers. This allows for conditional execution
|
||||
* (context-restore), and IB buffers needed for per tile/bin draw cmds.
|
||||
|
@ -236,7 +251,14 @@ struct drm_msm_gem_submit {
|
|||
__u64 bos; /* in, ptr to array of submit_bo's */
|
||||
__u64 cmds; /* in, ptr to array of submit_cmd's */
|
||||
__s32 fence_fd; /* in/out fence fd (see MSM_SUBMIT_FENCE_FD_IN/OUT) */
|
||||
__u32 queueid; /* in, submitqueue id */
|
||||
__u32 queueid; /* in, submitqueue id */
|
||||
__u64 in_syncobjs; /* in, ptr to array of drm_msm_gem_submit_syncobj */
|
||||
__u64 out_syncobjs; /* in, ptr to array of drm_msm_gem_submit_syncobj */
|
||||
__u32 nr_in_syncobjs; /* in, number of entries in in_syncobj */
|
||||
__u32 nr_out_syncobjs; /* in, number of entries in out_syncobj. */
|
||||
__u32 syncobj_stride; /* in, stride of syncobj arrays. */
|
||||
__u32 pad; /*in, reserved for future use, always 0. */
|
||||
|
||||
};
|
||||
|
||||
/* The normal way to synchronize with the GPU is just to CPU_PREP on
|
||||
|
|
|
@ -110,6 +110,7 @@ struct drm_nouveau_gem_pushbuf {
|
|||
__u64 push;
|
||||
__u32 suffix0;
|
||||
__u32 suffix1;
|
||||
#define NOUVEAU_GEM_PUSHBUF_SYNC (1ULL << 0)
|
||||
__u64 vram_available;
|
||||
__u64 gart_available;
|
||||
};
|
||||
|
|
|
@ -38,20 +38,20 @@ struct drm_omap_param {
|
|||
__u64 value; /* in (set_param), out (get_param) */
|
||||
};
|
||||
|
||||
#define OMAP_BO_SCANOUT 0x00000001 /* scanout capable (phys contiguous) */
|
||||
#define OMAP_BO_CACHE_MASK 0x00000006 /* cache type mask, see cache modes */
|
||||
#define OMAP_BO_TILED_MASK 0x00000f00 /* tiled mapping mask, see tiled modes */
|
||||
/* Scanout buffer, consumable by DSS */
|
||||
#define OMAP_BO_SCANOUT 0x00000001
|
||||
|
||||
/* cache modes */
|
||||
#define OMAP_BO_CACHED 0x00000000 /* default */
|
||||
#define OMAP_BO_WC 0x00000002 /* write-combine */
|
||||
#define OMAP_BO_UNCACHED 0x00000004 /* strongly-ordered (uncached) */
|
||||
/* Buffer CPU caching mode: cached, write-combining or uncached. */
|
||||
#define OMAP_BO_CACHED 0x00000000
|
||||
#define OMAP_BO_WC 0x00000002
|
||||
#define OMAP_BO_UNCACHED 0x00000004
|
||||
#define OMAP_BO_CACHE_MASK 0x00000006
|
||||
|
||||
/* tiled modes */
|
||||
/* Use TILER for the buffer. The TILER container unit can be 8, 16 or 32 bits. */
|
||||
#define OMAP_BO_TILED_8 0x00000100
|
||||
#define OMAP_BO_TILED_16 0x00000200
|
||||
#define OMAP_BO_TILED_32 0x00000300
|
||||
#define OMAP_BO_TILED (OMAP_BO_TILED_8 | OMAP_BO_TILED_16 | OMAP_BO_TILED_32)
|
||||
#define OMAP_BO_TILED_MASK 0x00000f00
|
||||
|
||||
union omap_gem_size {
|
||||
__u32 bytes; /* (for non-tiled formats) */
|
||||
|
|
|
@ -48,6 +48,8 @@ extern "C" {
|
|||
#define DRM_IOCTL_V3D_SUBMIT_TFU DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_TFU, struct drm_v3d_submit_tfu)
|
||||
#define DRM_IOCTL_V3D_SUBMIT_CSD DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CSD, struct drm_v3d_submit_csd)
|
||||
|
||||
#define DRM_V3D_SUBMIT_CL_FLUSH_CACHE 0x01
|
||||
|
||||
/**
|
||||
* struct drm_v3d_submit_cl - ioctl argument for submitting commands to the 3D
|
||||
* engine.
|
||||
|
@ -61,7 +63,7 @@ extern "C" {
|
|||
* flushed by the time the render done IRQ happens, which is the
|
||||
* trigger for out_sync. Any dirtying of cachelines by the job (only
|
||||
* possible using TMU writes) must be flushed by the caller using the
|
||||
* CL's cache flush commands.
|
||||
* DRM_V3D_SUBMIT_CL_FLUSH_CACHE_FLAG flag.
|
||||
*/
|
||||
struct drm_v3d_submit_cl {
|
||||
/* Pointer to the binner command list.
|
||||
|
@ -124,8 +126,7 @@ struct drm_v3d_submit_cl {
|
|||
/* Number of BO handles passed in (size is that times 4). */
|
||||
__u32 bo_handle_count;
|
||||
|
||||
/* Pad, must be zero-filled. */
|
||||
__u32 pad;
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -193,6 +194,7 @@ enum drm_v3d_param {
|
|||
DRM_V3D_PARAM_V3D_CORE0_IDENT2,
|
||||
DRM_V3D_PARAM_SUPPORTS_TFU,
|
||||
DRM_V3D_PARAM_SUPPORTS_CSD,
|
||||
DRM_V3D_PARAM_SUPPORTS_CACHE_FLUSH,
|
||||
};
|
||||
|
||||
struct drm_v3d_get_param {
|
||||
|
|
|
@ -71,6 +71,7 @@ extern "C" {
|
|||
#define DRM_VMW_CREATE_EXTENDED_CONTEXT 26
|
||||
#define DRM_VMW_GB_SURFACE_CREATE_EXT 27
|
||||
#define DRM_VMW_GB_SURFACE_REF_EXT 28
|
||||
#define DRM_VMW_MSG 29
|
||||
|
||||
/*************************************************************************/
|
||||
/**
|
||||
|
@ -85,6 +86,9 @@ extern "C" {
|
|||
*
|
||||
* DRM_VMW_PARAM_SM4_1
|
||||
* SM4_1 support is enabled.
|
||||
*
|
||||
* DRM_VMW_PARAM_SM5
|
||||
* SM5 support is enabled.
|
||||
*/
|
||||
|
||||
#define DRM_VMW_PARAM_NUM_STREAMS 0
|
||||
|
@ -102,6 +106,7 @@ extern "C" {
|
|||
#define DRM_VMW_PARAM_DX 12
|
||||
#define DRM_VMW_PARAM_HW_CAPS2 13
|
||||
#define DRM_VMW_PARAM_SM4_1 14
|
||||
#define DRM_VMW_PARAM_SM5 15
|
||||
|
||||
/**
|
||||
* enum drm_vmw_handle_type - handle type for ref ioctls
|
||||
|
@ -891,11 +896,13 @@ struct drm_vmw_shader_arg {
|
|||
* surface.
|
||||
* @drm_vmw_surface_flag_create_buffer: Create a backup buffer if none is
|
||||
* given.
|
||||
* @drm_vmw_surface_flag_coherent: Back surface with coherent memory.
|
||||
*/
|
||||
enum drm_vmw_surface_flags {
|
||||
drm_vmw_surface_flag_shareable = (1 << 0),
|
||||
drm_vmw_surface_flag_scanout = (1 << 1),
|
||||
drm_vmw_surface_flag_create_buffer = (1 << 2)
|
||||
drm_vmw_surface_flag_create_buffer = (1 << 2),
|
||||
drm_vmw_surface_flag_coherent = (1 << 3),
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1130,7 +1137,7 @@ struct drm_vmw_handle_close_arg {
|
|||
* svga3d surface flags split into 2, upper half and lower half.
|
||||
*/
|
||||
enum drm_vmw_surface_version {
|
||||
drm_vmw_gb_surface_v1
|
||||
drm_vmw_gb_surface_v1,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1141,6 +1148,7 @@ enum drm_vmw_surface_version {
|
|||
* @svga3d_flags_upper_32_bits: Upper 32 bits of svga3d flags.
|
||||
* @multisample_pattern: Multisampling pattern when msaa is supported.
|
||||
* @quality_level: Precision settings for each sample.
|
||||
* @buffer_byte_stride: Buffer byte stride.
|
||||
* @must_be_zero: Reserved for future usage.
|
||||
*
|
||||
* Input argument to the DRM_VMW_GB_SURFACE_CREATE_EXT Ioctl.
|
||||
|
@ -1149,10 +1157,11 @@ enum drm_vmw_surface_version {
|
|||
struct drm_vmw_gb_surface_create_ext_req {
|
||||
struct drm_vmw_gb_surface_create_req base;
|
||||
enum drm_vmw_surface_version version;
|
||||
uint32_t svga3d_flags_upper_32_bits;
|
||||
SVGA3dMSPattern multisample_pattern;
|
||||
SVGA3dMSQualityLevel quality_level;
|
||||
uint64_t must_be_zero;
|
||||
__u32 svga3d_flags_upper_32_bits;
|
||||
__u32 multisample_pattern;
|
||||
__u32 quality_level;
|
||||
__u32 buffer_byte_stride;
|
||||
__u32 must_be_zero;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1211,6 +1220,22 @@ union drm_vmw_gb_surface_reference_ext_arg {
|
|||
struct drm_vmw_surface_arg req;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct drm_vmw_msg_arg
|
||||
*
|
||||
* @send: Pointer to user-space msg string (null terminated).
|
||||
* @receive: Pointer to user-space receive buffer.
|
||||
* @send_only: Boolean whether this is only sending or receiving too.
|
||||
*
|
||||
* Argument to the DRM_VMW_MSG ioctl.
|
||||
*/
|
||||
struct drm_vmw_msg_arg {
|
||||
__u64 send;
|
||||
__u64 receive;
|
||||
__s32 send_only;
|
||||
__u32 receive_len;
|
||||
};
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -49,6 +49,7 @@ struct acct
|
|||
__u16 ac_uid16; /* LSB of Real User ID */
|
||||
__u16 ac_gid16; /* LSB of Real Group ID */
|
||||
__u16 ac_tty; /* Control Terminal */
|
||||
/* __u32 range means times from 1970 to 2106 */
|
||||
__u32 ac_btime; /* Process Creation Time */
|
||||
comp_t ac_utime; /* User Time */
|
||||
comp_t ac_stime; /* System Time */
|
||||
|
@ -79,6 +80,7 @@ struct acct_v3
|
|||
__u32 ac_gid; /* Real Group ID */
|
||||
__u32 ac_pid; /* Process ID */
|
||||
__u32 ac_ppid; /* Parent Process ID */
|
||||
/* __u32 range means times from 1970 to 2106 */
|
||||
__u32 ac_btime; /* Process Creation Time */
|
||||
float ac_etime; /* Elapsed Time */
|
||||
comp_t ac_utime; /* User Time */
|
||||
|
|
|
@ -248,6 +248,7 @@ enum transaction_flags {
|
|||
TF_ROOT_OBJECT = 0x04, /* contents are the component's root object */
|
||||
TF_STATUS_CODE = 0x08, /* contents are a 32-bit status code */
|
||||
TF_ACCEPT_FDS = 0x10, /* allow replies with file descriptors */
|
||||
TF_CLEAR_BUF = 0x20, /* clear buffer on txn complete */
|
||||
};
|
||||
|
||||
struct binder_transaction_data {
|
||||
|
@ -404,7 +405,7 @@ enum binder_driver_return_protocol {
|
|||
|
||||
BR_FAILED_REPLY = _IO('r', 17),
|
||||
/*
|
||||
* The the last transaction (either a bcTRANSACTION or
|
||||
* The last transaction (either a bcTRANSACTION or
|
||||
* a bcATTEMPT_ACQUIRE) failed (e.g. out of memory). No parameters.
|
||||
*/
|
||||
};
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
/*
|
||||
* See http://icawww1.epfl.ch/linux-atm/magic.html for the complete list of
|
||||
* See https://icawww1.epfl.ch/linux-atm/magic.html for the complete list of
|
||||
* "magic" ioctl numbers.
|
||||
*/
|
||||
|
||||
|
|
|
@ -116,6 +116,8 @@
|
|||
#define AUDIT_FANOTIFY 1331 /* Fanotify access decision */
|
||||
#define AUDIT_TIME_INJOFFSET 1332 /* Timekeeping offset injected */
|
||||
#define AUDIT_TIME_ADJNTPVAL 1333 /* NTP value adjustment */
|
||||
#define AUDIT_BPF 1334 /* BPF subsystem */
|
||||
#define AUDIT_EVENT_LISTENER 1335 /* Task joined multicast read socket */
|
||||
|
||||
#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */
|
||||
#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */
|
||||
|
@ -143,6 +145,7 @@
|
|||
#define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */
|
||||
#define AUDIT_ANOM_ABEND 1701 /* Process ended abnormally */
|
||||
#define AUDIT_ANOM_LINK 1702 /* Suspicious use of file links */
|
||||
#define AUDIT_ANOM_CREAT 1703 /* Suspicious file creation */
|
||||
#define AUDIT_INTEGRITY_DATA 1800 /* Data integrity verification */
|
||||
#define AUDIT_INTEGRITY_METADATA 1801 /* Metadata integrity verification */
|
||||
#define AUDIT_INTEGRITY_STATUS 1802 /* Integrity enable status */
|
||||
|
@ -330,14 +333,15 @@ enum {
|
|||
};
|
||||
|
||||
/* Status symbols */
|
||||
/* Mask values */
|
||||
#define AUDIT_STATUS_ENABLED 0x0001
|
||||
#define AUDIT_STATUS_FAILURE 0x0002
|
||||
#define AUDIT_STATUS_PID 0x0004
|
||||
/* Mask values */
|
||||
#define AUDIT_STATUS_ENABLED 0x0001
|
||||
#define AUDIT_STATUS_FAILURE 0x0002
|
||||
#define AUDIT_STATUS_PID 0x0004
|
||||
#define AUDIT_STATUS_RATE_LIMIT 0x0008
|
||||
#define AUDIT_STATUS_BACKLOG_LIMIT 0x0010
|
||||
#define AUDIT_STATUS_BACKLOG_WAIT_TIME 0x0020
|
||||
#define AUDIT_STATUS_LOST 0x0040
|
||||
#define AUDIT_STATUS_BACKLOG_LIMIT 0x0010
|
||||
#define AUDIT_STATUS_BACKLOG_WAIT_TIME 0x0020
|
||||
#define AUDIT_STATUS_LOST 0x0040
|
||||
#define AUDIT_STATUS_BACKLOG_WAIT_TIME_ACTUAL 0x0080
|
||||
|
||||
#define AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT 0x00000001
|
||||
#define AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME 0x00000002
|
||||
|
@ -464,6 +468,9 @@ struct audit_status {
|
|||
__u32 feature_bitmap; /* bitmap of kernel audit features */
|
||||
};
|
||||
__u32 backlog_wait_time;/* message queue wait timeout */
|
||||
__u32 backlog_wait_time_actual;/* time spent waiting while
|
||||
* message limit exceeded
|
||||
*/
|
||||
};
|
||||
|
||||
struct audit_features {
|
||||
|
|
|
@ -82,7 +82,7 @@ struct args_ismountpoint {
|
|||
/*
|
||||
* All the ioctls use this structure.
|
||||
* When sending a path size must account for the total length
|
||||
* of the chunk of memory otherwise is is the size of the
|
||||
* of the chunk of memory otherwise it is the size of the
|
||||
* structure.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,74 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/* $Id: b1lli.h,v 1.8.8.3 2001/09/23 22:25:05 kai Exp $
|
||||
*
|
||||
* ISDN lowlevel-module for AVM B1-card.
|
||||
*
|
||||
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _B1LLI_H_
|
||||
#define _B1LLI_H_
|
||||
/*
|
||||
* struct for loading t4 file
|
||||
*/
|
||||
typedef struct avmb1_t4file {
|
||||
int len;
|
||||
unsigned char *data;
|
||||
} avmb1_t4file;
|
||||
|
||||
typedef struct avmb1_loaddef {
|
||||
int contr;
|
||||
avmb1_t4file t4file;
|
||||
} avmb1_loaddef;
|
||||
|
||||
typedef struct avmb1_loadandconfigdef {
|
||||
int contr;
|
||||
avmb1_t4file t4file;
|
||||
avmb1_t4file t4config;
|
||||
} avmb1_loadandconfigdef;
|
||||
|
||||
typedef struct avmb1_resetdef {
|
||||
int contr;
|
||||
} avmb1_resetdef;
|
||||
|
||||
typedef struct avmb1_getdef {
|
||||
int contr;
|
||||
int cardtype;
|
||||
int cardstate;
|
||||
} avmb1_getdef;
|
||||
|
||||
/*
|
||||
* struct for adding new cards
|
||||
*/
|
||||
typedef struct avmb1_carddef {
|
||||
int port;
|
||||
int irq;
|
||||
} avmb1_carddef;
|
||||
|
||||
#define AVM_CARDTYPE_B1 0
|
||||
#define AVM_CARDTYPE_T1 1
|
||||
#define AVM_CARDTYPE_M1 2
|
||||
#define AVM_CARDTYPE_M2 3
|
||||
|
||||
typedef struct avmb1_extcarddef {
|
||||
int port;
|
||||
int irq;
|
||||
int cardtype;
|
||||
int cardnr; /* for HEMA/T1 */
|
||||
} avmb1_extcarddef;
|
||||
|
||||
#define AVMB1_LOAD 0 /* load image to card */
|
||||
#define AVMB1_ADDCARD 1 /* add a new card - OBSOLETE */
|
||||
#define AVMB1_RESETCARD 2 /* reset a card */
|
||||
#define AVMB1_LOAD_AND_CONFIG 3 /* load image and config to card */
|
||||
#define AVMB1_ADDCARD_WITH_TYPE 4 /* add a new card, with cardtype */
|
||||
#define AVMB1_GET_CARDINFO 5 /* get cardtype */
|
||||
#define AVMB1_REMOVECARD 6 /* remove a card - OBSOLETE */
|
||||
|
||||
#define AVMB1_REGISTERCARD_IS_OBSOLETE
|
||||
|
||||
#endif /* _B1LLI_H_ */
|
|
@ -1,5 +1,5 @@
|
|||
/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) */
|
||||
/* Copyright (C) 2007-2019 B.A.T.M.A.N. contributors:
|
||||
/* Copyright (C) 2007-2020 B.A.T.M.A.N. contributors:
|
||||
*
|
||||
* Marek Lindner, Simon Wunderlich
|
||||
*/
|
||||
|
@ -72,8 +72,8 @@ enum batadv_subtype {
|
|||
|
||||
/**
|
||||
* enum batadv_iv_flags - flags used in B.A.T.M.A.N. IV OGM packets
|
||||
* @BATADV_NOT_BEST_NEXT_HOP: flag is set when ogm packet is forwarded and was
|
||||
* previously received from someone else than the best neighbor.
|
||||
* @BATADV_NOT_BEST_NEXT_HOP: flag is set when the ogm packet is forwarded and
|
||||
* was previously received from someone other than the best neighbor.
|
||||
* @BATADV_PRIMARIES_FIRST_HOP: flag unused.
|
||||
* @BATADV_DIRECTLINK: flag is for the first hop or if rebroadcasted from a
|
||||
* one hop neighbor on the interface where it was originally received.
|
||||
|
@ -195,8 +195,8 @@ struct batadv_bla_claim_dst {
|
|||
/**
|
||||
* struct batadv_ogm_packet - ogm (routing protocol) packet
|
||||
* @packet_type: batman-adv packet type, part of the general header
|
||||
* @version: batman-adv protocol version, part of the genereal header
|
||||
* @ttl: time to live for this packet, part of the genereal header
|
||||
* @version: batman-adv protocol version, part of the general header
|
||||
* @ttl: time to live for this packet, part of the general header
|
||||
* @flags: contains routing relevant flags - see enum batadv_iv_flags
|
||||
* @seqno: sequence identification
|
||||
* @orig: address of the source node
|
||||
|
@ -247,7 +247,7 @@ struct batadv_ogm2_packet {
|
|||
/**
|
||||
* struct batadv_elp_packet - elp (neighbor discovery) packet
|
||||
* @packet_type: batman-adv packet type, part of the general header
|
||||
* @version: batman-adv protocol version, part of the genereal header
|
||||
* @version: batman-adv protocol version, part of the general header
|
||||
* @orig: originator mac address
|
||||
* @seqno: sequence number
|
||||
* @elp_interval: currently used ELP sending interval in ms
|
||||
|
@ -265,15 +265,15 @@ struct batadv_elp_packet {
|
|||
/**
|
||||
* struct batadv_icmp_header - common members among all the ICMP packets
|
||||
* @packet_type: batman-adv packet type, part of the general header
|
||||
* @version: batman-adv protocol version, part of the genereal header
|
||||
* @ttl: time to live for this packet, part of the genereal header
|
||||
* @version: batman-adv protocol version, part of the general header
|
||||
* @ttl: time to live for this packet, part of the general header
|
||||
* @msg_type: ICMP packet type
|
||||
* @dst: address of the destination node
|
||||
* @orig: address of the source node
|
||||
* @uid: local ICMP socket identifier
|
||||
* @align: not used - useful for alignment purposes only
|
||||
*
|
||||
* This structure is used for ICMP packets parsing only and it is never sent
|
||||
* This structure is used for ICMP packet parsing only and it is never sent
|
||||
* over the wire. The alignment field at the end is there to ensure that
|
||||
* members are padded the same way as they are in real packets.
|
||||
*/
|
||||
|
@ -291,8 +291,8 @@ struct batadv_icmp_header {
|
|||
/**
|
||||
* struct batadv_icmp_packet - ICMP packet
|
||||
* @packet_type: batman-adv packet type, part of the general header
|
||||
* @version: batman-adv protocol version, part of the genereal header
|
||||
* @ttl: time to live for this packet, part of the genereal header
|
||||
* @version: batman-adv protocol version, part of the general header
|
||||
* @ttl: time to live for this packet, part of the general header
|
||||
* @msg_type: ICMP packet type
|
||||
* @dst: address of the destination node
|
||||
* @orig: address of the source node
|
||||
|
@ -315,8 +315,8 @@ struct batadv_icmp_packet {
|
|||
/**
|
||||
* struct batadv_icmp_tp_packet - ICMP TP Meter packet
|
||||
* @packet_type: batman-adv packet type, part of the general header
|
||||
* @version: batman-adv protocol version, part of the genereal header
|
||||
* @ttl: time to live for this packet, part of the genereal header
|
||||
* @version: batman-adv protocol version, part of the general header
|
||||
* @ttl: time to live for this packet, part of the general header
|
||||
* @msg_type: ICMP packet type
|
||||
* @dst: address of the destination node
|
||||
* @orig: address of the source node
|
||||
|
@ -358,8 +358,8 @@ enum batadv_icmp_tp_subtype {
|
|||
/**
|
||||
* struct batadv_icmp_packet_rr - ICMP RouteRecord packet
|
||||
* @packet_type: batman-adv packet type, part of the general header
|
||||
* @version: batman-adv protocol version, part of the genereal header
|
||||
* @ttl: time to live for this packet, part of the genereal header
|
||||
* @version: batman-adv protocol version, part of the general header
|
||||
* @ttl: time to live for this packet, part of the general header
|
||||
* @msg_type: ICMP packet type
|
||||
* @dst: address of the destination node
|
||||
* @orig: address of the source node
|
||||
|
@ -397,8 +397,8 @@ struct batadv_icmp_packet_rr {
|
|||
/**
|
||||
* struct batadv_unicast_packet - unicast packet for network payload
|
||||
* @packet_type: batman-adv packet type, part of the general header
|
||||
* @version: batman-adv protocol version, part of the genereal header
|
||||
* @ttl: time to live for this packet, part of the genereal header
|
||||
* @version: batman-adv protocol version, part of the general header
|
||||
* @ttl: time to live for this packet, part of the general header
|
||||
* @ttvn: translation table version number
|
||||
* @dest: originator destination of the unicast packet
|
||||
*/
|
||||
|
@ -433,8 +433,8 @@ struct batadv_unicast_4addr_packet {
|
|||
/**
|
||||
* struct batadv_frag_packet - fragmented packet
|
||||
* @packet_type: batman-adv packet type, part of the general header
|
||||
* @version: batman-adv protocol version, part of the genereal header
|
||||
* @ttl: time to live for this packet, part of the genereal header
|
||||
* @version: batman-adv protocol version, part of the general header
|
||||
* @ttl: time to live for this packet, part of the general header
|
||||
* @dest: final destination used when routing fragments
|
||||
* @orig: originator of the fragment used when merging the packet
|
||||
* @no: fragment number within this sequence
|
||||
|
@ -467,8 +467,8 @@ struct batadv_frag_packet {
|
|||
/**
|
||||
* struct batadv_bcast_packet - broadcast packet for network payload
|
||||
* @packet_type: batman-adv packet type, part of the general header
|
||||
* @version: batman-adv protocol version, part of the genereal header
|
||||
* @ttl: time to live for this packet, part of the genereal header
|
||||
* @version: batman-adv protocol version, part of the general header
|
||||
* @ttl: time to live for this packet, part of the general header
|
||||
* @reserved: reserved byte for alignment
|
||||
* @seqno: sequence identification
|
||||
* @orig: originator of the broadcast packet
|
||||
|
@ -488,10 +488,10 @@ struct batadv_bcast_packet {
|
|||
/**
|
||||
* struct batadv_coded_packet - network coded packet
|
||||
* @packet_type: batman-adv packet type, part of the general header
|
||||
* @version: batman-adv protocol version, part of the genereal header
|
||||
* @ttl: time to live for this packet, part of the genereal header
|
||||
* @version: batman-adv protocol version, part of the general header
|
||||
* @ttl: time to live for this packet, part of the general header
|
||||
* @first_source: original source of first included packet
|
||||
* @first_orig_dest: original destinal of first included packet
|
||||
* @first_orig_dest: original destination of first included packet
|
||||
* @first_crc: checksum of first included packet
|
||||
* @first_ttvn: tt-version number of first included packet
|
||||
* @second_ttl: ttl of second packet
|
||||
|
@ -523,8 +523,8 @@ struct batadv_coded_packet {
|
|||
/**
|
||||
* struct batadv_unicast_tvlv_packet - generic unicast packet with tvlv payload
|
||||
* @packet_type: batman-adv packet type, part of the general header
|
||||
* @version: batman-adv protocol version, part of the genereal header
|
||||
* @ttl: time to live for this packet, part of the genereal header
|
||||
* @version: batman-adv protocol version, part of the general header
|
||||
* @ttl: time to live for this packet, part of the general header
|
||||
* @reserved: reserved field (for packet alignment)
|
||||
* @src: address of the source
|
||||
* @dst: address of the destination
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright (C) 2016-2019 B.A.T.M.A.N. contributors:
|
||||
/* Copyright (C) 2016-2020 B.A.T.M.A.N. contributors:
|
||||
*
|
||||
* Matthias Schiffer
|
||||
*/
|
||||
|
@ -69,7 +69,7 @@ enum batadv_tt_client_flags {
|
|||
|
||||
/**
|
||||
* @BATADV_TT_CLIENT_TEMP: this global client has been detected to be
|
||||
* part of the network but no nnode has already announced it
|
||||
* part of the network but no node has already announced it
|
||||
*/
|
||||
BATADV_TT_CLIENT_TEMP = (1 << 11),
|
||||
};
|
||||
|
@ -131,7 +131,7 @@ enum batadv_gw_modes {
|
|||
/** @BATADV_GW_MODE_CLIENT: send DHCP requests to gw servers */
|
||||
BATADV_GW_MODE_CLIENT,
|
||||
|
||||
/** @BATADV_GW_MODE_SERVER: announce itself as gatway server */
|
||||
/** @BATADV_GW_MODE_SERVER: announce itself as gateway server */
|
||||
BATADV_GW_MODE_SERVER,
|
||||
};
|
||||
|
||||
|
@ -427,7 +427,8 @@ enum batadv_nl_attrs {
|
|||
|
||||
/**
|
||||
* @BATADV_ATTR_HOP_PENALTY: defines the penalty which will be applied
|
||||
* to an originator message's tq-field on every hop.
|
||||
* to an originator message's tq-field on every hop and/or per
|
||||
* hard interface
|
||||
*/
|
||||
BATADV_ATTR_HOP_PENALTY,
|
||||
|
||||
|
|
|
@ -141,13 +141,16 @@ static __inline__ struct bkey *bkey_idx(const struct bkey *k, unsigned int nr_ke
|
|||
* Version 3: Cache device with new UUID format
|
||||
* Version 4: Backing device with data offset
|
||||
*/
|
||||
#define BCACHE_SB_VERSION_CDEV 0
|
||||
#define BCACHE_SB_VERSION_BDEV 1
|
||||
#define BCACHE_SB_VERSION_CDEV_WITH_UUID 3
|
||||
#define BCACHE_SB_VERSION_BDEV_WITH_OFFSET 4
|
||||
#define BCACHE_SB_MAX_VERSION 4
|
||||
#define BCACHE_SB_VERSION_CDEV 0
|
||||
#define BCACHE_SB_VERSION_BDEV 1
|
||||
#define BCACHE_SB_VERSION_CDEV_WITH_UUID 3
|
||||
#define BCACHE_SB_VERSION_BDEV_WITH_OFFSET 4
|
||||
#define BCACHE_SB_VERSION_CDEV_WITH_FEATURES 5
|
||||
#define BCACHE_SB_VERSION_BDEV_WITH_FEATURES 6
|
||||
#define BCACHE_SB_MAX_VERSION 6
|
||||
|
||||
#define SB_SECTOR 8
|
||||
#define SB_OFFSET (SB_SECTOR << SECTOR_SHIFT)
|
||||
#define SB_SIZE 4096
|
||||
#define SB_LABEL_SIZE 32
|
||||
#define SB_JOURNAL_BUCKETS 256U
|
||||
|
@ -156,8 +159,70 @@ static __inline__ struct bkey *bkey_idx(const struct bkey *k, unsigned int nr_ke
|
|||
|
||||
#define BDEV_DATA_START_DEFAULT 16 /* sectors */
|
||||
|
||||
struct cache_sb_disk {
|
||||
__le64 csum;
|
||||
__le64 offset; /* sector where this sb was written */
|
||||
__le64 version;
|
||||
|
||||
__u8 magic[16];
|
||||
|
||||
__u8 uuid[16];
|
||||
union {
|
||||
__u8 set_uuid[16];
|
||||
__le64 set_magic;
|
||||
};
|
||||
__u8 label[SB_LABEL_SIZE];
|
||||
|
||||
__le64 flags;
|
||||
__le64 seq;
|
||||
|
||||
__le64 feature_compat;
|
||||
__le64 feature_incompat;
|
||||
__le64 feature_ro_compat;
|
||||
|
||||
__le64 pad[5];
|
||||
|
||||
union {
|
||||
struct {
|
||||
/* Cache devices */
|
||||
__le64 nbuckets; /* device size */
|
||||
|
||||
__le16 block_size; /* sectors */
|
||||
__le16 bucket_size; /* sectors */
|
||||
|
||||
__le16 nr_in_set;
|
||||
__le16 nr_this_dev;
|
||||
};
|
||||
struct {
|
||||
/* Backing devices */
|
||||
__le64 data_offset;
|
||||
|
||||
/*
|
||||
* block_size from the cache device section is still used by
|
||||
* backing devices, so don't add anything here until we fix
|
||||
* things to not need it for backing devices anymore
|
||||
*/
|
||||
};
|
||||
};
|
||||
|
||||
__le32 last_mount; /* time overflow in y2106 */
|
||||
|
||||
__le16 first_bucket;
|
||||
union {
|
||||
__le16 njournal_buckets;
|
||||
__le16 keys;
|
||||
};
|
||||
__le64 d[SB_JOURNAL_BUCKETS]; /* journal buckets */
|
||||
__le16 bucket_size_hi;
|
||||
};
|
||||
|
||||
/*
|
||||
* This is for in-memory bcache super block.
|
||||
* NOTE: cache_sb is NOT exactly mapping to cache_sb_disk, the member
|
||||
* size, ordering and even whole struct size may be different
|
||||
* from cache_sb_disk.
|
||||
*/
|
||||
struct cache_sb {
|
||||
__u64 csum;
|
||||
__u64 offset; /* sector where this sb was written */
|
||||
__u64 version;
|
||||
|
||||
|
@ -172,7 +237,10 @@ struct cache_sb {
|
|||
|
||||
__u64 flags;
|
||||
__u64 seq;
|
||||
__u64 pad[8];
|
||||
|
||||
__u64 feature_compat;
|
||||
__u64 feature_incompat;
|
||||
__u64 feature_ro_compat;
|
||||
|
||||
union {
|
||||
struct {
|
||||
|
@ -180,10 +248,9 @@ struct cache_sb {
|
|||
__u64 nbuckets; /* device size */
|
||||
|
||||
__u16 block_size; /* sectors */
|
||||
__u16 bucket_size; /* sectors */
|
||||
|
||||
__u16 nr_in_set;
|
||||
__u16 nr_this_dev;
|
||||
__u32 bucket_size; /* sectors */
|
||||
};
|
||||
struct {
|
||||
/* Backing devices */
|
||||
|
@ -210,7 +277,8 @@ struct cache_sb {
|
|||
static __inline__ _Bool SB_IS_BDEV(const struct cache_sb *sb)
|
||||
{
|
||||
return sb->version == BCACHE_SB_VERSION_BDEV
|
||||
|| sb->version == BCACHE_SB_VERSION_BDEV_WITH_OFFSET;
|
||||
|| sb->version == BCACHE_SB_VERSION_BDEV_WITH_OFFSET
|
||||
|| sb->version == BCACHE_SB_VERSION_BDEV_WITH_FEATURES;
|
||||
}
|
||||
|
||||
BITMASK(CACHE_SYNC, struct cache_sb, flags, 0, 1);
|
||||
|
|
|
@ -73,6 +73,15 @@ enum blk_zone_cond {
|
|||
BLK_ZONE_COND_OFFLINE = 0xF,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum blk_zone_report_flags - Feature flags of reported zone descriptors.
|
||||
*
|
||||
* @BLK_ZONE_REP_CAPACITY: Zone descriptor has capacity field.
|
||||
*/
|
||||
enum blk_zone_report_flags {
|
||||
BLK_ZONE_REP_CAPACITY = (1 << 0),
|
||||
};
|
||||
|
||||
/**
|
||||
* struct blk_zone - Zone descriptor for BLKREPORTZONE ioctl.
|
||||
*
|
||||
|
@ -84,12 +93,15 @@ enum blk_zone_cond {
|
|||
* @non_seq: Flag indicating that the zone is using non-sequential resources
|
||||
* (for host-aware zoned block devices only).
|
||||
* @reset: Flag indicating that a zone reset is recommended.
|
||||
* @reserved: Padding to 64 B to match the ZBC/ZAC defined zone descriptor size.
|
||||
* @resv: Padding for 8B alignment.
|
||||
* @capacity: Zone usable capacity in 512 B sector units
|
||||
* @reserved: Padding to 64 B to match the ZBC, ZAC and ZNS defined zone
|
||||
* descriptor size.
|
||||
*
|
||||
* start, len and wp use the regular 512 B sector unit, regardless of the
|
||||
* device logical block size. The overall structure size is 64 B to match the
|
||||
* ZBC/ZAC defined zone descriptor and allow support for future additional
|
||||
* zone information.
|
||||
* start, len, capacity and wp use the regular 512 B sector unit, regardless
|
||||
* of the device logical block size. The overall structure size is 64 B to
|
||||
* match the ZBC, ZAC and ZNS defined zone descriptor and allow support for
|
||||
* future additional zone information.
|
||||
*/
|
||||
struct blk_zone {
|
||||
__u64 start; /* Zone start sector */
|
||||
|
@ -99,7 +111,9 @@ struct blk_zone {
|
|||
__u8 cond; /* Zone condition */
|
||||
__u8 non_seq; /* Non-sequential write resources active */
|
||||
__u8 reset; /* Reset write pointer recommended */
|
||||
__u8 reserved[36];
|
||||
__u8 resv[4];
|
||||
__u64 capacity; /* Zone capacity in number of sectors */
|
||||
__u8 reserved[24];
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -107,7 +121,7 @@ struct blk_zone {
|
|||
*
|
||||
* @sector: starting sector of report
|
||||
* @nr_zones: IN maximum / OUT actual
|
||||
* @reserved: padding to 16 byte alignment
|
||||
* @flags: one or more flags as defined by enum blk_zone_report_flags.
|
||||
* @zones: Space to hold @nr_zones @zones entries on reply.
|
||||
*
|
||||
* The array of at most @nr_zones must follow this structure in memory.
|
||||
|
@ -115,14 +129,16 @@ struct blk_zone {
|
|||
struct blk_zone_report {
|
||||
__u64 sector;
|
||||
__u32 nr_zones;
|
||||
__u8 reserved[4];
|
||||
__u32 flags;
|
||||
struct blk_zone zones[0];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct blk_zone_range - BLKRESETZONE ioctl request
|
||||
* @sector: starting sector of the first zone to issue reset write pointer
|
||||
* @nr_sectors: Total number of sectors of 1 or more zones to reset
|
||||
* struct blk_zone_range - BLKRESETZONE/BLKOPENZONE/
|
||||
* BLKCLOSEZONE/BLKFINISHZONE ioctl
|
||||
* requests
|
||||
* @sector: Starting sector of the first zone to operate on.
|
||||
* @nr_sectors: Total number of sectors of all zones to operate on.
|
||||
*/
|
||||
struct blk_zone_range {
|
||||
__u64 sector;
|
||||
|
@ -139,10 +155,19 @@ struct blk_zone_range {
|
|||
* sector range. The sector range must be zone aligned.
|
||||
* @BLKGETZONESZ: Get the device zone size in number of 512 B sectors.
|
||||
* @BLKGETNRZONES: Get the total number of zones of the device.
|
||||
* @BLKOPENZONE: Open the zones in the specified sector range.
|
||||
* The 512 B sector range must be zone aligned.
|
||||
* @BLKCLOSEZONE: Close the zones in the specified sector range.
|
||||
* The 512 B sector range must be zone aligned.
|
||||
* @BLKFINISHZONE: Mark the zones as full in the specified sector range.
|
||||
* The 512 B sector range must be zone aligned.
|
||||
*/
|
||||
#define BLKREPORTZONE _IOWR(0x12, 130, struct blk_zone_report)
|
||||
#define BLKRESETZONE _IOW(0x12, 131, struct blk_zone_range)
|
||||
#define BLKGETZONESZ _IOR(0x12, 132, __u32)
|
||||
#define BLKGETNRZONES _IOR(0x12, 133, __u32)
|
||||
#define BLKOPENZONE _IOW(0x12, 134, struct blk_zone_range)
|
||||
#define BLKCLOSEZONE _IOW(0x12, 135, struct blk_zone_range)
|
||||
#define BLKFINISHZONE _IOW(0x12, 136, struct blk_zone_range)
|
||||
|
||||
#endif /* _BLKZONED_H */
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -142,7 +142,14 @@ struct btf_param {
|
|||
|
||||
enum {
|
||||
BTF_VAR_STATIC = 0,
|
||||
BTF_VAR_GLOBAL_ALLOCATED,
|
||||
BTF_VAR_GLOBAL_ALLOCATED = 1,
|
||||
BTF_VAR_GLOBAL_EXTERN = 2,
|
||||
};
|
||||
|
||||
enum btf_func_linkage {
|
||||
BTF_FUNC_STATIC = 0,
|
||||
BTF_FUNC_GLOBAL = 1,
|
||||
BTF_FUNC_EXTERN = 2,
|
||||
};
|
||||
|
||||
/* BTF_KIND_VAR is followed by a single "struct btf_var" to describe
|
||||
|
|
|
@ -36,17 +36,20 @@ struct btrfs_ioctl_vol_args {
|
|||
#define BTRFS_DEVICE_PATH_NAME_MAX 1024
|
||||
#define BTRFS_SUBVOL_NAME_MAX 4039
|
||||
|
||||
#define BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0)
|
||||
/* Deprecated since 5.7 */
|
||||
# define BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0)
|
||||
#define BTRFS_SUBVOL_RDONLY (1ULL << 1)
|
||||
#define BTRFS_SUBVOL_QGROUP_INHERIT (1ULL << 2)
|
||||
|
||||
#define BTRFS_DEVICE_SPEC_BY_ID (1ULL << 3)
|
||||
|
||||
#define BTRFS_SUBVOL_SPEC_BY_ID (1ULL << 4)
|
||||
|
||||
#define BTRFS_VOL_ARG_V2_FLAGS_SUPPORTED \
|
||||
(BTRFS_SUBVOL_CREATE_ASYNC | \
|
||||
BTRFS_SUBVOL_RDONLY | \
|
||||
(BTRFS_SUBVOL_RDONLY | \
|
||||
BTRFS_SUBVOL_QGROUP_INHERIT | \
|
||||
BTRFS_DEVICE_SPEC_BY_ID)
|
||||
BTRFS_DEVICE_SPEC_BY_ID | \
|
||||
BTRFS_SUBVOL_SPEC_BY_ID)
|
||||
|
||||
#define BTRFS_FSID_SIZE 16
|
||||
#define BTRFS_UUID_SIZE 16
|
||||
|
@ -97,16 +100,29 @@ struct btrfs_ioctl_qgroup_limit_args {
|
|||
};
|
||||
|
||||
/*
|
||||
* flags for subvolumes
|
||||
* Arguments for specification of subvolumes or devices, supporting by-name or
|
||||
* by-id and flags
|
||||
*
|
||||
* Used by:
|
||||
* struct btrfs_ioctl_vol_args_v2.flags
|
||||
* The set of supported flags depends on the ioctl
|
||||
*
|
||||
* BTRFS_SUBVOL_RDONLY is also provided/consumed by the following ioctls:
|
||||
* - BTRFS_IOC_SUBVOL_GETFLAGS
|
||||
* - BTRFS_IOC_SUBVOL_SETFLAGS
|
||||
*/
|
||||
|
||||
/* Supported flags for BTRFS_IOC_RM_DEV_V2 */
|
||||
#define BTRFS_DEVICE_REMOVE_ARGS_MASK \
|
||||
(BTRFS_DEVICE_SPEC_BY_ID)
|
||||
|
||||
/* Supported flags for BTRFS_IOC_SNAP_CREATE_V2 and BTRFS_IOC_SUBVOL_CREATE_V2 */
|
||||
#define BTRFS_SUBVOL_CREATE_ARGS_MASK \
|
||||
(BTRFS_SUBVOL_RDONLY | \
|
||||
BTRFS_SUBVOL_QGROUP_INHERIT)
|
||||
|
||||
/* Supported flags for BTRFS_IOC_SNAP_DESTROY_V2 */
|
||||
#define BTRFS_SUBVOL_DELETE_ARGS_MASK \
|
||||
(BTRFS_SUBVOL_SPEC_BY_ID)
|
||||
|
||||
struct btrfs_ioctl_vol_args_v2 {
|
||||
__s64 fd;
|
||||
__u64 transid;
|
||||
|
@ -121,6 +137,7 @@ struct btrfs_ioctl_vol_args_v2 {
|
|||
union {
|
||||
char name[BTRFS_SUBVOL_NAME_MAX + 1];
|
||||
__u64 devid;
|
||||
__u64 subvolid;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -224,6 +241,18 @@ struct btrfs_ioctl_dev_info_args {
|
|||
__u8 path[BTRFS_DEVICE_PATH_NAME_MAX]; /* out */
|
||||
};
|
||||
|
||||
/*
|
||||
* Retrieve information about the filesystem
|
||||
*/
|
||||
|
||||
/* Request information about checksum type and size */
|
||||
#define BTRFS_FS_INFO_FLAG_CSUM_INFO (1 << 0)
|
||||
|
||||
/* Request information about filesystem generation */
|
||||
#define BTRFS_FS_INFO_FLAG_GENERATION (1 << 1)
|
||||
/* Request information about filesystem metadata UUID */
|
||||
#define BTRFS_FS_INFO_FLAG_METADATA_UUID (1 << 2)
|
||||
|
||||
struct btrfs_ioctl_fs_info_args {
|
||||
__u64 max_id; /* out */
|
||||
__u64 num_devices; /* out */
|
||||
|
@ -231,8 +260,13 @@ struct btrfs_ioctl_fs_info_args {
|
|||
__u32 nodesize; /* out */
|
||||
__u32 sectorsize; /* out */
|
||||
__u32 clone_alignment; /* out */
|
||||
__u32 reserved32;
|
||||
__u64 reserved[122]; /* pad to 1k */
|
||||
/* See BTRFS_FS_INFO_FLAG_* */
|
||||
__u16 csum_type; /* out */
|
||||
__u16 csum_size; /* out */
|
||||
__u64 flags; /* in/out */
|
||||
__u64 generation; /* out */
|
||||
__u8 metadata_uuid[BTRFS_FSID_SIZE]; /* out */
|
||||
__u8 reserved[944]; /* pad to 1k */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -270,6 +304,7 @@ struct btrfs_ioctl_fs_info_args {
|
|||
#define BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA (1ULL << 8)
|
||||
#define BTRFS_FEATURE_INCOMPAT_NO_HOLES (1ULL << 9)
|
||||
#define BTRFS_FEATURE_INCOMPAT_METADATA_UUID (1ULL << 10)
|
||||
#define BTRFS_FEATURE_INCOMPAT_RAID1C34 (1ULL << 11)
|
||||
|
||||
struct btrfs_ioctl_feature_flags {
|
||||
__u64 compat_flags;
|
||||
|
@ -831,7 +866,9 @@ enum btrfs_err_code {
|
|||
BTRFS_ERROR_DEV_TGT_REPLACE,
|
||||
BTRFS_ERROR_DEV_MISSING_NOT_FOUND,
|
||||
BTRFS_ERROR_DEV_ONLY_WRITABLE,
|
||||
BTRFS_ERROR_DEV_EXCL_RUN_IN_PROGRESS
|
||||
BTRFS_ERROR_DEV_EXCL_RUN_IN_PROGRESS,
|
||||
BTRFS_ERROR_DEV_RAID1C3_MIN_NOT_MET,
|
||||
BTRFS_ERROR_DEV_RAID1C4_MIN_NOT_MET,
|
||||
};
|
||||
|
||||
#define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
|
||||
|
@ -946,5 +983,7 @@ enum btrfs_err_code {
|
|||
struct btrfs_ioctl_get_subvol_rootref_args)
|
||||
#define BTRFS_IOC_INO_LOOKUP_USER _IOWR(BTRFS_IOCTL_MAGIC, 62, \
|
||||
struct btrfs_ioctl_ino_lookup_user_args)
|
||||
#define BTRFS_IOC_SNAP_DESTROY_V2 _IOW(BTRFS_IOCTL_MAGIC, 63, \
|
||||
struct btrfs_ioctl_vol_args_v2)
|
||||
|
||||
#endif /* _LINUX_BTRFS_H */
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <linux/btrfs.h>
|
||||
#include <linux/types.h>
|
||||
#include <stddef.h>
|
||||
|
||||
/*
|
||||
* This header contains the structure definitions and constants used
|
||||
|
@ -302,6 +303,9 @@
|
|||
/* csum types */
|
||||
enum btrfs_csum_type {
|
||||
BTRFS_CSUM_TYPE_CRC32 = 0,
|
||||
BTRFS_CSUM_TYPE_XXHASH = 1,
|
||||
BTRFS_CSUM_TYPE_SHA256 = 2,
|
||||
BTRFS_CSUM_TYPE_BLAKE2 = 3,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -516,15 +520,6 @@ struct btrfs_extent_inline_ref {
|
|||
__le64 offset;
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
/* old style backrefs item */
|
||||
struct btrfs_extent_ref_v0 {
|
||||
__le64 root;
|
||||
__le64 generation;
|
||||
__le64 objectid;
|
||||
__le32 count;
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
|
||||
/* dev extents record free space on individual devices. The owner
|
||||
* field points back to the chunk allocation mapping tree that allocated
|
||||
* the extent. The chunk tree uuid field is a way to double check the owner
|
||||
|
@ -650,6 +645,15 @@ struct btrfs_root_item {
|
|||
__le64 reserved[8]; /* for future */
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
/*
|
||||
* Btrfs root item used to be smaller than current size. The old format ends
|
||||
* at where member generation_v2 is.
|
||||
*/
|
||||
static __inline__ __u32 btrfs_legacy_root_item_size(void)
|
||||
{
|
||||
return offsetof(struct btrfs_root_item, generation_v2);
|
||||
}
|
||||
|
||||
/*
|
||||
* this is used for both forward and backward root refs
|
||||
*/
|
||||
|
@ -737,10 +741,12 @@ struct btrfs_balance_item {
|
|||
__le64 unused[4];
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
#define BTRFS_FILE_EXTENT_INLINE 0
|
||||
#define BTRFS_FILE_EXTENT_REG 1
|
||||
#define BTRFS_FILE_EXTENT_PREALLOC 2
|
||||
#define BTRFS_FILE_EXTENT_TYPES 2
|
||||
enum {
|
||||
BTRFS_FILE_EXTENT_INLINE = 0,
|
||||
BTRFS_FILE_EXTENT_REG = 1,
|
||||
BTRFS_FILE_EXTENT_PREALLOC = 2,
|
||||
BTRFS_NR_FILE_EXTENT_TYPES = 3,
|
||||
};
|
||||
|
||||
struct btrfs_file_extent_item {
|
||||
/*
|
||||
|
@ -836,6 +842,8 @@ struct btrfs_dev_replace_item {
|
|||
#define BTRFS_BLOCK_GROUP_RAID10 (1ULL << 6)
|
||||
#define BTRFS_BLOCK_GROUP_RAID5 (1ULL << 7)
|
||||
#define BTRFS_BLOCK_GROUP_RAID6 (1ULL << 8)
|
||||
#define BTRFS_BLOCK_GROUP_RAID1C3 (1ULL << 9)
|
||||
#define BTRFS_BLOCK_GROUP_RAID1C4 (1ULL << 10)
|
||||
#define BTRFS_BLOCK_GROUP_RESERVED (BTRFS_AVAIL_ALLOC_BIT_SINGLE | \
|
||||
BTRFS_SPACE_INFO_GLOBAL_RSV)
|
||||
|
||||
|
@ -847,6 +855,8 @@ enum btrfs_raid_types {
|
|||
BTRFS_RAID_SINGLE,
|
||||
BTRFS_RAID_RAID5,
|
||||
BTRFS_RAID_RAID6,
|
||||
BTRFS_RAID_RAID1C3,
|
||||
BTRFS_RAID_RAID1C4,
|
||||
BTRFS_NR_RAID_TYPES
|
||||
};
|
||||
|
||||
|
@ -856,6 +866,8 @@ enum btrfs_raid_types {
|
|||
|
||||
#define BTRFS_BLOCK_GROUP_PROFILE_MASK (BTRFS_BLOCK_GROUP_RAID0 | \
|
||||
BTRFS_BLOCK_GROUP_RAID1 | \
|
||||
BTRFS_BLOCK_GROUP_RAID1C3 | \
|
||||
BTRFS_BLOCK_GROUP_RAID1C4 | \
|
||||
BTRFS_BLOCK_GROUP_RAID5 | \
|
||||
BTRFS_BLOCK_GROUP_RAID6 | \
|
||||
BTRFS_BLOCK_GROUP_DUP | \
|
||||
|
@ -863,7 +875,9 @@ enum btrfs_raid_types {
|
|||
#define BTRFS_BLOCK_GROUP_RAID56_MASK (BTRFS_BLOCK_GROUP_RAID5 | \
|
||||
BTRFS_BLOCK_GROUP_RAID6)
|
||||
|
||||
#define BTRFS_BLOCK_GROUP_RAID1_MASK (BTRFS_BLOCK_GROUP_RAID1)
|
||||
#define BTRFS_BLOCK_GROUP_RAID1_MASK (BTRFS_BLOCK_GROUP_RAID1 | \
|
||||
BTRFS_BLOCK_GROUP_RAID1C3 | \
|
||||
BTRFS_BLOCK_GROUP_RAID1C4)
|
||||
|
||||
/*
|
||||
* We need a bit for restriper to be able to tell when chunks of type
|
||||
|
@ -909,9 +923,9 @@ struct btrfs_free_space_info {
|
|||
#define BTRFS_FREE_SPACE_USING_BITMAPS (1ULL << 0)
|
||||
|
||||
#define BTRFS_QGROUP_LEVEL_SHIFT 48
|
||||
static __inline__ __u64 btrfs_qgroup_level(__u64 qgroupid)
|
||||
static __inline__ __u16 btrfs_qgroup_level(__u64 qgroupid)
|
||||
{
|
||||
return qgroupid >> BTRFS_QGROUP_LEVEL_SHIFT;
|
||||
return (__u16)(qgroupid >> BTRFS_QGROUP_LEVEL_SHIFT);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -169,7 +169,7 @@ struct sockaddr_caif {
|
|||
* @CAIFSO_LINK_SELECT: Selector used if multiple CAIF Link layers are
|
||||
* available. Either a high bandwidth
|
||||
* link can be selected (CAIF_LINK_HIGH_BANDW) or
|
||||
* or a low latency link (CAIF_LINK_LOW_LATENCY).
|
||||
* a low latency link (CAIF_LINK_LOW_LATENCY).
|
||||
* This option is of type __u32.
|
||||
* Alternatively SO_BINDTODEVICE can be used.
|
||||
*
|
||||
|
|
165
linux-headers/include/linux/can/isotp.h
Normal file
165
linux-headers/include/linux/can/isotp.h
Normal file
|
@ -0,0 +1,165 @@
|
|||
/* SPDX-License-Identifier: ((GPL-2.0-only WITH Linux-syscall-note) OR BSD-3-Clause) */
|
||||
/*
|
||||
* linux/can/isotp.h
|
||||
*
|
||||
* Definitions for isotp CAN sockets (ISO 15765-2:2016)
|
||||
*
|
||||
* Copyright (c) 2020 Volkswagen Group Electronic Research
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of Volkswagen nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* Alternatively, provided that this notice is retained in full, this
|
||||
* software may be distributed under the terms of the GNU General
|
||||
* Public License ("GPL") version 2, in which case the provisions of the
|
||||
* GPL apply INSTEAD OF those given above.
|
||||
*
|
||||
* The provided data structures and external interfaces from this code
|
||||
* are not restricted to be used by modules with a GPL compatible license.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||
* DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _CAN_ISOTP_H
|
||||
#define _CAN_ISOTP_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/can.h>
|
||||
|
||||
#define SOL_CAN_ISOTP (SOL_CAN_BASE + CAN_ISOTP)
|
||||
|
||||
/* for socket options affecting the socket (not the global system) */
|
||||
|
||||
#define CAN_ISOTP_OPTS 1 /* pass struct can_isotp_options */
|
||||
|
||||
#define CAN_ISOTP_RECV_FC 2 /* pass struct can_isotp_fc_options */
|
||||
|
||||
/* sockopts to force stmin timer values for protocol regression tests */
|
||||
|
||||
#define CAN_ISOTP_TX_STMIN 3 /* pass __u32 value in nano secs */
|
||||
/* use this time instead of value */
|
||||
/* provided in FC from the receiver */
|
||||
|
||||
#define CAN_ISOTP_RX_STMIN 4 /* pass __u32 value in nano secs */
|
||||
/* ignore received CF frames which */
|
||||
/* timestamps differ less than val */
|
||||
|
||||
#define CAN_ISOTP_LL_OPTS 5 /* pass struct can_isotp_ll_options */
|
||||
|
||||
struct can_isotp_options {
|
||||
|
||||
__u32 flags; /* set flags for isotp behaviour. */
|
||||
/* __u32 value : flags see below */
|
||||
|
||||
__u32 frame_txtime; /* frame transmission time (N_As/N_Ar) */
|
||||
/* __u32 value : time in nano secs */
|
||||
|
||||
__u8 ext_address; /* set address for extended addressing */
|
||||
/* __u8 value : extended address */
|
||||
|
||||
__u8 txpad_content; /* set content of padding byte (tx) */
|
||||
/* __u8 value : content on tx path */
|
||||
|
||||
__u8 rxpad_content; /* set content of padding byte (rx) */
|
||||
/* __u8 value : content on rx path */
|
||||
|
||||
__u8 rx_ext_address; /* set address for extended addressing */
|
||||
/* __u8 value : extended address (rx) */
|
||||
};
|
||||
|
||||
struct can_isotp_fc_options {
|
||||
|
||||
__u8 bs; /* blocksize provided in FC frame */
|
||||
/* __u8 value : blocksize. 0 = off */
|
||||
|
||||
__u8 stmin; /* separation time provided in FC frame */
|
||||
/* __u8 value : */
|
||||
/* 0x00 - 0x7F : 0 - 127 ms */
|
||||
/* 0x80 - 0xF0 : reserved */
|
||||
/* 0xF1 - 0xF9 : 100 us - 900 us */
|
||||
/* 0xFA - 0xFF : reserved */
|
||||
|
||||
__u8 wftmax; /* max. number of wait frame transmiss. */
|
||||
/* __u8 value : 0 = omit FC N_PDU WT */
|
||||
};
|
||||
|
||||
struct can_isotp_ll_options {
|
||||
|
||||
__u8 mtu; /* generated & accepted CAN frame type */
|
||||
/* __u8 value : */
|
||||
/* CAN_MTU (16) -> standard CAN 2.0 */
|
||||
/* CANFD_MTU (72) -> CAN FD frame */
|
||||
|
||||
__u8 tx_dl; /* tx link layer data length in bytes */
|
||||
/* (configured maximum payload length) */
|
||||
/* __u8 value : 8,12,16,20,24,32,48,64 */
|
||||
/* => rx path supports all LL_DL values */
|
||||
|
||||
__u8 tx_flags; /* set into struct canfd_frame.flags */
|
||||
/* at frame creation: e.g. CANFD_BRS */
|
||||
/* Obsolete when the BRS flag is fixed */
|
||||
/* by the CAN netdriver configuration */
|
||||
};
|
||||
|
||||
/* flags for isotp behaviour */
|
||||
|
||||
#define CAN_ISOTP_LISTEN_MODE 0x001 /* listen only (do not send FC) */
|
||||
#define CAN_ISOTP_EXTEND_ADDR 0x002 /* enable extended addressing */
|
||||
#define CAN_ISOTP_TX_PADDING 0x004 /* enable CAN frame padding tx path */
|
||||
#define CAN_ISOTP_RX_PADDING 0x008 /* enable CAN frame padding rx path */
|
||||
#define CAN_ISOTP_CHK_PAD_LEN 0x010 /* check received CAN frame padding */
|
||||
#define CAN_ISOTP_CHK_PAD_DATA 0x020 /* check received CAN frame padding */
|
||||
#define CAN_ISOTP_HALF_DUPLEX 0x040 /* half duplex error state handling */
|
||||
#define CAN_ISOTP_FORCE_TXSTMIN 0x080 /* ignore stmin from received FC */
|
||||
#define CAN_ISOTP_FORCE_RXSTMIN 0x100 /* ignore CFs depending on rx stmin */
|
||||
#define CAN_ISOTP_RX_EXT_ADDR 0x200 /* different rx extended addressing */
|
||||
#define CAN_ISOTP_WAIT_TX_DONE 0x400 /* wait for tx completion */
|
||||
|
||||
|
||||
/* default values */
|
||||
|
||||
#define CAN_ISOTP_DEFAULT_FLAGS 0
|
||||
#define CAN_ISOTP_DEFAULT_EXT_ADDRESS 0x00
|
||||
#define CAN_ISOTP_DEFAULT_PAD_CONTENT 0xCC /* prevent bit-stuffing */
|
||||
#define CAN_ISOTP_DEFAULT_FRAME_TXTIME 0
|
||||
#define CAN_ISOTP_DEFAULT_RECV_BS 0
|
||||
#define CAN_ISOTP_DEFAULT_RECV_STMIN 0x00
|
||||
#define CAN_ISOTP_DEFAULT_RECV_WFTMAX 0
|
||||
|
||||
#define CAN_ISOTP_DEFAULT_LL_MTU CAN_MTU
|
||||
#define CAN_ISOTP_DEFAULT_LL_TX_DL CAN_MAX_DLEN
|
||||
#define CAN_ISOTP_DEFAULT_LL_TX_FLAGS 0
|
||||
|
||||
/*
|
||||
* Remark on CAN_ISOTP_DEFAULT_RECV_* values:
|
||||
*
|
||||
* We can strongly assume, that the Linux Kernel implementation of
|
||||
* CAN_ISOTP is capable to run with BS=0, STmin=0 and WFTmax=0.
|
||||
* But as we like to be able to behave as a commonly available ECU,
|
||||
* these default settings can be changed via sockopts.
|
||||
* For that reason the STmin value is intentionally _not_ checked for
|
||||
* consistency and copied directly into the flow control (FC) frame.
|
||||
*/
|
||||
|
||||
#endif /* !_UAPI_CAN_ISOTP_H */
|
|
@ -49,6 +49,9 @@
|
|||
#include <linux/can.h>
|
||||
|
||||
#define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW)
|
||||
enum {
|
||||
SCM_CAN_RAW_ERRQUEUE = 1,
|
||||
};
|
||||
|
||||
/* for socket options affecting the socket (not the global system) */
|
||||
|
||||
|
|
|
@ -272,6 +272,7 @@ struct vfs_ns_cap_data {
|
|||
arbitrary SCSI commands */
|
||||
/* Allow setting encryption key on loopback filesystem */
|
||||
/* Allow setting zone reclaim policy */
|
||||
/* Allow everything under CAP_BPF and CAP_PERFMON for backward compatibility */
|
||||
|
||||
#define CAP_SYS_ADMIN 21
|
||||
|
||||
|
@ -285,6 +286,8 @@ struct vfs_ns_cap_data {
|
|||
processes and setting the scheduling algorithm used by another
|
||||
process. */
|
||||
/* Allow setting cpu affinity on other processes */
|
||||
/* Allow setting realtime ioprio class */
|
||||
/* Allow setting ioprio class on other processes */
|
||||
|
||||
#define CAP_SYS_NICE 23
|
||||
|
||||
|
@ -299,6 +302,7 @@ struct vfs_ns_cap_data {
|
|||
/* Allow more than 64hz interrupts from the real-time clock */
|
||||
/* Override max number of consoles on console allocation */
|
||||
/* Override max number of keymaps */
|
||||
/* Control memory reclaim behavior */
|
||||
|
||||
#define CAP_SYS_RESOURCE 24
|
||||
|
||||
|
@ -329,6 +333,8 @@ struct vfs_ns_cap_data {
|
|||
|
||||
#define CAP_AUDIT_CONTROL 30
|
||||
|
||||
/* Set or remove capabilities on files */
|
||||
|
||||
#define CAP_SETFCAP 31
|
||||
|
||||
/* Override MAC access.
|
||||
|
@ -364,8 +370,52 @@ struct vfs_ns_cap_data {
|
|||
|
||||
#define CAP_AUDIT_READ 37
|
||||
|
||||
/*
|
||||
* Allow system performance and observability privileged operations
|
||||
* using perf_events, i915_perf and other kernel subsystems
|
||||
*/
|
||||
|
||||
#define CAP_LAST_CAP CAP_AUDIT_READ
|
||||
#define CAP_PERFMON 38
|
||||
|
||||
/*
|
||||
* CAP_BPF allows the following BPF operations:
|
||||
* - Creating all types of BPF maps
|
||||
* - Advanced verifier features
|
||||
* - Indirect variable access
|
||||
* - Bounded loops
|
||||
* - BPF to BPF function calls
|
||||
* - Scalar precision tracking
|
||||
* - Larger complexity limits
|
||||
* - Dead code elimination
|
||||
* - And potentially other features
|
||||
* - Loading BPF Type Format (BTF) data
|
||||
* - Retrieve xlated and JITed code of BPF programs
|
||||
* - Use bpf_spin_lock() helper
|
||||
*
|
||||
* CAP_PERFMON relaxes the verifier checks further:
|
||||
* - BPF progs can use of pointer-to-integer conversions
|
||||
* - speculation attack hardening measures are bypassed
|
||||
* - bpf_probe_read to read arbitrary kernel memory is allowed
|
||||
* - bpf_trace_printk to print kernel memory is allowed
|
||||
*
|
||||
* CAP_SYS_ADMIN is required to use bpf_probe_write_user.
|
||||
*
|
||||
* CAP_SYS_ADMIN is required to iterate system wide loaded
|
||||
* programs, maps, links, BTFs and convert their IDs to file descriptors.
|
||||
*
|
||||
* CAP_PERFMON and CAP_BPF are required to load tracing programs.
|
||||
* CAP_NET_ADMIN and CAP_BPF are required to load networking programs.
|
||||
*/
|
||||
#define CAP_BPF 39
|
||||
|
||||
|
||||
/* Allow checkpoint/restore related operations */
|
||||
/* Allow PID selection during clone3() */
|
||||
/* Allow writing to ns_last_pid */
|
||||
|
||||
#define CAP_CHECKPOINT_RESTORE 40
|
||||
|
||||
#define CAP_LAST_CAP CAP_CHECKPOINT_RESTORE
|
||||
|
||||
#define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
|
||||
|
||||
|
|
|
@ -289,7 +289,10 @@ struct cdrom_generic_command
|
|||
unsigned char data_direction;
|
||||
int quiet;
|
||||
int timeout;
|
||||
void *reserved[1]; /* unused, actually */
|
||||
union {
|
||||
void *reserved[1]; /* unused, actually */
|
||||
void *unused;
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -1304,17 +1304,17 @@ static __inline__ void cec_msg_user_control_pressed(struct cec_msg *msg,
|
|||
if (!ui_cmd->has_opt_arg)
|
||||
return;
|
||||
switch (ui_cmd->ui_cmd) {
|
||||
case 0x56:
|
||||
case 0x57:
|
||||
case 0x60:
|
||||
case 0x68:
|
||||
case 0x69:
|
||||
case 0x6a:
|
||||
case CEC_OP_UI_CMD_SELECT_BROADCAST_TYPE:
|
||||
case CEC_OP_UI_CMD_SELECT_SOUND_PRESENTATION:
|
||||
case CEC_OP_UI_CMD_PLAY_FUNCTION:
|
||||
case CEC_OP_UI_CMD_SELECT_MEDIA_FUNCTION:
|
||||
case CEC_OP_UI_CMD_SELECT_AV_INPUT_FUNCTION:
|
||||
case CEC_OP_UI_CMD_SELECT_AUDIO_INPUT_FUNCTION:
|
||||
/* The optional operand is one byte for all these ui commands */
|
||||
msg->len++;
|
||||
msg->msg[3] = ui_cmd->play_mode;
|
||||
break;
|
||||
case 0x67:
|
||||
case CEC_OP_UI_CMD_TUNE_FUNCTION:
|
||||
msg->len += 4;
|
||||
msg->msg[3] = (ui_cmd->channel_identifier.channel_number_fmt << 2) |
|
||||
(ui_cmd->channel_identifier.major >> 8);
|
||||
|
@ -1333,17 +1333,17 @@ static __inline__ void cec_ops_user_control_pressed(const struct cec_msg *msg,
|
|||
if (msg->len == 3)
|
||||
return;
|
||||
switch (ui_cmd->ui_cmd) {
|
||||
case 0x56:
|
||||
case 0x57:
|
||||
case 0x60:
|
||||
case 0x68:
|
||||
case 0x69:
|
||||
case 0x6a:
|
||||
case CEC_OP_UI_CMD_SELECT_BROADCAST_TYPE:
|
||||
case CEC_OP_UI_CMD_SELECT_SOUND_PRESENTATION:
|
||||
case CEC_OP_UI_CMD_PLAY_FUNCTION:
|
||||
case CEC_OP_UI_CMD_SELECT_MEDIA_FUNCTION:
|
||||
case CEC_OP_UI_CMD_SELECT_AV_INPUT_FUNCTION:
|
||||
case CEC_OP_UI_CMD_SELECT_AUDIO_INPUT_FUNCTION:
|
||||
/* The optional operand is one byte for all these ui commands */
|
||||
ui_cmd->play_mode = msg->msg[3];
|
||||
ui_cmd->has_opt_arg = 1;
|
||||
break;
|
||||
case 0x67:
|
||||
case CEC_OP_UI_CMD_TUNE_FUNCTION:
|
||||
if (msg->len < 7)
|
||||
break;
|
||||
ui_cmd->has_opt_arg = 1;
|
||||
|
|
|
@ -317,6 +317,8 @@ static __inline__ int cec_is_unconfigured(__u16 log_addr_mask)
|
|||
#define CEC_CAP_NEEDS_HPD (1 << 6)
|
||||
/* Hardware can monitor CEC pin transitions */
|
||||
#define CEC_CAP_MONITOR_PIN (1 << 7)
|
||||
/* CEC_ADAP_G_CONNECTOR_INFO is available */
|
||||
#define CEC_CAP_CONNECTOR_INFO (1 << 8)
|
||||
|
||||
/**
|
||||
* struct cec_caps - CEC capabilities structure.
|
||||
|
@ -375,6 +377,34 @@ struct cec_log_addrs {
|
|||
/* CDC-Only device: supports only CDC messages */
|
||||
#define CEC_LOG_ADDRS_FL_CDC_ONLY (1 << 2)
|
||||
|
||||
/**
|
||||
* struct cec_drm_connector_info - tells which drm connector is
|
||||
* associated with the CEC adapter.
|
||||
* @card_no: drm card number
|
||||
* @connector_id: drm connector ID
|
||||
*/
|
||||
struct cec_drm_connector_info {
|
||||
__u32 card_no;
|
||||
__u32 connector_id;
|
||||
};
|
||||
|
||||
#define CEC_CONNECTOR_TYPE_NO_CONNECTOR 0
|
||||
#define CEC_CONNECTOR_TYPE_DRM 1
|
||||
|
||||
/**
|
||||
* struct cec_connector_info - tells if and which connector is
|
||||
* associated with the CEC adapter.
|
||||
* @type: connector type (if any)
|
||||
* @drm: drm connector info
|
||||
*/
|
||||
struct cec_connector_info {
|
||||
__u32 type;
|
||||
union {
|
||||
struct cec_drm_connector_info drm;
|
||||
__u32 raw[16];
|
||||
};
|
||||
};
|
||||
|
||||
/* Events */
|
||||
|
||||
/* Event that occurs when the adapter state changes */
|
||||
|
@ -398,10 +428,17 @@ struct cec_log_addrs {
|
|||
* struct cec_event_state_change - used when the CEC adapter changes state.
|
||||
* @phys_addr: the current physical address
|
||||
* @log_addr_mask: the current logical address mask
|
||||
* @have_conn_info: if non-zero, then HDMI connector information is available.
|
||||
* This field is only valid if CEC_CAP_CONNECTOR_INFO is set. If that
|
||||
* capability is set and @have_conn_info is zero, then that indicates
|
||||
* that the HDMI connector device is not instantiated, either because
|
||||
* the HDMI driver is still configuring the device or because the HDMI
|
||||
* device was unbound.
|
||||
*/
|
||||
struct cec_event_state_change {
|
||||
__u16 phys_addr;
|
||||
__u16 log_addr_mask;
|
||||
__u16 have_conn_info;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -476,6 +513,9 @@ struct cec_event {
|
|||
#define CEC_G_MODE _IOR('a', 8, __u32)
|
||||
#define CEC_S_MODE _IOW('a', 9, __u32)
|
||||
|
||||
/* Get the connector info */
|
||||
#define CEC_ADAP_G_CONNECTOR_INFO _IOR('a', 10, struct cec_connector_info)
|
||||
|
||||
/*
|
||||
* The remainder of this header defines all CEC messages and operands.
|
||||
* The format matters since it the cec-ctl utility parses it to generate
|
||||
|
@ -820,6 +860,95 @@ struct cec_event {
|
|||
#define CEC_OP_MENU_STATE_DEACTIVATED 0x01
|
||||
|
||||
#define CEC_MSG_USER_CONTROL_PRESSED 0x44
|
||||
/* UI Command Operand (ui_cmd) */
|
||||
#define CEC_OP_UI_CMD_SELECT 0x00
|
||||
#define CEC_OP_UI_CMD_UP 0x01
|
||||
#define CEC_OP_UI_CMD_DOWN 0x02
|
||||
#define CEC_OP_UI_CMD_LEFT 0x03
|
||||
#define CEC_OP_UI_CMD_RIGHT 0x04
|
||||
#define CEC_OP_UI_CMD_RIGHT_UP 0x05
|
||||
#define CEC_OP_UI_CMD_RIGHT_DOWN 0x06
|
||||
#define CEC_OP_UI_CMD_LEFT_UP 0x07
|
||||
#define CEC_OP_UI_CMD_LEFT_DOWN 0x08
|
||||
#define CEC_OP_UI_CMD_DEVICE_ROOT_MENU 0x09
|
||||
#define CEC_OP_UI_CMD_DEVICE_SETUP_MENU 0x0a
|
||||
#define CEC_OP_UI_CMD_CONTENTS_MENU 0x0b
|
||||
#define CEC_OP_UI_CMD_FAVORITE_MENU 0x0c
|
||||
#define CEC_OP_UI_CMD_BACK 0x0d
|
||||
#define CEC_OP_UI_CMD_MEDIA_TOP_MENU 0x10
|
||||
#define CEC_OP_UI_CMD_MEDIA_CONTEXT_SENSITIVE_MENU 0x11
|
||||
#define CEC_OP_UI_CMD_NUMBER_ENTRY_MODE 0x1d
|
||||
#define CEC_OP_UI_CMD_NUMBER_11 0x1e
|
||||
#define CEC_OP_UI_CMD_NUMBER_12 0x1f
|
||||
#define CEC_OP_UI_CMD_NUMBER_0_OR_NUMBER_10 0x20
|
||||
#define CEC_OP_UI_CMD_NUMBER_1 0x21
|
||||
#define CEC_OP_UI_CMD_NUMBER_2 0x22
|
||||
#define CEC_OP_UI_CMD_NUMBER_3 0x23
|
||||
#define CEC_OP_UI_CMD_NUMBER_4 0x24
|
||||
#define CEC_OP_UI_CMD_NUMBER_5 0x25
|
||||
#define CEC_OP_UI_CMD_NUMBER_6 0x26
|
||||
#define CEC_OP_UI_CMD_NUMBER_7 0x27
|
||||
#define CEC_OP_UI_CMD_NUMBER_8 0x28
|
||||
#define CEC_OP_UI_CMD_NUMBER_9 0x29
|
||||
#define CEC_OP_UI_CMD_DOT 0x2a
|
||||
#define CEC_OP_UI_CMD_ENTER 0x2b
|
||||
#define CEC_OP_UI_CMD_CLEAR 0x2c
|
||||
#define CEC_OP_UI_CMD_NEXT_FAVORITE 0x2f
|
||||
#define CEC_OP_UI_CMD_CHANNEL_UP 0x30
|
||||
#define CEC_OP_UI_CMD_CHANNEL_DOWN 0x31
|
||||
#define CEC_OP_UI_CMD_PREVIOUS_CHANNEL 0x32
|
||||
#define CEC_OP_UI_CMD_SOUND_SELECT 0x33
|
||||
#define CEC_OP_UI_CMD_INPUT_SELECT 0x34
|
||||
#define CEC_OP_UI_CMD_DISPLAY_INFORMATION 0x35
|
||||
#define CEC_OP_UI_CMD_HELP 0x36
|
||||
#define CEC_OP_UI_CMD_PAGE_UP 0x37
|
||||
#define CEC_OP_UI_CMD_PAGE_DOWN 0x38
|
||||
#define CEC_OP_UI_CMD_POWER 0x40
|
||||
#define CEC_OP_UI_CMD_VOLUME_UP 0x41
|
||||
#define CEC_OP_UI_CMD_VOLUME_DOWN 0x42
|
||||
#define CEC_OP_UI_CMD_MUTE 0x43
|
||||
#define CEC_OP_UI_CMD_PLAY 0x44
|
||||
#define CEC_OP_UI_CMD_STOP 0x45
|
||||
#define CEC_OP_UI_CMD_PAUSE 0x46
|
||||
#define CEC_OP_UI_CMD_RECORD 0x47
|
||||
#define CEC_OP_UI_CMD_REWIND 0x48
|
||||
#define CEC_OP_UI_CMD_FAST_FORWARD 0x49
|
||||
#define CEC_OP_UI_CMD_EJECT 0x4a
|
||||
#define CEC_OP_UI_CMD_SKIP_FORWARD 0x4b
|
||||
#define CEC_OP_UI_CMD_SKIP_BACKWARD 0x4c
|
||||
#define CEC_OP_UI_CMD_STOP_RECORD 0x4d
|
||||
#define CEC_OP_UI_CMD_PAUSE_RECORD 0x4e
|
||||
#define CEC_OP_UI_CMD_ANGLE 0x50
|
||||
#define CEC_OP_UI_CMD_SUB_PICTURE 0x51
|
||||
#define CEC_OP_UI_CMD_VIDEO_ON_DEMAND 0x52
|
||||
#define CEC_OP_UI_CMD_ELECTRONIC_PROGRAM_GUIDE 0x53
|
||||
#define CEC_OP_UI_CMD_TIMER_PROGRAMMING 0x54
|
||||
#define CEC_OP_UI_CMD_INITIAL_CONFIGURATION 0x55
|
||||
#define CEC_OP_UI_CMD_SELECT_BROADCAST_TYPE 0x56
|
||||
#define CEC_OP_UI_CMD_SELECT_SOUND_PRESENTATION 0x57
|
||||
#define CEC_OP_UI_CMD_AUDIO_DESCRIPTION 0x58
|
||||
#define CEC_OP_UI_CMD_INTERNET 0x59
|
||||
#define CEC_OP_UI_CMD_3D_MODE 0x5a
|
||||
#define CEC_OP_UI_CMD_PLAY_FUNCTION 0x60
|
||||
#define CEC_OP_UI_CMD_PAUSE_PLAY_FUNCTION 0x61
|
||||
#define CEC_OP_UI_CMD_RECORD_FUNCTION 0x62
|
||||
#define CEC_OP_UI_CMD_PAUSE_RECORD_FUNCTION 0x63
|
||||
#define CEC_OP_UI_CMD_STOP_FUNCTION 0x64
|
||||
#define CEC_OP_UI_CMD_MUTE_FUNCTION 0x65
|
||||
#define CEC_OP_UI_CMD_RESTORE_VOLUME_FUNCTION 0x66
|
||||
#define CEC_OP_UI_CMD_TUNE_FUNCTION 0x67
|
||||
#define CEC_OP_UI_CMD_SELECT_MEDIA_FUNCTION 0x68
|
||||
#define CEC_OP_UI_CMD_SELECT_AV_INPUT_FUNCTION 0x69
|
||||
#define CEC_OP_UI_CMD_SELECT_AUDIO_INPUT_FUNCTION 0x6a
|
||||
#define CEC_OP_UI_CMD_POWER_TOGGLE_FUNCTION 0x6b
|
||||
#define CEC_OP_UI_CMD_POWER_OFF_FUNCTION 0x6c
|
||||
#define CEC_OP_UI_CMD_POWER_ON_FUNCTION 0x6d
|
||||
#define CEC_OP_UI_CMD_F1_BLUE 0x71
|
||||
#define CEC_OP_UI_CMD_F2_RED 0x72
|
||||
#define CEC_OP_UI_CMD_F3_GREEN 0x73
|
||||
#define CEC_OP_UI_CMD_F4_YELLOW 0x74
|
||||
#define CEC_OP_UI_CMD_F5 0x75
|
||||
#define CEC_OP_UI_CMD_DATA 0x76
|
||||
/* UI Broadcast Type Operand (ui_bcast_type) */
|
||||
#define CEC_OP_UI_BCAST_TYPE_TOGGLE_ALL 0x00
|
||||
#define CEC_OP_UI_BCAST_TYPE_TOGGLE_DIG_ANA 0x01
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
* ioctl interface for the scsi media changer driver
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_CHIO_H
|
||||
#define _LINUX_CHIO_H
|
||||
|
||||
/* changer element types */
|
||||
#define CHET_MT 0 /* media transport element (robot) */
|
||||
#define CHET_ST 1 /* storage element (media slots) */
|
||||
|
@ -160,10 +163,4 @@ struct changer_set_voltag {
|
|||
#define CHIOSVOLTAG _IOW('c',18,struct changer_set_voltag)
|
||||
#define CHIOGVPARAMS _IOR('c',19,struct changer_vendor_params)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* c-basic-offset: 8
|
||||
* End:
|
||||
*/
|
||||
#endif /* _LINUX_CHIO_H */
|
||||
|
|
9
linux-headers/include/linux/close_range.h
Normal file
9
linux-headers/include/linux/close_range.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _LINUX_CLOSE_RANGE_H
|
||||
#define _LINUX_CLOSE_RANGE_H
|
||||
|
||||
/* Unshare the file descriptor table before closing file descriptors. */
|
||||
#define CLOSE_RANGE_UNSHARE (1U << 1)
|
||||
|
||||
#endif /* _LINUX_CLOSE_RANGE_H */
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
#include <linux/const.h>
|
||||
|
||||
#define STM_FLAG_TIMESTAMPED _BITUL(3)
|
||||
#define STM_FLAG_MARKED _BITUL(4)
|
||||
#define STM_FLAG_GUARANTEED _BITUL(7)
|
||||
|
||||
/*
|
||||
|
|
|
@ -83,9 +83,9 @@ struct cyclades_monitor {
|
|||
* open)
|
||||
*/
|
||||
struct cyclades_idle_stats {
|
||||
__kernel_time_t in_use; /* Time device has been in use (secs) */
|
||||
__kernel_time_t recv_idle; /* Time since last char received (secs) */
|
||||
__kernel_time_t xmit_idle; /* Time since last char transmitted (secs) */
|
||||
__kernel_old_time_t in_use; /* Time device has been in use (secs) */
|
||||
__kernel_old_time_t recv_idle; /* Time since last char received (secs) */
|
||||
__kernel_old_time_t xmit_idle; /* Time since last char transmitted (secs) */
|
||||
unsigned long recv_bytes; /* Bytes received */
|
||||
unsigned long xmit_bytes; /* Bytes transmitted */
|
||||
unsigned long overruns; /* Input overruns */
|
||||
|
|
|
@ -286,7 +286,7 @@ struct dcbmsg {
|
|||
* @DCB_CMD_GNUMTCS: get the number of traffic classes currently supported
|
||||
* @DCB_CMD_SNUMTCS: set the number of traffic classes
|
||||
* @DCB_CMD_GBCN: set backward congestion notification configuration
|
||||
* @DCB_CMD_SBCN: get backward congestion notification configration.
|
||||
* @DCB_CMD_SBCN: get backward congestion notification configuration.
|
||||
* @DCB_CMD_GAPP: get application protocol configuration
|
||||
* @DCB_CMD_SAPP: set application protocol configuration
|
||||
* @DCB_CMD_IEEE_SET: set IEEE 802.1Qaz configuration
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
#ifndef _LINUX_DEVLINK_H_
|
||||
#define _LINUX_DEVLINK_H_
|
||||
|
||||
#include <linux/const.h>
|
||||
|
||||
#define DEVLINK_GENL_NAME "devlink"
|
||||
#define DEVLINK_GENL_VERSION 0x1
|
||||
#define DEVLINK_GENL_MCGRP_CONFIG_NAME "config"
|
||||
|
@ -117,6 +119,13 @@ enum devlink_command {
|
|||
DEVLINK_CMD_TRAP_GROUP_NEW,
|
||||
DEVLINK_CMD_TRAP_GROUP_DEL,
|
||||
|
||||
DEVLINK_CMD_TRAP_POLICER_GET, /* can dump */
|
||||
DEVLINK_CMD_TRAP_POLICER_SET,
|
||||
DEVLINK_CMD_TRAP_POLICER_NEW,
|
||||
DEVLINK_CMD_TRAP_POLICER_DEL,
|
||||
|
||||
DEVLINK_CMD_HEALTH_REPORTER_TEST,
|
||||
|
||||
/* add new commands above here */
|
||||
__DEVLINK_CMD_MAX,
|
||||
DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1
|
||||
|
@ -187,6 +196,10 @@ enum devlink_port_flavour {
|
|||
* for the PCI VF. It is an internal
|
||||
* port that faces the PCI VF.
|
||||
*/
|
||||
DEVLINK_PORT_FLAVOUR_VIRTUAL, /* Any virtual port facing the user. */
|
||||
DEVLINK_PORT_FLAVOUR_UNUSED, /* Port which exists in the switch, but
|
||||
* is not used in any way.
|
||||
*/
|
||||
};
|
||||
|
||||
enum devlink_param_cmode {
|
||||
|
@ -216,20 +229,46 @@ enum devlink_param_reset_dev_on_drv_probe_value {
|
|||
enum {
|
||||
DEVLINK_ATTR_STATS_RX_PACKETS, /* u64 */
|
||||
DEVLINK_ATTR_STATS_RX_BYTES, /* u64 */
|
||||
DEVLINK_ATTR_STATS_RX_DROPPED, /* u64 */
|
||||
|
||||
__DEVLINK_ATTR_STATS_MAX,
|
||||
DEVLINK_ATTR_STATS_MAX = __DEVLINK_ATTR_STATS_MAX - 1
|
||||
};
|
||||
|
||||
/* Specify what sections of a flash component can be overwritten when
|
||||
* performing an update. Overwriting of firmware binary sections is always
|
||||
* implicitly assumed to be allowed.
|
||||
*
|
||||
* Each section must be documented in
|
||||
* Documentation/networking/devlink/devlink-flash.rst
|
||||
*
|
||||
*/
|
||||
enum {
|
||||
DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT,
|
||||
DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT,
|
||||
|
||||
__DEVLINK_FLASH_OVERWRITE_MAX_BIT,
|
||||
DEVLINK_FLASH_OVERWRITE_MAX_BIT = __DEVLINK_FLASH_OVERWRITE_MAX_BIT - 1
|
||||
};
|
||||
|
||||
#define DEVLINK_FLASH_OVERWRITE_SETTINGS _BITUL(DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT)
|
||||
#define DEVLINK_FLASH_OVERWRITE_IDENTIFIERS _BITUL(DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT)
|
||||
|
||||
#define DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS \
|
||||
(_BITUL(__DEVLINK_FLASH_OVERWRITE_MAX_BIT) - 1)
|
||||
|
||||
/**
|
||||
* enum devlink_trap_action - Packet trap action.
|
||||
* @DEVLINK_TRAP_ACTION_DROP: Packet is dropped by the device and a copy is not
|
||||
* sent to the CPU.
|
||||
* @DEVLINK_TRAP_ACTION_TRAP: The sole copy of the packet is sent to the CPU.
|
||||
* @DEVLINK_TRAP_ACTION_MIRROR: Packet is forwarded by the device and a copy is
|
||||
* sent to the CPU.
|
||||
*/
|
||||
enum devlink_trap_action {
|
||||
DEVLINK_TRAP_ACTION_DROP,
|
||||
DEVLINK_TRAP_ACTION_TRAP,
|
||||
DEVLINK_TRAP_ACTION_MIRROR,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -243,17 +282,48 @@ enum devlink_trap_action {
|
|||
* control plane for resolution. Trapped packets
|
||||
* are processed by devlink and injected to
|
||||
* the kernel's Rx path.
|
||||
* @DEVLINK_TRAP_TYPE_CONTROL: Packet was trapped because it is required for
|
||||
* the correct functioning of the control plane.
|
||||
* For example, an ARP request packet. Trapped
|
||||
* packets are injected to the kernel's Rx path,
|
||||
* but not reported to drop monitor.
|
||||
*/
|
||||
enum devlink_trap_type {
|
||||
DEVLINK_TRAP_TYPE_DROP,
|
||||
DEVLINK_TRAP_TYPE_EXCEPTION,
|
||||
DEVLINK_TRAP_TYPE_CONTROL,
|
||||
};
|
||||
|
||||
enum {
|
||||
/* Trap can report input port as metadata */
|
||||
DEVLINK_ATTR_TRAP_METADATA_TYPE_IN_PORT,
|
||||
/* Trap can report flow action cookie as metadata */
|
||||
DEVLINK_ATTR_TRAP_METADATA_TYPE_FA_COOKIE,
|
||||
};
|
||||
|
||||
enum devlink_reload_action {
|
||||
DEVLINK_RELOAD_ACTION_UNSPEC,
|
||||
DEVLINK_RELOAD_ACTION_DRIVER_REINIT, /* Driver entities re-instantiation */
|
||||
DEVLINK_RELOAD_ACTION_FW_ACTIVATE, /* FW activate */
|
||||
|
||||
/* Add new reload actions above */
|
||||
__DEVLINK_RELOAD_ACTION_MAX,
|
||||
DEVLINK_RELOAD_ACTION_MAX = __DEVLINK_RELOAD_ACTION_MAX - 1
|
||||
};
|
||||
|
||||
enum devlink_reload_limit {
|
||||
DEVLINK_RELOAD_LIMIT_UNSPEC, /* unspecified, no constraints */
|
||||
DEVLINK_RELOAD_LIMIT_NO_RESET, /* No reset allowed, no down time allowed,
|
||||
* no link flap and no configuration is lost.
|
||||
*/
|
||||
|
||||
/* Add new reload limit above */
|
||||
__DEVLINK_RELOAD_LIMIT_MAX,
|
||||
DEVLINK_RELOAD_LIMIT_MAX = __DEVLINK_RELOAD_LIMIT_MAX - 1
|
||||
};
|
||||
|
||||
#define DEVLINK_RELOAD_LIMITS_VALID_MASK (_BITUL(__DEVLINK_RELOAD_LIMIT_MAX) - 1)
|
||||
|
||||
enum devlink_attr {
|
||||
/* don't change the order or add anything between, this is ABI! */
|
||||
DEVLINK_ATTR_UNSPEC,
|
||||
|
@ -422,6 +492,43 @@ enum devlink_attr {
|
|||
DEVLINK_ATTR_RELOAD_FAILED, /* u8 0 or 1 */
|
||||
|
||||
DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS_NS, /* u64 */
|
||||
|
||||
DEVLINK_ATTR_NETNS_FD, /* u32 */
|
||||
DEVLINK_ATTR_NETNS_PID, /* u32 */
|
||||
DEVLINK_ATTR_NETNS_ID, /* u32 */
|
||||
|
||||
DEVLINK_ATTR_HEALTH_REPORTER_AUTO_DUMP, /* u8 */
|
||||
|
||||
DEVLINK_ATTR_TRAP_POLICER_ID, /* u32 */
|
||||
DEVLINK_ATTR_TRAP_POLICER_RATE, /* u64 */
|
||||
DEVLINK_ATTR_TRAP_POLICER_BURST, /* u64 */
|
||||
|
||||
DEVLINK_ATTR_PORT_FUNCTION, /* nested */
|
||||
|
||||
DEVLINK_ATTR_INFO_BOARD_SERIAL_NUMBER, /* string */
|
||||
|
||||
DEVLINK_ATTR_PORT_LANES, /* u32 */
|
||||
DEVLINK_ATTR_PORT_SPLITTABLE, /* u8 */
|
||||
|
||||
DEVLINK_ATTR_PORT_EXTERNAL, /* u8 */
|
||||
DEVLINK_ATTR_PORT_CONTROLLER_NUMBER, /* u32 */
|
||||
|
||||
DEVLINK_ATTR_FLASH_UPDATE_STATUS_TIMEOUT, /* u64 */
|
||||
DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK, /* bitfield32 */
|
||||
|
||||
DEVLINK_ATTR_RELOAD_ACTION, /* u8 */
|
||||
DEVLINK_ATTR_RELOAD_ACTIONS_PERFORMED, /* bitfield32 */
|
||||
DEVLINK_ATTR_RELOAD_LIMITS, /* bitfield32 */
|
||||
|
||||
DEVLINK_ATTR_DEV_STATS, /* nested */
|
||||
DEVLINK_ATTR_RELOAD_STATS, /* nested */
|
||||
DEVLINK_ATTR_RELOAD_STATS_ENTRY, /* nested */
|
||||
DEVLINK_ATTR_RELOAD_STATS_LIMIT, /* u8 */
|
||||
DEVLINK_ATTR_RELOAD_STATS_VALUE, /* u32 */
|
||||
DEVLINK_ATTR_REMOTE_RELOAD_STATS, /* nested */
|
||||
DEVLINK_ATTR_RELOAD_ACTION_INFO, /* nested */
|
||||
DEVLINK_ATTR_RELOAD_ACTION_STATS, /* nested */
|
||||
|
||||
/* add new attributes above here, update the policy in devlink.c */
|
||||
|
||||
__DEVLINK_ATTR_MAX,
|
||||
|
@ -468,4 +575,12 @@ enum devlink_resource_unit {
|
|||
DEVLINK_RESOURCE_UNIT_ENTRY,
|
||||
};
|
||||
|
||||
enum devlink_port_function_attr {
|
||||
DEVLINK_PORT_FUNCTION_ATTR_UNSPEC,
|
||||
DEVLINK_PORT_FUNCTION_ATTR_HW_ADDR, /* binary */
|
||||
|
||||
__DEVLINK_PORT_FUNCTION_ATTR_MAX,
|
||||
DEVLINK_PORT_FUNCTION_ATTR_MAX = __DEVLINK_PORT_FUNCTION_ATTR_MAX - 1
|
||||
};
|
||||
|
||||
#endif /* _LINUX_DEVLINK_H_ */
|
||||
|
|
|
@ -272,9 +272,9 @@ enum {
|
|||
#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
|
||||
|
||||
#define DM_VERSION_MAJOR 4
|
||||
#define DM_VERSION_MINOR 41
|
||||
#define DM_VERSION_MINOR 43
|
||||
#define DM_VERSION_PATCHLEVEL 0
|
||||
#define DM_VERSION_EXTRA "-ioctl (2019-09-16)"
|
||||
#define DM_VERSION_EXTRA "-ioctl (2020-10-01)"
|
||||
|
||||
/* Status bits */
|
||||
#define DM_READONLY_FLAG (1 << 0) /* In/Out */
|
||||
|
|
|
@ -39,6 +39,12 @@ struct dma_buf_sync {
|
|||
|
||||
#define DMA_BUF_BASE 'b'
|
||||
#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
|
||||
|
||||
/* 32/64bitness of this uapi was botched in android, there's no difference
|
||||
* between them in actual uapi, they're just different numbers.
|
||||
*/
|
||||
#define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *)
|
||||
#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, u32)
|
||||
#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, u64)
|
||||
|
||||
#endif
|
||||
|
|
53
linux-headers/include/linux/dma-heap.h
Normal file
53
linux-headers/include/linux/dma-heap.h
Normal file
|
@ -0,0 +1,53 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* DMABUF Heaps Userspace API
|
||||
*
|
||||
* Copyright (C) 2011 Google, Inc.
|
||||
* Copyright (C) 2019 Linaro Ltd.
|
||||
*/
|
||||
#ifndef _LINUX_DMABUF_POOL_H
|
||||
#define _LINUX_DMABUF_POOL_H
|
||||
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/**
|
||||
* DOC: DMABUF Heaps Userspace API
|
||||
*/
|
||||
|
||||
/* Valid FD_FLAGS are O_CLOEXEC, O_RDONLY, O_WRONLY, O_RDWR */
|
||||
#define DMA_HEAP_VALID_FD_FLAGS (O_CLOEXEC | O_ACCMODE)
|
||||
|
||||
/* Currently no heap flags */
|
||||
#define DMA_HEAP_VALID_HEAP_FLAGS (0)
|
||||
|
||||
/**
|
||||
* struct dma_heap_allocation_data - metadata passed from userspace for
|
||||
* allocations
|
||||
* @len: size of the allocation
|
||||
* @fd: will be populated with a fd which provides the
|
||||
* handle to the allocated dma-buf
|
||||
* @fd_flags: file descriptor flags used when allocating
|
||||
* @heap_flags: flags passed to heap
|
||||
*
|
||||
* Provided by userspace as an argument to the ioctl
|
||||
*/
|
||||
struct dma_heap_allocation_data {
|
||||
__u64 len;
|
||||
__u32 fd;
|
||||
__u32 fd_flags;
|
||||
__u64 heap_flags;
|
||||
};
|
||||
|
||||
#define DMA_HEAP_IOC_MAGIC 'H'
|
||||
|
||||
/**
|
||||
* DOC: DMA_HEAP_IOCTL_ALLOC - allocate memory from pool
|
||||
*
|
||||
* Takes a dma_heap_allocation_data struct and returns it with the fd field
|
||||
* populated with the dmabuf handle of the allocation.
|
||||
*/
|
||||
#define DMA_HEAP_IOCTL_ALLOC _IOWR(DMA_HEAP_IOC_MAGIC, 0x0,\
|
||||
struct dma_heap_allocation_data)
|
||||
|
||||
#endif /* _LINUX_DMABUF_POOL_H */
|
|
@ -61,12 +61,16 @@ typedef struct fs_disk_quota {
|
|||
__u64 d_ino_softlimit;/* preferred inode limit */
|
||||
__u64 d_bcount; /* # disk blocks owned by the user */
|
||||
__u64 d_icount; /* # inodes owned by the user */
|
||||
__s32 d_itimer; /* zero if within inode limits */
|
||||
/* if not, we refuse service */
|
||||
__s32 d_itimer; /* Zero if within inode limits. If
|
||||
* not, we refuse service at this time
|
||||
* (in seconds since Unix epoch) */
|
||||
__s32 d_btimer; /* similar to above; for disk blocks */
|
||||
__u16 d_iwarns; /* # warnings issued wrt num inodes */
|
||||
__u16 d_bwarns; /* # warnings issued wrt disk blocks */
|
||||
__s32 d_padding2; /* padding2 - for future use */
|
||||
__s8 d_itimer_hi; /* upper 8 bits of timer values */
|
||||
__s8 d_btimer_hi;
|
||||
__s8 d_rtbtimer_hi;
|
||||
__s8 d_padding2; /* padding2 - for future use */
|
||||
__u64 d_rtb_hardlimit;/* absolute limit on realtime blks */
|
||||
__u64 d_rtb_softlimit;/* preferred limit on RT disk blks */
|
||||
__u64 d_rtbcount; /* # realtime blocks owned */
|
||||
|
@ -121,6 +125,12 @@ typedef struct fs_disk_quota {
|
|||
#define FS_DQ_RTBCOUNT (1<<14)
|
||||
#define FS_DQ_ACCT_MASK (FS_DQ_BCOUNT | FS_DQ_ICOUNT | FS_DQ_RTBCOUNT)
|
||||
|
||||
/*
|
||||
* Quota expiration timestamps are 40-bit signed integers, with the upper 8
|
||||
* bits encoded in the _hi fields.
|
||||
*/
|
||||
#define FS_DQ_BIGTIME (1<<15)
|
||||
|
||||
/*
|
||||
* Various flags related to quotactl(2).
|
||||
*/
|
||||
|
|
|
@ -36,6 +36,7 @@ typedef __s64 Elf64_Sxword;
|
|||
#define PT_LOPROC 0x70000000
|
||||
#define PT_HIPROC 0x7fffffff
|
||||
#define PT_GNU_EH_FRAME 0x6474e550
|
||||
#define PT_GNU_PROPERTY 0x6474e553
|
||||
|
||||
#define PT_GNU_STACK (PT_LOOS + 0x474e551)
|
||||
|
||||
|
@ -52,7 +53,7 @@ typedef __s64 Elf64_Sxword;
|
|||
*
|
||||
* - Oracle: Linker and Libraries.
|
||||
* Part No: 817–1984–19, August 2011.
|
||||
* http://docs.oracle.com/cd/E18752_01/pdf/817-1984.pdf
|
||||
* https://docs.oracle.com/cd/E18752_01/pdf/817-1984.pdf
|
||||
*
|
||||
* - System V ABI AMD64 Architecture Processor Supplement
|
||||
* Draft Version 0.99.4,
|
||||
|
@ -367,6 +368,7 @@ typedef struct elf64_shdr {
|
|||
* Notes used in ET_CORE. Architectures export some of the arch register sets
|
||||
* using the corresponding note types via the PTRACE_GETREGSET and
|
||||
* PTRACE_SETREGSET requests.
|
||||
* The note name for all these is "LINUX".
|
||||
*/
|
||||
#define NT_PRSTATUS 1
|
||||
#define NT_PRFPREG 2
|
||||
|
@ -423,6 +425,7 @@ typedef struct elf64_shdr {
|
|||
#define NT_ARM_PAC_MASK 0x406 /* ARM pointer authentication code masks */
|
||||
#define NT_ARM_PACA_KEYS 0x407 /* ARM pointer authentication address keys */
|
||||
#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication generic key */
|
||||
#define NT_ARM_TAGGED_ADDR_CTRL 0x409 /* arm64 tagged address control (prctl()) */
|
||||
#define NT_ARC_V2 0x600 /* ARCv2 accumulator/extra registers */
|
||||
#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note */
|
||||
#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers */
|
||||
|
@ -430,6 +433,9 @@ typedef struct elf64_shdr {
|
|||
#define NT_MIPS_MSA 0x802 /* MIPS SIMD registers */
|
||||
#define NT_RISCV_VECTOR 0x900 /* RISC-V vector registers */
|
||||
|
||||
/* Note types with note name "GNU" */
|
||||
#define NT_GNU_PROPERTY_TYPE_0 5
|
||||
|
||||
/* Note header in a PT_NOTE section */
|
||||
typedef struct elf32_note {
|
||||
Elf32_Word n_namesz; /* Name size */
|
||||
|
@ -444,4 +450,10 @@ typedef struct elf64_note {
|
|||
Elf64_Word n_type; /* Content type */
|
||||
} Elf64_Nhdr;
|
||||
|
||||
/* .note.gnu.property types for EM_AARCH64: */
|
||||
#define GNU_PROPERTY_AARCH64_FEATURE_1_AND 0xc0000000
|
||||
|
||||
/* Bits for GNU_PROPERTY_AARCH64_FEATURE_1_BTI */
|
||||
#define GNU_PROPERTY_AARCH64_FEATURE_1_BTI (1U << 0)
|
||||
|
||||
#endif /* _LINUX_ELF_H */
|
||||
|
|
|
@ -1,97 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _LINUX_ELFCORE_H
|
||||
#define _LINUX_ELFCORE_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/signal.h>
|
||||
#include <linux/time.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/elf.h>
|
||||
#include <linux/fs.h>
|
||||
|
||||
struct elf_siginfo
|
||||
{
|
||||
int si_signo; /* signal number */
|
||||
int si_code; /* extra code */
|
||||
int si_errno; /* errno */
|
||||
};
|
||||
|
||||
|
||||
typedef elf_greg_t greg_t;
|
||||
typedef elf_gregset_t gregset_t;
|
||||
typedef elf_fpregset_t fpregset_t;
|
||||
typedef elf_fpxregset_t fpxregset_t;
|
||||
#define NGREG ELF_NGREG
|
||||
|
||||
/*
|
||||
* Definitions to generate Intel SVR4-like core files.
|
||||
* These mostly have the same names as the SVR4 types with "elf_"
|
||||
* tacked on the front to prevent clashes with linux definitions,
|
||||
* and the typedef forms have been avoided. This is mostly like
|
||||
* the SVR4 structure, but more Linuxy, with things that Linux does
|
||||
* not support and which gdb doesn't really use excluded.
|
||||
* Fields present but not used are marked with "XXX".
|
||||
*/
|
||||
struct elf_prstatus
|
||||
{
|
||||
#if 0
|
||||
long pr_flags; /* XXX Process flags */
|
||||
short pr_why; /* XXX Reason for process halt */
|
||||
short pr_what; /* XXX More detailed reason */
|
||||
#endif
|
||||
struct elf_siginfo pr_info; /* Info associated with signal */
|
||||
short pr_cursig; /* Current signal */
|
||||
unsigned long pr_sigpend; /* Set of pending signals */
|
||||
unsigned long pr_sighold; /* Set of held signals */
|
||||
#if 0
|
||||
struct sigaltstack pr_altstack; /* Alternate stack info */
|
||||
struct sigaction pr_action; /* Signal action for current sig */
|
||||
#endif
|
||||
pid_t pr_pid;
|
||||
pid_t pr_ppid;
|
||||
pid_t pr_pgrp;
|
||||
pid_t pr_sid;
|
||||
struct timeval pr_utime; /* User time */
|
||||
struct timeval pr_stime; /* System time */
|
||||
struct timeval pr_cutime; /* Cumulative user time */
|
||||
struct timeval pr_cstime; /* Cumulative system time */
|
||||
#if 0
|
||||
long pr_instr; /* Current instruction */
|
||||
#endif
|
||||
elf_gregset_t pr_reg; /* GP registers */
|
||||
#ifdef CONFIG_BINFMT_ELF_FDPIC
|
||||
/* When using FDPIC, the loadmap addresses need to be communicated
|
||||
* to GDB in order for GDB to do the necessary relocations. The
|
||||
* fields (below) used to communicate this information are placed
|
||||
* immediately after ``pr_reg'', so that the loadmap addresses may
|
||||
* be viewed as part of the register set if so desired.
|
||||
*/
|
||||
unsigned long pr_exec_fdpic_loadmap;
|
||||
unsigned long pr_interp_fdpic_loadmap;
|
||||
#endif
|
||||
int pr_fpvalid; /* True if math co-processor being used. */
|
||||
};
|
||||
|
||||
#define ELF_PRARGSZ (80) /* Number of chars for args */
|
||||
|
||||
struct elf_prpsinfo
|
||||
{
|
||||
char pr_state; /* numeric process state */
|
||||
char pr_sname; /* char for pr_state */
|
||||
char pr_zomb; /* zombie */
|
||||
char pr_nice; /* nice val */
|
||||
unsigned long pr_flag; /* flags */
|
||||
__kernel_uid_t pr_uid;
|
||||
__kernel_gid_t pr_gid;
|
||||
pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid;
|
||||
/* Lots missing */
|
||||
char pr_fname[16]; /* filename of executable */
|
||||
char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */
|
||||
};
|
||||
|
||||
typedef struct elf_prstatus prstatus_t;
|
||||
typedef struct elf_prpsinfo prpsinfo_t;
|
||||
#define PRARGSZ ELF_PRARGSZ
|
||||
|
||||
|
||||
#endif /* _LINUX_ELFCORE_H */
|
|
@ -5,6 +5,13 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/time_types.h>
|
||||
|
||||
/* RFC 4884: return offset to extension struct + validation */
|
||||
struct sock_ee_data_rfc4884 {
|
||||
__u16 len;
|
||||
__u8 flags;
|
||||
__u8 reserved;
|
||||
};
|
||||
|
||||
struct sock_extended_err {
|
||||
__u32 ee_errno;
|
||||
__u8 ee_origin;
|
||||
|
@ -12,7 +19,10 @@ struct sock_extended_err {
|
|||
__u8 ee_code;
|
||||
__u8 ee_pad;
|
||||
__u32 ee_info;
|
||||
__u32 ee_data;
|
||||
union {
|
||||
__u32 ee_data;
|
||||
struct sock_ee_data_rfc4884 ee_rfc4884;
|
||||
};
|
||||
};
|
||||
|
||||
#define SO_EE_ORIGIN_NONE 0
|
||||
|
@ -31,12 +41,17 @@ struct sock_extended_err {
|
|||
#define SO_EE_CODE_TXTIME_INVALID_PARAM 1
|
||||
#define SO_EE_CODE_TXTIME_MISSED 2
|
||||
|
||||
#define SO_EE_RFC4884_FLAG_INVALID 1
|
||||
|
||||
/**
|
||||
* struct scm_timestamping - timestamps exposed through cmsg
|
||||
*
|
||||
* The timestamping interfaces SO_TIMESTAMPING, MSG_TSTAMP_*
|
||||
* communicate network timestamps by passing this struct in a cmsg with
|
||||
* recvmsg(). See Documentation/networking/timestamping.txt for details.
|
||||
* recvmsg(). See Documentation/networking/timestamping.rst for details.
|
||||
* User space sees a timespec definition that matches either
|
||||
* __kernel_timespec or __kernel_old_timespec, in the kernel we
|
||||
* require two structure definitions to provide both.
|
||||
*/
|
||||
struct scm_timestamping {
|
||||
struct timespec ts[3];
|
||||
|
|
|
@ -577,6 +577,76 @@ struct ethtool_pauseparam {
|
|||
__u32 tx_pause;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum ethtool_link_ext_state - link extended state
|
||||
*/
|
||||
enum ethtool_link_ext_state {
|
||||
ETHTOOL_LINK_EXT_STATE_AUTONEG,
|
||||
ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE,
|
||||
ETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH,
|
||||
ETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY,
|
||||
ETHTOOL_LINK_EXT_STATE_NO_CABLE,
|
||||
ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE,
|
||||
ETHTOOL_LINK_EXT_STATE_EEPROM_ISSUE,
|
||||
ETHTOOL_LINK_EXT_STATE_CALIBRATION_FAILURE,
|
||||
ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED,
|
||||
ETHTOOL_LINK_EXT_STATE_OVERHEAT,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum ethtool_link_ext_substate_autoneg - more information in addition to
|
||||
* ETHTOOL_LINK_EXT_STATE_AUTONEG.
|
||||
*/
|
||||
enum ethtool_link_ext_substate_autoneg {
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED = 1,
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_AN_ACK_NOT_RECEIVED,
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_AN_NEXT_PAGE_EXCHANGE_FAILED,
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED_FORCE_MODE,
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_AN_FEC_MISMATCH_DURING_OVERRIDE,
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_HCD,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum ethtool_link_ext_substate_link_training - more information in addition to
|
||||
* ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE.
|
||||
*/
|
||||
enum ethtool_link_ext_substate_link_training {
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_FRAME_LOCK_NOT_ACQUIRED = 1,
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_INHIBIT_TIMEOUT,
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_PARTNER_DID_NOT_SET_RECEIVER_READY,
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_LT_REMOTE_FAULT,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum ethtool_link_ext_substate_logical_mismatch - more information in addition
|
||||
* to ETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH.
|
||||
*/
|
||||
enum ethtool_link_ext_substate_link_logical_mismatch {
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_BLOCK_LOCK = 1,
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_AM_LOCK,
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_GET_ALIGN_STATUS,
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_LLM_FC_FEC_IS_NOT_LOCKED,
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_LLM_RS_FEC_IS_NOT_LOCKED,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum ethtool_link_ext_substate_bad_signal_integrity - more information in
|
||||
* addition to ETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY.
|
||||
*/
|
||||
enum ethtool_link_ext_substate_bad_signal_integrity {
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_BSI_LARGE_NUMBER_OF_PHYSICAL_ERRORS = 1,
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_BSI_UNSUPPORTED_RATE,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum ethtool_link_ext_substate_cable_issue - more information in
|
||||
* addition to ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE.
|
||||
*/
|
||||
enum ethtool_link_ext_substate_cable_issue {
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_CI_UNSUPPORTED_CABLE = 1,
|
||||
ETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE,
|
||||
};
|
||||
|
||||
#define ETH_GSTRING_LEN 32
|
||||
|
||||
/**
|
||||
|
@ -591,6 +661,13 @@ struct ethtool_pauseparam {
|
|||
* @ETH_SS_RSS_HASH_FUNCS: RSS hush function names
|
||||
* @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS
|
||||
* @ETH_SS_PHY_TUNABLES: PHY tunable names
|
||||
* @ETH_SS_LINK_MODES: link mode names
|
||||
* @ETH_SS_MSG_CLASSES: debug message class names
|
||||
* @ETH_SS_WOL_MODES: wake-on-lan modes
|
||||
* @ETH_SS_SOF_TIMESTAMPING: SOF_TIMESTAMPING_* flags
|
||||
* @ETH_SS_TS_TX_TYPES: timestamping Tx types
|
||||
* @ETH_SS_TS_RX_FILTERS: timestamping Rx filters
|
||||
* @ETH_SS_UDP_TUNNEL_TYPES: UDP tunnel types
|
||||
*/
|
||||
enum ethtool_stringset {
|
||||
ETH_SS_TEST = 0,
|
||||
|
@ -602,6 +679,16 @@ enum ethtool_stringset {
|
|||
ETH_SS_TUNABLES,
|
||||
ETH_SS_PHY_STATS,
|
||||
ETH_SS_PHY_TUNABLES,
|
||||
ETH_SS_LINK_MODES,
|
||||
ETH_SS_MSG_CLASSES,
|
||||
ETH_SS_WOL_MODES,
|
||||
ETH_SS_SOF_TIMESTAMPING,
|
||||
ETH_SS_TS_TX_TYPES,
|
||||
ETH_SS_TS_RX_FILTERS,
|
||||
ETH_SS_UDP_TUNNEL_TYPES,
|
||||
|
||||
/* add new constants above here */
|
||||
ETH_SS_COUNT
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1319,6 +1406,7 @@ enum ethtool_fec_config_bits {
|
|||
ETHTOOL_FEC_OFF_BIT,
|
||||
ETHTOOL_FEC_RS_BIT,
|
||||
ETHTOOL_FEC_BASER_BIT,
|
||||
ETHTOOL_FEC_LLRS_BIT,
|
||||
};
|
||||
|
||||
#define ETHTOOL_FEC_NONE (1 << ETHTOOL_FEC_NONE_BIT)
|
||||
|
@ -1326,6 +1414,7 @@ enum ethtool_fec_config_bits {
|
|||
#define ETHTOOL_FEC_OFF (1 << ETHTOOL_FEC_OFF_BIT)
|
||||
#define ETHTOOL_FEC_RS (1 << ETHTOOL_FEC_RS_BIT)
|
||||
#define ETHTOOL_FEC_BASER (1 << ETHTOOL_FEC_BASER_BIT)
|
||||
#define ETHTOOL_FEC_LLRS (1 << ETHTOOL_FEC_LLRS_BIT)
|
||||
|
||||
/* CMDs currently supported */
|
||||
#define ETHTOOL_GSET 0x00000001 /* DEPRECATED, Get settings.
|
||||
|
@ -1505,7 +1594,29 @@ enum ethtool_link_mode_bit_indices {
|
|||
ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT = 66,
|
||||
ETHTOOL_LINK_MODE_100baseT1_Full_BIT = 67,
|
||||
ETHTOOL_LINK_MODE_1000baseT1_Full_BIT = 68,
|
||||
|
||||
ETHTOOL_LINK_MODE_400000baseKR8_Full_BIT = 69,
|
||||
ETHTOOL_LINK_MODE_400000baseSR8_Full_BIT = 70,
|
||||
ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT = 71,
|
||||
ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT = 72,
|
||||
ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT = 73,
|
||||
ETHTOOL_LINK_MODE_FEC_LLRS_BIT = 74,
|
||||
ETHTOOL_LINK_MODE_100000baseKR_Full_BIT = 75,
|
||||
ETHTOOL_LINK_MODE_100000baseSR_Full_BIT = 76,
|
||||
ETHTOOL_LINK_MODE_100000baseLR_ER_FR_Full_BIT = 77,
|
||||
ETHTOOL_LINK_MODE_100000baseCR_Full_BIT = 78,
|
||||
ETHTOOL_LINK_MODE_100000baseDR_Full_BIT = 79,
|
||||
ETHTOOL_LINK_MODE_200000baseKR2_Full_BIT = 80,
|
||||
ETHTOOL_LINK_MODE_200000baseSR2_Full_BIT = 81,
|
||||
ETHTOOL_LINK_MODE_200000baseLR2_ER2_FR2_Full_BIT = 82,
|
||||
ETHTOOL_LINK_MODE_200000baseDR2_Full_BIT = 83,
|
||||
ETHTOOL_LINK_MODE_200000baseCR2_Full_BIT = 84,
|
||||
ETHTOOL_LINK_MODE_400000baseKR4_Full_BIT = 85,
|
||||
ETHTOOL_LINK_MODE_400000baseSR4_Full_BIT = 86,
|
||||
ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT = 87,
|
||||
ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT = 88,
|
||||
ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT = 89,
|
||||
ETHTOOL_LINK_MODE_100baseFX_Half_BIT = 90,
|
||||
ETHTOOL_LINK_MODE_100baseFX_Full_BIT = 91,
|
||||
/* must be last entry */
|
||||
__ETHTOOL_LINK_MODE_MASK_NBITS
|
||||
};
|
||||
|
@ -1616,6 +1727,7 @@ enum ethtool_link_mode_bit_indices {
|
|||
#define SPEED_56000 56000
|
||||
#define SPEED_100000 100000
|
||||
#define SPEED_200000 200000
|
||||
#define SPEED_400000 400000
|
||||
|
||||
#define SPEED_UNKNOWN -1
|
||||
|
||||
|
@ -1641,6 +1753,18 @@ static __inline__ int ethtool_validate_duplex(__u8 duplex)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#define MASTER_SLAVE_CFG_UNSUPPORTED 0
|
||||
#define MASTER_SLAVE_CFG_UNKNOWN 1
|
||||
#define MASTER_SLAVE_CFG_MASTER_PREFERRED 2
|
||||
#define MASTER_SLAVE_CFG_SLAVE_PREFERRED 3
|
||||
#define MASTER_SLAVE_CFG_MASTER_FORCE 4
|
||||
#define MASTER_SLAVE_CFG_SLAVE_FORCE 5
|
||||
#define MASTER_SLAVE_STATE_UNSUPPORTED 0
|
||||
#define MASTER_SLAVE_STATE_UNKNOWN 1
|
||||
#define MASTER_SLAVE_STATE_MASTER 2
|
||||
#define MASTER_SLAVE_STATE_SLAVE 3
|
||||
#define MASTER_SLAVE_STATE_ERR 4
|
||||
|
||||
/* Which connector port. */
|
||||
#define PORT_TP 0x00
|
||||
#define PORT_AUI 0x01
|
||||
|
@ -1680,6 +1804,8 @@ static __inline__ int ethtool_validate_duplex(__u8 duplex)
|
|||
#define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */
|
||||
#define WAKE_FILTER (1 << 7)
|
||||
|
||||
#define WOL_MODE_COUNT 8
|
||||
|
||||
/* L2-L4 network traffic flow types */
|
||||
#define TCP_V4_FLOW 0x01 /* hash or spec (tcp_ip4_spec) */
|
||||
#define UDP_V4_FLOW 0x02 /* hash or spec (udp_ip4_spec) */
|
||||
|
@ -1877,7 +2003,9 @@ struct ethtool_link_settings {
|
|||
__u8 eth_tp_mdix_ctrl;
|
||||
__s8 link_mode_masks_nwords;
|
||||
__u8 transceiver;
|
||||
__u8 reserved1[3];
|
||||
__u8 master_slave_cfg;
|
||||
__u8 master_slave_state;
|
||||
__u8 reserved1[1];
|
||||
__u32 reserved[7];
|
||||
__u32 link_mode_masks[0];
|
||||
/* layout of link_mode_masks fields:
|
||||
|
|
637
linux-headers/include/linux/ethtool_netlink.h
Normal file
637
linux-headers/include/linux/ethtool_netlink.h
Normal file
|
@ -0,0 +1,637 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
|
||||
/*
|
||||
* include/uapi/linux/ethtool_netlink.h - netlink interface for ethtool
|
||||
*
|
||||
* See Documentation/networking/ethtool-netlink.rst in kernel source tree for
|
||||
* doucumentation of the interface.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_ETHTOOL_NETLINK_H_
|
||||
#define _LINUX_ETHTOOL_NETLINK_H_
|
||||
|
||||
#include <linux/ethtool.h>
|
||||
|
||||
/* message types - userspace to kernel */
|
||||
enum {
|
||||
ETHTOOL_MSG_USER_NONE,
|
||||
ETHTOOL_MSG_STRSET_GET,
|
||||
ETHTOOL_MSG_LINKINFO_GET,
|
||||
ETHTOOL_MSG_LINKINFO_SET,
|
||||
ETHTOOL_MSG_LINKMODES_GET,
|
||||
ETHTOOL_MSG_LINKMODES_SET,
|
||||
ETHTOOL_MSG_LINKSTATE_GET,
|
||||
ETHTOOL_MSG_DEBUG_GET,
|
||||
ETHTOOL_MSG_DEBUG_SET,
|
||||
ETHTOOL_MSG_WOL_GET,
|
||||
ETHTOOL_MSG_WOL_SET,
|
||||
ETHTOOL_MSG_FEATURES_GET,
|
||||
ETHTOOL_MSG_FEATURES_SET,
|
||||
ETHTOOL_MSG_PRIVFLAGS_GET,
|
||||
ETHTOOL_MSG_PRIVFLAGS_SET,
|
||||
ETHTOOL_MSG_RINGS_GET,
|
||||
ETHTOOL_MSG_RINGS_SET,
|
||||
ETHTOOL_MSG_CHANNELS_GET,
|
||||
ETHTOOL_MSG_CHANNELS_SET,
|
||||
ETHTOOL_MSG_COALESCE_GET,
|
||||
ETHTOOL_MSG_COALESCE_SET,
|
||||
ETHTOOL_MSG_PAUSE_GET,
|
||||
ETHTOOL_MSG_PAUSE_SET,
|
||||
ETHTOOL_MSG_EEE_GET,
|
||||
ETHTOOL_MSG_EEE_SET,
|
||||
ETHTOOL_MSG_TSINFO_GET,
|
||||
ETHTOOL_MSG_CABLE_TEST_ACT,
|
||||
ETHTOOL_MSG_CABLE_TEST_TDR_ACT,
|
||||
ETHTOOL_MSG_TUNNEL_INFO_GET,
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_MSG_USER_CNT,
|
||||
ETHTOOL_MSG_USER_MAX = __ETHTOOL_MSG_USER_CNT - 1
|
||||
};
|
||||
|
||||
/* message types - kernel to userspace */
|
||||
enum {
|
||||
ETHTOOL_MSG_KERNEL_NONE,
|
||||
ETHTOOL_MSG_STRSET_GET_REPLY,
|
||||
ETHTOOL_MSG_LINKINFO_GET_REPLY,
|
||||
ETHTOOL_MSG_LINKINFO_NTF,
|
||||
ETHTOOL_MSG_LINKMODES_GET_REPLY,
|
||||
ETHTOOL_MSG_LINKMODES_NTF,
|
||||
ETHTOOL_MSG_LINKSTATE_GET_REPLY,
|
||||
ETHTOOL_MSG_DEBUG_GET_REPLY,
|
||||
ETHTOOL_MSG_DEBUG_NTF,
|
||||
ETHTOOL_MSG_WOL_GET_REPLY,
|
||||
ETHTOOL_MSG_WOL_NTF,
|
||||
ETHTOOL_MSG_FEATURES_GET_REPLY,
|
||||
ETHTOOL_MSG_FEATURES_SET_REPLY,
|
||||
ETHTOOL_MSG_FEATURES_NTF,
|
||||
ETHTOOL_MSG_PRIVFLAGS_GET_REPLY,
|
||||
ETHTOOL_MSG_PRIVFLAGS_NTF,
|
||||
ETHTOOL_MSG_RINGS_GET_REPLY,
|
||||
ETHTOOL_MSG_RINGS_NTF,
|
||||
ETHTOOL_MSG_CHANNELS_GET_REPLY,
|
||||
ETHTOOL_MSG_CHANNELS_NTF,
|
||||
ETHTOOL_MSG_COALESCE_GET_REPLY,
|
||||
ETHTOOL_MSG_COALESCE_NTF,
|
||||
ETHTOOL_MSG_PAUSE_GET_REPLY,
|
||||
ETHTOOL_MSG_PAUSE_NTF,
|
||||
ETHTOOL_MSG_EEE_GET_REPLY,
|
||||
ETHTOOL_MSG_EEE_NTF,
|
||||
ETHTOOL_MSG_TSINFO_GET_REPLY,
|
||||
ETHTOOL_MSG_CABLE_TEST_NTF,
|
||||
ETHTOOL_MSG_CABLE_TEST_TDR_NTF,
|
||||
ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY,
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_MSG_KERNEL_CNT,
|
||||
ETHTOOL_MSG_KERNEL_MAX = __ETHTOOL_MSG_KERNEL_CNT - 1
|
||||
};
|
||||
|
||||
/* request header */
|
||||
|
||||
/* use compact bitsets in reply */
|
||||
#define ETHTOOL_FLAG_COMPACT_BITSETS (1 << 0)
|
||||
/* provide optional reply for SET or ACT requests */
|
||||
#define ETHTOOL_FLAG_OMIT_REPLY (1 << 1)
|
||||
/* request statistics, if supported by the driver */
|
||||
#define ETHTOOL_FLAG_STATS (1 << 2)
|
||||
|
||||
#define ETHTOOL_FLAG_ALL (ETHTOOL_FLAG_COMPACT_BITSETS | \
|
||||
ETHTOOL_FLAG_OMIT_REPLY | \
|
||||
ETHTOOL_FLAG_STATS)
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_HEADER_UNSPEC,
|
||||
ETHTOOL_A_HEADER_DEV_INDEX, /* u32 */
|
||||
ETHTOOL_A_HEADER_DEV_NAME, /* string */
|
||||
ETHTOOL_A_HEADER_FLAGS, /* u32 - ETHTOOL_FLAG_* */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_HEADER_CNT,
|
||||
ETHTOOL_A_HEADER_MAX = __ETHTOOL_A_HEADER_CNT - 1
|
||||
};
|
||||
|
||||
/* bit sets */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_BITSET_BIT_UNSPEC,
|
||||
ETHTOOL_A_BITSET_BIT_INDEX, /* u32 */
|
||||
ETHTOOL_A_BITSET_BIT_NAME, /* string */
|
||||
ETHTOOL_A_BITSET_BIT_VALUE, /* flag */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_BITSET_BIT_CNT,
|
||||
ETHTOOL_A_BITSET_BIT_MAX = __ETHTOOL_A_BITSET_BIT_CNT - 1
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_BITSET_BITS_UNSPEC,
|
||||
ETHTOOL_A_BITSET_BITS_BIT, /* nest - _A_BITSET_BIT_* */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_BITSET_BITS_CNT,
|
||||
ETHTOOL_A_BITSET_BITS_MAX = __ETHTOOL_A_BITSET_BITS_CNT - 1
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_BITSET_UNSPEC,
|
||||
ETHTOOL_A_BITSET_NOMASK, /* flag */
|
||||
ETHTOOL_A_BITSET_SIZE, /* u32 */
|
||||
ETHTOOL_A_BITSET_BITS, /* nest - _A_BITSET_BITS_* */
|
||||
ETHTOOL_A_BITSET_VALUE, /* binary */
|
||||
ETHTOOL_A_BITSET_MASK, /* binary */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_BITSET_CNT,
|
||||
ETHTOOL_A_BITSET_MAX = __ETHTOOL_A_BITSET_CNT - 1
|
||||
};
|
||||
|
||||
/* string sets */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_STRING_UNSPEC,
|
||||
ETHTOOL_A_STRING_INDEX, /* u32 */
|
||||
ETHTOOL_A_STRING_VALUE, /* string */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_STRING_CNT,
|
||||
ETHTOOL_A_STRING_MAX = __ETHTOOL_A_STRING_CNT - 1
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_STRINGS_UNSPEC,
|
||||
ETHTOOL_A_STRINGS_STRING, /* nest - _A_STRINGS_* */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_STRINGS_CNT,
|
||||
ETHTOOL_A_STRINGS_MAX = __ETHTOOL_A_STRINGS_CNT - 1
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_STRINGSET_UNSPEC,
|
||||
ETHTOOL_A_STRINGSET_ID, /* u32 */
|
||||
ETHTOOL_A_STRINGSET_COUNT, /* u32 */
|
||||
ETHTOOL_A_STRINGSET_STRINGS, /* nest - _A_STRINGS_* */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_STRINGSET_CNT,
|
||||
ETHTOOL_A_STRINGSET_MAX = __ETHTOOL_A_STRINGSET_CNT - 1
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_STRINGSETS_UNSPEC,
|
||||
ETHTOOL_A_STRINGSETS_STRINGSET, /* nest - _A_STRINGSET_* */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_STRINGSETS_CNT,
|
||||
ETHTOOL_A_STRINGSETS_MAX = __ETHTOOL_A_STRINGSETS_CNT - 1
|
||||
};
|
||||
|
||||
/* STRSET */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_STRSET_UNSPEC,
|
||||
ETHTOOL_A_STRSET_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_STRSET_STRINGSETS, /* nest - _A_STRINGSETS_* */
|
||||
ETHTOOL_A_STRSET_COUNTS_ONLY, /* flag */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_STRSET_CNT,
|
||||
ETHTOOL_A_STRSET_MAX = __ETHTOOL_A_STRSET_CNT - 1
|
||||
};
|
||||
|
||||
/* LINKINFO */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_LINKINFO_UNSPEC,
|
||||
ETHTOOL_A_LINKINFO_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_LINKINFO_PORT, /* u8 */
|
||||
ETHTOOL_A_LINKINFO_PHYADDR, /* u8 */
|
||||
ETHTOOL_A_LINKINFO_TP_MDIX, /* u8 */
|
||||
ETHTOOL_A_LINKINFO_TP_MDIX_CTRL, /* u8 */
|
||||
ETHTOOL_A_LINKINFO_TRANSCEIVER, /* u8 */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_LINKINFO_CNT,
|
||||
ETHTOOL_A_LINKINFO_MAX = __ETHTOOL_A_LINKINFO_CNT - 1
|
||||
};
|
||||
|
||||
/* LINKMODES */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_LINKMODES_UNSPEC,
|
||||
ETHTOOL_A_LINKMODES_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_LINKMODES_AUTONEG, /* u8 */
|
||||
ETHTOOL_A_LINKMODES_OURS, /* bitset */
|
||||
ETHTOOL_A_LINKMODES_PEER, /* bitset */
|
||||
ETHTOOL_A_LINKMODES_SPEED, /* u32 */
|
||||
ETHTOOL_A_LINKMODES_DUPLEX, /* u8 */
|
||||
ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG, /* u8 */
|
||||
ETHTOOL_A_LINKMODES_MASTER_SLAVE_STATE, /* u8 */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_LINKMODES_CNT,
|
||||
ETHTOOL_A_LINKMODES_MAX = __ETHTOOL_A_LINKMODES_CNT - 1
|
||||
};
|
||||
|
||||
/* LINKSTATE */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_LINKSTATE_UNSPEC,
|
||||
ETHTOOL_A_LINKSTATE_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_LINKSTATE_LINK, /* u8 */
|
||||
ETHTOOL_A_LINKSTATE_SQI, /* u32 */
|
||||
ETHTOOL_A_LINKSTATE_SQI_MAX, /* u32 */
|
||||
ETHTOOL_A_LINKSTATE_EXT_STATE, /* u8 */
|
||||
ETHTOOL_A_LINKSTATE_EXT_SUBSTATE, /* u8 */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_LINKSTATE_CNT,
|
||||
ETHTOOL_A_LINKSTATE_MAX = __ETHTOOL_A_LINKSTATE_CNT - 1
|
||||
};
|
||||
|
||||
/* DEBUG */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_DEBUG_UNSPEC,
|
||||
ETHTOOL_A_DEBUG_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_DEBUG_MSGMASK, /* bitset */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_DEBUG_CNT,
|
||||
ETHTOOL_A_DEBUG_MAX = __ETHTOOL_A_DEBUG_CNT - 1
|
||||
};
|
||||
|
||||
/* WOL */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_WOL_UNSPEC,
|
||||
ETHTOOL_A_WOL_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_WOL_MODES, /* bitset */
|
||||
ETHTOOL_A_WOL_SOPASS, /* binary */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_WOL_CNT,
|
||||
ETHTOOL_A_WOL_MAX = __ETHTOOL_A_WOL_CNT - 1
|
||||
};
|
||||
|
||||
/* FEATURES */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_FEATURES_UNSPEC,
|
||||
ETHTOOL_A_FEATURES_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_FEATURES_HW, /* bitset */
|
||||
ETHTOOL_A_FEATURES_WANTED, /* bitset */
|
||||
ETHTOOL_A_FEATURES_ACTIVE, /* bitset */
|
||||
ETHTOOL_A_FEATURES_NOCHANGE, /* bitset */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_FEATURES_CNT,
|
||||
ETHTOOL_A_FEATURES_MAX = __ETHTOOL_A_FEATURES_CNT - 1
|
||||
};
|
||||
|
||||
/* PRIVFLAGS */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_PRIVFLAGS_UNSPEC,
|
||||
ETHTOOL_A_PRIVFLAGS_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_PRIVFLAGS_FLAGS, /* bitset */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_PRIVFLAGS_CNT,
|
||||
ETHTOOL_A_PRIVFLAGS_MAX = __ETHTOOL_A_PRIVFLAGS_CNT - 1
|
||||
};
|
||||
|
||||
/* RINGS */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_RINGS_UNSPEC,
|
||||
ETHTOOL_A_RINGS_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_RINGS_RX_MAX, /* u32 */
|
||||
ETHTOOL_A_RINGS_RX_MINI_MAX, /* u32 */
|
||||
ETHTOOL_A_RINGS_RX_JUMBO_MAX, /* u32 */
|
||||
ETHTOOL_A_RINGS_TX_MAX, /* u32 */
|
||||
ETHTOOL_A_RINGS_RX, /* u32 */
|
||||
ETHTOOL_A_RINGS_RX_MINI, /* u32 */
|
||||
ETHTOOL_A_RINGS_RX_JUMBO, /* u32 */
|
||||
ETHTOOL_A_RINGS_TX, /* u32 */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_RINGS_CNT,
|
||||
ETHTOOL_A_RINGS_MAX = (__ETHTOOL_A_RINGS_CNT - 1)
|
||||
};
|
||||
|
||||
/* CHANNELS */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_CHANNELS_UNSPEC,
|
||||
ETHTOOL_A_CHANNELS_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_CHANNELS_RX_MAX, /* u32 */
|
||||
ETHTOOL_A_CHANNELS_TX_MAX, /* u32 */
|
||||
ETHTOOL_A_CHANNELS_OTHER_MAX, /* u32 */
|
||||
ETHTOOL_A_CHANNELS_COMBINED_MAX, /* u32 */
|
||||
ETHTOOL_A_CHANNELS_RX_COUNT, /* u32 */
|
||||
ETHTOOL_A_CHANNELS_TX_COUNT, /* u32 */
|
||||
ETHTOOL_A_CHANNELS_OTHER_COUNT, /* u32 */
|
||||
ETHTOOL_A_CHANNELS_COMBINED_COUNT, /* u32 */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_CHANNELS_CNT,
|
||||
ETHTOOL_A_CHANNELS_MAX = (__ETHTOOL_A_CHANNELS_CNT - 1)
|
||||
};
|
||||
|
||||
/* COALESCE */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_COALESCE_UNSPEC,
|
||||
ETHTOOL_A_COALESCE_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_COALESCE_RX_USECS, /* u32 */
|
||||
ETHTOOL_A_COALESCE_RX_MAX_FRAMES, /* u32 */
|
||||
ETHTOOL_A_COALESCE_RX_USECS_IRQ, /* u32 */
|
||||
ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ, /* u32 */
|
||||
ETHTOOL_A_COALESCE_TX_USECS, /* u32 */
|
||||
ETHTOOL_A_COALESCE_TX_MAX_FRAMES, /* u32 */
|
||||
ETHTOOL_A_COALESCE_TX_USECS_IRQ, /* u32 */
|
||||
ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ, /* u32 */
|
||||
ETHTOOL_A_COALESCE_STATS_BLOCK_USECS, /* u32 */
|
||||
ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX, /* u8 */
|
||||
ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX, /* u8 */
|
||||
ETHTOOL_A_COALESCE_PKT_RATE_LOW, /* u32 */
|
||||
ETHTOOL_A_COALESCE_RX_USECS_LOW, /* u32 */
|
||||
ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW, /* u32 */
|
||||
ETHTOOL_A_COALESCE_TX_USECS_LOW, /* u32 */
|
||||
ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW, /* u32 */
|
||||
ETHTOOL_A_COALESCE_PKT_RATE_HIGH, /* u32 */
|
||||
ETHTOOL_A_COALESCE_RX_USECS_HIGH, /* u32 */
|
||||
ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH, /* u32 */
|
||||
ETHTOOL_A_COALESCE_TX_USECS_HIGH, /* u32 */
|
||||
ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH, /* u32 */
|
||||
ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL, /* u32 */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_COALESCE_CNT,
|
||||
ETHTOOL_A_COALESCE_MAX = (__ETHTOOL_A_COALESCE_CNT - 1)
|
||||
};
|
||||
|
||||
/* PAUSE */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_PAUSE_UNSPEC,
|
||||
ETHTOOL_A_PAUSE_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_PAUSE_AUTONEG, /* u8 */
|
||||
ETHTOOL_A_PAUSE_RX, /* u8 */
|
||||
ETHTOOL_A_PAUSE_TX, /* u8 */
|
||||
ETHTOOL_A_PAUSE_STATS, /* nest - _PAUSE_STAT_* */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_PAUSE_CNT,
|
||||
ETHTOOL_A_PAUSE_MAX = (__ETHTOOL_A_PAUSE_CNT - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_PAUSE_STAT_UNSPEC,
|
||||
ETHTOOL_A_PAUSE_STAT_PAD,
|
||||
|
||||
ETHTOOL_A_PAUSE_STAT_TX_FRAMES,
|
||||
ETHTOOL_A_PAUSE_STAT_RX_FRAMES,
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_PAUSE_STAT_CNT,
|
||||
ETHTOOL_A_PAUSE_STAT_MAX = (__ETHTOOL_A_PAUSE_STAT_CNT - 1)
|
||||
};
|
||||
|
||||
/* EEE */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_EEE_UNSPEC,
|
||||
ETHTOOL_A_EEE_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_EEE_MODES_OURS, /* bitset */
|
||||
ETHTOOL_A_EEE_MODES_PEER, /* bitset */
|
||||
ETHTOOL_A_EEE_ACTIVE, /* u8 */
|
||||
ETHTOOL_A_EEE_ENABLED, /* u8 */
|
||||
ETHTOOL_A_EEE_TX_LPI_ENABLED, /* u8 */
|
||||
ETHTOOL_A_EEE_TX_LPI_TIMER, /* u32 */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_EEE_CNT,
|
||||
ETHTOOL_A_EEE_MAX = (__ETHTOOL_A_EEE_CNT - 1)
|
||||
};
|
||||
|
||||
/* TSINFO */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_TSINFO_UNSPEC,
|
||||
ETHTOOL_A_TSINFO_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_TSINFO_TIMESTAMPING, /* bitset */
|
||||
ETHTOOL_A_TSINFO_TX_TYPES, /* bitset */
|
||||
ETHTOOL_A_TSINFO_RX_FILTERS, /* bitset */
|
||||
ETHTOOL_A_TSINFO_PHC_INDEX, /* u32 */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_TSINFO_CNT,
|
||||
ETHTOOL_A_TSINFO_MAX = (__ETHTOOL_A_TSINFO_CNT - 1)
|
||||
};
|
||||
|
||||
/* CABLE TEST */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_CABLE_TEST_UNSPEC,
|
||||
ETHTOOL_A_CABLE_TEST_HEADER, /* nest - _A_HEADER_* */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_CABLE_TEST_CNT,
|
||||
ETHTOOL_A_CABLE_TEST_MAX = __ETHTOOL_A_CABLE_TEST_CNT - 1
|
||||
};
|
||||
|
||||
/* CABLE TEST NOTIFY */
|
||||
enum {
|
||||
ETHTOOL_A_CABLE_RESULT_CODE_UNSPEC,
|
||||
ETHTOOL_A_CABLE_RESULT_CODE_OK,
|
||||
ETHTOOL_A_CABLE_RESULT_CODE_OPEN,
|
||||
ETHTOOL_A_CABLE_RESULT_CODE_SAME_SHORT,
|
||||
ETHTOOL_A_CABLE_RESULT_CODE_CROSS_SHORT,
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_CABLE_PAIR_A,
|
||||
ETHTOOL_A_CABLE_PAIR_B,
|
||||
ETHTOOL_A_CABLE_PAIR_C,
|
||||
ETHTOOL_A_CABLE_PAIR_D,
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_CABLE_RESULT_UNSPEC,
|
||||
ETHTOOL_A_CABLE_RESULT_PAIR, /* u8 ETHTOOL_A_CABLE_PAIR_ */
|
||||
ETHTOOL_A_CABLE_RESULT_CODE, /* u8 ETHTOOL_A_CABLE_RESULT_CODE_ */
|
||||
|
||||
__ETHTOOL_A_CABLE_RESULT_CNT,
|
||||
ETHTOOL_A_CABLE_RESULT_MAX = (__ETHTOOL_A_CABLE_RESULT_CNT - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_CABLE_FAULT_LENGTH_UNSPEC,
|
||||
ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR, /* u8 ETHTOOL_A_CABLE_PAIR_ */
|
||||
ETHTOOL_A_CABLE_FAULT_LENGTH_CM, /* u32 */
|
||||
|
||||
__ETHTOOL_A_CABLE_FAULT_LENGTH_CNT,
|
||||
ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = (__ETHTOOL_A_CABLE_FAULT_LENGTH_CNT - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_CABLE_TEST_NTF_STATUS_UNSPEC,
|
||||
ETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED,
|
||||
ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_CABLE_NEST_UNSPEC,
|
||||
ETHTOOL_A_CABLE_NEST_RESULT, /* nest - ETHTOOL_A_CABLE_RESULT_ */
|
||||
ETHTOOL_A_CABLE_NEST_FAULT_LENGTH, /* nest - ETHTOOL_A_CABLE_FAULT_LENGTH_ */
|
||||
__ETHTOOL_A_CABLE_NEST_CNT,
|
||||
ETHTOOL_A_CABLE_NEST_MAX = (__ETHTOOL_A_CABLE_NEST_CNT - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_CABLE_TEST_NTF_UNSPEC,
|
||||
ETHTOOL_A_CABLE_TEST_NTF_HEADER, /* nest - ETHTOOL_A_HEADER_* */
|
||||
ETHTOOL_A_CABLE_TEST_NTF_STATUS, /* u8 - _STARTED/_COMPLETE */
|
||||
ETHTOOL_A_CABLE_TEST_NTF_NEST, /* nest - of results: */
|
||||
|
||||
__ETHTOOL_A_CABLE_TEST_NTF_CNT,
|
||||
ETHTOOL_A_CABLE_TEST_NTF_MAX = (__ETHTOOL_A_CABLE_TEST_NTF_CNT - 1)
|
||||
};
|
||||
|
||||
/* CABLE TEST TDR */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_CABLE_TEST_TDR_CFG_UNSPEC,
|
||||
ETHTOOL_A_CABLE_TEST_TDR_CFG_FIRST, /* u32 */
|
||||
ETHTOOL_A_CABLE_TEST_TDR_CFG_LAST, /* u32 */
|
||||
ETHTOOL_A_CABLE_TEST_TDR_CFG_STEP, /* u32 */
|
||||
ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR, /* u8 */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_CABLE_TEST_TDR_CFG_CNT,
|
||||
ETHTOOL_A_CABLE_TEST_TDR_CFG_MAX = __ETHTOOL_A_CABLE_TEST_TDR_CFG_CNT - 1
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_CABLE_TEST_TDR_UNSPEC,
|
||||
ETHTOOL_A_CABLE_TEST_TDR_HEADER, /* nest - _A_HEADER_* */
|
||||
ETHTOOL_A_CABLE_TEST_TDR_CFG, /* nest - *_TDR_CFG_* */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_CABLE_TEST_TDR_CNT,
|
||||
ETHTOOL_A_CABLE_TEST_TDR_MAX = __ETHTOOL_A_CABLE_TEST_TDR_CNT - 1
|
||||
};
|
||||
|
||||
/* CABLE TEST TDR NOTIFY */
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_CABLE_AMPLITUDE_UNSPEC,
|
||||
ETHTOOL_A_CABLE_AMPLITUDE_PAIR, /* u8 */
|
||||
ETHTOOL_A_CABLE_AMPLITUDE_mV, /* s16 */
|
||||
|
||||
__ETHTOOL_A_CABLE_AMPLITUDE_CNT,
|
||||
ETHTOOL_A_CABLE_AMPLITUDE_MAX = (__ETHTOOL_A_CABLE_AMPLITUDE_CNT - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_CABLE_PULSE_UNSPEC,
|
||||
ETHTOOL_A_CABLE_PULSE_mV, /* s16 */
|
||||
|
||||
__ETHTOOL_A_CABLE_PULSE_CNT,
|
||||
ETHTOOL_A_CABLE_PULSE_MAX = (__ETHTOOL_A_CABLE_PULSE_CNT - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_CABLE_STEP_UNSPEC,
|
||||
ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE, /* u32 */
|
||||
ETHTOOL_A_CABLE_STEP_LAST_DISTANCE, /* u32 */
|
||||
ETHTOOL_A_CABLE_STEP_STEP_DISTANCE, /* u32 */
|
||||
|
||||
__ETHTOOL_A_CABLE_STEP_CNT,
|
||||
ETHTOOL_A_CABLE_STEP_MAX = (__ETHTOOL_A_CABLE_STEP_CNT - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_CABLE_TDR_NEST_UNSPEC,
|
||||
ETHTOOL_A_CABLE_TDR_NEST_STEP, /* nest - ETHTTOOL_A_CABLE_STEP */
|
||||
ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE, /* nest - ETHTOOL_A_CABLE_AMPLITUDE */
|
||||
ETHTOOL_A_CABLE_TDR_NEST_PULSE, /* nest - ETHTOOL_A_CABLE_PULSE */
|
||||
|
||||
__ETHTOOL_A_CABLE_TDR_NEST_CNT,
|
||||
ETHTOOL_A_CABLE_TDR_NEST_MAX = (__ETHTOOL_A_CABLE_TDR_NEST_CNT - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_CABLE_TEST_TDR_NTF_UNSPEC,
|
||||
ETHTOOL_A_CABLE_TEST_TDR_NTF_HEADER, /* nest - ETHTOOL_A_HEADER_* */
|
||||
ETHTOOL_A_CABLE_TEST_TDR_NTF_STATUS, /* u8 - _STARTED/_COMPLETE */
|
||||
ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST, /* nest - of results: */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT,
|
||||
ETHTOOL_A_CABLE_TEST_TDR_NTF_MAX = __ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT - 1
|
||||
};
|
||||
|
||||
/* TUNNEL INFO */
|
||||
|
||||
enum {
|
||||
ETHTOOL_UDP_TUNNEL_TYPE_VXLAN,
|
||||
ETHTOOL_UDP_TUNNEL_TYPE_GENEVE,
|
||||
ETHTOOL_UDP_TUNNEL_TYPE_VXLAN_GPE,
|
||||
|
||||
__ETHTOOL_UDP_TUNNEL_TYPE_CNT
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_TUNNEL_UDP_ENTRY_UNSPEC,
|
||||
|
||||
ETHTOOL_A_TUNNEL_UDP_ENTRY_PORT, /* be16 */
|
||||
ETHTOOL_A_TUNNEL_UDP_ENTRY_TYPE, /* u32 */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_TUNNEL_UDP_ENTRY_CNT,
|
||||
ETHTOOL_A_TUNNEL_UDP_ENTRY_MAX = (__ETHTOOL_A_TUNNEL_UDP_ENTRY_CNT - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_TUNNEL_UDP_TABLE_UNSPEC,
|
||||
|
||||
ETHTOOL_A_TUNNEL_UDP_TABLE_SIZE, /* u32 */
|
||||
ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES, /* bitset */
|
||||
ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY, /* nest - _UDP_ENTRY_* */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_TUNNEL_UDP_TABLE_CNT,
|
||||
ETHTOOL_A_TUNNEL_UDP_TABLE_MAX = (__ETHTOOL_A_TUNNEL_UDP_TABLE_CNT - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_TUNNEL_UDP_UNSPEC,
|
||||
|
||||
ETHTOOL_A_TUNNEL_UDP_TABLE, /* nest - _UDP_TABLE_* */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_TUNNEL_UDP_CNT,
|
||||
ETHTOOL_A_TUNNEL_UDP_MAX = (__ETHTOOL_A_TUNNEL_UDP_CNT - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_TUNNEL_INFO_UNSPEC,
|
||||
ETHTOOL_A_TUNNEL_INFO_HEADER, /* nest - _A_HEADER_* */
|
||||
|
||||
ETHTOOL_A_TUNNEL_INFO_UDP_PORTS, /* nest - _UDP_TABLE */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_TUNNEL_INFO_CNT,
|
||||
ETHTOOL_A_TUNNEL_INFO_MAX = (__ETHTOOL_A_TUNNEL_INFO_CNT - 1)
|
||||
};
|
||||
|
||||
/* generic netlink info */
|
||||
#define ETHTOOL_GENL_NAME "ethtool"
|
||||
#define ETHTOOL_GENL_VERSION 1
|
||||
|
||||
#define ETHTOOL_MCGRP_MONITOR_NAME "monitor"
|
||||
|
||||
#endif /* _LINUX_ETHTOOL_NETLINK_H_ */
|
|
@ -25,9 +25,9 @@
|
|||
#define FAN_ACCESS_PERM 0x00020000 /* File accessed in perm check */
|
||||
#define FAN_OPEN_EXEC_PERM 0x00040000 /* File open/exec in perm check */
|
||||
|
||||
#define FAN_ONDIR 0x40000000 /* event occurred against dir */
|
||||
#define FAN_EVENT_ON_CHILD 0x08000000 /* Interested in child events */
|
||||
|
||||
#define FAN_EVENT_ON_CHILD 0x08000000 /* interested in child events */
|
||||
#define FAN_ONDIR 0x40000000 /* Event occurred against dir */
|
||||
|
||||
/* helper events */
|
||||
#define FAN_CLOSE (FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE) /* close */
|
||||
|
@ -53,6 +53,11 @@
|
|||
/* Flags to determine fanotify event format */
|
||||
#define FAN_REPORT_TID 0x00000100 /* event->pid is thread id */
|
||||
#define FAN_REPORT_FID 0x00000200 /* Report unique file id */
|
||||
#define FAN_REPORT_DIR_FID 0x00000400 /* Report unique directory id */
|
||||
#define FAN_REPORT_NAME 0x00000800 /* Report events with name */
|
||||
|
||||
/* Convenience macro - FAN_REPORT_NAME requires FAN_REPORT_DIR_FID */
|
||||
#define FAN_REPORT_DFID_NAME (FAN_REPORT_DIR_FID | FAN_REPORT_NAME)
|
||||
|
||||
/* Deprecated - do not use this in programs and do not add new flags here! */
|
||||
#define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK | \
|
||||
|
@ -116,6 +121,8 @@ struct fanotify_event_metadata {
|
|||
};
|
||||
|
||||
#define FAN_EVENT_INFO_TYPE_FID 1
|
||||
#define FAN_EVENT_INFO_TYPE_DFID_NAME 2
|
||||
#define FAN_EVENT_INFO_TYPE_DFID 3
|
||||
|
||||
/* Variable length info record following event metadata */
|
||||
struct fanotify_event_info_header {
|
||||
|
@ -124,7 +131,13 @@ struct fanotify_event_info_header {
|
|||
__u16 len;
|
||||
};
|
||||
|
||||
/* Unique file identifier info record */
|
||||
/*
|
||||
* Unique file identifier info record.
|
||||
* This structure is used for records of types FAN_EVENT_INFO_TYPE_FID,
|
||||
* FAN_EVENT_INFO_TYPE_DFID and FAN_EVENT_INFO_TYPE_DFID_NAME.
|
||||
* For FAN_EVENT_INFO_TYPE_DFID_NAME there is additionally a null terminated
|
||||
* name immediately after the file handle.
|
||||
*/
|
||||
struct fanotify_event_info_fid {
|
||||
struct fanotify_event_info_header hdr;
|
||||
__kernel_fsid_t fsid;
|
||||
|
|
|
@ -203,6 +203,7 @@ struct fb_bitfield {
|
|||
#define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */
|
||||
#define FB_ACTIVATE_FORCE 128 /* force apply even when no change*/
|
||||
#define FB_ACTIVATE_INV_MODE 256 /* invalidate videomode */
|
||||
#define FB_ACTIVATE_KD_TEXT 512 /* for KDSET vt ioctl */
|
||||
|
||||
#define FB_ACCELF_TEXT 1 /* (OBSOLETE) see fb_info.flags and vc_mode */
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#define _LINUX_FCNTL_H
|
||||
|
||||
#include <asm/fcntl.h>
|
||||
#include <linux/openat2.h>
|
||||
|
||||
#define F_SETLEASE (F_LINUX_SPECIFIC_BASE + 0)
|
||||
#define F_GETLEASE (F_LINUX_SPECIFIC_BASE + 1)
|
||||
|
@ -58,13 +59,20 @@
|
|||
* Valid hint values for F_{GET,SET}_RW_HINT. 0 is "not set", or can be
|
||||
* used to clear any hints previously set.
|
||||
*/
|
||||
#define RWF_WRITE_LIFE_NOT_SET 0
|
||||
#define RWH_WRITE_LIFE_NOT_SET 0
|
||||
#define RWH_WRITE_LIFE_NONE 1
|
||||
#define RWH_WRITE_LIFE_SHORT 2
|
||||
#define RWH_WRITE_LIFE_MEDIUM 3
|
||||
#define RWH_WRITE_LIFE_LONG 4
|
||||
#define RWH_WRITE_LIFE_EXTREME 5
|
||||
|
||||
/*
|
||||
* The originally introduced spelling is remained from the first
|
||||
* versions of the patch set that introduced the feature, see commit
|
||||
* v4.13-rc1~212^2~51.
|
||||
*/
|
||||
#define RWF_WRITE_LIFE_NOT_SET RWH_WRITE_LIFE_NOT_SET
|
||||
|
||||
/*
|
||||
* Types of directory notifications that may be requested.
|
||||
*/
|
||||
|
@ -76,10 +84,20 @@
|
|||
#define DN_ATTRIB 0x00000020 /* File changed attibutes */
|
||||
#define DN_MULTISHOT 0x80000000 /* Don't remove notifier */
|
||||
|
||||
/*
|
||||
* The constants AT_REMOVEDIR and AT_EACCESS have the same value. AT_EACCESS is
|
||||
* meaningful only to faccessat, while AT_REMOVEDIR is meaningful only to
|
||||
* unlinkat. The two functions do completely different things and therefore,
|
||||
* the flags can be allowed to overlap. For example, passing AT_REMOVEDIR to
|
||||
* faccessat would be undefined behavior and thus treating it equivalent to
|
||||
* AT_EACCESS is valid undefined behavior.
|
||||
*/
|
||||
#define AT_FDCWD -100 /* Special value used to indicate
|
||||
openat should use the current
|
||||
working directory. */
|
||||
#define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */
|
||||
#define AT_EACCESS 0x200 /* Test access permitted for
|
||||
effective IDs, not real IDs. */
|
||||
#define AT_REMOVEDIR 0x200 /* Remove directory instead of
|
||||
unlinking file. */
|
||||
#define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
|
||||
|
@ -93,5 +111,4 @@
|
|||
|
||||
#define AT_RECURSIVE 0x8000 /* Apply to the entire subtree */
|
||||
|
||||
|
||||
#endif /* _LINUX_FCNTL_H */
|
||||
|
|
|
@ -172,7 +172,10 @@ struct floppy_drive_params {
|
|||
* used in succession to try to read the disk. If the FDC cannot lock onto
|
||||
* the disk, the next format is tried. This uses the variable 'probing'.
|
||||
*/
|
||||
short autodetect[8]; /* autodetected formats */
|
||||
|
||||
#define FD_AUTODETECT_SIZE 8
|
||||
|
||||
short autodetect[FD_AUTODETECT_SIZE]; /* autodetected formats */
|
||||
|
||||
int checkfreq; /* how often should the drive be checked for disk
|
||||
* changes */
|
||||
|
@ -357,10 +360,25 @@ struct floppy_raw_cmd {
|
|||
int buffer_length; /* length of allocated buffer */
|
||||
|
||||
unsigned char rate;
|
||||
|
||||
#define FD_RAW_CMD_SIZE 16
|
||||
#define FD_RAW_REPLY_SIZE 16
|
||||
#define FD_RAW_CMD_FULLSIZE (FD_RAW_CMD_SIZE + 1 + FD_RAW_REPLY_SIZE)
|
||||
|
||||
/* The command may take up the space initially intended for the reply
|
||||
* and the reply count. Needed for long 82078 commands such as RESTORE,
|
||||
* which takes 17 command bytes.
|
||||
*/
|
||||
|
||||
unsigned char cmd_count;
|
||||
unsigned char cmd[16];
|
||||
unsigned char reply_count;
|
||||
unsigned char reply[16];
|
||||
union {
|
||||
struct {
|
||||
unsigned char cmd[FD_RAW_CMD_SIZE];
|
||||
unsigned char reply_count;
|
||||
unsigned char reply[FD_RAW_REPLY_SIZE];
|
||||
};
|
||||
unsigned char fullcmd[FD_RAW_CMD_FULLSIZE];
|
||||
};
|
||||
int track;
|
||||
int resultcode;
|
||||
|
||||
|
|
|
@ -7,26 +7,28 @@
|
|||
* Handbook", Sanches and Canton.
|
||||
*/
|
||||
|
||||
#ifdef FDPATCHES
|
||||
#define FD_IOPORT fdc_state[fdc].address
|
||||
#else
|
||||
/* It would be a lot saner just to force fdc_state[fdc].address to always
|
||||
be set ! FIXME */
|
||||
#define FD_IOPORT 0x3f0
|
||||
#endif
|
||||
|
||||
/* Fd controller regs. S&C, about page 340 */
|
||||
#define FD_STATUS (4 + FD_IOPORT )
|
||||
#define FD_DATA (5 + FD_IOPORT )
|
||||
/* 82077's auxiliary status registers A & B (R) */
|
||||
#define FD_SRA 0
|
||||
#define FD_SRB 1
|
||||
|
||||
/* Digital Output Register */
|
||||
#define FD_DOR (2 + FD_IOPORT )
|
||||
#define FD_DOR 2
|
||||
|
||||
/* 82077's tape drive register (R/W) */
|
||||
#define FD_TDR 3
|
||||
|
||||
/* 82077's data rate select register (W) */
|
||||
#define FD_DSR 4
|
||||
|
||||
/* Fd controller regs. S&C, about page 340 */
|
||||
#define FD_STATUS 4
|
||||
#define FD_DATA 5
|
||||
|
||||
/* Digital Input Register (read) */
|
||||
#define FD_DIR (7 + FD_IOPORT )
|
||||
#define FD_DIR 7
|
||||
|
||||
/* Diskette Control Register (write)*/
|
||||
#define FD_DCR (7 + FD_IOPORT )
|
||||
#define FD_DCR 7
|
||||
|
||||
/* Bits of main status register */
|
||||
#define STATUS_BUSYMASK 0x0F /* drive busy mask */
|
||||
|
|
|
@ -308,7 +308,7 @@ struct fw_cdev_event_iso_interrupt_mc {
|
|||
/**
|
||||
* struct fw_cdev_event_iso_resource - Iso resources were allocated or freed
|
||||
* @closure: See &fw_cdev_event_common;
|
||||
* set by %FW_CDEV_IOC_(DE)ALLOCATE_ISO_RESOURCE(_ONCE) ioctl
|
||||
* set by``FW_CDEV_IOC_(DE)ALLOCATE_ISO_RESOURCE(_ONCE)`` ioctl
|
||||
* @type: %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED or
|
||||
* %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED
|
||||
* @handle: Reference by which an allocated resource can be deallocated
|
||||
|
|
|
@ -151,6 +151,65 @@ struct dfl_fpga_port_dma_unmap {
|
|||
|
||||
#define DFL_FPGA_PORT_DMA_UNMAP _IO(DFL_FPGA_MAGIC, DFL_PORT_BASE + 4)
|
||||
|
||||
/**
|
||||
* struct dfl_fpga_irq_set - the argument for DFL_FPGA_XXX_SET_IRQ ioctl.
|
||||
*
|
||||
* @start: Index of the first irq.
|
||||
* @count: The number of eventfd handler.
|
||||
* @evtfds: Eventfd handlers.
|
||||
*/
|
||||
struct dfl_fpga_irq_set {
|
||||
__u32 start;
|
||||
__u32 count;
|
||||
__s32 evtfds[];
|
||||
};
|
||||
|
||||
/**
|
||||
* DFL_FPGA_PORT_ERR_GET_IRQ_NUM - _IOR(DFL_FPGA_MAGIC, DFL_PORT_BASE + 5,
|
||||
* __u32 num_irqs)
|
||||
*
|
||||
* Get the number of irqs supported by the fpga port error reporting private
|
||||
* feature. Currently hardware supports up to 1 irq.
|
||||
* Return: 0 on success, -errno on failure.
|
||||
*/
|
||||
#define DFL_FPGA_PORT_ERR_GET_IRQ_NUM _IOR(DFL_FPGA_MAGIC, \
|
||||
DFL_PORT_BASE + 5, __u32)
|
||||
|
||||
/**
|
||||
* DFL_FPGA_PORT_ERR_SET_IRQ - _IOW(DFL_FPGA_MAGIC, DFL_PORT_BASE + 6,
|
||||
* struct dfl_fpga_irq_set)
|
||||
*
|
||||
* Set fpga port error reporting interrupt trigger if evtfds[n] is valid.
|
||||
* Unset related interrupt trigger if evtfds[n] is a negative value.
|
||||
* Return: 0 on success, -errno on failure.
|
||||
*/
|
||||
#define DFL_FPGA_PORT_ERR_SET_IRQ _IOW(DFL_FPGA_MAGIC, \
|
||||
DFL_PORT_BASE + 6, \
|
||||
struct dfl_fpga_irq_set)
|
||||
|
||||
/**
|
||||
* DFL_FPGA_PORT_UINT_GET_IRQ_NUM - _IOR(DFL_FPGA_MAGIC, DFL_PORT_BASE + 7,
|
||||
* __u32 num_irqs)
|
||||
*
|
||||
* Get the number of irqs supported by the fpga AFU interrupt private
|
||||
* feature.
|
||||
* Return: 0 on success, -errno on failure.
|
||||
*/
|
||||
#define DFL_FPGA_PORT_UINT_GET_IRQ_NUM _IOR(DFL_FPGA_MAGIC, \
|
||||
DFL_PORT_BASE + 7, __u32)
|
||||
|
||||
/**
|
||||
* DFL_FPGA_PORT_UINT_SET_IRQ - _IOW(DFL_FPGA_MAGIC, DFL_PORT_BASE + 8,
|
||||
* struct dfl_fpga_irq_set)
|
||||
*
|
||||
* Set fpga AFU interrupt trigger if evtfds[n] is valid.
|
||||
* Unset related interrupt trigger if evtfds[n] is a negative value.
|
||||
* Return: 0 on success, -errno on failure.
|
||||
*/
|
||||
#define DFL_FPGA_PORT_UINT_SET_IRQ _IOW(DFL_FPGA_MAGIC, \
|
||||
DFL_PORT_BASE + 8, \
|
||||
struct dfl_fpga_irq_set)
|
||||
|
||||
/* IOCTLs for FME file descriptor */
|
||||
|
||||
/**
|
||||
|
@ -194,4 +253,27 @@ struct dfl_fpga_fme_port_pr {
|
|||
*/
|
||||
#define DFL_FPGA_FME_PORT_ASSIGN _IOW(DFL_FPGA_MAGIC, DFL_FME_BASE + 2, int)
|
||||
|
||||
/**
|
||||
* DFL_FPGA_FME_ERR_GET_IRQ_NUM - _IOR(DFL_FPGA_MAGIC, DFL_FME_BASE + 3,
|
||||
* __u32 num_irqs)
|
||||
*
|
||||
* Get the number of irqs supported by the fpga fme error reporting private
|
||||
* feature. Currently hardware supports up to 1 irq.
|
||||
* Return: 0 on success, -errno on failure.
|
||||
*/
|
||||
#define DFL_FPGA_FME_ERR_GET_IRQ_NUM _IOR(DFL_FPGA_MAGIC, \
|
||||
DFL_FME_BASE + 3, __u32)
|
||||
|
||||
/**
|
||||
* DFL_FPGA_FME_ERR_SET_IRQ - _IOW(DFL_FPGA_MAGIC, DFL_FME_BASE + 4,
|
||||
* struct dfl_fpga_irq_set)
|
||||
*
|
||||
* Set fpga fme error reporting interrupt trigger if evtfds[n] is valid.
|
||||
* Unset related interrupt trigger if evtfds[n] is a negative value.
|
||||
* Return: 0 on success, -errno on failure.
|
||||
*/
|
||||
#define DFL_FPGA_FME_ERR_SET_IRQ _IOW(DFL_FPGA_MAGIC, \
|
||||
DFL_FME_BASE + 4, \
|
||||
struct dfl_fpga_irq_set)
|
||||
|
||||
#endif /* _LINUX_FPGA_DFL_H */
|
||||
|
|
|
@ -258,6 +258,7 @@ struct fsxattr {
|
|||
#define FS_EA_INODE_FL 0x00200000 /* Inode used for large EA */
|
||||
#define FS_EOFBLOCKS_FL 0x00400000 /* Reserved for ext4 */
|
||||
#define FS_NOCOW_FL 0x00800000 /* Do not cow file */
|
||||
#define FS_DAX_FL 0x02000000 /* Inode is DAX */
|
||||
#define FS_INLINE_DATA_FL 0x10000000 /* Reserved for ext4 */
|
||||
#define FS_PROJINHERIT_FL 0x20000000 /* Create with parents projid */
|
||||
#define FS_CASEFOLD_FL 0x40000000 /* Folder is case insensitive */
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#ifndef _LINUX_FSCRYPT_H
|
||||
#define _LINUX_FSCRYPT_H
|
||||
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/* Encryption policy flags */
|
||||
|
@ -17,7 +18,8 @@
|
|||
#define FSCRYPT_POLICY_FLAGS_PAD_32 0x03
|
||||
#define FSCRYPT_POLICY_FLAGS_PAD_MASK 0x03
|
||||
#define FSCRYPT_POLICY_FLAG_DIRECT_KEY 0x04
|
||||
#define FSCRYPT_POLICY_FLAGS_VALID 0x07
|
||||
#define FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 0x08
|
||||
#define FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32 0x10
|
||||
|
||||
/* Encryption algorithms */
|
||||
#define FSCRYPT_MODE_AES_256_XTS 1
|
||||
|
@ -25,7 +27,7 @@
|
|||
#define FSCRYPT_MODE_AES_128_CBC 5
|
||||
#define FSCRYPT_MODE_AES_128_CTS 6
|
||||
#define FSCRYPT_MODE_ADIANTUM 9
|
||||
#define __FSCRYPT_MODE_MAX 9
|
||||
/* If adding a mode number > 9, update FSCRYPT_MODE_MAX in fscrypt_private.h */
|
||||
|
||||
/*
|
||||
* Legacy policy version; ad-hoc KDF and no key verification.
|
||||
|
@ -42,7 +44,6 @@ struct fscrypt_policy_v1 {
|
|||
__u8 flags;
|
||||
__u8 master_key_descriptor[FSCRYPT_KEY_DESCRIPTOR_SIZE];
|
||||
};
|
||||
#define fscrypt_policy fscrypt_policy_v1
|
||||
|
||||
/*
|
||||
* Process-subscribed "logon" key description prefix and payload format.
|
||||
|
@ -108,11 +109,22 @@ struct fscrypt_key_specifier {
|
|||
} u;
|
||||
};
|
||||
|
||||
/*
|
||||
* Payload of Linux keyring key of type "fscrypt-provisioning", referenced by
|
||||
* fscrypt_add_key_arg::key_id as an alternative to fscrypt_add_key_arg::raw.
|
||||
*/
|
||||
struct fscrypt_provisioning_key_payload {
|
||||
__u32 type;
|
||||
__u32 __reserved;
|
||||
__u8 raw[];
|
||||
};
|
||||
|
||||
/* Struct passed to FS_IOC_ADD_ENCRYPTION_KEY */
|
||||
struct fscrypt_add_key_arg {
|
||||
struct fscrypt_key_specifier key_spec;
|
||||
__u32 raw_size;
|
||||
__u32 __reserved[9];
|
||||
__u32 key_id;
|
||||
__u32 __reserved[8];
|
||||
__u8 raw[];
|
||||
};
|
||||
|
||||
|
@ -142,18 +154,20 @@ struct fscrypt_get_key_status_arg {
|
|||
__u32 __out_reserved[13];
|
||||
};
|
||||
|
||||
#define FS_IOC_SET_ENCRYPTION_POLICY _IOR('f', 19, struct fscrypt_policy)
|
||||
#define FS_IOC_SET_ENCRYPTION_POLICY _IOR('f', 19, struct fscrypt_policy_v1)
|
||||
#define FS_IOC_GET_ENCRYPTION_PWSALT _IOW('f', 20, __u8[16])
|
||||
#define FS_IOC_GET_ENCRYPTION_POLICY _IOW('f', 21, struct fscrypt_policy)
|
||||
#define FS_IOC_GET_ENCRYPTION_POLICY _IOW('f', 21, struct fscrypt_policy_v1)
|
||||
#define FS_IOC_GET_ENCRYPTION_POLICY_EX _IOWR('f', 22, __u8[9]) /* size + version */
|
||||
#define FS_IOC_ADD_ENCRYPTION_KEY _IOWR('f', 23, struct fscrypt_add_key_arg)
|
||||
#define FS_IOC_REMOVE_ENCRYPTION_KEY _IOWR('f', 24, struct fscrypt_remove_key_arg)
|
||||
#define FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS _IOWR('f', 25, struct fscrypt_remove_key_arg)
|
||||
#define FS_IOC_GET_ENCRYPTION_KEY_STATUS _IOWR('f', 26, struct fscrypt_get_key_status_arg)
|
||||
#define FS_IOC_GET_ENCRYPTION_NONCE _IOR('f', 27, __u8[16])
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
/* old names; don't add anything new here! */
|
||||
#define fscrypt_policy fscrypt_policy_v1
|
||||
#define FS_KEY_DESCRIPTOR_SIZE FSCRYPT_KEY_DESCRIPTOR_SIZE
|
||||
#define FS_POLICY_FLAGS_PAD_4 FSCRYPT_POLICY_FLAGS_PAD_4
|
||||
#define FS_POLICY_FLAGS_PAD_8 FSCRYPT_POLICY_FLAGS_PAD_8
|
||||
|
@ -161,7 +175,7 @@ struct fscrypt_get_key_status_arg {
|
|||
#define FS_POLICY_FLAGS_PAD_32 FSCRYPT_POLICY_FLAGS_PAD_32
|
||||
#define FS_POLICY_FLAGS_PAD_MASK FSCRYPT_POLICY_FLAGS_PAD_MASK
|
||||
#define FS_POLICY_FLAG_DIRECT_KEY FSCRYPT_POLICY_FLAG_DIRECT_KEY
|
||||
#define FS_POLICY_FLAGS_VALID FSCRYPT_POLICY_FLAGS_VALID
|
||||
#define FS_POLICY_FLAGS_VALID 0x07 /* contains old flags only */
|
||||
#define FS_ENCRYPTION_MODE_INVALID 0 /* never used */
|
||||
#define FS_ENCRYPTION_MODE_AES_256_XTS FSCRYPT_MODE_AES_256_XTS
|
||||
#define FS_ENCRYPTION_MODE_AES_256_GCM 2 /* never used */
|
||||
|
|
|
@ -172,6 +172,9 @@
|
|||
* - add FUSE_WRITE_KILL_PRIV flag
|
||||
* - add FUSE_SETUPMAPPING and FUSE_REMOVEMAPPING
|
||||
* - add map_alignment to fuse_init_out, add FUSE_MAP_ALIGNMENT flag
|
||||
*
|
||||
* 7.32
|
||||
* - add flags to fuse_attr, add FUSE_ATTR_SUBMOUNT, add FUSE_SUBMOUNTS
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_FUSE_H
|
||||
|
@ -203,7 +206,7 @@
|
|||
#define FUSE_KERNEL_VERSION 7
|
||||
|
||||
/** Minor version number of this interface */
|
||||
#define FUSE_KERNEL_MINOR_VERSION 31
|
||||
#define FUSE_KERNEL_MINOR_VERSION 32
|
||||
|
||||
/** The node ID of the root inode */
|
||||
#define FUSE_ROOT_ID 1
|
||||
|
@ -227,7 +230,7 @@ struct fuse_attr {
|
|||
uint32_t gid;
|
||||
uint32_t rdev;
|
||||
uint32_t blksize;
|
||||
uint32_t padding;
|
||||
uint32_t flags;
|
||||
};
|
||||
|
||||
struct fuse_kstatfs {
|
||||
|
@ -309,7 +312,10 @@ struct fuse_file_lock {
|
|||
* FUSE_CACHE_SYMLINKS: cache READLINK responses
|
||||
* FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir
|
||||
* FUSE_EXPLICIT_INVAL_DATA: only invalidate cached pages on explicit request
|
||||
* FUSE_MAP_ALIGNMENT: map_alignment field is valid
|
||||
* FUSE_MAP_ALIGNMENT: init_out.map_alignment contains log2(byte alignment) for
|
||||
* foffset and moffset fields in struct
|
||||
* fuse_setupmapping_out and fuse_removemapping_one.
|
||||
* FUSE_SUBMOUNTS: kernel supports auto-mounting directory submounts
|
||||
*/
|
||||
#define FUSE_ASYNC_READ (1 << 0)
|
||||
#define FUSE_POSIX_LOCKS (1 << 1)
|
||||
|
@ -338,6 +344,7 @@ struct fuse_file_lock {
|
|||
#define FUSE_NO_OPENDIR_SUPPORT (1 << 24)
|
||||
#define FUSE_EXPLICIT_INVAL_DATA (1 << 25)
|
||||
#define FUSE_MAP_ALIGNMENT (1 << 26)
|
||||
#define FUSE_SUBMOUNTS (1 << 27)
|
||||
|
||||
/**
|
||||
* CUSE INIT request/reply flags
|
||||
|
@ -413,6 +420,13 @@ struct fuse_file_lock {
|
|||
*/
|
||||
#define FUSE_FSYNC_FDATASYNC (1 << 0)
|
||||
|
||||
/**
|
||||
* fuse_attr flags
|
||||
*
|
||||
* FUSE_ATTR_SUBMOUNT: Object is a submount root
|
||||
*/
|
||||
#define FUSE_ATTR_SUBMOUNT (1 << 0)
|
||||
|
||||
enum fuse_opcode {
|
||||
FUSE_LOOKUP = 1,
|
||||
FUSE_FORGET = 2, /* no reply */
|
||||
|
@ -888,4 +902,34 @@ struct fuse_copy_file_range_in {
|
|||
uint64_t flags;
|
||||
};
|
||||
|
||||
#define FUSE_SETUPMAPPING_FLAG_WRITE (1ull << 0)
|
||||
#define FUSE_SETUPMAPPING_FLAG_READ (1ull << 1)
|
||||
struct fuse_setupmapping_in {
|
||||
/* An already open handle */
|
||||
uint64_t fh;
|
||||
/* Offset into the file to start the mapping */
|
||||
uint64_t foffset;
|
||||
/* Length of mapping required */
|
||||
uint64_t len;
|
||||
/* Flags, FUSE_SETUPMAPPING_FLAG_* */
|
||||
uint64_t flags;
|
||||
/* Offset in Memory Window */
|
||||
uint64_t moffset;
|
||||
};
|
||||
|
||||
struct fuse_removemapping_in {
|
||||
/* number of fuse_removemapping_one follows */
|
||||
uint32_t count;
|
||||
};
|
||||
|
||||
struct fuse_removemapping_one {
|
||||
/* Offset into the dax window start the unmapping */
|
||||
uint64_t moffset;
|
||||
/* Length of mapping required */
|
||||
uint64_t len;
|
||||
};
|
||||
|
||||
#define FUSE_REMOVEMAPPING_MAX_ENTRY \
|
||||
(PAGE_SIZE / sizeof(struct fuse_removemapping_one))
|
||||
|
||||
#endif /* _LINUX_FUSE_H */
|
||||
|
|
|
@ -13,6 +13,7 @@ enum {
|
|||
TCA_STATS_RATE_EST64,
|
||||
TCA_STATS_PAD,
|
||||
TCA_STATS_BASIC_HW,
|
||||
TCA_STATS_PKT64,
|
||||
__TCA_STATS_MAX,
|
||||
};
|
||||
#define TCA_STATS_MAX (__TCA_STATS_MAX - 1)
|
||||
|
@ -26,10 +27,6 @@ struct gnet_stats_basic {
|
|||
__u64 bytes;
|
||||
__u32 packets;
|
||||
};
|
||||
struct gnet_stats_basic_packed {
|
||||
__u64 bytes;
|
||||
__u32 packets;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/**
|
||||
* struct gnet_stats_rate_est - rate estimator
|
||||
|
|
|
@ -48,6 +48,7 @@ enum {
|
|||
CTRL_CMD_NEWMCAST_GRP,
|
||||
CTRL_CMD_DELMCAST_GRP,
|
||||
CTRL_CMD_GETMCAST_GRP, /* unused */
|
||||
CTRL_CMD_GETPOLICY,
|
||||
__CTRL_CMD_MAX,
|
||||
};
|
||||
|
||||
|
@ -62,6 +63,9 @@ enum {
|
|||
CTRL_ATTR_MAXATTR,
|
||||
CTRL_ATTR_OPS,
|
||||
CTRL_ATTR_MCAST_GROUPS,
|
||||
CTRL_ATTR_POLICY,
|
||||
CTRL_ATTR_OP_POLICY,
|
||||
CTRL_ATTR_OP,
|
||||
__CTRL_ATTR_MAX,
|
||||
};
|
||||
|
||||
|
@ -83,6 +87,15 @@ enum {
|
|||
__CTRL_ATTR_MCAST_GRP_MAX,
|
||||
};
|
||||
|
||||
enum {
|
||||
CTRL_ATTR_POLICY_UNSPEC,
|
||||
CTRL_ATTR_POLICY_DO,
|
||||
CTRL_ATTR_POLICY_DUMP,
|
||||
|
||||
__CTRL_ATTR_POLICY_DUMP_MAX,
|
||||
CTRL_ATTR_POLICY_DUMP_MAX = __CTRL_ATTR_POLICY_DUMP_MAX - 1
|
||||
};
|
||||
|
||||
#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
|
||||
|
||||
|
||||
|
|
|
@ -171,6 +171,12 @@ struct gfs2_rindex {
|
|||
#define GFS2_RGF_NOALLOC 0x00000008
|
||||
#define GFS2_RGF_TRIMMED 0x00000010
|
||||
|
||||
struct gfs2_inode_lvb {
|
||||
__be32 ri_magic;
|
||||
__be32 __pad;
|
||||
__be64 ri_generation_deleted;
|
||||
};
|
||||
|
||||
struct gfs2_rgrp_lvb {
|
||||
__be32 rl_magic;
|
||||
__be32 rl_flags;
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
|
||||
/*
|
||||
* interface to user space for the gigaset driver
|
||||
*
|
||||
* Copyright (c) 2004 by Hansjoerg Lipp <hjlipp@web.de>
|
||||
*
|
||||
* =====================================================================
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* =====================================================================
|
||||
*/
|
||||
|
||||
#ifndef GIGASET_INTERFACE_H
|
||||
#define GIGASET_INTERFACE_H
|
||||
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
/* The magic IOCTL value for this interface. */
|
||||
#define GIGASET_IOCTL 0x47
|
||||
|
||||
/* enable/disable device control via character device (lock out ISDN subsys) */
|
||||
#define GIGASET_REDIR _IOWR(GIGASET_IOCTL, 0, int)
|
||||
|
||||
/* enable adapter configuration mode (M10x only) */
|
||||
#define GIGASET_CONFIG _IOWR(GIGASET_IOCTL, 1, int)
|
||||
|
||||
/* set break characters (M105 only) */
|
||||
#define GIGASET_BRKCHARS _IOW(GIGASET_IOCTL, 2, unsigned char[6])
|
||||
|
||||
/* get version information selected by arg[0] */
|
||||
#define GIGASET_VERSION _IOWR(GIGASET_IOCTL, 3, unsigned[4])
|
||||
/* values for GIGASET_VERSION arg[0] */
|
||||
#define GIGVER_DRIVER 0 /* get driver version */
|
||||
#define GIGVER_COMPAT 1 /* get interface compatibility version */
|
||||
#define GIGVER_FWBASE 2 /* get base station firmware version */
|
||||
|
||||
#endif
|
|
@ -11,28 +11,302 @@
|
|||
#ifndef _GPIO_H_
|
||||
#define _GPIO_H_
|
||||
|
||||
#include <linux/const.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* The maximum size of name and label arrays.
|
||||
*
|
||||
* Must be a multiple of 8 to ensure 32/64-bit alignment of structs.
|
||||
*/
|
||||
#define GPIO_MAX_NAME_SIZE 32
|
||||
|
||||
/**
|
||||
* struct gpiochip_info - Information about a certain GPIO chip
|
||||
* @name: the Linux kernel name of this GPIO chip
|
||||
* @label: a functional name for this GPIO chip, such as a product
|
||||
* number, may be NULL
|
||||
* number, may be empty (i.e. label[0] == '\0')
|
||||
* @lines: number of GPIO lines on this chip
|
||||
*/
|
||||
struct gpiochip_info {
|
||||
char name[32];
|
||||
char label[32];
|
||||
char name[GPIO_MAX_NAME_SIZE];
|
||||
char label[GPIO_MAX_NAME_SIZE];
|
||||
__u32 lines;
|
||||
};
|
||||
|
||||
/*
|
||||
* Maximum number of requested lines.
|
||||
*
|
||||
* Must be no greater than 64, as bitmaps are restricted here to 64-bits
|
||||
* for simplicity, and a multiple of 2 to ensure 32/64-bit alignment of
|
||||
* structs.
|
||||
*/
|
||||
#define GPIO_V2_LINES_MAX 64
|
||||
|
||||
/*
|
||||
* The maximum number of configuration attributes associated with a line
|
||||
* request.
|
||||
*/
|
||||
#define GPIO_V2_LINE_NUM_ATTRS_MAX 10
|
||||
|
||||
/**
|
||||
* enum gpio_v2_line_flag - &struct gpio_v2_line_attribute.flags values
|
||||
* @GPIO_V2_LINE_FLAG_USED: line is not available for request
|
||||
* @GPIO_V2_LINE_FLAG_ACTIVE_LOW: line active state is physical low
|
||||
* @GPIO_V2_LINE_FLAG_INPUT: line is an input
|
||||
* @GPIO_V2_LINE_FLAG_OUTPUT: line is an output
|
||||
* @GPIO_V2_LINE_FLAG_EDGE_RISING: line detects rising (inactive to active)
|
||||
* edges
|
||||
* @GPIO_V2_LINE_FLAG_EDGE_FALLING: line detects falling (active to
|
||||
* inactive) edges
|
||||
* @GPIO_V2_LINE_FLAG_OPEN_DRAIN: line is an open drain output
|
||||
* @GPIO_V2_LINE_FLAG_OPEN_SOURCE: line is an open source output
|
||||
* @GPIO_V2_LINE_FLAG_BIAS_PULL_UP: line has pull-up bias enabled
|
||||
* @GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN: line has pull-down bias enabled
|
||||
* @GPIO_V2_LINE_FLAG_BIAS_DISABLED: line has bias disabled
|
||||
*/
|
||||
enum gpio_v2_line_flag {
|
||||
GPIO_V2_LINE_FLAG_USED = _BITULL(0),
|
||||
GPIO_V2_LINE_FLAG_ACTIVE_LOW = _BITULL(1),
|
||||
GPIO_V2_LINE_FLAG_INPUT = _BITULL(2),
|
||||
GPIO_V2_LINE_FLAG_OUTPUT = _BITULL(3),
|
||||
GPIO_V2_LINE_FLAG_EDGE_RISING = _BITULL(4),
|
||||
GPIO_V2_LINE_FLAG_EDGE_FALLING = _BITULL(5),
|
||||
GPIO_V2_LINE_FLAG_OPEN_DRAIN = _BITULL(6),
|
||||
GPIO_V2_LINE_FLAG_OPEN_SOURCE = _BITULL(7),
|
||||
GPIO_V2_LINE_FLAG_BIAS_PULL_UP = _BITULL(8),
|
||||
GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN = _BITULL(9),
|
||||
GPIO_V2_LINE_FLAG_BIAS_DISABLED = _BITULL(10),
|
||||
};
|
||||
|
||||
/**
|
||||
* struct gpio_v2_line_values - Values of GPIO lines
|
||||
* @bits: a bitmap containing the value of the lines, set to 1 for active
|
||||
* and 0 for inactive.
|
||||
* @mask: a bitmap identifying the lines to get or set, with each bit
|
||||
* number corresponding to the index into &struct
|
||||
* gpio_v2_line_request.offsets.
|
||||
*/
|
||||
struct gpio_v2_line_values {
|
||||
__aligned_u64 bits;
|
||||
__aligned_u64 mask;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum gpio_v2_line_attr_id - &struct gpio_v2_line_attribute.id values
|
||||
* identifying which field of the attribute union is in use.
|
||||
* @GPIO_V2_LINE_ATTR_ID_FLAGS: flags field is in use
|
||||
* @GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES: values field is in use
|
||||
* @GPIO_V2_LINE_ATTR_ID_DEBOUNCE: debounce_period_us field is in use
|
||||
*/
|
||||
enum gpio_v2_line_attr_id {
|
||||
GPIO_V2_LINE_ATTR_ID_FLAGS = 1,
|
||||
GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES = 2,
|
||||
GPIO_V2_LINE_ATTR_ID_DEBOUNCE = 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct gpio_v2_line_attribute - a configurable attribute of a line
|
||||
* @id: attribute identifier with value from &enum gpio_v2_line_attr_id
|
||||
* @padding: reserved for future use and must be zero filled
|
||||
* @flags: if id is %GPIO_V2_LINE_ATTR_ID_FLAGS, the flags for the GPIO
|
||||
* line, with values from &enum gpio_v2_line_flag, such as
|
||||
* %GPIO_V2_LINE_FLAG_ACTIVE_LOW, %GPIO_V2_LINE_FLAG_OUTPUT etc, added
|
||||
* together. This overrides the default flags contained in the &struct
|
||||
* gpio_v2_line_config for the associated line.
|
||||
* @values: if id is %GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES, a bitmap
|
||||
* containing the values to which the lines will be set, with each bit
|
||||
* number corresponding to the index into &struct
|
||||
* gpio_v2_line_request.offsets.
|
||||
* @debounce_period_us: if id is %GPIO_V2_LINE_ATTR_ID_DEBOUNCE, the
|
||||
* desired debounce period, in microseconds
|
||||
*/
|
||||
struct gpio_v2_line_attribute {
|
||||
__u32 id;
|
||||
__u32 padding;
|
||||
union {
|
||||
__aligned_u64 flags;
|
||||
__aligned_u64 values;
|
||||
__u32 debounce_period_us;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* struct gpio_v2_line_config_attribute - a configuration attribute
|
||||
* associated with one or more of the requested lines.
|
||||
* @attr: the configurable attribute
|
||||
* @mask: a bitmap identifying the lines to which the attribute applies,
|
||||
* with each bit number corresponding to the index into &struct
|
||||
* gpio_v2_line_request.offsets.
|
||||
*/
|
||||
struct gpio_v2_line_config_attribute {
|
||||
struct gpio_v2_line_attribute attr;
|
||||
__aligned_u64 mask;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct gpio_v2_line_config - Configuration for GPIO lines
|
||||
* @flags: flags for the GPIO lines, with values from &enum
|
||||
* gpio_v2_line_flag, such as %GPIO_V2_LINE_FLAG_ACTIVE_LOW,
|
||||
* %GPIO_V2_LINE_FLAG_OUTPUT etc, added together. This is the default for
|
||||
* all requested lines but may be overridden for particular lines using
|
||||
* @attrs.
|
||||
* @num_attrs: the number of attributes in @attrs
|
||||
* @padding: reserved for future use and must be zero filled
|
||||
* @attrs: the configuration attributes associated with the requested
|
||||
* lines. Any attribute should only be associated with a particular line
|
||||
* once. If an attribute is associated with a line multiple times then the
|
||||
* first occurrence (i.e. lowest index) has precedence.
|
||||
*/
|
||||
struct gpio_v2_line_config {
|
||||
__aligned_u64 flags;
|
||||
__u32 num_attrs;
|
||||
/* Pad to fill implicit padding and reserve space for future use. */
|
||||
__u32 padding[5];
|
||||
struct gpio_v2_line_config_attribute attrs[GPIO_V2_LINE_NUM_ATTRS_MAX];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct gpio_v2_line_request - Information about a request for GPIO lines
|
||||
* @offsets: an array of desired lines, specified by offset index for the
|
||||
* associated GPIO chip
|
||||
* @consumer: a desired consumer label for the selected GPIO lines such as
|
||||
* "my-bitbanged-relay"
|
||||
* @config: requested configuration for the lines.
|
||||
* @num_lines: number of lines requested in this request, i.e. the number
|
||||
* of valid fields in the %GPIO_V2_LINES_MAX sized arrays, set to 1 to
|
||||
* request a single line
|
||||
* @event_buffer_size: a suggested minimum number of line events that the
|
||||
* kernel should buffer. This is only relevant if edge detection is
|
||||
* enabled in the configuration. Note that this is only a suggested value
|
||||
* and the kernel may allocate a larger buffer or cap the size of the
|
||||
* buffer. If this field is zero then the buffer size defaults to a minimum
|
||||
* of @num_lines * 16.
|
||||
* @padding: reserved for future use and must be zero filled
|
||||
* @fd: if successful this field will contain a valid anonymous file handle
|
||||
* after a %GPIO_GET_LINE_IOCTL operation, zero or negative value means
|
||||
* error
|
||||
*/
|
||||
struct gpio_v2_line_request {
|
||||
__u32 offsets[GPIO_V2_LINES_MAX];
|
||||
char consumer[GPIO_MAX_NAME_SIZE];
|
||||
struct gpio_v2_line_config config;
|
||||
__u32 num_lines;
|
||||
__u32 event_buffer_size;
|
||||
/* Pad to fill implicit padding and reserve space for future use. */
|
||||
__u32 padding[5];
|
||||
__s32 fd;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct gpio_v2_line_info - Information about a certain GPIO line
|
||||
* @name: the name of this GPIO line, such as the output pin of the line on
|
||||
* the chip, a rail or a pin header name on a board, as specified by the
|
||||
* GPIO chip, may be empty (i.e. name[0] == '\0')
|
||||
* @consumer: a functional name for the consumer of this GPIO line as set
|
||||
* by whatever is using it, will be empty if there is no current user but
|
||||
* may also be empty if the consumer doesn't set this up
|
||||
* @offset: the local offset on this GPIO chip, fill this in when
|
||||
* requesting the line information from the kernel
|
||||
* @num_attrs: the number of attributes in @attrs
|
||||
* @flags: flags for the GPIO lines, with values from &enum
|
||||
* gpio_v2_line_flag, such as %GPIO_V2_LINE_FLAG_ACTIVE_LOW,
|
||||
* %GPIO_V2_LINE_FLAG_OUTPUT etc, added together.
|
||||
* @attrs: the configuration attributes associated with the line
|
||||
* @padding: reserved for future use
|
||||
*/
|
||||
struct gpio_v2_line_info {
|
||||
char name[GPIO_MAX_NAME_SIZE];
|
||||
char consumer[GPIO_MAX_NAME_SIZE];
|
||||
__u32 offset;
|
||||
__u32 num_attrs;
|
||||
__aligned_u64 flags;
|
||||
struct gpio_v2_line_attribute attrs[GPIO_V2_LINE_NUM_ATTRS_MAX];
|
||||
/* Space reserved for future use. */
|
||||
__u32 padding[4];
|
||||
};
|
||||
|
||||
/**
|
||||
* enum gpio_v2_line_changed_type - &struct gpio_v2_line_changed.event_type
|
||||
* values
|
||||
* @GPIO_V2_LINE_CHANGED_REQUESTED: line has been requested
|
||||
* @GPIO_V2_LINE_CHANGED_RELEASED: line has been released
|
||||
* @GPIO_V2_LINE_CHANGED_CONFIG: line has been reconfigured
|
||||
*/
|
||||
enum gpio_v2_line_changed_type {
|
||||
GPIO_V2_LINE_CHANGED_REQUESTED = 1,
|
||||
GPIO_V2_LINE_CHANGED_RELEASED = 2,
|
||||
GPIO_V2_LINE_CHANGED_CONFIG = 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct gpio_v2_line_info_changed - Information about a change in status
|
||||
* of a GPIO line
|
||||
* @info: updated line information
|
||||
* @timestamp_ns: estimate of time of status change occurrence, in nanoseconds
|
||||
* @event_type: the type of change with a value from &enum
|
||||
* gpio_v2_line_changed_type
|
||||
* @padding: reserved for future use
|
||||
*/
|
||||
struct gpio_v2_line_info_changed {
|
||||
struct gpio_v2_line_info info;
|
||||
__aligned_u64 timestamp_ns;
|
||||
__u32 event_type;
|
||||
/* Pad struct to 64-bit boundary and reserve space for future use. */
|
||||
__u32 padding[5];
|
||||
};
|
||||
|
||||
/**
|
||||
* enum gpio_v2_line_event_id - &struct gpio_v2_line_event.id values
|
||||
* @GPIO_V2_LINE_EVENT_RISING_EDGE: event triggered by a rising edge
|
||||
* @GPIO_V2_LINE_EVENT_FALLING_EDGE: event triggered by a falling edge
|
||||
*/
|
||||
enum gpio_v2_line_event_id {
|
||||
GPIO_V2_LINE_EVENT_RISING_EDGE = 1,
|
||||
GPIO_V2_LINE_EVENT_FALLING_EDGE = 2,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct gpio_v2_line_event - The actual event being pushed to userspace
|
||||
* @timestamp_ns: best estimate of time of event occurrence, in nanoseconds.
|
||||
* The @timestamp_ns is read from %CLOCK_MONOTONIC and is intended to allow
|
||||
* the accurate measurement of the time between events. It does not provide
|
||||
* the wall-clock time.
|
||||
* @id: event identifier with value from &enum gpio_v2_line_event_id
|
||||
* @offset: the offset of the line that triggered the event
|
||||
* @seqno: the sequence number for this event in the sequence of events for
|
||||
* all the lines in this line request
|
||||
* @line_seqno: the sequence number for this event in the sequence of
|
||||
* events on this particular line
|
||||
* @padding: reserved for future use
|
||||
*/
|
||||
struct gpio_v2_line_event {
|
||||
__aligned_u64 timestamp_ns;
|
||||
__u32 id;
|
||||
__u32 offset;
|
||||
__u32 seqno;
|
||||
__u32 line_seqno;
|
||||
/* Space reserved for future use. */
|
||||
__u32 padding[6];
|
||||
};
|
||||
|
||||
/*
|
||||
* ABI v1
|
||||
*
|
||||
* This version of the ABI is deprecated.
|
||||
* Use the latest version of the ABI, defined above, instead.
|
||||
*/
|
||||
|
||||
/* Informational flags */
|
||||
#define GPIOLINE_FLAG_KERNEL (1UL << 0) /* Line used by the kernel */
|
||||
#define GPIOLINE_FLAG_IS_OUT (1UL << 1)
|
||||
#define GPIOLINE_FLAG_ACTIVE_LOW (1UL << 2)
|
||||
#define GPIOLINE_FLAG_OPEN_DRAIN (1UL << 3)
|
||||
#define GPIOLINE_FLAG_OPEN_SOURCE (1UL << 4)
|
||||
#define GPIOLINE_FLAG_BIAS_PULL_UP (1UL << 5)
|
||||
#define GPIOLINE_FLAG_BIAS_PULL_DOWN (1UL << 6)
|
||||
#define GPIOLINE_FLAG_BIAS_DISABLE (1UL << 7)
|
||||
|
||||
/**
|
||||
* struct gpioline_info - Information about a certain GPIO line
|
||||
|
@ -41,40 +315,78 @@ struct gpiochip_info {
|
|||
* @flags: various flags for this line
|
||||
* @name: the name of this GPIO line, such as the output pin of the line on the
|
||||
* chip, a rail or a pin header name on a board, as specified by the gpio
|
||||
* chip, may be NULL
|
||||
* chip, may be empty (i.e. name[0] == '\0')
|
||||
* @consumer: a functional name for the consumer of this GPIO line as set by
|
||||
* whatever is using it, will be NULL if there is no current user but may
|
||||
* also be NULL if the consumer doesn't set this up
|
||||
* whatever is using it, will be empty if there is no current user but may
|
||||
* also be empty if the consumer doesn't set this up
|
||||
*
|
||||
* Note: This struct is part of ABI v1 and is deprecated.
|
||||
* Use &struct gpio_v2_line_info instead.
|
||||
*/
|
||||
struct gpioline_info {
|
||||
__u32 line_offset;
|
||||
__u32 flags;
|
||||
char name[32];
|
||||
char consumer[32];
|
||||
char name[GPIO_MAX_NAME_SIZE];
|
||||
char consumer[GPIO_MAX_NAME_SIZE];
|
||||
};
|
||||
|
||||
/* Maximum number of requested handles */
|
||||
#define GPIOHANDLES_MAX 64
|
||||
|
||||
/* Possible line status change events */
|
||||
enum {
|
||||
GPIOLINE_CHANGED_REQUESTED = 1,
|
||||
GPIOLINE_CHANGED_RELEASED,
|
||||
GPIOLINE_CHANGED_CONFIG,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct gpioline_info_changed - Information about a change in status
|
||||
* of a GPIO line
|
||||
* @info: updated line information
|
||||
* @timestamp: estimate of time of status change occurrence, in nanoseconds
|
||||
* @event_type: one of %GPIOLINE_CHANGED_REQUESTED,
|
||||
* %GPIOLINE_CHANGED_RELEASED and %GPIOLINE_CHANGED_CONFIG
|
||||
* @padding: reserved for future use
|
||||
*
|
||||
* The &struct gpioline_info embedded here has 32-bit alignment on its own,
|
||||
* but it works fine with 64-bit alignment too. With its 72 byte size, we can
|
||||
* guarantee there are no implicit holes between it and subsequent members.
|
||||
* The 20-byte padding at the end makes sure we don't add any implicit padding
|
||||
* at the end of the structure on 64-bit architectures.
|
||||
*
|
||||
* Note: This struct is part of ABI v1 and is deprecated.
|
||||
* Use &struct gpio_v2_line_info_changed instead.
|
||||
*/
|
||||
struct gpioline_info_changed {
|
||||
struct gpioline_info info;
|
||||
__u64 timestamp;
|
||||
__u32 event_type;
|
||||
__u32 padding[5]; /* for future use */
|
||||
};
|
||||
|
||||
/* Linerequest flags */
|
||||
#define GPIOHANDLE_REQUEST_INPUT (1UL << 0)
|
||||
#define GPIOHANDLE_REQUEST_OUTPUT (1UL << 1)
|
||||
#define GPIOHANDLE_REQUEST_ACTIVE_LOW (1UL << 2)
|
||||
#define GPIOHANDLE_REQUEST_OPEN_DRAIN (1UL << 3)
|
||||
#define GPIOHANDLE_REQUEST_OPEN_SOURCE (1UL << 4)
|
||||
#define GPIOHANDLE_REQUEST_BIAS_PULL_UP (1UL << 5)
|
||||
#define GPIOHANDLE_REQUEST_BIAS_PULL_DOWN (1UL << 6)
|
||||
#define GPIOHANDLE_REQUEST_BIAS_DISABLE (1UL << 7)
|
||||
|
||||
/**
|
||||
* struct gpiohandle_request - Information about a GPIO handle request
|
||||
* @lineoffsets: an array of desired lines, specified by offset index for the
|
||||
* associated GPIO device
|
||||
* @flags: desired flags for the desired GPIO lines, such as
|
||||
* GPIOHANDLE_REQUEST_OUTPUT, GPIOHANDLE_REQUEST_ACTIVE_LOW etc, OR:ed
|
||||
* %GPIOHANDLE_REQUEST_OUTPUT, %GPIOHANDLE_REQUEST_ACTIVE_LOW etc, added
|
||||
* together. Note that even if multiple lines are requested, the same flags
|
||||
* must be applicable to all of them, if you want lines with individual
|
||||
* flags set, request them one by one. It is possible to select
|
||||
* a batch of input or output lines, but they must all have the same
|
||||
* characteristics, i.e. all inputs or all outputs, all active low etc
|
||||
* @default_values: if the GPIOHANDLE_REQUEST_OUTPUT is set for a requested
|
||||
* @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set for a requested
|
||||
* line, this specifies the default output value, should be 0 (low) or
|
||||
* 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)
|
||||
* @consumer_label: a desired consumer label for the selected GPIO line(s)
|
||||
|
@ -82,31 +394,53 @@ struct gpioline_info {
|
|||
* @lines: number of lines requested in this request, i.e. the number of
|
||||
* valid fields in the above arrays, set to 1 to request a single line
|
||||
* @fd: if successful this field will contain a valid anonymous file handle
|
||||
* after a GPIO_GET_LINEHANDLE_IOCTL operation, zero or negative value
|
||||
* after a %GPIO_GET_LINEHANDLE_IOCTL operation, zero or negative value
|
||||
* means error
|
||||
*
|
||||
* Note: This struct is part of ABI v1 and is deprecated.
|
||||
* Use &struct gpio_v2_line_request instead.
|
||||
*/
|
||||
struct gpiohandle_request {
|
||||
__u32 lineoffsets[GPIOHANDLES_MAX];
|
||||
__u32 flags;
|
||||
__u8 default_values[GPIOHANDLES_MAX];
|
||||
char consumer_label[32];
|
||||
char consumer_label[GPIO_MAX_NAME_SIZE];
|
||||
__u32 lines;
|
||||
int fd;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct gpiohandle_config - Configuration for a GPIO handle request
|
||||
* @flags: updated flags for the requested GPIO lines, such as
|
||||
* %GPIOHANDLE_REQUEST_OUTPUT, %GPIOHANDLE_REQUEST_ACTIVE_LOW etc, added
|
||||
* together
|
||||
* @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set in flags,
|
||||
* this specifies the default output value, should be 0 (low) or
|
||||
* 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)
|
||||
* @padding: reserved for future use and should be zero filled
|
||||
*
|
||||
* Note: This struct is part of ABI v1 and is deprecated.
|
||||
* Use &struct gpio_v2_line_config instead.
|
||||
*/
|
||||
struct gpiohandle_config {
|
||||
__u32 flags;
|
||||
__u8 default_values[GPIOHANDLES_MAX];
|
||||
__u32 padding[4]; /* padding for future use */
|
||||
};
|
||||
|
||||
/**
|
||||
* struct gpiohandle_data - Information of values on a GPIO handle
|
||||
* @values: when getting the state of lines this contains the current
|
||||
* state of a line, when setting the state of lines these should contain
|
||||
* the desired target state
|
||||
*
|
||||
* Note: This struct is part of ABI v1 and is deprecated.
|
||||
* Use &struct gpio_v2_line_values instead.
|
||||
*/
|
||||
struct gpiohandle_data {
|
||||
__u8 values[GPIOHANDLES_MAX];
|
||||
};
|
||||
|
||||
#define GPIOHANDLE_GET_LINE_VALUES_IOCTL _IOWR(0xB4, 0x08, struct gpiohandle_data)
|
||||
#define GPIOHANDLE_SET_LINE_VALUES_IOCTL _IOWR(0xB4, 0x09, struct gpiohandle_data)
|
||||
|
||||
/* Eventrequest flags */
|
||||
#define GPIOEVENT_REQUEST_RISING_EDGE (1UL << 0)
|
||||
#define GPIOEVENT_REQUEST_FALLING_EDGE (1UL << 1)
|
||||
|
@ -117,24 +451,27 @@ struct gpiohandle_data {
|
|||
* @lineoffset: the desired line to subscribe to events from, specified by
|
||||
* offset index for the associated GPIO device
|
||||
* @handleflags: desired handle flags for the desired GPIO line, such as
|
||||
* GPIOHANDLE_REQUEST_ACTIVE_LOW or GPIOHANDLE_REQUEST_OPEN_DRAIN
|
||||
* %GPIOHANDLE_REQUEST_ACTIVE_LOW or %GPIOHANDLE_REQUEST_OPEN_DRAIN
|
||||
* @eventflags: desired flags for the desired GPIO event line, such as
|
||||
* GPIOEVENT_REQUEST_RISING_EDGE or GPIOEVENT_REQUEST_FALLING_EDGE
|
||||
* %GPIOEVENT_REQUEST_RISING_EDGE or %GPIOEVENT_REQUEST_FALLING_EDGE
|
||||
* @consumer_label: a desired consumer label for the selected GPIO line(s)
|
||||
* such as "my-listener"
|
||||
* @fd: if successful this field will contain a valid anonymous file handle
|
||||
* after a GPIO_GET_LINEEVENT_IOCTL operation, zero or negative value
|
||||
* after a %GPIO_GET_LINEEVENT_IOCTL operation, zero or negative value
|
||||
* means error
|
||||
*
|
||||
* Note: This struct is part of ABI v1 and is deprecated.
|
||||
* Use &struct gpio_v2_line_request instead.
|
||||
*/
|
||||
struct gpioevent_request {
|
||||
__u32 lineoffset;
|
||||
__u32 handleflags;
|
||||
__u32 eventflags;
|
||||
char consumer_label[32];
|
||||
char consumer_label[GPIO_MAX_NAME_SIZE];
|
||||
int fd;
|
||||
};
|
||||
|
||||
/**
|
||||
/*
|
||||
* GPIO event types
|
||||
*/
|
||||
#define GPIOEVENT_EVENT_RISING_EDGE 0x01
|
||||
|
@ -144,15 +481,42 @@ struct gpioevent_request {
|
|||
* struct gpioevent_data - The actual event being pushed to userspace
|
||||
* @timestamp: best estimate of time of event occurrence, in nanoseconds
|
||||
* @id: event identifier
|
||||
*
|
||||
* Note: This struct is part of ABI v1 and is deprecated.
|
||||
* Use &struct gpio_v2_line_event instead.
|
||||
*/
|
||||
struct gpioevent_data {
|
||||
__u64 timestamp;
|
||||
__u32 id;
|
||||
};
|
||||
|
||||
/*
|
||||
* v1 and v2 ioctl()s
|
||||
*/
|
||||
#define GPIO_GET_CHIPINFO_IOCTL _IOR(0xB4, 0x01, struct gpiochip_info)
|
||||
#define GPIO_GET_LINEINFO_UNWATCH_IOCTL _IOWR(0xB4, 0x0C, __u32)
|
||||
|
||||
/*
|
||||
* v2 ioctl()s
|
||||
*/
|
||||
#define GPIO_V2_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x05, struct gpio_v2_line_info)
|
||||
#define GPIO_V2_GET_LINEINFO_WATCH_IOCTL _IOWR(0xB4, 0x06, struct gpio_v2_line_info)
|
||||
#define GPIO_V2_GET_LINE_IOCTL _IOWR(0xB4, 0x07, struct gpio_v2_line_request)
|
||||
#define GPIO_V2_LINE_SET_CONFIG_IOCTL _IOWR(0xB4, 0x0D, struct gpio_v2_line_config)
|
||||
#define GPIO_V2_LINE_GET_VALUES_IOCTL _IOWR(0xB4, 0x0E, struct gpio_v2_line_values)
|
||||
#define GPIO_V2_LINE_SET_VALUES_IOCTL _IOWR(0xB4, 0x0F, struct gpio_v2_line_values)
|
||||
|
||||
/*
|
||||
* v1 ioctl()s
|
||||
*
|
||||
* These ioctl()s are deprecated. Use the v2 equivalent instead.
|
||||
*/
|
||||
#define GPIO_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x02, struct gpioline_info)
|
||||
#define GPIO_GET_LINEHANDLE_IOCTL _IOWR(0xB4, 0x03, struct gpiohandle_request)
|
||||
#define GPIO_GET_LINEEVENT_IOCTL _IOWR(0xB4, 0x04, struct gpioevent_request)
|
||||
#define GPIOHANDLE_GET_LINE_VALUES_IOCTL _IOWR(0xB4, 0x08, struct gpiohandle_data)
|
||||
#define GPIOHANDLE_SET_LINE_VALUES_IOCTL _IOWR(0xB4, 0x09, struct gpiohandle_data)
|
||||
#define GPIOHANDLE_SET_CONFIG_IOCTL _IOWR(0xB4, 0x0A, struct gpiohandle_config)
|
||||
#define GPIO_GET_LINEINFO_WATCH_IOCTL _IOWR(0xB4, 0x0B, struct gpioline_info)
|
||||
|
||||
#endif /* _GPIO_H_ */
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#ifndef _LINUX_GTP_H_
|
||||
#define _LINUX_GTP_H_
|
||||
|
||||
#define GTP_GENL_MCGRP_NAME "gtp"
|
||||
|
||||
enum gtp_genl_cmds {
|
||||
GTP_CMD_NEWPDP,
|
||||
GTP_CMD_DELPDP,
|
||||
|
|
|
@ -79,6 +79,15 @@ typedef struct {
|
|||
unsigned int timeout;
|
||||
} cisco_proto;
|
||||
|
||||
typedef struct {
|
||||
unsigned short dce; /* 1 for DCE (network side) operation */
|
||||
unsigned int modulo; /* modulo (8 = basic / 128 = extended) */
|
||||
unsigned int window; /* frame window size */
|
||||
unsigned int t1; /* timeout t1 */
|
||||
unsigned int t2; /* timeout t2 */
|
||||
unsigned int n2; /* frame retry counter */
|
||||
} x25_hdlc_proto;
|
||||
|
||||
/* PPP doesn't need any info now - supply length = 0 to ioctl */
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
|
|
@ -39,6 +39,7 @@ struct hidraw_devinfo {
|
|||
/* The first byte of SFEATURE and GFEATURE is the report number */
|
||||
#define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len)
|
||||
#define HIDIOCGFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len)
|
||||
#define HIDIOCGRAWUNIQ(len) _IOC(_IOC_READ, 'H', 0x08, len)
|
||||
|
||||
#define HIDRAW_FIRST_MINOR 0
|
||||
#define HIDRAW_MAX_DEVICES 64
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
/* Generic Netlink HSR family definition
|
||||
*/
|
||||
|
||||
/* attributes */
|
||||
/* attributes for HSR or PRP node */
|
||||
enum {
|
||||
HSR_A_UNSPEC,
|
||||
HSR_A_NODE_ADDR,
|
||||
|
|
|
@ -119,8 +119,8 @@ enum hv_fcopy_op {
|
|||
|
||||
struct hv_fcopy_hdr {
|
||||
__u32 operation;
|
||||
uuid_le service_id0; /* currently unused */
|
||||
uuid_le service_id1; /* currently unused */
|
||||
__u8 service_id0[16]; /* currently unused */
|
||||
__u8 service_id1[16]; /* currently unused */
|
||||
} __attribute__((packed));
|
||||
|
||||
#define OVER_WRITE 0x1
|
||||
|
@ -219,7 +219,7 @@ struct hv_do_fcopy {
|
|||
* kernel and user-level daemon communicate using a connector channel.
|
||||
*
|
||||
* The user mode component first registers with the
|
||||
* the kernel component. Subsequently, the kernel component requests, data
|
||||
* kernel component. Subsequently, the kernel component requests, data
|
||||
* for the specified keys. In response to this message the user mode component
|
||||
* fills in the value corresponding to the specified key. We overload the
|
||||
* sequence field in the cn_msg header to define our KVP message types.
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/* $Id: hysdn_if.h,v 1.1.8.3 2001/09/23 22:25:05 kai Exp $
|
||||
*
|
||||
* Linux driver for HYSDN cards
|
||||
* ioctl definitions shared by hynetmgr and driver.
|
||||
*
|
||||
* Author Werner Cornelius (werner@titro.de) for Hypercope GmbH
|
||||
* Copyright 1999 by Werner Cornelius (werner@titro.de)
|
||||
*
|
||||
* This software may be used and distributed according to the terms
|
||||
* of the GNU General Public License, incorporated herein by reference.
|
||||
*
|
||||
*/
|
||||
|
||||
/****************/
|
||||
/* error values */
|
||||
/****************/
|
||||
#define ERR_NONE 0 /* no error occurred */
|
||||
#define ERR_ALREADY_BOOT 1000 /* we are already booting */
|
||||
#define EPOF_BAD_MAGIC 1001 /* bad magic in POF header */
|
||||
#define ERR_BOARD_DPRAM 1002 /* board DPRAM failed */
|
||||
#define EPOF_INTERNAL 1003 /* internal POF handler error */
|
||||
#define EPOF_BAD_IMG_SIZE 1004 /* POF boot image size invalid */
|
||||
#define ERR_BOOTIMG_FAIL 1005 /* 1. stage boot image did not start */
|
||||
#define ERR_BOOTSEQ_FAIL 1006 /* 2. stage boot seq handshake timeout */
|
||||
#define ERR_POF_TIMEOUT 1007 /* timeout waiting for card pof ready */
|
||||
#define ERR_NOT_BOOTED 1008 /* operation only allowed when booted */
|
||||
#define ERR_CONF_LONG 1009 /* conf line is too long */
|
||||
#define ERR_INV_CHAN 1010 /* invalid channel number */
|
||||
#define ERR_ASYNC_TIME 1011 /* timeout sending async data */
|
||||
|
||||
|
||||
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
#define _LINUX_ICMP_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#define ICMP_ECHOREPLY 0 /* Echo Reply */
|
||||
#define ICMP_DEST_UNREACH 3 /* Destination Unreachable */
|
||||
|
@ -95,5 +96,26 @@ struct icmp_filter {
|
|||
__u32 data;
|
||||
};
|
||||
|
||||
/* RFC 4884 extension struct: one per message */
|
||||
struct icmp_ext_hdr {
|
||||
#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||
__u8 reserved1:4,
|
||||
version:4;
|
||||
#elif defined(__BIG_ENDIAN_BITFIELD)
|
||||
__u8 version:4,
|
||||
reserved1:4;
|
||||
#else
|
||||
#error "Please fix <asm/byteorder.h>"
|
||||
#endif
|
||||
__u8 reserved2;
|
||||
__sum16 checksum;
|
||||
};
|
||||
|
||||
/* RFC 4884 extension object header: one for each object */
|
||||
struct icmp_extobj_hdr {
|
||||
__be16 length;
|
||||
__u8 class_num;
|
||||
__u8 class_type;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_ICMP_H */
|
||||
|
|
|
@ -68,6 +68,7 @@ struct icmp6hdr {
|
|||
#define icmp6_mtu icmp6_dataun.un_data32[0]
|
||||
#define icmp6_unused icmp6_dataun.un_data32[0]
|
||||
#define icmp6_maxdelay icmp6_dataun.un_data16[0]
|
||||
#define icmp6_datagram_len icmp6_dataun.un_data8[0]
|
||||
#define icmp6_router icmp6_dataun.u_nd_advt.router
|
||||
#define icmp6_solicited icmp6_dataun.u_nd_advt.solicited
|
||||
#define icmp6_override icmp6_dataun.u_nd_advt.override
|
||||
|
@ -137,6 +138,7 @@ struct icmp6hdr {
|
|||
#define ICMPV6_HDR_FIELD 0
|
||||
#define ICMPV6_UNK_NEXTHDR 1
|
||||
#define ICMPV6_UNK_OPTION 2
|
||||
#define ICMPV6_HDR_INCOMP 3
|
||||
|
||||
/*
|
||||
* constants for (set|get)sockopt
|
||||
|
|
222
linux-headers/include/linux/idxd.h
Normal file
222
linux-headers/include/linux/idxd.h
Normal file
|
@ -0,0 +1,222 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */
|
||||
#ifndef _USR_IDXD_H_
|
||||
#define _USR_IDXD_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* Descriptor flags */
|
||||
#define IDXD_OP_FLAG_FENCE 0x0001
|
||||
#define IDXD_OP_FLAG_BOF 0x0002
|
||||
#define IDXD_OP_FLAG_CRAV 0x0004
|
||||
#define IDXD_OP_FLAG_RCR 0x0008
|
||||
#define IDXD_OP_FLAG_RCI 0x0010
|
||||
#define IDXD_OP_FLAG_CRSTS 0x0020
|
||||
#define IDXD_OP_FLAG_CR 0x0080
|
||||
#define IDXD_OP_FLAG_CC 0x0100
|
||||
#define IDXD_OP_FLAG_ADDR1_TCS 0x0200
|
||||
#define IDXD_OP_FLAG_ADDR2_TCS 0x0400
|
||||
#define IDXD_OP_FLAG_ADDR3_TCS 0x0800
|
||||
#define IDXD_OP_FLAG_CR_TCS 0x1000
|
||||
#define IDXD_OP_FLAG_STORD 0x2000
|
||||
#define IDXD_OP_FLAG_DRDBK 0x4000
|
||||
#define IDXD_OP_FLAG_DSTS 0x8000
|
||||
|
||||
/* Opcode */
|
||||
enum dsa_opcode {
|
||||
DSA_OPCODE_NOOP = 0,
|
||||
DSA_OPCODE_BATCH,
|
||||
DSA_OPCODE_DRAIN,
|
||||
DSA_OPCODE_MEMMOVE,
|
||||
DSA_OPCODE_MEMFILL,
|
||||
DSA_OPCODE_COMPARE,
|
||||
DSA_OPCODE_COMPVAL,
|
||||
DSA_OPCODE_CR_DELTA,
|
||||
DSA_OPCODE_AP_DELTA,
|
||||
DSA_OPCODE_DUALCAST,
|
||||
DSA_OPCODE_CRCGEN = 0x10,
|
||||
DSA_OPCODE_COPY_CRC,
|
||||
DSA_OPCODE_DIF_CHECK,
|
||||
DSA_OPCODE_DIF_INS,
|
||||
DSA_OPCODE_DIF_STRP,
|
||||
DSA_OPCODE_DIF_UPDT,
|
||||
DSA_OPCODE_CFLUSH = 0x20,
|
||||
};
|
||||
|
||||
/* Completion record status */
|
||||
enum dsa_completion_status {
|
||||
DSA_COMP_NONE = 0,
|
||||
DSA_COMP_SUCCESS,
|
||||
DSA_COMP_SUCCESS_PRED,
|
||||
DSA_COMP_PAGE_FAULT_NOBOF,
|
||||
DSA_COMP_PAGE_FAULT_IR,
|
||||
DSA_COMP_BATCH_FAIL,
|
||||
DSA_COMP_BATCH_PAGE_FAULT,
|
||||
DSA_COMP_DR_OFFSET_NOINC,
|
||||
DSA_COMP_DR_OFFSET_ERANGE,
|
||||
DSA_COMP_DIF_ERR,
|
||||
DSA_COMP_BAD_OPCODE = 0x10,
|
||||
DSA_COMP_INVALID_FLAGS,
|
||||
DSA_COMP_NOZERO_RESERVE,
|
||||
DSA_COMP_XFER_ERANGE,
|
||||
DSA_COMP_DESC_CNT_ERANGE,
|
||||
DSA_COMP_DR_ERANGE,
|
||||
DSA_COMP_OVERLAP_BUFFERS,
|
||||
DSA_COMP_DCAST_ERR,
|
||||
DSA_COMP_DESCLIST_ALIGN,
|
||||
DSA_COMP_INT_HANDLE_INVAL,
|
||||
DSA_COMP_CRA_XLAT,
|
||||
DSA_COMP_CRA_ALIGN,
|
||||
DSA_COMP_ADDR_ALIGN,
|
||||
DSA_COMP_PRIV_BAD,
|
||||
DSA_COMP_TRAFFIC_CLASS_CONF,
|
||||
DSA_COMP_PFAULT_RDBA,
|
||||
DSA_COMP_HW_ERR1,
|
||||
DSA_COMP_HW_ERR_DRB,
|
||||
DSA_COMP_TRANSLATION_FAIL,
|
||||
};
|
||||
|
||||
#define DSA_COMP_STATUS_MASK 0x7f
|
||||
#define DSA_COMP_STATUS_WRITE 0x80
|
||||
|
||||
struct dsa_hw_desc {
|
||||
uint32_t pasid:20;
|
||||
uint32_t rsvd:11;
|
||||
uint32_t priv:1;
|
||||
uint32_t flags:24;
|
||||
uint32_t opcode:8;
|
||||
uint64_t completion_addr;
|
||||
union {
|
||||
uint64_t src_addr;
|
||||
uint64_t rdback_addr;
|
||||
uint64_t pattern;
|
||||
uint64_t desc_list_addr;
|
||||
};
|
||||
union {
|
||||
uint64_t dst_addr;
|
||||
uint64_t rdback_addr2;
|
||||
uint64_t src2_addr;
|
||||
uint64_t comp_pattern;
|
||||
};
|
||||
union {
|
||||
uint32_t xfer_size;
|
||||
uint32_t desc_count;
|
||||
};
|
||||
uint16_t int_handle;
|
||||
uint16_t rsvd1;
|
||||
union {
|
||||
uint8_t expected_res;
|
||||
/* create delta record */
|
||||
struct {
|
||||
uint64_t delta_addr;
|
||||
uint32_t max_delta_size;
|
||||
uint32_t delt_rsvd;
|
||||
uint8_t expected_res_mask;
|
||||
};
|
||||
uint32_t delta_rec_size;
|
||||
uint64_t dest2;
|
||||
/* CRC */
|
||||
struct {
|
||||
uint32_t crc_seed;
|
||||
uint32_t crc_rsvd;
|
||||
uint64_t seed_addr;
|
||||
};
|
||||
/* DIF check or strip */
|
||||
struct {
|
||||
uint8_t src_dif_flags;
|
||||
uint8_t dif_chk_res;
|
||||
uint8_t dif_chk_flags;
|
||||
uint8_t dif_chk_res2[5];
|
||||
uint32_t chk_ref_tag_seed;
|
||||
uint16_t chk_app_tag_mask;
|
||||
uint16_t chk_app_tag_seed;
|
||||
};
|
||||
/* DIF insert */
|
||||
struct {
|
||||
uint8_t dif_ins_res;
|
||||
uint8_t dest_dif_flag;
|
||||
uint8_t dif_ins_flags;
|
||||
uint8_t dif_ins_res2[13];
|
||||
uint32_t ins_ref_tag_seed;
|
||||
uint16_t ins_app_tag_mask;
|
||||
uint16_t ins_app_tag_seed;
|
||||
};
|
||||
/* DIF update */
|
||||
struct {
|
||||
uint8_t src_upd_flags;
|
||||
uint8_t upd_dest_flags;
|
||||
uint8_t dif_upd_flags;
|
||||
uint8_t dif_upd_res[5];
|
||||
uint32_t src_ref_tag_seed;
|
||||
uint16_t src_app_tag_mask;
|
||||
uint16_t src_app_tag_seed;
|
||||
uint32_t dest_ref_tag_seed;
|
||||
uint16_t dest_app_tag_mask;
|
||||
uint16_t dest_app_tag_seed;
|
||||
};
|
||||
|
||||
uint8_t op_specific[24];
|
||||
};
|
||||
} __attribute__((packed));
|
||||
|
||||
struct dsa_raw_desc {
|
||||
uint64_t field[8];
|
||||
} __attribute__((packed));
|
||||
|
||||
/*
|
||||
* The status field will be modified by hardware, therefore it should be
|
||||
* __volatile__ and prevent the compiler from optimize the read.
|
||||
*/
|
||||
struct dsa_completion_record {
|
||||
__volatile__ uint8_t status;
|
||||
union {
|
||||
uint8_t result;
|
||||
uint8_t dif_status;
|
||||
};
|
||||
uint16_t rsvd;
|
||||
uint32_t bytes_completed;
|
||||
uint64_t fault_addr;
|
||||
union {
|
||||
/* common record */
|
||||
struct {
|
||||
uint32_t invalid_flags:24;
|
||||
uint32_t rsvd2:8;
|
||||
};
|
||||
|
||||
uint16_t delta_rec_size;
|
||||
uint16_t crc_val;
|
||||
|
||||
/* DIF check & strip */
|
||||
struct {
|
||||
uint32_t dif_chk_ref_tag;
|
||||
uint16_t dif_chk_app_tag_mask;
|
||||
uint16_t dif_chk_app_tag;
|
||||
};
|
||||
|
||||
/* DIF insert */
|
||||
struct {
|
||||
uint64_t dif_ins_res;
|
||||
uint32_t dif_ins_ref_tag;
|
||||
uint16_t dif_ins_app_tag_mask;
|
||||
uint16_t dif_ins_app_tag;
|
||||
};
|
||||
|
||||
/* DIF update */
|
||||
struct {
|
||||
uint32_t dif_upd_src_ref_tag;
|
||||
uint16_t dif_upd_src_app_tag_mask;
|
||||
uint16_t dif_upd_src_app_tag;
|
||||
uint32_t dif_upd_dest_ref_tag;
|
||||
uint16_t dif_upd_dest_app_tag_mask;
|
||||
uint16_t dif_upd_dest_app_tag;
|
||||
};
|
||||
|
||||
uint8_t op_specific[16];
|
||||
};
|
||||
} __attribute__((packed));
|
||||
|
||||
struct dsa_raw_completion_record {
|
||||
uint64_t field[4];
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif
|
|
@ -31,6 +31,7 @@
|
|||
#define IFNAMSIZ 16
|
||||
#endif /* __UAPI_DEF_IF_IFNAMSIZ */
|
||||
#define IFALIASZ 256
|
||||
#define ALTIFNAMSIZ 128
|
||||
#include <linux/hdlc/ioctl.h>
|
||||
|
||||
/* For glibc compatibility. An empty enum does not compile. */
|
||||
|
@ -175,6 +176,7 @@ enum {
|
|||
enum {
|
||||
IF_LINK_MODE_DEFAULT,
|
||||
IF_LINK_MODE_DORMANT, /* limit upward transition to dormant */
|
||||
IF_LINK_MODE_TESTING, /* limit upward transition to testing */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -210,6 +212,7 @@ struct if_settings {
|
|||
fr_proto *fr;
|
||||
fr_proto_pvc *fr_pvc;
|
||||
fr_proto_pvc_info *fr_pvc_info;
|
||||
x25_hdlc_proto *x25;
|
||||
|
||||
/* interface settings */
|
||||
sync_serial_settings *sync;
|
||||
|
|
|
@ -24,6 +24,22 @@ struct sockaddr_alg {
|
|||
__u8 salg_name[64];
|
||||
};
|
||||
|
||||
/*
|
||||
* Linux v4.12 and later removed the 64-byte limit on salg_name[]; it's now an
|
||||
* arbitrary-length field. We had to keep the original struct above for source
|
||||
* compatibility with existing userspace programs, though. Use the new struct
|
||||
* below if support for very long algorithm names is needed. To do this,
|
||||
* allocate 'sizeof(struct sockaddr_alg_new) + strlen(algname) + 1' bytes, and
|
||||
* copy algname (including the null terminator) into salg_name.
|
||||
*/
|
||||
struct sockaddr_alg_new {
|
||||
__u16 salg_family;
|
||||
__u8 salg_type[14];
|
||||
__u32 salg_feat;
|
||||
__u32 salg_mask;
|
||||
__u8 salg_name[];
|
||||
};
|
||||
|
||||
struct af_alg_iv {
|
||||
__u32 ivlen;
|
||||
__u8 iv[0];
|
||||
|
@ -35,6 +51,7 @@ struct af_alg_iv {
|
|||
#define ALG_SET_OP 3
|
||||
#define ALG_SET_AEAD_ASSOCLEN 4
|
||||
#define ALG_SET_AEAD_AUTHSIZE 5
|
||||
#define ALG_SET_DRBG_ENTROPY 6
|
||||
|
||||
/* Operations */
|
||||
#define ALG_OP_DECRYPT 0
|
||||
|
|
|
@ -95,6 +95,16 @@
|
|||
#define BOND_XMIT_POLICY_ENCAP23 3 /* encapsulated layer 2+3 */
|
||||
#define BOND_XMIT_POLICY_ENCAP34 4 /* encapsulated layer 3+4 */
|
||||
|
||||
/* 802.3ad port state definitions (43.4.2.2 in the 802.3ad standard) */
|
||||
#define LACP_STATE_LACP_ACTIVITY 0x1
|
||||
#define LACP_STATE_LACP_TIMEOUT 0x2
|
||||
#define LACP_STATE_AGGREGATION 0x4
|
||||
#define LACP_STATE_SYNCHRONIZATION 0x8
|
||||
#define LACP_STATE_COLLECTING 0x10
|
||||
#define LACP_STATE_DISTRIBUTING 0x20
|
||||
#define LACP_STATE_DEFAULTED 0x40
|
||||
#define LACP_STATE_EXPIRED 0x80
|
||||
|
||||
typedef struct ifbond {
|
||||
__s32 bond_mode;
|
||||
__s32 num_slaves;
|
||||
|
|
|
@ -120,6 +120,7 @@ enum {
|
|||
IFLA_BRIDGE_MODE,
|
||||
IFLA_BRIDGE_VLAN_INFO,
|
||||
IFLA_BRIDGE_VLAN_TUNNEL_INFO,
|
||||
IFLA_BRIDGE_MRP,
|
||||
__IFLA_BRIDGE_MAX,
|
||||
};
|
||||
#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
|
||||
|
@ -130,6 +131,7 @@ enum {
|
|||
#define BRIDGE_VLAN_INFO_RANGE_BEGIN (1<<3) /* VLAN is start of vlan range */
|
||||
#define BRIDGE_VLAN_INFO_RANGE_END (1<<4) /* VLAN is end of vlan range */
|
||||
#define BRIDGE_VLAN_INFO_BRENTRY (1<<5) /* Global bridge VLAN entry */
|
||||
#define BRIDGE_VLAN_INFO_ONLY_OPTS (1<<6) /* Skip create/delete/flags */
|
||||
|
||||
struct bridge_vlan_info {
|
||||
__u16 flags;
|
||||
|
@ -156,6 +158,261 @@ struct bridge_vlan_xstats {
|
|||
__u32 pad2;
|
||||
};
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_MRP_UNSPEC,
|
||||
IFLA_BRIDGE_MRP_INSTANCE,
|
||||
IFLA_BRIDGE_MRP_PORT_STATE,
|
||||
IFLA_BRIDGE_MRP_PORT_ROLE,
|
||||
IFLA_BRIDGE_MRP_RING_STATE,
|
||||
IFLA_BRIDGE_MRP_RING_ROLE,
|
||||
IFLA_BRIDGE_MRP_START_TEST,
|
||||
IFLA_BRIDGE_MRP_INFO,
|
||||
IFLA_BRIDGE_MRP_IN_ROLE,
|
||||
IFLA_BRIDGE_MRP_IN_STATE,
|
||||
IFLA_BRIDGE_MRP_START_IN_TEST,
|
||||
__IFLA_BRIDGE_MRP_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_MRP_MAX (__IFLA_BRIDGE_MRP_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_MRP_INSTANCE_UNSPEC,
|
||||
IFLA_BRIDGE_MRP_INSTANCE_RING_ID,
|
||||
IFLA_BRIDGE_MRP_INSTANCE_P_IFINDEX,
|
||||
IFLA_BRIDGE_MRP_INSTANCE_S_IFINDEX,
|
||||
IFLA_BRIDGE_MRP_INSTANCE_PRIO,
|
||||
__IFLA_BRIDGE_MRP_INSTANCE_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_MRP_INSTANCE_MAX (__IFLA_BRIDGE_MRP_INSTANCE_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_MRP_PORT_STATE_UNSPEC,
|
||||
IFLA_BRIDGE_MRP_PORT_STATE_STATE,
|
||||
__IFLA_BRIDGE_MRP_PORT_STATE_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_MRP_PORT_STATE_MAX (__IFLA_BRIDGE_MRP_PORT_STATE_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_MRP_PORT_ROLE_UNSPEC,
|
||||
IFLA_BRIDGE_MRP_PORT_ROLE_ROLE,
|
||||
__IFLA_BRIDGE_MRP_PORT_ROLE_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_MRP_PORT_ROLE_MAX (__IFLA_BRIDGE_MRP_PORT_ROLE_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_MRP_RING_STATE_UNSPEC,
|
||||
IFLA_BRIDGE_MRP_RING_STATE_RING_ID,
|
||||
IFLA_BRIDGE_MRP_RING_STATE_STATE,
|
||||
__IFLA_BRIDGE_MRP_RING_STATE_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_MRP_RING_STATE_MAX (__IFLA_BRIDGE_MRP_RING_STATE_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_MRP_RING_ROLE_UNSPEC,
|
||||
IFLA_BRIDGE_MRP_RING_ROLE_RING_ID,
|
||||
IFLA_BRIDGE_MRP_RING_ROLE_ROLE,
|
||||
__IFLA_BRIDGE_MRP_RING_ROLE_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_MRP_RING_ROLE_MAX (__IFLA_BRIDGE_MRP_RING_ROLE_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_MRP_START_TEST_UNSPEC,
|
||||
IFLA_BRIDGE_MRP_START_TEST_RING_ID,
|
||||
IFLA_BRIDGE_MRP_START_TEST_INTERVAL,
|
||||
IFLA_BRIDGE_MRP_START_TEST_MAX_MISS,
|
||||
IFLA_BRIDGE_MRP_START_TEST_PERIOD,
|
||||
IFLA_BRIDGE_MRP_START_TEST_MONITOR,
|
||||
__IFLA_BRIDGE_MRP_START_TEST_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_MRP_START_TEST_MAX (__IFLA_BRIDGE_MRP_START_TEST_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_MRP_INFO_UNSPEC,
|
||||
IFLA_BRIDGE_MRP_INFO_RING_ID,
|
||||
IFLA_BRIDGE_MRP_INFO_P_IFINDEX,
|
||||
IFLA_BRIDGE_MRP_INFO_S_IFINDEX,
|
||||
IFLA_BRIDGE_MRP_INFO_PRIO,
|
||||
IFLA_BRIDGE_MRP_INFO_RING_STATE,
|
||||
IFLA_BRIDGE_MRP_INFO_RING_ROLE,
|
||||
IFLA_BRIDGE_MRP_INFO_TEST_INTERVAL,
|
||||
IFLA_BRIDGE_MRP_INFO_TEST_MAX_MISS,
|
||||
IFLA_BRIDGE_MRP_INFO_TEST_MONITOR,
|
||||
IFLA_BRIDGE_MRP_INFO_I_IFINDEX,
|
||||
IFLA_BRIDGE_MRP_INFO_IN_STATE,
|
||||
IFLA_BRIDGE_MRP_INFO_IN_ROLE,
|
||||
IFLA_BRIDGE_MRP_INFO_IN_TEST_INTERVAL,
|
||||
IFLA_BRIDGE_MRP_INFO_IN_TEST_MAX_MISS,
|
||||
__IFLA_BRIDGE_MRP_INFO_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_MRP_INFO_MAX (__IFLA_BRIDGE_MRP_INFO_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_MRP_IN_STATE_UNSPEC,
|
||||
IFLA_BRIDGE_MRP_IN_STATE_IN_ID,
|
||||
IFLA_BRIDGE_MRP_IN_STATE_STATE,
|
||||
__IFLA_BRIDGE_MRP_IN_STATE_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_MRP_IN_STATE_MAX (__IFLA_BRIDGE_MRP_IN_STATE_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_MRP_IN_ROLE_UNSPEC,
|
||||
IFLA_BRIDGE_MRP_IN_ROLE_RING_ID,
|
||||
IFLA_BRIDGE_MRP_IN_ROLE_IN_ID,
|
||||
IFLA_BRIDGE_MRP_IN_ROLE_ROLE,
|
||||
IFLA_BRIDGE_MRP_IN_ROLE_I_IFINDEX,
|
||||
__IFLA_BRIDGE_MRP_IN_ROLE_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_MRP_IN_ROLE_MAX (__IFLA_BRIDGE_MRP_IN_ROLE_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_MRP_START_IN_TEST_UNSPEC,
|
||||
IFLA_BRIDGE_MRP_START_IN_TEST_IN_ID,
|
||||
IFLA_BRIDGE_MRP_START_IN_TEST_INTERVAL,
|
||||
IFLA_BRIDGE_MRP_START_IN_TEST_MAX_MISS,
|
||||
IFLA_BRIDGE_MRP_START_IN_TEST_PERIOD,
|
||||
__IFLA_BRIDGE_MRP_START_IN_TEST_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_BRIDGE_MRP_START_IN_TEST_MAX (__IFLA_BRIDGE_MRP_START_IN_TEST_MAX - 1)
|
||||
|
||||
struct br_mrp_instance {
|
||||
__u32 ring_id;
|
||||
__u32 p_ifindex;
|
||||
__u32 s_ifindex;
|
||||
__u16 prio;
|
||||
};
|
||||
|
||||
struct br_mrp_ring_state {
|
||||
__u32 ring_id;
|
||||
__u32 ring_state;
|
||||
};
|
||||
|
||||
struct br_mrp_ring_role {
|
||||
__u32 ring_id;
|
||||
__u32 ring_role;
|
||||
};
|
||||
|
||||
struct br_mrp_start_test {
|
||||
__u32 ring_id;
|
||||
__u32 interval;
|
||||
__u32 max_miss;
|
||||
__u32 period;
|
||||
__u32 monitor;
|
||||
};
|
||||
|
||||
struct br_mrp_in_state {
|
||||
__u32 in_state;
|
||||
__u16 in_id;
|
||||
};
|
||||
|
||||
struct br_mrp_in_role {
|
||||
__u32 ring_id;
|
||||
__u32 in_role;
|
||||
__u32 i_ifindex;
|
||||
__u16 in_id;
|
||||
};
|
||||
|
||||
struct br_mrp_start_in_test {
|
||||
__u32 interval;
|
||||
__u32 max_miss;
|
||||
__u32 period;
|
||||
__u16 in_id;
|
||||
};
|
||||
|
||||
struct bridge_stp_xstats {
|
||||
__u64 transition_blk;
|
||||
__u64 transition_fwd;
|
||||
__u64 rx_bpdu;
|
||||
__u64 tx_bpdu;
|
||||
__u64 rx_tcn;
|
||||
__u64 tx_tcn;
|
||||
};
|
||||
|
||||
/* Bridge vlan RTM header */
|
||||
struct br_vlan_msg {
|
||||
__u8 family;
|
||||
__u8 reserved1;
|
||||
__u16 reserved2;
|
||||
__u32 ifindex;
|
||||
};
|
||||
|
||||
enum {
|
||||
BRIDGE_VLANDB_DUMP_UNSPEC,
|
||||
BRIDGE_VLANDB_DUMP_FLAGS,
|
||||
__BRIDGE_VLANDB_DUMP_MAX,
|
||||
};
|
||||
#define BRIDGE_VLANDB_DUMP_MAX (__BRIDGE_VLANDB_DUMP_MAX - 1)
|
||||
|
||||
/* flags used in BRIDGE_VLANDB_DUMP_FLAGS attribute to affect dumps */
|
||||
#define BRIDGE_VLANDB_DUMPF_STATS (1 << 0) /* Include stats in the dump */
|
||||
|
||||
/* Bridge vlan RTM attributes
|
||||
* [BRIDGE_VLANDB_ENTRY] = {
|
||||
* [BRIDGE_VLANDB_ENTRY_INFO]
|
||||
* ...
|
||||
* }
|
||||
*/
|
||||
enum {
|
||||
BRIDGE_VLANDB_UNSPEC,
|
||||
BRIDGE_VLANDB_ENTRY,
|
||||
__BRIDGE_VLANDB_MAX,
|
||||
};
|
||||
#define BRIDGE_VLANDB_MAX (__BRIDGE_VLANDB_MAX - 1)
|
||||
|
||||
enum {
|
||||
BRIDGE_VLANDB_ENTRY_UNSPEC,
|
||||
BRIDGE_VLANDB_ENTRY_INFO,
|
||||
BRIDGE_VLANDB_ENTRY_RANGE,
|
||||
BRIDGE_VLANDB_ENTRY_STATE,
|
||||
BRIDGE_VLANDB_ENTRY_TUNNEL_INFO,
|
||||
BRIDGE_VLANDB_ENTRY_STATS,
|
||||
__BRIDGE_VLANDB_ENTRY_MAX,
|
||||
};
|
||||
#define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1)
|
||||
|
||||
/* [BRIDGE_VLANDB_ENTRY] = {
|
||||
* [BRIDGE_VLANDB_ENTRY_TUNNEL_INFO] = {
|
||||
* [BRIDGE_VLANDB_TINFO_ID]
|
||||
* ...
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
enum {
|
||||
BRIDGE_VLANDB_TINFO_UNSPEC,
|
||||
BRIDGE_VLANDB_TINFO_ID,
|
||||
BRIDGE_VLANDB_TINFO_CMD,
|
||||
__BRIDGE_VLANDB_TINFO_MAX,
|
||||
};
|
||||
#define BRIDGE_VLANDB_TINFO_MAX (__BRIDGE_VLANDB_TINFO_MAX - 1)
|
||||
|
||||
/* [BRIDGE_VLANDB_ENTRY] = {
|
||||
* [BRIDGE_VLANDB_ENTRY_STATS] = {
|
||||
* [BRIDGE_VLANDB_STATS_RX_BYTES]
|
||||
* ...
|
||||
* }
|
||||
* ...
|
||||
* }
|
||||
*/
|
||||
enum {
|
||||
BRIDGE_VLANDB_STATS_UNSPEC,
|
||||
BRIDGE_VLANDB_STATS_RX_BYTES,
|
||||
BRIDGE_VLANDB_STATS_RX_PACKETS,
|
||||
BRIDGE_VLANDB_STATS_TX_BYTES,
|
||||
BRIDGE_VLANDB_STATS_TX_PACKETS,
|
||||
BRIDGE_VLANDB_STATS_PAD,
|
||||
__BRIDGE_VLANDB_STATS_MAX,
|
||||
};
|
||||
#define BRIDGE_VLANDB_STATS_MAX (__BRIDGE_VLANDB_STATS_MAX - 1)
|
||||
|
||||
/* Bridge multicast database attributes
|
||||
* [MDBA_MDB] = {
|
||||
* [MDBA_MDB_ENTRY] = {
|
||||
|
@ -198,10 +455,33 @@ enum {
|
|||
enum {
|
||||
MDBA_MDB_EATTR_UNSPEC,
|
||||
MDBA_MDB_EATTR_TIMER,
|
||||
MDBA_MDB_EATTR_SRC_LIST,
|
||||
MDBA_MDB_EATTR_GROUP_MODE,
|
||||
MDBA_MDB_EATTR_SOURCE,
|
||||
MDBA_MDB_EATTR_RTPROT,
|
||||
__MDBA_MDB_EATTR_MAX
|
||||
};
|
||||
#define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)
|
||||
|
||||
/* per mdb entry source */
|
||||
enum {
|
||||
MDBA_MDB_SRCLIST_UNSPEC,
|
||||
MDBA_MDB_SRCLIST_ENTRY,
|
||||
__MDBA_MDB_SRCLIST_MAX
|
||||
};
|
||||
#define MDBA_MDB_SRCLIST_MAX (__MDBA_MDB_SRCLIST_MAX - 1)
|
||||
|
||||
/* per mdb entry per source attributes
|
||||
* these are embedded in MDBA_MDB_SRCLIST_ENTRY
|
||||
*/
|
||||
enum {
|
||||
MDBA_MDB_SRCATTR_UNSPEC,
|
||||
MDBA_MDB_SRCATTR_ADDRESS,
|
||||
MDBA_MDB_SRCATTR_TIMER,
|
||||
__MDBA_MDB_SRCATTR_MAX
|
||||
};
|
||||
#define MDBA_MDB_SRCATTR_MAX (__MDBA_MDB_SRCATTR_MAX - 1)
|
||||
|
||||
/* multicast router types */
|
||||
enum {
|
||||
MDB_RTR_TYPE_DISABLED,
|
||||
|
@ -238,6 +518,8 @@ struct br_mdb_entry {
|
|||
__u8 state;
|
||||
#define MDB_FLAGS_OFFLOAD (1 << 0)
|
||||
#define MDB_FLAGS_FAST_LEAVE (1 << 1)
|
||||
#define MDB_FLAGS_STAR_EXCL (1 << 2)
|
||||
#define MDB_FLAGS_BLOCKED (1 << 3)
|
||||
__u8 flags;
|
||||
__u16 vid;
|
||||
struct {
|
||||
|
@ -252,16 +534,30 @@ struct br_mdb_entry {
|
|||
enum {
|
||||
MDBA_SET_ENTRY_UNSPEC,
|
||||
MDBA_SET_ENTRY,
|
||||
MDBA_SET_ENTRY_ATTRS,
|
||||
__MDBA_SET_ENTRY_MAX,
|
||||
};
|
||||
#define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1)
|
||||
|
||||
/* [MDBA_SET_ENTRY_ATTRS] = {
|
||||
* [MDBE_ATTR_xxx]
|
||||
* ...
|
||||
* }
|
||||
*/
|
||||
enum {
|
||||
MDBE_ATTR_UNSPEC,
|
||||
MDBE_ATTR_SOURCE,
|
||||
__MDBE_ATTR_MAX,
|
||||
};
|
||||
#define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1)
|
||||
|
||||
/* Embedded inside LINK_XSTATS_TYPE_BRIDGE */
|
||||
enum {
|
||||
BRIDGE_XSTATS_UNSPEC,
|
||||
BRIDGE_XSTATS_VLAN,
|
||||
BRIDGE_XSTATS_MCAST,
|
||||
BRIDGE_XSTATS_PAD,
|
||||
BRIDGE_XSTATS_STP,
|
||||
__BRIDGE_XSTATS_MAX
|
||||
};
|
||||
#define BRIDGE_XSTATS_MAX (__BRIDGE_XSTATS_MAX - 1)
|
||||
|
|
|
@ -92,6 +92,7 @@
|
|||
#define ETH_P_PREAUTH 0x88C7 /* 802.11 Preauthentication */
|
||||
#define ETH_P_TIPC 0x88CA /* TIPC */
|
||||
#define ETH_P_LLDP 0x88CC /* Link Layer Discovery Protocol */
|
||||
#define ETH_P_MRP 0x88E3 /* Media Redundancy Protocol */
|
||||
#define ETH_P_MACSEC 0x88E5 /* 802.1ae MACsec */
|
||||
#define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */
|
||||
#define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */
|
||||
|
|
|
@ -7,24 +7,23 @@
|
|||
|
||||
/* This struct should be in sync with struct rtnl_link_stats64 */
|
||||
struct rtnl_link_stats {
|
||||
__u32 rx_packets; /* total packets received */
|
||||
__u32 tx_packets; /* total packets transmitted */
|
||||
__u32 rx_bytes; /* total bytes received */
|
||||
__u32 tx_bytes; /* total bytes transmitted */
|
||||
__u32 rx_errors; /* bad packets received */
|
||||
__u32 tx_errors; /* packet transmit problems */
|
||||
__u32 rx_dropped; /* no space in linux buffers */
|
||||
__u32 tx_dropped; /* no space available in linux */
|
||||
__u32 multicast; /* multicast packets received */
|
||||
__u32 rx_packets;
|
||||
__u32 tx_packets;
|
||||
__u32 rx_bytes;
|
||||
__u32 tx_bytes;
|
||||
__u32 rx_errors;
|
||||
__u32 tx_errors;
|
||||
__u32 rx_dropped;
|
||||
__u32 tx_dropped;
|
||||
__u32 multicast;
|
||||
__u32 collisions;
|
||||
|
||||
/* detailed rx_errors: */
|
||||
__u32 rx_length_errors;
|
||||
__u32 rx_over_errors; /* receiver ring buff overflow */
|
||||
__u32 rx_crc_errors; /* recved pkt with crc error */
|
||||
__u32 rx_frame_errors; /* recv'd frame alignment error */
|
||||
__u32 rx_fifo_errors; /* recv'r fifo overrun */
|
||||
__u32 rx_missed_errors; /* receiver missed packet */
|
||||
__u32 rx_over_errors;
|
||||
__u32 rx_crc_errors;
|
||||
__u32 rx_frame_errors;
|
||||
__u32 rx_fifo_errors;
|
||||
__u32 rx_missed_errors;
|
||||
|
||||
/* detailed tx_errors */
|
||||
__u32 tx_aborted_errors;
|
||||
|
@ -37,29 +36,200 @@ struct rtnl_link_stats {
|
|||
__u32 rx_compressed;
|
||||
__u32 tx_compressed;
|
||||
|
||||
__u32 rx_nohandler; /* dropped, no handler found */
|
||||
__u32 rx_nohandler;
|
||||
};
|
||||
|
||||
/* The main device statistics structure */
|
||||
/**
|
||||
* struct rtnl_link_stats64 - The main device statistics structure.
|
||||
*
|
||||
* @rx_packets: Number of good packets received by the interface.
|
||||
* For hardware interfaces counts all good packets received from the device
|
||||
* by the host, including packets which host had to drop at various stages
|
||||
* of processing (even in the driver).
|
||||
*
|
||||
* @tx_packets: Number of packets successfully transmitted.
|
||||
* For hardware interfaces counts packets which host was able to successfully
|
||||
* hand over to the device, which does not necessarily mean that packets
|
||||
* had been successfully transmitted out of the device, only that device
|
||||
* acknowledged it copied them out of host memory.
|
||||
*
|
||||
* @rx_bytes: Number of good received bytes, corresponding to @rx_packets.
|
||||
*
|
||||
* For IEEE 802.3 devices should count the length of Ethernet Frames
|
||||
* excluding the FCS.
|
||||
*
|
||||
* @tx_bytes: Number of good transmitted bytes, corresponding to @tx_packets.
|
||||
*
|
||||
* For IEEE 802.3 devices should count the length of Ethernet Frames
|
||||
* excluding the FCS.
|
||||
*
|
||||
* @rx_errors: Total number of bad packets received on this network device.
|
||||
* This counter must include events counted by @rx_length_errors,
|
||||
* @rx_crc_errors, @rx_frame_errors and other errors not otherwise
|
||||
* counted.
|
||||
*
|
||||
* @tx_errors: Total number of transmit problems.
|
||||
* This counter must include events counter by @tx_aborted_errors,
|
||||
* @tx_carrier_errors, @tx_fifo_errors, @tx_heartbeat_errors,
|
||||
* @tx_window_errors and other errors not otherwise counted.
|
||||
*
|
||||
* @rx_dropped: Number of packets received but not processed,
|
||||
* e.g. due to lack of resources or unsupported protocol.
|
||||
* For hardware interfaces this counter should not include packets
|
||||
* dropped by the device which are counted separately in
|
||||
* @rx_missed_errors (since procfs folds those two counters together).
|
||||
*
|
||||
* @tx_dropped: Number of packets dropped on their way to transmission,
|
||||
* e.g. due to lack of resources.
|
||||
*
|
||||
* @multicast: Multicast packets received.
|
||||
* For hardware interfaces this statistic is commonly calculated
|
||||
* at the device level (unlike @rx_packets) and therefore may include
|
||||
* packets which did not reach the host.
|
||||
*
|
||||
* For IEEE 802.3 devices this counter may be equivalent to:
|
||||
*
|
||||
* - 30.3.1.1.21 aMulticastFramesReceivedOK
|
||||
*
|
||||
* @collisions: Number of collisions during packet transmissions.
|
||||
*
|
||||
* @rx_length_errors: Number of packets dropped due to invalid length.
|
||||
* Part of aggregate "frame" errors in `/proc/net/dev`.
|
||||
*
|
||||
* For IEEE 802.3 devices this counter should be equivalent to a sum
|
||||
* of the following attributes:
|
||||
*
|
||||
* - 30.3.1.1.23 aInRangeLengthErrors
|
||||
* - 30.3.1.1.24 aOutOfRangeLengthField
|
||||
* - 30.3.1.1.25 aFrameTooLongErrors
|
||||
*
|
||||
* @rx_over_errors: Receiver FIFO overflow event counter.
|
||||
*
|
||||
* Historically the count of overflow events. Such events may be
|
||||
* reported in the receive descriptors or via interrupts, and may
|
||||
* not correspond one-to-one with dropped packets.
|
||||
*
|
||||
* The recommended interpretation for high speed interfaces is -
|
||||
* number of packets dropped because they did not fit into buffers
|
||||
* provided by the host, e.g. packets larger than MTU or next buffer
|
||||
* in the ring was not available for a scatter transfer.
|
||||
*
|
||||
* Part of aggregate "frame" errors in `/proc/net/dev`.
|
||||
*
|
||||
* This statistics was historically used interchangeably with
|
||||
* @rx_fifo_errors.
|
||||
*
|
||||
* This statistic corresponds to hardware events and is not commonly used
|
||||
* on software devices.
|
||||
*
|
||||
* @rx_crc_errors: Number of packets received with a CRC error.
|
||||
* Part of aggregate "frame" errors in `/proc/net/dev`.
|
||||
*
|
||||
* For IEEE 802.3 devices this counter must be equivalent to:
|
||||
*
|
||||
* - 30.3.1.1.6 aFrameCheckSequenceErrors
|
||||
*
|
||||
* @rx_frame_errors: Receiver frame alignment errors.
|
||||
* Part of aggregate "frame" errors in `/proc/net/dev`.
|
||||
*
|
||||
* For IEEE 802.3 devices this counter should be equivalent to:
|
||||
*
|
||||
* - 30.3.1.1.7 aAlignmentErrors
|
||||
*
|
||||
* @rx_fifo_errors: Receiver FIFO error counter.
|
||||
*
|
||||
* Historically the count of overflow events. Those events may be
|
||||
* reported in the receive descriptors or via interrupts, and may
|
||||
* not correspond one-to-one with dropped packets.
|
||||
*
|
||||
* This statistics was used interchangeably with @rx_over_errors.
|
||||
* Not recommended for use in drivers for high speed interfaces.
|
||||
*
|
||||
* This statistic is used on software devices, e.g. to count software
|
||||
* packet queue overflow (can) or sequencing errors (GRE).
|
||||
*
|
||||
* @rx_missed_errors: Count of packets missed by the host.
|
||||
* Folded into the "drop" counter in `/proc/net/dev`.
|
||||
*
|
||||
* Counts number of packets dropped by the device due to lack
|
||||
* of buffer space. This usually indicates that the host interface
|
||||
* is slower than the network interface, or host is not keeping up
|
||||
* with the receive packet rate.
|
||||
*
|
||||
* This statistic corresponds to hardware events and is not used
|
||||
* on software devices.
|
||||
*
|
||||
* @tx_aborted_errors:
|
||||
* Part of aggregate "carrier" errors in `/proc/net/dev`.
|
||||
* For IEEE 802.3 devices capable of half-duplex operation this counter
|
||||
* must be equivalent to:
|
||||
*
|
||||
* - 30.3.1.1.11 aFramesAbortedDueToXSColls
|
||||
*
|
||||
* High speed interfaces may use this counter as a general device
|
||||
* discard counter.
|
||||
*
|
||||
* @tx_carrier_errors: Number of frame transmission errors due to loss
|
||||
* of carrier during transmission.
|
||||
* Part of aggregate "carrier" errors in `/proc/net/dev`.
|
||||
*
|
||||
* For IEEE 802.3 devices this counter must be equivalent to:
|
||||
*
|
||||
* - 30.3.1.1.13 aCarrierSenseErrors
|
||||
*
|
||||
* @tx_fifo_errors: Number of frame transmission errors due to device
|
||||
* FIFO underrun / underflow. This condition occurs when the device
|
||||
* begins transmission of a frame but is unable to deliver the
|
||||
* entire frame to the transmitter in time for transmission.
|
||||
* Part of aggregate "carrier" errors in `/proc/net/dev`.
|
||||
*
|
||||
* @tx_heartbeat_errors: Number of Heartbeat / SQE Test errors for
|
||||
* old half-duplex Ethernet.
|
||||
* Part of aggregate "carrier" errors in `/proc/net/dev`.
|
||||
*
|
||||
* For IEEE 802.3 devices possibly equivalent to:
|
||||
*
|
||||
* - 30.3.2.1.4 aSQETestErrors
|
||||
*
|
||||
* @tx_window_errors: Number of frame transmission errors due
|
||||
* to late collisions (for Ethernet - after the first 64B of transmission).
|
||||
* Part of aggregate "carrier" errors in `/proc/net/dev`.
|
||||
*
|
||||
* For IEEE 802.3 devices this counter must be equivalent to:
|
||||
*
|
||||
* - 30.3.1.1.10 aLateCollisions
|
||||
*
|
||||
* @rx_compressed: Number of correctly received compressed packets.
|
||||
* This counters is only meaningful for interfaces which support
|
||||
* packet compression (e.g. CSLIP, PPP).
|
||||
*
|
||||
* @tx_compressed: Number of transmitted compressed packets.
|
||||
* This counters is only meaningful for interfaces which support
|
||||
* packet compression (e.g. CSLIP, PPP).
|
||||
*
|
||||
* @rx_nohandler: Number of packets received on the interface
|
||||
* but dropped by the networking stack because the device is
|
||||
* not designated to receive packets (e.g. backup link in a bond).
|
||||
*/
|
||||
struct rtnl_link_stats64 {
|
||||
__u64 rx_packets; /* total packets received */
|
||||
__u64 tx_packets; /* total packets transmitted */
|
||||
__u64 rx_bytes; /* total bytes received */
|
||||
__u64 tx_bytes; /* total bytes transmitted */
|
||||
__u64 rx_errors; /* bad packets received */
|
||||
__u64 tx_errors; /* packet transmit problems */
|
||||
__u64 rx_dropped; /* no space in linux buffers */
|
||||
__u64 tx_dropped; /* no space available in linux */
|
||||
__u64 multicast; /* multicast packets received */
|
||||
__u64 rx_packets;
|
||||
__u64 tx_packets;
|
||||
__u64 rx_bytes;
|
||||
__u64 tx_bytes;
|
||||
__u64 rx_errors;
|
||||
__u64 tx_errors;
|
||||
__u64 rx_dropped;
|
||||
__u64 tx_dropped;
|
||||
__u64 multicast;
|
||||
__u64 collisions;
|
||||
|
||||
/* detailed rx_errors: */
|
||||
__u64 rx_length_errors;
|
||||
__u64 rx_over_errors; /* receiver ring buff overflow */
|
||||
__u64 rx_crc_errors; /* recved pkt with crc error */
|
||||
__u64 rx_frame_errors; /* recv'd frame alignment error */
|
||||
__u64 rx_fifo_errors; /* recv'r fifo overrun */
|
||||
__u64 rx_missed_errors; /* receiver missed packet */
|
||||
__u64 rx_over_errors;
|
||||
__u64 rx_crc_errors;
|
||||
__u64 rx_frame_errors;
|
||||
__u64 rx_fifo_errors;
|
||||
__u64 rx_missed_errors;
|
||||
|
||||
/* detailed tx_errors */
|
||||
__u64 tx_aborted_errors;
|
||||
|
@ -71,8 +241,7 @@ struct rtnl_link_stats64 {
|
|||
/* for cslip etc */
|
||||
__u64 rx_compressed;
|
||||
__u64 tx_compressed;
|
||||
|
||||
__u64 rx_nohandler; /* dropped, no handler found */
|
||||
__u64 rx_nohandler;
|
||||
};
|
||||
|
||||
/* The struct should be in sync with struct ifmap */
|
||||
|
@ -167,12 +336,25 @@ enum {
|
|||
IFLA_NEW_IFINDEX,
|
||||
IFLA_MIN_MTU,
|
||||
IFLA_MAX_MTU,
|
||||
IFLA_PROP_LIST,
|
||||
IFLA_ALT_IFNAME, /* Alternative ifname */
|
||||
IFLA_PERM_ADDRESS,
|
||||
IFLA_PROTO_DOWN_REASON,
|
||||
__IFLA_MAX
|
||||
};
|
||||
|
||||
|
||||
#define IFLA_MAX (__IFLA_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_PROTO_DOWN_REASON_UNSPEC,
|
||||
IFLA_PROTO_DOWN_REASON_MASK, /* u32, mask for reason bits */
|
||||
IFLA_PROTO_DOWN_REASON_VALUE, /* u32, reason bit value */
|
||||
|
||||
__IFLA_PROTO_DOWN_REASON_CNT,
|
||||
IFLA_PROTO_DOWN_REASON_MAX = __IFLA_PROTO_DOWN_REASON_CNT - 1
|
||||
};
|
||||
|
||||
/* backwards compatibility for userspace */
|
||||
#define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
|
||||
#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
|
||||
|
@ -338,6 +520,8 @@ enum {
|
|||
IFLA_BRPORT_NEIGH_SUPPRESS,
|
||||
IFLA_BRPORT_ISOLATED,
|
||||
IFLA_BRPORT_BACKUP_PORT,
|
||||
IFLA_BRPORT_MRP_RING_OPEN,
|
||||
IFLA_BRPORT_MRP_IN_OPEN,
|
||||
__IFLA_BRPORT_MAX
|
||||
};
|
||||
#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
|
||||
|
@ -458,6 +642,7 @@ enum {
|
|||
IFLA_MACSEC_REPLAY_PROTECT,
|
||||
IFLA_MACSEC_VALIDATION,
|
||||
IFLA_MACSEC_PAD,
|
||||
IFLA_MACSEC_OFFLOAD,
|
||||
__IFLA_MACSEC_MAX,
|
||||
};
|
||||
|
||||
|
@ -481,6 +666,14 @@ enum macsec_validation_type {
|
|||
MACSEC_VALIDATE_MAX = __MACSEC_VALIDATE_END - 1,
|
||||
};
|
||||
|
||||
enum macsec_offload {
|
||||
MACSEC_OFFLOAD_OFF = 0,
|
||||
MACSEC_OFFLOAD_PHY = 1,
|
||||
MACSEC_OFFLOAD_MAC = 2,
|
||||
__MACSEC_OFFLOAD_END,
|
||||
MACSEC_OFFLOAD_MAX = __MACSEC_OFFLOAD_END - 1,
|
||||
};
|
||||
|
||||
/* IPVLAN section */
|
||||
enum {
|
||||
IFLA_IPVLAN_UNSPEC,
|
||||
|
@ -578,6 +771,18 @@ enum ifla_geneve_df {
|
|||
GENEVE_DF_MAX = __GENEVE_DF_END - 1,
|
||||
};
|
||||
|
||||
/* Bareudp section */
|
||||
enum {
|
||||
IFLA_BAREUDP_UNSPEC,
|
||||
IFLA_BAREUDP_PORT,
|
||||
IFLA_BAREUDP_ETHERTYPE,
|
||||
IFLA_BAREUDP_SRCPORT_MIN,
|
||||
IFLA_BAREUDP_MULTIPROTO_MODE,
|
||||
__IFLA_BAREUDP_MAX
|
||||
};
|
||||
|
||||
#define IFLA_BAREUDP_MAX (__IFLA_BAREUDP_MAX - 1)
|
||||
|
||||
/* PPP section */
|
||||
enum {
|
||||
IFLA_PPP_UNSPEC,
|
||||
|
@ -879,7 +1084,14 @@ enum {
|
|||
#define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1)
|
||||
|
||||
|
||||
/* HSR section */
|
||||
/* HSR/PRP section, both uses same interface */
|
||||
|
||||
/* Different redundancy protocols for hsr device */
|
||||
enum {
|
||||
HSR_PROTOCOL_HSR,
|
||||
HSR_PROTOCOL_PRP,
|
||||
HSR_PROTOCOL_MAX,
|
||||
};
|
||||
|
||||
enum {
|
||||
IFLA_HSR_UNSPEC,
|
||||
|
@ -889,6 +1101,9 @@ enum {
|
|||
IFLA_HSR_SUPERVISION_ADDR, /* Supervision frame multicast addr */
|
||||
IFLA_HSR_SEQ_NR,
|
||||
IFLA_HSR_VERSION, /* HSR version */
|
||||
IFLA_HSR_PROTOCOL, /* Indicate different protocol than
|
||||
* HSR. For example PRP.
|
||||
*/
|
||||
__IFLA_HSR_MAX,
|
||||
};
|
||||
|
||||
|
@ -948,11 +1163,12 @@ enum {
|
|||
#define XDP_FLAGS_SKB_MODE (1U << 1)
|
||||
#define XDP_FLAGS_DRV_MODE (1U << 2)
|
||||
#define XDP_FLAGS_HW_MODE (1U << 3)
|
||||
#define XDP_FLAGS_REPLACE (1U << 4)
|
||||
#define XDP_FLAGS_MODES (XDP_FLAGS_SKB_MODE | \
|
||||
XDP_FLAGS_DRV_MODE | \
|
||||
XDP_FLAGS_HW_MODE)
|
||||
#define XDP_FLAGS_MASK (XDP_FLAGS_UPDATE_IF_NOEXIST | \
|
||||
XDP_FLAGS_MODES)
|
||||
XDP_FLAGS_MODES | XDP_FLAGS_REPLACE)
|
||||
|
||||
/* These are stored into IFLA_XDP_ATTACHED on dump. */
|
||||
enum {
|
||||
|
@ -972,6 +1188,7 @@ enum {
|
|||
IFLA_XDP_DRV_PROG_ID,
|
||||
IFLA_XDP_SKB_PROG_ID,
|
||||
IFLA_XDP_HW_PROG_ID,
|
||||
IFLA_XDP_EXPECTED_FD,
|
||||
__IFLA_XDP_MAX,
|
||||
};
|
||||
|
||||
|
|
|
@ -22,9 +22,11 @@
|
|||
|
||||
#define MACSEC_KEYID_LEN 16
|
||||
|
||||
/* cipher IDs as per IEEE802.1AEbn-2011 */
|
||||
/* cipher IDs as per IEEE802.1AE-2018 (Table 14-1) */
|
||||
#define MACSEC_CIPHER_ID_GCM_AES_128 0x0080C20001000001ULL
|
||||
#define MACSEC_CIPHER_ID_GCM_AES_256 0x0080C20001000002ULL
|
||||
#define MACSEC_CIPHER_ID_GCM_AES_XPN_128 0x0080C20001000003ULL
|
||||
#define MACSEC_CIPHER_ID_GCM_AES_XPN_256 0x0080C20001000004ULL
|
||||
|
||||
/* deprecated cipher ID for GCM-AES-128 */
|
||||
#define MACSEC_DEFAULT_CIPHER_ID 0x0080020001000001ULL
|
||||
|
@ -45,6 +47,7 @@ enum macsec_attrs {
|
|||
MACSEC_ATTR_RXSC_LIST, /* dump, nested, macsec_rxsc_attrs for each RXSC */
|
||||
MACSEC_ATTR_TXSC_STATS, /* dump, nested, macsec_txsc_stats_attr */
|
||||
MACSEC_ATTR_SECY_STATS, /* dump, nested, macsec_secy_stats_attr */
|
||||
MACSEC_ATTR_OFFLOAD, /* config, nested, macsec_offload_attrs */
|
||||
__MACSEC_ATTR_END,
|
||||
NUM_MACSEC_ATTR = __MACSEC_ATTR_END,
|
||||
MACSEC_ATTR_MAX = __MACSEC_ATTR_END - 1,
|
||||
|
@ -87,16 +90,27 @@ enum macsec_sa_attrs {
|
|||
MACSEC_SA_ATTR_UNSPEC,
|
||||
MACSEC_SA_ATTR_AN, /* config/dump, u8 0..3 */
|
||||
MACSEC_SA_ATTR_ACTIVE, /* config/dump, u8 0..1 */
|
||||
MACSEC_SA_ATTR_PN, /* config/dump, u32 */
|
||||
MACSEC_SA_ATTR_PN, /* config/dump, u32/u64 (u64 if XPN) */
|
||||
MACSEC_SA_ATTR_KEY, /* config, data */
|
||||
MACSEC_SA_ATTR_KEYID, /* config/dump, 128-bit */
|
||||
MACSEC_SA_ATTR_STATS, /* dump, nested, macsec_sa_stats_attr */
|
||||
MACSEC_SA_ATTR_PAD,
|
||||
MACSEC_SA_ATTR_SSCI, /* config/dump, u32 - XPN only */
|
||||
MACSEC_SA_ATTR_SALT, /* config, 96-bit - XPN only */
|
||||
__MACSEC_SA_ATTR_END,
|
||||
NUM_MACSEC_SA_ATTR = __MACSEC_SA_ATTR_END,
|
||||
MACSEC_SA_ATTR_MAX = __MACSEC_SA_ATTR_END - 1,
|
||||
};
|
||||
|
||||
enum macsec_offload_attrs {
|
||||
MACSEC_OFFLOAD_ATTR_UNSPEC,
|
||||
MACSEC_OFFLOAD_ATTR_TYPE, /* config/dump, u8 0..2 */
|
||||
MACSEC_OFFLOAD_ATTR_PAD,
|
||||
__MACSEC_OFFLOAD_ATTR_END,
|
||||
NUM_MACSEC_OFFLOAD_ATTR = __MACSEC_OFFLOAD_ATTR_END,
|
||||
MACSEC_OFFLOAD_ATTR_MAX = __MACSEC_OFFLOAD_ATTR_END - 1,
|
||||
};
|
||||
|
||||
enum macsec_nl_commands {
|
||||
MACSEC_CMD_GET_TXSC,
|
||||
MACSEC_CMD_ADD_RXSC,
|
||||
|
@ -108,6 +122,7 @@ enum macsec_nl_commands {
|
|||
MACSEC_CMD_ADD_RXSA,
|
||||
MACSEC_CMD_DEL_RXSA,
|
||||
MACSEC_CMD_UPD_RXSA,
|
||||
MACSEC_CMD_UPD_OFFLOAD,
|
||||
};
|
||||
|
||||
/* u64 per-RXSC stats */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue