History

Merge drm/drm-next into drm-misc-next

Get drm-misc-next to up v6.12-rc1.

Thomas Zimmermann committed 2 years ago

Commit 2dd0ef52 parents 1549974 9852d8510336 files · +413613 −169522Browse files

Showing the changes to include/uapi (62 of 10336 files). Show all

Unified · Split

62 files
  1. include/uapi/asm-generic/socket.h +6 −0
  2. include/uapi/linux/android/binder.h +36 −0
  3. include/uapi/linux/audit.h +3 −0
  4. include/uapi/linux/auto_fs.h +1 −1
  5. include/uapi/linux/bits.h +3 −0
  6. include/uapi/linux/blkdev.h +14 −0
  7. include/uapi/linux/bpf.h +16 −5
  8. include/uapi/linux/cec.h +8 −1
  9. include/uapi/linux/const.h +17 −0
  10. include/uapi/linux/dpll.h +3 −0
  11. include/uapi/linux/elf.h +2 −0
  12. include/uapi/linux/ethtool.h +16 −0
  13. include/uapi/linux/ethtool_netlink.h +36 −0
  14. include/uapi/linux/exfat.h +25 −0
  15. include/uapi/linux/falloc.h +1 −0
  16. include/uapi/linux/fcntl.h +60 −24
  17. include/uapi/linux/fib_rules.h +1 −0
  18. include/uapi/linux/fuse.h +21 −1
  19. include/uapi/linux/hidraw.h +1 −0
  20. include/uapi/linux/if_packet.h +4 −3
  21. include/uapi/linux/in.h +1 −1
  22. include/uapi/linux/inet_diag.h +1 −1
  23. include/uapi/linux/io_uring.h +41 −1
  24. include/uapi/linux/ioam6_iptunnel.h +6 −0
  25. include/uapi/linux/iommufd.h +1 −1
  26. include/uapi/linux/kernel-page-flags.h +1 −1
  27. include/uapi/linux/kfd_ioctl.h +87 −13
  28. include/uapi/linux/landlock.h +30 −0
  29. include/uapi/linux/libc-compat.h +0 −36
  30. include/uapi/linux/lsm.h +1 −0
  31. include/uapi/linux/mdio.h +1 −0
  32. include/uapi/linux/nbd.h +6 −2
  33. include/uapi/linux/net_tstamp.h +2 −1
  34. include/uapi/linux/netdev.h +13 −0
  35. include/uapi/linux/netfilter/nf_tables.h +1 −1
  36. include/uapi/linux/nexthop.h +9 −1
  37. include/uapi/linux/nsfs.h +15 −0
  38. include/uapi/linux/pci_regs.h +39 −2
  39. include/uapi/linux/pkt_cls.h +13 −10
  40. include/uapi/linux/ptp_clock.h +18 −6
  41. include/uapi/linux/rkisp1-config.h +578 −0
  42. include/uapi/linux/sched.h +1 −0
  43. include/uapi/linux/sched/types.h +3 −3
  44. include/uapi/linux/serio.h +1 −0
  45. include/uapi/linux/smc.h +6 −0
  46. include/uapi/linux/spi/spi.h +3 −2
  47. include/uapi/linux/uio.h +18 −0
  48. include/uapi/linux/usb/ch9.h +6 −2
  49. include/uapi/linux/usb/functionfs.h +89 −8
  50. include/uapi/linux/usb/g_hid.h +40 −0
  51. include/uapi/linux/usb/gadgetfs.h +1 −1
  52. include/uapi/linux/vbox_vmmdev_types.h +4 −1
  53. include/uapi/linux/vdpa.h +1 −0
  54. include/uapi/linux/videodev2.h +2 −0
  55. include/uapi/linux/virtio_balloon.h +14 −2
  56. include/uapi/rdma/bnxt_re-abi.h +13 −0
  57. include/uapi/rdma/mlx5_user_ioctl_cmds.h +9 −0
  58. include/uapi/rdma/mlx5_user_ioctl_verbs.h +4 −0
  59. include/uapi/rdma/rdma_netlink.h +16 −0
  60. include/uapi/sound/asequencer.h +2 −0
  61. include/uapi/sound/asound.h +16 −1
  62. include/uapi/xen/privcmd.h +7 −0
include/uapi/asm-generic/socket.h+6−0
@@ -135,6 +135,12 @@ · 134 unmodified lines
135135 #define SO_PASSPIDFD 76
136136 #define SO_PEERPIDFD 77
137137
138+#define SO_DEVMEM_LINEAR 78
139+#define SCM_DEVMEM_LINEAR SO_DEVMEM_LINEAR
140+#define SO_DEVMEM_DMABUF 79
141+#define SCM_DEVMEM_DMABUF SO_DEVMEM_DMABUF
142+#define SO_DEVMEM_DONTNEED 80
143+
138144 #if !defined(__KERNEL__)
139145
140146 #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))
include/uapi/linux/android/binder.h+36−0
@@ -236,6 +236,12 @@ struct binder_frozen_status_info { · 235 unmodified lines
236236 __u32 async_recv;
237237 };
238238
239+struct binder_frozen_state_info {
240+ binder_uintptr_t cookie;
241+ __u32 is_frozen;
242+ __u32 reserved;
243+};
244+
239245 /* struct binder_extened_error - extended error information
240246 * @id: identifier for the failed operation
241247 * @command: command as defined by binder_driver_return_protocol
@@ -467,6 +473,17 @@ enum binder_driver_return_protocol { · 225 unmodified lines
467473 /*
468474 * The target of the last async transaction is frozen. No parameters.
469475 */
476+
477+ BR_FROZEN_BINDER = _IOR('r', 21, struct binder_frozen_state_info),
478+ /*
479+ * The cookie and a boolean (is_frozen) that indicates whether the process
480+ * transitioned into a frozen or an unfrozen state.
481+ */
482+
483+ BR_CLEAR_FREEZE_NOTIFICATION_DONE = _IOR('r', 22, binder_uintptr_t),
484+ /*
485+ * void *: cookie
486+ */
470487 };
471488
472489 enum binder_driver_command_protocol {
@@ -550,6 +567,25 @@ enum binder_driver_command_protocol { · 77 unmodified lines
550567 /*
551568 * binder_transaction_data_sg: the sent command.
552569 */
570+
571+ BC_REQUEST_FREEZE_NOTIFICATION =
572+ _IOW('c', 19, struct binder_handle_cookie),
573+ /*
574+ * int: handle
575+ * void *: cookie
576+ */
577+
578+ BC_CLEAR_FREEZE_NOTIFICATION = _IOW('c', 20,
579+ struct binder_handle_cookie),
580+ /*
581+ * int: handle
582+ * void *: cookie
583+ */
584+
585+ BC_FREEZE_NOTIFICATION_DONE = _IOW('c', 21, binder_uintptr_t),
586+ /*
587+ * void *: cookie
588+ */
553589 };
554590
555591 #endif /* _UAPI_LINUX_BINDER_H */
include/uapi/linux/audit.h+3−0
@@ -143,6 +143,9 @@ · 142 unmodified lines
143143 #define AUDIT_MAC_UNLBL_STCDEL 1417 /* NetLabel: del a static label */
144144 #define AUDIT_MAC_CALIPSO_ADD 1418 /* NetLabel: add CALIPSO DOI entry */
145145 #define AUDIT_MAC_CALIPSO_DEL 1419 /* NetLabel: del CALIPSO DOI entry */
146+#define AUDIT_IPE_ACCESS 1420 /* IPE denial or grant */
147+#define AUDIT_IPE_CONFIG_CHANGE 1421 /* IPE config change */
148+#define AUDIT_IPE_POLICY_LOAD 1422 /* IPE policy load */
146149
147150 #define AUDIT_FIRST_KERN_ANOM_MSG 1700
148151 #define AUDIT_LAST_KERN_ANOM_MSG 1799
include/uapi/linux/auto_fs.h+1−1
@@ -23,7 +23,7 @@ · 22 unmodified lines
2323 #define AUTOFS_MIN_PROTO_VERSION 3
2424 #define AUTOFS_MAX_PROTO_VERSION 5
2525
26−#define AUTOFS_PROTO_SUBVERSION 5
26+#define AUTOFS_PROTO_SUBVERSION 6
2727
2828 /*
2929 * The wait_queue_token (autofs_wqt_t) is part of a structure which is passed
include/uapi/linux/bits.h+3−0
@@ -12,4 +12,7 @@ · 11 unmodified lines
1212 (((~_ULL(0)) - (_ULL(1) << (l)) + 1) & \
1313 (~_ULL(0) >> (__BITS_PER_LONG_LONG - 1 - (h))))
1414
15+#define __GENMASK_U128(h, l) \
16+ ((_BIT128((h)) << 1) - (_BIT128(l)))
17+
1518 #endif /* _UAPI_LINUX_BITS_H */
include/uapi/linux/blkdev.h+14−0
@@ -0,0 +1,14 @@
1+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2+#ifndef _UAPI_LINUX_BLKDEV_H
3+#define _UAPI_LINUX_BLKDEV_H
4+
5+#include <linux/ioctl.h>
6+#include <linux/types.h>
7+
8+/*
9+ * io_uring block file commands, see IORING_OP_URING_CMD.
10+ * It's a different number space from ioctl(), reuse the block's code 0x12.
11+ */
12+#define BLOCK_URING_CMD_DISCARD _IO(0x12, 0)
13+
14+#endif
include/uapi/linux/bpf.h+16−5
@@ -2851,7 +2851,7 @@ union bpf_attr { · 2850 unmodified lines
28512851 * **TCP_SYNCNT**, **TCP_USER_TIMEOUT**, **TCP_NOTSENT_LOWAT**,
28522852 * **TCP_NODELAY**, **TCP_MAXSEG**, **TCP_WINDOW_CLAMP**,
28532853 * **TCP_THIN_LINEAR_TIMEOUTS**, **TCP_BPF_DELACK_MAX**,
2854− * **TCP_BPF_RTO_MIN**.
2854+ * **TCP_BPF_RTO_MIN**, **TCP_BPF_SOCK_OPS_CB_FLAGS**.
28552855 * * **IPPROTO_IP**, which supports *optname* **IP_TOS**.
28562856 * * **IPPROTO_IPV6**, which supports the following *optname*\ s:
28572857 * **IPV6_TCLASS**, **IPV6_AUTOFLOWLABEL**.
@@ -5519,11 +5519,12 @@ union bpf_attr { · 2661 unmodified lines
55195519 * **-EOPNOTSUPP** if the hash calculation failed or **-EINVAL** if
55205520 * invalid arguments are passed.
55215521 *
5522− * void *bpf_kptr_xchg(void *map_value, void *ptr)
5522+ * void *bpf_kptr_xchg(void *dst, void *ptr)
55235523 * Description
5524− * Exchange kptr at pointer *map_value* with *ptr*, and return the
5525− * old value. *ptr* can be NULL, otherwise it must be a referenced
5526− * pointer which will be released when this helper is called.
5524+ * Exchange kptr at pointer *dst* with *ptr*, and return the old value.
5525+ * *dst* can be map value or local kptr. *ptr* can be NULL, otherwise
5526+ * it must be a referenced pointer which will be released when this helper
5527+ * is called.
55275528 * Return
55285529 * The old value of kptr (which can be NULL). The returned pointer
55295530 * if not NULL, is a reference which must be released using its
@@ -7080,6 +7081,7 @@ enum { · 1550 unmodified lines
70807081 TCP_BPF_SYN = 1005, /* Copy the TCP header */
70817082 TCP_BPF_SYN_IP = 1006, /* Copy the IP[46] and TCP header */
70827083 TCP_BPF_SYN_MAC = 1007, /* Copy the MAC, IP[46], and TCP header */
7084+ TCP_BPF_SOCK_OPS_CB_FLAGS = 1008, /* Get or Set TCP sock ops flags */
70837085 };
70847086
70857087 enum {
@@ -7512,4 +7514,13 @@ struct bpf_iter_num { · 426 unmodified lines
75127514 __u64 __opaque[1];
75137515 } __attribute__((aligned(8)));
75147516
7517+/*
7518+ * Flags to control BPF kfunc behaviour.
7519+ * - BPF_F_PAD_ZEROS: Pad destination buffer with zeros. (See the respective
7520+ * helper documentation for details.)
7521+ */
7522+enum bpf_kfunc_flags {
7523+ BPF_F_PAD_ZEROS = (1ULL << 0),
7524+};
7525+
75157526 #endif /* _UAPI__LINUX_BPF_H__ */
include/uapi/linux/cec.h+8−1
@@ -132,6 +132,8 @@ static inline void cec_msg_init(struct cec_msg *msg, · 131 unmodified lines
132132 * Set the msg destination to the orig initiator and the msg initiator to the
133133 * orig destination. Note that msg and orig may be the same pointer, in which
134134 * case the change is done in place.
135+ *
136+ * It also zeroes the reply, timeout and flags fields.
135137 */
136138 static inline void cec_msg_set_reply_to(struct cec_msg *msg,
137139 struct cec_msg *orig)
@@ -139,7 +141,9 @@ static inline void cec_msg_set_reply_to(struct cec_msg *msg, · 1 unmodified line
139141 /* The destination becomes the initiator and vice versa */
140142 msg->msg[0] = (cec_msg_destination(orig) << 4) |
141143 cec_msg_initiator(orig);
142− msg->reply = msg->timeout = 0;
144+ msg->reply = 0;
145+ msg->timeout = 0;
146+ msg->flags = 0;
143147 }
144148
145149 /**
@@ -165,6 +169,7 @@ static inline int cec_msg_recv_is_rx_result(const struct cec_msg *msg) · 19 unmodified lines
165169 /* cec_msg flags field */
166170 #define CEC_MSG_FL_REPLY_TO_FOLLOWERS (1 << 0)
167171 #define CEC_MSG_FL_RAW (1 << 1)
172+#define CEC_MSG_FL_REPLY_VENDOR_ID (1 << 2)
168173
169174 /* cec_msg tx/rx_status field */
170175 #define CEC_TX_STATUS_OK (1 << 0)
@@ -339,6 +344,8 @@ static inline int cec_is_unconfigured(__u16 log_addr_mask) · 168 unmodified lines
339344 #define CEC_CAP_MONITOR_PIN (1 << 7)
340345 /* CEC_ADAP_G_CONNECTOR_INFO is available */
341346 #define CEC_CAP_CONNECTOR_INFO (1 << 8)
347+/* CEC_MSG_FL_REPLY_VENDOR_ID is available */
348+#define CEC_CAP_REPLY_VENDOR_ID (1 << 9)
342349
343350 /**
344351 * struct cec_caps - CEC capabilities structure.
include/uapi/linux/const.h+17−0
@@ -28,6 +28,23 @@ · 27 unmodified lines
2828 #define _BITUL(x) (_UL(1) << (x))
2929 #define _BITULL(x) (_ULL(1) << (x))
3030
31+#if !defined(__ASSEMBLY__)
32+/*
33+ * Missing asm support
34+ *
35+ * __BIT128() would not work in the asm code, as it shifts an
36+ * 'unsigned __init128' data type as direct representation of
37+ * 128 bit constants is not supported in the gcc compiler, as
38+ * they get silently truncated.
39+ *
40+ * TODO: Please revisit this implementation when gcc compiler
41+ * starts representing 128 bit constants directly like long
42+ * and unsigned long etc. Subsequently drop the comment for
43+ * GENMASK_U128() which would then start supporting asm code.
44+ */
45+#define _BIT128(x) ((unsigned __int128)(1) << (x))
46+#endif
47+
3148 #define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
3249 #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
3350
include/uapi/linux/dpll.h+3−0
@@ -210,6 +210,9 @@ enum dpll_a_pin { · 209 unmodified lines
210210 DPLL_A_PIN_PHASE_ADJUST,
211211 DPLL_A_PIN_PHASE_OFFSET,
212212 DPLL_A_PIN_FRACTIONAL_FREQUENCY_OFFSET,
213+ DPLL_A_PIN_ESYNC_FREQUENCY,
214+ DPLL_A_PIN_ESYNC_FREQUENCY_SUPPORTED,
215+ DPLL_A_PIN_ESYNC_PULSE,
213216
214217 __DPLL_A_PIN_MAX,
215218 DPLL_A_PIN_MAX = (__DPLL_A_PIN_MAX - 1)
include/uapi/linux/elf.h+2−0
@@ -411,6 +411,7 @@ typedef struct elf64_shdr { · 410 unmodified lines
411411 #define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */
412412 /* Old binutils treats 0x203 as a CET state */
413413 #define NT_X86_SHSTK 0x204 /* x86 SHSTK state */
414+#define NT_X86_XSAVE_LAYOUT 0x205 /* XSAVE layout description */
414415 #define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */
415416 #define NT_S390_TIMER 0x301 /* s390 timer register */
416417 #define NT_S390_TODCMP 0x302 /* s390 TOD clock comparator register */
@@ -441,6 +442,7 @@ typedef struct elf64_shdr { · 24 unmodified lines
441442 #define NT_ARM_ZA 0x40c /* ARM SME ZA registers */
442443 #define NT_ARM_ZT 0x40d /* ARM SME ZT registers */
443444 #define NT_ARM_FPMR 0x40e /* ARM floating point mode register */
445+#define NT_ARM_POE 0x40f /* ARM POE registers */
444446 #define NT_ARC_V2 0x600 /* ARCv2 accumulator/extra registers */
445447 #define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note */
446448 #define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers */
include/uapi/linux/ethtool.h+16−0
@@ -2533,4 +2533,20 @@ struct ethtool_link_settings { · 2532 unmodified lines
25332533 * __u32 map_lp_advertising[link_mode_masks_nwords];
25342534 */
25352535 };
2536+
2537+/**
2538+ * enum phy_upstream - Represents the upstream component a given PHY device
2539+ * is connected to, as in what is on the other end of the MII bus. Most PHYs
2540+ * will be attached to an Ethernet MAC controller, but in some cases, there's
2541+ * an intermediate PHY used as a media-converter, which will driver another
2542+ * MII interface as its output.
2543+ * @PHY_UPSTREAM_MAC: Upstream component is a MAC (a switch port,
2544+ * or ethernet controller)
2545+ * @PHY_UPSTREAM_PHY: Upstream component is a PHY (likely a media converter)
2546+ */
2547+enum phy_upstream {
2548+ PHY_UPSTREAM_MAC,
2549+ PHY_UPSTREAM_PHY,
2550+};
2551+
25362552 #endif /* _UAPI_LINUX_ETHTOOL_H */
include/uapi/linux/ethtool_netlink.h+36−0
@@ -58,6 +58,7 @@ enum { · 57 unmodified lines
5858 ETHTOOL_MSG_MM_GET,
5959 ETHTOOL_MSG_MM_SET,
6060 ETHTOOL_MSG_MODULE_FW_FLASH_ACT,
61+ ETHTOOL_MSG_PHY_GET,
6162
6263 /* add new constants above here */
6364 __ETHTOOL_MSG_USER_CNT,
@@ -111,6 +112,8 @@ enum { · 47 unmodified lines
111112 ETHTOOL_MSG_MM_GET_REPLY,
112113 ETHTOOL_MSG_MM_NTF,
113114 ETHTOOL_MSG_MODULE_FW_FLASH_NTF,
115+ ETHTOOL_MSG_PHY_GET_REPLY,
116+ ETHTOOL_MSG_PHY_NTF,
114117
115118 /* add new constants above here */
116119 __ETHTOOL_MSG_KERNEL_CNT,
@@ -134,6 +137,7 @@ enum { · 17 unmodified lines
134137 ETHTOOL_A_HEADER_DEV_INDEX, /* u32 */
135138 ETHTOOL_A_HEADER_DEV_NAME, /* string */
136139 ETHTOOL_A_HEADER_FLAGS, /* u32 - ETHTOOL_FLAG_* */
140+ ETHTOOL_A_HEADER_PHY_INDEX, /* u32 */
137141
138142 /* add new constants above here */
139143 __ETHTOOL_A_HEADER_CNT,
@@ -556,6 +560,10 @@ enum { · 416 unmodified lines
556560 * a regular 100 Ohm cable and a part with the abnormal impedance value
557561 */
558562 ETHTOOL_A_CABLE_RESULT_CODE_IMPEDANCE_MISMATCH,
563+ /* TDR not possible due to high noise level */
564+ ETHTOOL_A_CABLE_RESULT_CODE_NOISE,
565+ /* TDR resolution not possible / out of distance */
566+ ETHTOOL_A_CABLE_RESULT_CODE_RESOLUTION_NOT_POSSIBLE,
559567 };
560568
561569 enum {
@@ -565,10 +573,20 @@ enum { · 3 unmodified lines
565573 ETHTOOL_A_CABLE_PAIR_D,
566574 };
567575
576+/* Information source for specific results. */
577+enum {
578+ ETHTOOL_A_CABLE_INF_SRC_UNSPEC,
579+ /* Results provided by the Time Domain Reflectometry (TDR) */
580+ ETHTOOL_A_CABLE_INF_SRC_TDR,
581+ /* Results provided by the Active Link Cable Diagnostic (ALCD) */
582+ ETHTOOL_A_CABLE_INF_SRC_ALCD,
583+};
584+
568585 enum {
569586 ETHTOOL_A_CABLE_RESULT_UNSPEC,
570587 ETHTOOL_A_CABLE_RESULT_PAIR, /* u8 ETHTOOL_A_CABLE_PAIR_ */
571588 ETHTOOL_A_CABLE_RESULT_CODE, /* u8 ETHTOOL_A_CABLE_RESULT_CODE_ */
589+ ETHTOOL_A_CABLE_RESULT_SRC, /* u32 ETHTOOL_A_CABLE_INF_SRC_ */
572590
573591 __ETHTOOL_A_CABLE_RESULT_CNT,
574592 ETHTOOL_A_CABLE_RESULT_MAX = (__ETHTOOL_A_CABLE_RESULT_CNT - 1)
@@ -578,6 +596,7 @@ enum { · 3 unmodified lines
578596 ETHTOOL_A_CABLE_FAULT_LENGTH_UNSPEC,
579597 ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR, /* u8 ETHTOOL_A_CABLE_PAIR_ */
580598 ETHTOOL_A_CABLE_FAULT_LENGTH_CM, /* u32 */
599+ ETHTOOL_A_CABLE_FAULT_LENGTH_SRC, /* u32 ETHTOOL_A_CABLE_INF_SRC_ */
581600
582601 __ETHTOOL_A_CABLE_FAULT_LENGTH_CNT,
583602 ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = (__ETHTOOL_A_CABLE_FAULT_LENGTH_CNT - 1)
@@ -965,6 +984,7 @@ enum { · 381 unmodified lines
965984 ETHTOOL_A_RSS_INDIR, /* binary */
966985 ETHTOOL_A_RSS_HKEY, /* binary */
967986 ETHTOOL_A_RSS_INPUT_XFRM, /* u32 */
987+ ETHTOOL_A_RSS_START_CONTEXT, /* u32 */
968988
969989 __ETHTOOL_A_RSS_CNT,
970990 ETHTOOL_A_RSS_MAX = (__ETHTOOL_A_RSS_CNT - 1),
@@ -1049,6 +1069,22 @@ enum { · 78 unmodified lines
10491069 ETHTOOL_A_MODULE_FW_FLASH_MAX = (__ETHTOOL_A_MODULE_FW_FLASH_CNT - 1)
10501070 };
10511071
1072+enum {
1073+ ETHTOOL_A_PHY_UNSPEC,
1074+ ETHTOOL_A_PHY_HEADER, /* nest - _A_HEADER_* */
1075+ ETHTOOL_A_PHY_INDEX, /* u32 */
1076+ ETHTOOL_A_PHY_DRVNAME, /* string */
1077+ ETHTOOL_A_PHY_NAME, /* string */
1078+ ETHTOOL_A_PHY_UPSTREAM_TYPE, /* u32 */
1079+ ETHTOOL_A_PHY_UPSTREAM_INDEX, /* u32 */
1080+ ETHTOOL_A_PHY_UPSTREAM_SFP_NAME, /* string */
1081+ ETHTOOL_A_PHY_DOWNSTREAM_SFP_NAME, /* string */
1082+
1083+ /* add new constants above here */
1084+ __ETHTOOL_A_PHY_CNT,
1085+ ETHTOOL_A_PHY_MAX = (__ETHTOOL_A_PHY_CNT - 1)
1086+};
1087+
10521088 /* generic netlink info */
10531089 #define ETHTOOL_GENL_NAME "ethtool"
10541090 #define ETHTOOL_GENL_VERSION 1
include/uapi/linux/exfat.h+25−0
@@ -0,0 +1,25 @@
1+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2+/*
3+ * Copyright (C) 2024 Unisoc Technologies Co., Ltd.
4+ */
5+
6+#ifndef _UAPI_LINUX_EXFAT_H
7+#define _UAPI_LINUX_EXFAT_H
8+#include <linux/types.h>
9+#include <linux/ioctl.h>
10+
11+/*
12+ * exfat-specific ioctl commands
13+ */
14+
15+#define EXFAT_IOC_SHUTDOWN _IOR('X', 125, __u32)
16+
17+/*
18+ * Flags used by EXFAT_IOC_SHUTDOWN
19+ */
20+
21+#define EXFAT_GOING_DOWN_DEFAULT 0x0 /* default with full sync */
22+#define EXFAT_GOING_DOWN_FULLSYNC 0x1 /* going down with full sync*/
23+#define EXFAT_GOING_DOWN_NOSYNC 0x2 /* going down */
24+
25+#endif /* _UAPI_LINUX_EXFAT_H */
include/uapi/linux/falloc.h+1−0
@@ -2,6 +2,7 @@ · 1 unmodified line
22 #ifndef _UAPI_FALLOC_H_
33 #define _UAPI_FALLOC_H_
44
5+#define FALLOC_FL_ALLOCATE_RANGE 0x00 /* allocate range */
56 #define FALLOC_FL_KEEP_SIZE 0x01 /* default is extend size */
67 #define FALLOC_FL_PUNCH_HOLE 0x02 /* de-allocates range */
78 #define FALLOC_FL_NO_HIDE_STALE 0x04 /* reserved codepoint */
include/uapi/linux/fcntl.h+60−24
@@ -16,6 +16,9 @@ · 15 unmodified lines
1616
1717 #define F_DUPFD_QUERY (F_LINUX_SPECIFIC_BASE + 3)
1818
19+/* Was the file just created? */
20+#define F_CREATED_QUERY (F_LINUX_SPECIFIC_BASE + 4)
21+
1922 /*
2023 * Cancel a blocking posix lock; internal use only until we expose an
2124 * asynchronous lock api to userspace:
@@ -87,37 +90,70 @@ · 65 unmodified lines
8790 #define DN_ATTRIB 0x00000020 /* File changed attibutes */
8891 #define DN_MULTISHOT 0x80000000 /* Don't remove notifier */
8992
93+#define AT_FDCWD -100 /* Special value for dirfd used to
94+ indicate openat should use the
95+ current working directory. */
96+
97+
98+/* Generic flags for the *at(2) family of syscalls. */
99+
100+/* Reserved for per-syscall flags 0xff. */
101+#define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic
102+ links. */
103+/* Reserved for per-syscall flags 0x200 */
104+#define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
105+#define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount
106+ traversal. */
107+#define AT_EMPTY_PATH 0x1000 /* Allow empty relative
108+ pathname to operate on dirfd
109+ directly. */
110+/*
111+ * These flags are currently statx(2)-specific, but they could be made generic
112+ * in the future and so they should not be used for other per-syscall flags.
113+ */
114+#define AT_STATX_SYNC_TYPE 0x6000 /* Type of synchronisation required from statx() */
115+#define AT_STATX_SYNC_AS_STAT 0x0000 /* - Do whatever stat() does */
116+#define AT_STATX_FORCE_SYNC 0x2000 /* - Force the attributes to be sync'd with the server */
117+#define AT_STATX_DONT_SYNC 0x4000 /* - Don't sync attributes with the server */
118+
119+#define AT_RECURSIVE 0x8000 /* Apply to the entire subtree */
120+
90121 /*
91− * The constants AT_REMOVEDIR and AT_EACCESS have the same value. AT_EACCESS is
92− * meaningful only to faccessat, while AT_REMOVEDIR is meaningful only to
93− * unlinkat. The two functions do completely different things and therefore,
94− * the flags can be allowed to overlap. For example, passing AT_REMOVEDIR to
95− * faccessat would be undefined behavior and thus treating it equivalent to
96− * AT_EACCESS is valid undefined behavior.
122+ * Per-syscall flags for the *at(2) family of syscalls.
123+ *
124+ * These are flags that are so syscall-specific that a user passing these flags
125+ * to the wrong syscall is so "clearly wrong" that we can safely call such
126+ * usage "undefined behaviour".
127+ *
128+ * For example, the constants AT_REMOVEDIR and AT_EACCESS have the same value.
129+ * AT_EACCESS is meaningful only to faccessat, while AT_REMOVEDIR is meaningful
130+ * only to unlinkat. The two functions do completely different things and
131+ * therefore, the flags can be allowed to overlap. For example, passing
132+ * AT_REMOVEDIR to faccessat would be undefined behavior and thus treating it
133+ * equivalent to AT_EACCESS is valid undefined behavior.
134+ *
135+ * Note for implementers: When picking a new per-syscall AT_* flag, try to
136+ * reuse already existing flags first. This leaves us with as many unused bits
137+ * as possible, so we can use them for generic bits in the future if necessary.
97138 */
98−#define AT_FDCWD -100 /* Special value used to indicate
99− openat should use the current
100− working directory. */
101−#define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */
139+
140+/* Flags for renameat2(2) (must match legacy RENAME_* flags). */
141+#define AT_RENAME_NOREPLACE 0x0001
142+#define AT_RENAME_EXCHANGE 0x0002
143+#define AT_RENAME_WHITEOUT 0x0004
144+
145+/* Flag for faccessat(2). */
102146 #define AT_EACCESS 0x200 /* Test access permitted for
103147 effective IDs, not real IDs. */
148+/* Flag for unlinkat(2). */
104149 #define AT_REMOVEDIR 0x200 /* Remove directory instead of
105150 unlinking file. */
106−#define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
107−#define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount traversal */
108−#define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname */
109−
110−#define AT_STATX_SYNC_TYPE 0x6000 /* Type of synchronisation required from statx() */
111−#define AT_STATX_SYNC_AS_STAT 0x0000 /* - Do whatever stat() does */
112−#define AT_STATX_FORCE_SYNC 0x2000 /* - Force the attributes to be sync'd with the server */
113−#define AT_STATX_DONT_SYNC 0x4000 /* - Don't sync attributes with the server */
114−
115−#define AT_RECURSIVE 0x8000 /* Apply to the entire subtree */
151+/* Flags for name_to_handle_at(2). */
152+#define AT_HANDLE_FID 0x200 /* File handle is needed to compare
153+ object identity and may not be
154+ usable with open_by_handle_at(2). */
155+#define AT_HANDLE_MNT_ID_UNIQUE 0x001 /* Return the u64 unique mount ID. */
116156
117−/* Flags for name_to_handle_at(2). We reuse AT_ flag space to save bits... */
118−#define AT_HANDLE_FID AT_REMOVEDIR /* file handle is needed to
119− compare object identity and may not
120− be usable to open_by_handle_at(2) */
121157 #if defined(__KERNEL__)
122158 #define AT_GETATTR_NOSEC 0x80000000
123159 #endif
include/uapi/linux/fib_rules.h+1−0
@@ -67,6 +67,7 @@ enum { · 66 unmodified lines
6767 FRA_IP_PROTO, /* ip proto */
6868 FRA_SPORT_RANGE, /* sport */
6969 FRA_DPORT_RANGE, /* dport */
70+ FRA_DSCP, /* dscp */
7071 __FRA_MAX
7172 };
7273
include/uapi/linux/fuse.h+21−1
@@ -217,6 +217,9 @@ · 216 unmodified lines
217217 * - add backing_id to fuse_open_out, add FOPEN_PASSTHROUGH open flag
218218 * - add FUSE_NO_EXPORT_SUPPORT init flag
219219 * - add FUSE_NOTIFY_RESEND, add FUSE_HAS_RESEND init flag
220+ *
221+ * 7.41
222+ * - add FUSE_ALLOW_IDMAP
220223 */
221224
222225 #ifndef _LINUX_FUSE_H
@@ -252,7 +255,7 @@ · 29 unmodified lines
252255 #define FUSE_KERNEL_VERSION 7
253256
254257 /** Minor version number of this interface */
255−#define FUSE_KERNEL_MINOR_VERSION 40
258+#define FUSE_KERNEL_MINOR_VERSION 41
256259
257260 /** The node ID of the root inode */
258261 #define FUSE_ROOT_ID 1
@@ -421,6 +424,7 @@ struct fuse_file_lock { · 162 unmodified lines
421424 * FUSE_NO_EXPORT_SUPPORT: explicitly disable export support
422425 * FUSE_HAS_RESEND: kernel supports resending pending requests, and the high bit
423426 * of the request ID indicates resend requests
427+ * FUSE_ALLOW_IDMAP: allow creation of idmapped mounts
424428 */
425429 #define FUSE_ASYNC_READ (1 << 0)
426430 #define FUSE_POSIX_LOCKS (1 << 1)
@@ -466,6 +470,7 @@ struct fuse_file_lock { · 39 unmodified lines
466470
467471 /* Obsolete alias for FUSE_DIRECT_IO_ALLOW_MMAP */
468472 #define FUSE_DIRECT_IO_RELAX FUSE_DIRECT_IO_ALLOW_MMAP
473+#define FUSE_ALLOW_IDMAP (1ULL << 40)
469474
470475 /**
471476 * CUSE INIT request/reply flags
@@ -984,6 +989,21 @@ struct fuse_fallocate_in { · 512 unmodified lines
984989 */
985990 #define FUSE_UNIQUE_RESEND (1ULL << 63)
986991
992+/**
993+ * This value will be set by the kernel to
994+ * (struct fuse_in_header).{uid,gid} fields in
995+ * case when:
996+ * - fuse daemon enabled FUSE_ALLOW_IDMAP
997+ * - idmapping information is not available and uid/gid
998+ * can not be mapped in accordance with an idmapping.
999+ *
1000+ * Note: an idmapping information always available
1001+ * for inode creation operations like:
1002+ * FUSE_MKNOD, FUSE_SYMLINK, FUSE_MKDIR, FUSE_TMPFILE,
1003+ * FUSE_CREATE and FUSE_RENAME2 (with RENAME_WHITEOUT).
1004+ */
1005+#define FUSE_INVALID_UIDGID ((uint32_t)(-1))
1006+
9871007 struct fuse_in_header {
9881008 uint32_t len;
9891009 uint32_t opcode;
include/uapi/linux/hidraw.h+1−0
@@ -46,6 +46,7 @@ struct hidraw_devinfo { · 45 unmodified lines
4646 /* The first byte of SOUTPUT and GOUTPUT is the report number */
4747 #define HIDIOCSOUTPUT(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x0B, len)
4848 #define HIDIOCGOUTPUT(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x0C, len)
49+#define HIDIOCREVOKE _IOW('H', 0x0D, int) /* Revoke device access */
4950
5051 #define HIDRAW_FIRST_MINOR 0
5152 #define HIDRAW_MAX_DEVICES 64
include/uapi/linux/if_packet.h+4−3
@@ -230,8 +230,8 @@ struct tpacket_hdr_v1 { · 229 unmodified lines
230230 * ts_first_pkt:
231231 * Is always the time-stamp when the block was opened.
232232 * Case a) ZERO packets
233− * No packets to deal with but atleast you know the
234− * time-interval of this block.
233+ * No packets to deal with but at least you know
234+ * the time-interval of this block.
235235 * Case b) Non-zero packets
236236 * Use the ts of the first packet in the block.
237237 *
@@ -265,7 +265,8 @@ enum tpacket_versions { · 27 unmodified lines
265265 - struct tpacket_hdr
266266 - pad to TPACKET_ALIGNMENT=16
267267 - struct sockaddr_ll
268− - Gap, chosen so that packet data (Start+tp_net) alignes to TPACKET_ALIGNMENT=16
268+ - Gap, chosen so that packet data (Start+tp_net) aligns to
269+ TPACKET_ALIGNMENT=16
269270 - Start+tp_mac: [ Optional MAC header ]
270271 - Start+tp_net: Packet data, aligned to TPACKET_ALIGNMENT=16.
271272 - Pad to align to TPACKET_ALIGNMENT=16
include/uapi/linux/in.h+1−1
@@ -141,7 +141,7 @@ struct in_addr { · 140 unmodified lines
141141 */
142142 #define IP_PMTUDISC_INTERFACE 4
143143 /* weaker version of IP_PMTUDISC_INTERFACE, which allows packets to get
144− * fragmented if they exeed the interface mtu
144+ * fragmented if they exceed the interface mtu
145145 */
146146 #define IP_PMTUDISC_OMIT 5
147147
include/uapi/linux/inet_diag.h+1−1
@@ -143,7 +143,7 @@ enum { · 142 unmodified lines
143143 INET_DIAG_SHUTDOWN,
144144
145145 /*
146− * Next extenstions cannot be requested in struct inet_diag_req_v2:
146+ * Next extensions cannot be requested in struct inet_diag_req_v2:
147147 * its field idiag_ext has only 8 bits.
148148 */
149149
include/uapi/linux/io_uring.h+41−1
@@ -440,11 +440,21 @@ struct io_uring_cqe { · 439 unmodified lines
440440 * IORING_CQE_F_SOCK_NONEMPTY If set, more data to read after socket recv
441441 * IORING_CQE_F_NOTIF Set for notification CQEs. Can be used to distinct
442442 * them from sends.
443+ * IORING_CQE_F_BUF_MORE If set, the buffer ID set in the completion will get
444+ * more completions. In other words, the buffer is being
445+ * partially consumed, and will be used by the kernel for
446+ * more completions. This is only set for buffers used via
447+ * the incremental buffer consumption, as provided by
448+ * a ring buffer setup with IOU_PBUF_RING_INC. For any
449+ * other provided buffer type, all completions with a
450+ * buffer passed back is automatically returned to the
451+ * application.
443452 */
444453 #define IORING_CQE_F_BUFFER (1U << 0)
445454 #define IORING_CQE_F_MORE (1U << 1)
446455 #define IORING_CQE_F_SOCK_NONEMPTY (1U << 2)
447456 #define IORING_CQE_F_NOTIF (1U << 3)
457+#define IORING_CQE_F_BUF_MORE (1U << 4)
448458
449459 #define IORING_CQE_BUFFER_SHIFT 16
450460
@@ -507,6 +517,7 @@ struct io_cqring_offsets { · 56 unmodified lines
507517 #define IORING_ENTER_SQ_WAIT (1U << 2)
508518 #define IORING_ENTER_EXT_ARG (1U << 3)
509519 #define IORING_ENTER_REGISTERED_RING (1U << 4)
520+#define IORING_ENTER_ABS_TIMER (1U << 5)
510521
511522 /*
512523 * Passed in for io_uring_setup(2). Copied back with updated info on success
@@ -542,6 +553,7 @@ struct io_uring_params { · 29 unmodified lines
542553 #define IORING_FEAT_LINKED_FILE (1U << 12)
543554 #define IORING_FEAT_REG_REG_RING (1U << 13)
544555 #define IORING_FEAT_RECVSEND_BUNDLE (1U << 14)
556+#define IORING_FEAT_MIN_TIMEOUT (1U << 15)
545557
546558 /*
547559 * io_uring_register(2) opcodes and arguments
@@ -595,6 +607,11 @@ enum io_uring_register_op { · 47 unmodified lines
595607 IORING_REGISTER_NAPI = 27,
596608 IORING_UNREGISTER_NAPI = 28,
597609
610+ IORING_REGISTER_CLOCK = 29,
611+
612+ /* clone registered buffers from source ring to current ring */
613+ IORING_REGISTER_CLONE_BUFFERS = 30,
614+
598615 /* this goes last */
599616 IORING_REGISTER_LAST,
600617
@@ -675,6 +692,21 @@ struct io_uring_restriction { · 74 unmodified lines
675692 __u32 resv2[3];
676693 };
677694
695+struct io_uring_clock_register {
696+ __u32 clockid;
697+ __u32 __resv[3];
698+};
699+
700+enum {
701+ IORING_REGISTER_SRC_REGISTERED = 1,
702+};
703+
704+struct io_uring_clone_buffers {
705+ __u32 src_fd;
706+ __u32 flags;
707+ __u32 pad[6];
708+};
709+
678710 struct io_uring_buf {
679711 __u64 addr;
680712 __u32 len;
@@ -707,9 +739,17 @@ struct io_uring_buf_ring { · 26 unmodified lines
707739 * mmap(2) with the offset set as:
708740 * IORING_OFF_PBUF_RING | (bgid << IORING_OFF_PBUF_SHIFT)
709741 * to get a virtual mapping for the ring.
742+ * IOU_PBUF_RING_INC: If set, buffers consumed from this buffer ring can be
743+ * consumed incrementally. Normally one (or more) buffers
744+ * are fully consumed. With incremental consumptions, it's
745+ * feasible to register big ranges of buffers, and each
746+ * use of it will consume only as much as it needs. This
747+ * requires that both the kernel and application keep
748+ * track of where the current read/recv index is at.
710749 */
711750 enum io_uring_register_pbuf_ring_flags {
712751 IOU_PBUF_RING_MMAP = 1,
752+ IOU_PBUF_RING_INC = 2,
713753 };
714754
715755 /* argument for IORING_(UN)REGISTER_PBUF_RING */
@@ -758,7 +798,7 @@ enum io_uring_register_restriction_op { · 42 unmodified lines
758798 struct io_uring_getevents_arg {
759799 __u64 sigmask;
760800 __u32 sigmask_sz;
761− __u32 pad;
801+ __u32 min_wait_usec;
762802 __u64 ts;
763803 };
764804
include/uapi/linux/ioam6_iptunnel.h+6−0
@@ -50,6 +50,12 @@ enum { · 49 unmodified lines
5050 IOAM6_IPTUNNEL_FREQ_K, /* u32 */
5151 IOAM6_IPTUNNEL_FREQ_N, /* u32 */
5252
53+ /* Tunnel src address.
54+ * For encap,auto modes.
55+ * Optional (automatic if not provided).
56+ */
57+ IOAM6_IPTUNNEL_SRC, /* struct in6_addr */
58+
5359 __IOAM6_IPTUNNEL_MAX,
5460 };
5561
include/uapi/linux/iommufd.h+1−1
@@ -4,8 +4,8 @@ · 3 unmodified lines
44 #ifndef _UAPI_IOMMUFD_H
55 #define _UAPI_IOMMUFD_H
66
7−#include <linux/types.h>
87 #include <linux/ioctl.h>
8+#include <linux/types.h>
99
1010 #define IOMMUFD_TYPE (';')
1111
include/uapi/linux/kernel-page-flags.h+1−1
@@ -7,7 +7,7 @@ · 6 unmodified lines
77 */
88
99 #define KPF_LOCKED 0
10−#define KPF_ERROR 1
10+#define KPF_ERROR 1 /* Now unused */
1111 #define KPF_REFERENCED 2
1212 #define KPF_UPTODATE 3
1313 #define KPF_DIRTY 4
include/uapi/linux/kfd_ioctl.h+87−13
@@ -540,26 +540,29 @@ enum kfd_smi_event { · 539 unmodified lines
540540 KFD_SMI_EVENT_ALL_PROCESS = 64
541541 };
542542
543+/* The reason of the page migration event */
543544 enum KFD_MIGRATE_TRIGGERS {
544− KFD_MIGRATE_TRIGGER_PREFETCH,
545− KFD_MIGRATE_TRIGGER_PAGEFAULT_GPU,
546− KFD_MIGRATE_TRIGGER_PAGEFAULT_CPU,
547− KFD_MIGRATE_TRIGGER_TTM_EVICTION
545+ KFD_MIGRATE_TRIGGER_PREFETCH, /* Prefetch to GPU VRAM or system memory */
546+ KFD_MIGRATE_TRIGGER_PAGEFAULT_GPU, /* GPU page fault recover */
547+ KFD_MIGRATE_TRIGGER_PAGEFAULT_CPU, /* CPU page fault recover */
548+ KFD_MIGRATE_TRIGGER_TTM_EVICTION /* TTM eviction */
548549 };
549550
551+/* The reason of user queue evition event */
550552 enum KFD_QUEUE_EVICTION_TRIGGERS {
551− KFD_QUEUE_EVICTION_TRIGGER_SVM,
552− KFD_QUEUE_EVICTION_TRIGGER_USERPTR,
553− KFD_QUEUE_EVICTION_TRIGGER_TTM,
554− KFD_QUEUE_EVICTION_TRIGGER_SUSPEND,
555− KFD_QUEUE_EVICTION_CRIU_CHECKPOINT,
556− KFD_QUEUE_EVICTION_CRIU_RESTORE
553+ KFD_QUEUE_EVICTION_TRIGGER_SVM, /* SVM buffer migration */
554+ KFD_QUEUE_EVICTION_TRIGGER_USERPTR, /* userptr movement */
555+ KFD_QUEUE_EVICTION_TRIGGER_TTM, /* TTM move buffer */
556+ KFD_QUEUE_EVICTION_TRIGGER_SUSPEND, /* GPU suspend */
557+ KFD_QUEUE_EVICTION_CRIU_CHECKPOINT, /* CRIU checkpoint */
558+ KFD_QUEUE_EVICTION_CRIU_RESTORE /* CRIU restore */
557559 };
558560
561+/* The reason of unmap buffer from GPU event */
559562 enum KFD_SVM_UNMAP_TRIGGERS {
560− KFD_SVM_UNMAP_TRIGGER_MMU_NOTIFY,
561− KFD_SVM_UNMAP_TRIGGER_MMU_NOTIFY_MIGRATE,
562− KFD_SVM_UNMAP_TRIGGER_UNMAP_FROM_CPU
563+ KFD_SVM_UNMAP_TRIGGER_MMU_NOTIFY, /* MMU notifier CPU buffer movement */
564+ KFD_SVM_UNMAP_TRIGGER_MMU_NOTIFY_MIGRATE,/* MMU notifier page migration */
565+ KFD_SVM_UNMAP_TRIGGER_UNMAP_FROM_CPU /* Unmap to free the buffer */
563566 };
564567
565568 #define KFD_SMI_EVENT_MASK_FROM_INDEX(i) (1ULL << ((i) - 1))
@@ -570,6 +573,77 @@ struct kfd_ioctl_smi_events_args { · 4 unmodified lines
570573 __u32 anon_fd; /* from KFD */
571574 };
572575
576+/*
577+ * SVM event tracing via SMI system management interface
578+ *
579+ * Open event file descriptor
580+ * use ioctl AMDKFD_IOC_SMI_EVENTS, pass in gpuid and return a anonymous file
581+ * descriptor to receive SMI events.
582+ * If calling with sudo permission, then file descriptor can be used to receive
583+ * SVM events from all processes, otherwise, to only receive SVM events of same
584+ * process.
585+ *
586+ * To enable the SVM event
587+ * Write event file descriptor with KFD_SMI_EVENT_MASK_FROM_INDEX(event) bitmap
588+ * mask to start record the event to the kfifo, use bitmap mask combination
589+ * for multiple events. New event mask will overwrite the previous event mask.
590+ * KFD_SMI_EVENT_MASK_FROM_INDEX(KFD_SMI_EVENT_ALL_PROCESS) bit requires sudo
591+ * permisson to receive SVM events from all process.
592+ *
593+ * To receive the event
594+ * Application can poll file descriptor to wait for the events, then read event
595+ * from the file into a buffer. Each event is one line string message, starting
596+ * with the event id, then the event specific information.
597+ *
598+ * To decode event information
599+ * The following event format string macro can be used with sscanf to decode
600+ * the specific event information.
601+ * event triggers: the reason to generate the event, defined as enum for unmap,
602+ * eviction and migrate events.
603+ * node, from, to, prefetch_loc, preferred_loc: GPU ID, or 0 for system memory.
604+ * addr: user mode address, in pages
605+ * size: in pages
606+ * pid: the process ID to generate the event
607+ * ns: timestamp in nanosecond-resolution, starts at system boot time but
608+ * stops during suspend
609+ * migrate_update: GPU page fault is recovered by 'M' for migrate, 'U' for update
610+ * rw: 'W' for write page fault, 'R' for read page fault
611+ * rescheduled: 'R' if the queue restore failed and rescheduled to try again
612+ */
613+#define KFD_EVENT_FMT_UPDATE_GPU_RESET(reset_seq_num, reset_cause)\
614+ "%x %s\n", (reset_seq_num), (reset_cause)
615+
616+#define KFD_EVENT_FMT_THERMAL_THROTTLING(bitmask, counter)\
617+ "%llx:%llx\n", (bitmask), (counter)
618+
619+#define KFD_EVENT_FMT_VMFAULT(pid, task_name)\
620+ "%x:%s\n", (pid), (task_name)
621+
622+#define KFD_EVENT_FMT_PAGEFAULT_START(ns, pid, addr, node, rw)\
623+ "%lld -%d @%lx(%x) %c\n", (ns), (pid), (addr), (node), (rw)
624+
625+#define KFD_EVENT_FMT_PAGEFAULT_END(ns, pid, addr, node, migrate_update)\
626+ "%lld -%d @%lx(%x) %c\n", (ns), (pid), (addr), (node), (migrate_update)
627+
628+#define KFD_EVENT_FMT_MIGRATE_START(ns, pid, start, size, from, to, prefetch_loc,\
629+ preferred_loc, migrate_trigger)\
630+ "%lld -%d @%lx(%lx) %x->%x %x:%x %d\n", (ns), (pid), (start), (size),\
631+ (from), (to), (prefetch_loc), (preferred_loc), (migrate_trigger)
632+
633+#define KFD_EVENT_FMT_MIGRATE_END(ns, pid, start, size, from, to, migrate_trigger)\
634+ "%lld -%d @%lx(%lx) %x->%x %d\n", (ns), (pid), (start), (size),\
635+ (from), (to), (migrate_trigger)
636+
637+#define KFD_EVENT_FMT_QUEUE_EVICTION(ns, pid, node, evict_trigger)\
638+ "%lld -%d %x %d\n", (ns), (pid), (node), (evict_trigger)
639+
640+#define KFD_EVENT_FMT_QUEUE_RESTORE(ns, pid, node, rescheduled)\
641+ "%lld -%d %x %c\n", (ns), (pid), (node), (rescheduled)
642+
643+#define KFD_EVENT_FMT_UNMAP_FROM_GPU(ns, pid, addr, size, node, unmap_trigger)\
644+ "%lld -%d @%lx(%lx) %x %d\n", (ns), (pid), (addr), (size),\
645+ (node), (unmap_trigger)
646+
573647 /**************************************************************************************************
574648 * CRIU IOCTLs (Checkpoint Restore In Userspace)
575649 *
include/uapi/linux/landlock.h+30−0
@@ -44,6 +44,12 @@ struct landlock_ruleset_attr { · 43 unmodified lines
4444 * flags`_).
4545 */
4646 __u64 handled_access_net;
47+ /**
48+ * @scoped: Bitmask of scopes (cf. `Scope flags`_)
49+ * restricting a Landlock domain from accessing outside
50+ * resources (e.g. IPCs).
51+ */
52+ __u64 scoped;
4753 };
4854
4955 /*
@@ -274,4 +280,28 @@ struct landlock_net_port_attr { · 224 unmodified lines
274280 #define LANDLOCK_ACCESS_NET_BIND_TCP (1ULL << 0)
275281 #define LANDLOCK_ACCESS_NET_CONNECT_TCP (1ULL << 1)
276282 /* clang-format on */
283+
284+/**
285+ * DOC: scope
286+ *
287+ * Scope flags
288+ * ~~~~~~~~~~~
289+ *
290+ * These flags enable to isolate a sandboxed process from a set of IPC actions.
291+ * Setting a flag for a ruleset will isolate the Landlock domain to forbid
292+ * connections to resources outside the domain.
293+ *
294+ * Scopes:
295+ *
296+ * - %LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET: Restrict a sandboxed process from
297+ * connecting to an abstract UNIX socket created by a process outside the
298+ * related Landlock domain (e.g. a parent domain or a non-sandboxed process).
299+ * - %LANDLOCK_SCOPE_SIGNAL: Restrict a sandboxed process from sending a signal
300+ * to another process outside the domain.
301+ */
302+/* clang-format off */
303+#define LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET (1ULL << 0)
304+#define LANDLOCK_SCOPE_SIGNAL (1ULL << 1)
305+/* clang-format on*/
306+
277307 #endif /* _UAPI_LINUX_LANDLOCK_H */
include/uapi/linux/libc-compat.h+0−36
@@ -140,25 +140,6 @@ · 139 unmodified lines
140140
141141 #endif /* _NETINET_IN_H */
142142
143−/* Coordinate with glibc netipx/ipx.h header. */
144−#if defined(__NETIPX_IPX_H)
145−
146−#define __UAPI_DEF_SOCKADDR_IPX 0
147−#define __UAPI_DEF_IPX_ROUTE_DEFINITION 0
148−#define __UAPI_DEF_IPX_INTERFACE_DEFINITION 0
149−#define __UAPI_DEF_IPX_CONFIG_DATA 0
150−#define __UAPI_DEF_IPX_ROUTE_DEF 0
151−
152−#else /* defined(__NETIPX_IPX_H) */
153−
154−#define __UAPI_DEF_SOCKADDR_IPX 1
155−#define __UAPI_DEF_IPX_ROUTE_DEFINITION 1
156−#define __UAPI_DEF_IPX_INTERFACE_DEFINITION 1
157−#define __UAPI_DEF_IPX_CONFIG_DATA 1
158−#define __UAPI_DEF_IPX_ROUTE_DEF 1
159−
160−#endif /* defined(__NETIPX_IPX_H) */
161−
162143 /* Definitions for xattr.h */
163144 #if defined(_SYS_XATTR_H)
164145 #define __UAPI_DEF_XATTR 0
@@ -240,23 +221,6 @@ · 75 unmodified lines
240221 #define __UAPI_DEF_IP6_MTUINFO 1
241222 #endif
242223
243−/* Definitions for ipx.h */
244−#ifndef __UAPI_DEF_SOCKADDR_IPX
245−#define __UAPI_DEF_SOCKADDR_IPX 1
246−#endif
247−#ifndef __UAPI_DEF_IPX_ROUTE_DEFINITION
248−#define __UAPI_DEF_IPX_ROUTE_DEFINITION 1
249−#endif
250−#ifndef __UAPI_DEF_IPX_INTERFACE_DEFINITION
251−#define __UAPI_DEF_IPX_INTERFACE_DEFINITION 1
252−#endif
253−#ifndef __UAPI_DEF_IPX_CONFIG_DATA
254−#define __UAPI_DEF_IPX_CONFIG_DATA 1
255−#endif
256−#ifndef __UAPI_DEF_IPX_ROUTE_DEF
257−#define __UAPI_DEF_IPX_ROUTE_DEF 1
258−#endif
259−
260224 /* Definitions for xattr.h */
261225 #ifndef __UAPI_DEF_XATTR
262226 #define __UAPI_DEF_XATTR 1
include/uapi/linux/lsm.h+1−0
@@ -64,6 +64,7 @@ struct lsm_ctx { · 63 unmodified lines
6464 #define LSM_ID_LANDLOCK 110
6565 #define LSM_ID_IMA 111
6666 #define LSM_ID_EVM 112
67+#define LSM_ID_IPE 113
6768
6869 /*
6970 * LSM_ATTR_XXX definitions identify different LSM attributes
include/uapi/linux/mdio.h+1−0
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323 #define MDIO_MMD_DTEXS 5 /* DTE Extender Sublayer */
2424 #define MDIO_MMD_TC 6 /* Transmission Convergence */
2525 #define MDIO_MMD_AN 7 /* Auto-Negotiation */
26+#define MDIO_MMD_POWER_UNIT 13 /* PHY Power Unit */
2627 #define MDIO_MMD_C22EXT 29 /* Clause 22 extension */
2728 #define MDIO_MMD_VEND1 30 /* Vendor specific 1 */
2829 #define MDIO_MMD_VEND2 31 /* Vendor specific 2 */
include/uapi/linux/nbd.h+6−2
@@ -42,8 +42,9 @@ enum { · 41 unmodified lines
4242 NBD_CMD_WRITE = 1,
4343 NBD_CMD_DISC = 2,
4444 NBD_CMD_FLUSH = 3,
45− NBD_CMD_TRIM = 4
45+ NBD_CMD_TRIM = 4,
4646 /* userspace defines additional extension commands */
47+ NBD_CMD_WRITE_ZEROES = 6,
4748 };
4849
4950 /* values for flags field, these are server interaction specific. */
@@ -51,12 +52,15 @@ enum { · 1 unmodified line
5152 #define NBD_FLAG_READ_ONLY (1 << 1) /* device is read-only */
5253 #define NBD_FLAG_SEND_FLUSH (1 << 2) /* can flush writeback cache */
5354 #define NBD_FLAG_SEND_FUA (1 << 3) /* send FUA (forced unit access) */
54−/* there is a gap here to match userspace */
55+#define NBD_FLAG_ROTATIONAL (1 << 4) /* device is rotational */
5556 #define NBD_FLAG_SEND_TRIM (1 << 5) /* send trim/discard */
57+#define NBD_FLAG_SEND_WRITE_ZEROES (1 << 6) /* supports WRITE_ZEROES */
58+/* there is a gap here to match userspace */
5659 #define NBD_FLAG_CAN_MULTI_CONN (1 << 8) /* Server supports multiple connections per export. */
5760
5861 /* values for cmd flags in the upper 16 bits of request type */
5962 #define NBD_CMD_FLAG_FUA (1 << 16) /* FUA (forced unit access) op */
63+#define NBD_CMD_FLAG_NO_HOLE (1 << 17) /* Do not punch a hole for WRITE_ZEROES */
6064
6165 /* These are client behavior specific flags. */
6266 #define NBD_CFLAG_DESTROY_ON_DISCONNECT (1 << 0) /* delete the nbd device on
include/uapi/linux/net_tstamp.h+2−1
@@ -32,8 +32,9 @@ enum { · 31 unmodified lines
3232 SOF_TIMESTAMPING_OPT_TX_SWHW = (1<<14),
3333 SOF_TIMESTAMPING_BIND_PHC = (1 << 15),
3434 SOF_TIMESTAMPING_OPT_ID_TCP = (1 << 16),
35+ SOF_TIMESTAMPING_OPT_RX_FILTER = (1 << 17),
3536
36− SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_OPT_ID_TCP,
37+ SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_OPT_RX_FILTER,
3738 SOF_TIMESTAMPING_MASK = (SOF_TIMESTAMPING_LAST - 1) |
3839 SOF_TIMESTAMPING_LAST
3940 };
include/uapi/linux/netdev.h+13−0
@@ -93,6 +93,7 @@ enum { · 92 unmodified lines
9393 NETDEV_A_PAGE_POOL_INFLIGHT,
9494 NETDEV_A_PAGE_POOL_INFLIGHT_MEM,
9595 NETDEV_A_PAGE_POOL_DETACH_TIME,
96+ NETDEV_A_PAGE_POOL_DMABUF,
9697
9798 __NETDEV_A_PAGE_POOL_MAX,
9899 NETDEV_A_PAGE_POOL_MAX = (__NETDEV_A_PAGE_POOL_MAX - 1)
@@ -131,6 +132,7 @@ enum { · 32 unmodified lines
131132 NETDEV_A_QUEUE_IFINDEX,
132133 NETDEV_A_QUEUE_TYPE,
133134 NETDEV_A_QUEUE_NAPI_ID,
135+ NETDEV_A_QUEUE_DMABUF,
134136
135137 __NETDEV_A_QUEUE_MAX,
136138 NETDEV_A_QUEUE_MAX = (__NETDEV_A_QUEUE_MAX - 1)
@@ -173,6 +175,16 @@ enum { · 36 unmodified lines
173175 NETDEV_A_QSTATS_MAX = (__NETDEV_A_QSTATS_MAX - 1)
174176 };
175177
178+enum {
179+ NETDEV_A_DMABUF_IFINDEX = 1,
180+ NETDEV_A_DMABUF_QUEUES,
181+ NETDEV_A_DMABUF_FD,
182+ NETDEV_A_DMABUF_ID,
183+
184+ __NETDEV_A_DMABUF_MAX,
185+ NETDEV_A_DMABUF_MAX = (__NETDEV_A_DMABUF_MAX - 1)
186+};
187+
176188 enum {
177189 NETDEV_CMD_DEV_GET = 1,
178190 NETDEV_CMD_DEV_ADD_NTF,
@@ -186,6 +198,7 @@ enum { · 7 unmodified lines
186198 NETDEV_CMD_QUEUE_GET,
187199 NETDEV_CMD_NAPI_GET,
188200 NETDEV_CMD_QSTATS_GET,
201+ NETDEV_CMD_BIND_RX,
189202
190203 __NETDEV_CMD_MAX,
191204 NETDEV_CMD_MAX = (__NETDEV_CMD_MAX - 1)
include/uapi/linux/netfilter/nf_tables.h+1−1
@@ -436,7 +436,7 @@ enum nft_set_elem_flags { · 435 unmodified lines
436436 * @NFTA_SET_ELEM_KEY: key value (NLA_NESTED: nft_data)
437437 * @NFTA_SET_ELEM_DATA: data value of mapping (NLA_NESTED: nft_data_attributes)
438438 * @NFTA_SET_ELEM_FLAGS: bitmask of nft_set_elem_flags (NLA_U32)
439− * @NFTA_SET_ELEM_TIMEOUT: timeout value (NLA_U64)
439+ * @NFTA_SET_ELEM_TIMEOUT: timeout value, zero means never times out (NLA_U64)
440440 * @NFTA_SET_ELEM_EXPIRATION: expiration time (NLA_U64)
441441 * @NFTA_SET_ELEM_USERDATA: user data (NLA_BINARY)
442442 * @NFTA_SET_ELEM_EXPR: expression (NLA_NESTED: nft_expr_attributes)
include/uapi/linux/nexthop.h+9−1
@@ -16,10 +16,15 @@ struct nhmsg { · 15 unmodified lines
1616 struct nexthop_grp {
1717 __u32 id; /* nexthop id - must exist */
1818 __u8 weight; /* weight of this nexthop */
19− __u8 resvd1;
19+ __u8 weight_high; /* high order bits of weight */
2020 __u16 resvd2;
2121 };
2222
23+static inline __u16 nexthop_grp_weight(const struct nexthop_grp *entry)
24+{
25+ return ((entry->weight_high << 8) | entry->weight) + 1;
26+}
27+
2328 enum {
2429 NEXTHOP_GRP_TYPE_MPATH, /* hash-threshold nexthop group
2530 * default type if not specified
@@ -33,6 +38,9 @@ enum { · 7 unmodified lines
3338 #define NHA_OP_FLAG_DUMP_STATS BIT(0)
3439 #define NHA_OP_FLAG_DUMP_HW_STATS BIT(1)
3540
41+/* Response OP_FLAGS. */
42+#define NHA_OP_FLAG_RESP_GRP_RESVD_0 BIT(31) /* Dump clears resvd fields. */
43+
3644 enum {
3745 NHA_UNSPEC,
3846 NHA_ID, /* u32; id for nexthop. id == 0 means auto-assign */
include/uapi/linux/nsfs.h+15−0
@@ -27,4 +27,19 @@ · 26 unmodified lines
2727 /* Return thread-group leader id of pid in the target pid namespace. */
2828 #define NS_GET_TGID_IN_PIDNS _IOR(NSIO, 0x9, int)
2929
30+struct mnt_ns_info {
31+ __u32 size;
32+ __u32 nr_mounts;
33+ __u64 mnt_ns_id;
34+};
35+
36+#define MNT_NS_INFO_SIZE_VER0 16 /* size of first published struct */
37+
38+/* Get information about namespace. */
39+#define NS_MNT_GET_INFO _IOR(NSIO, 10, struct mnt_ns_info)
40+/* Get next namespace. */
41+#define NS_MNT_GET_NEXT _IOR(NSIO, 11, struct mnt_ns_info)
42+/* Get previous namespace. */
43+#define NS_MNT_GET_PREV _IOR(NSIO, 12, struct mnt_ns_info)
44+
3045 #endif /* __LINUX_NSFS_H */
include/uapi/linux/pci_regs.h+39−2
@@ -634,9 +634,11 @@ · 633 unmodified lines
634634 #define PCI_EXP_RTCTL_SENFEE 0x0002 /* System Error on Non-Fatal Error */
635635 #define PCI_EXP_RTCTL_SEFEE 0x0004 /* System Error on Fatal Error */
636636 #define PCI_EXP_RTCTL_PMEIE 0x0008 /* PME Interrupt Enable */
637−#define PCI_EXP_RTCTL_CRSSVE 0x0010 /* CRS Software Visibility Enable */
637+#define PCI_EXP_RTCTL_RRS_SVE 0x0010 /* Config RRS Software Visibility Enable */
638+#define PCI_EXP_RTCTL_CRSSVE PCI_EXP_RTCTL_RRS_SVE /* compatibility */
638639 #define PCI_EXP_RTCAP 0x1e /* Root Capabilities */
639−#define PCI_EXP_RTCAP_CRSVIS 0x0001 /* CRS Software Visibility capability */
640+#define PCI_EXP_RTCAP_RRS_SV 0x0001 /* Config RRS Software Visibility */
641+#define PCI_EXP_RTCAP_CRSVIS PCI_EXP_RTCAP_RRS_SV /* compatibility */
640642 #define PCI_EXP_RTSTA 0x20 /* Root Status */
641643 #define PCI_EXP_RTSTA_PME_RQ_ID 0x0000ffff /* PME Requester ID */
642644 #define PCI_EXP_RTSTA_PME 0x00010000 /* PME status */
@@ -740,6 +742,7 @@ · 97 unmodified lines
740742 #define PCI_EXT_CAP_ID_DVSEC 0x23 /* Designated Vendor-Specific */
741743 #define PCI_EXT_CAP_ID_DLF 0x25 /* Data Link Feature */
742744 #define PCI_EXT_CAP_ID_PL_16GT 0x26 /* Physical Layer 16.0 GT/s */
745+#define PCI_EXT_CAP_ID_NPEM 0x29 /* Native PCIe Enclosure Management */
743746 #define PCI_EXT_CAP_ID_PL_32GT 0x2A /* Physical Layer 32.0 GT/s */
744747 #define PCI_EXT_CAP_ID_DOE 0x2E /* Data Object Exchange */
745748 #define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_DOE
@@ -1121,6 +1124,40 @@ · 375 unmodified lines
11211124 #define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_MASK 0x000000F0
11221125 #define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_SHIFT 4
11231126
1127+/* Native PCIe Enclosure Management */
1128+#define PCI_NPEM_CAP 0x04 /* NPEM capability register */
1129+#define PCI_NPEM_CAP_CAPABLE 0x00000001 /* NPEM Capable */
1130+
1131+#define PCI_NPEM_CTRL 0x08 /* NPEM control register */
1132+#define PCI_NPEM_CTRL_ENABLE 0x00000001 /* NPEM Enable */
1133+
1134+/*
1135+ * Native PCIe Enclosure Management indication bits and Reset command bit
1136+ * are corresponding for capability and control registers.
1137+ */
1138+#define PCI_NPEM_CMD_RESET 0x00000002 /* Reset Command */
1139+#define PCI_NPEM_IND_OK 0x00000004 /* OK */
1140+#define PCI_NPEM_IND_LOCATE 0x00000008 /* Locate */
1141+#define PCI_NPEM_IND_FAIL 0x00000010 /* Fail */
1142+#define PCI_NPEM_IND_REBUILD 0x00000020 /* Rebuild */
1143+#define PCI_NPEM_IND_PFA 0x00000040 /* Predicted Failure Analysis */
1144+#define PCI_NPEM_IND_HOTSPARE 0x00000080 /* Hot Spare */
1145+#define PCI_NPEM_IND_ICA 0x00000100 /* In Critical Array */
1146+#define PCI_NPEM_IND_IFA 0x00000200 /* In Failed Array */
1147+#define PCI_NPEM_IND_IDT 0x00000400 /* Device Type */
1148+#define PCI_NPEM_IND_DISABLED 0x00000800 /* Disabled */
1149+#define PCI_NPEM_IND_SPEC_0 0x01000000
1150+#define PCI_NPEM_IND_SPEC_1 0x02000000
1151+#define PCI_NPEM_IND_SPEC_2 0x04000000
1152+#define PCI_NPEM_IND_SPEC_3 0x08000000
1153+#define PCI_NPEM_IND_SPEC_4 0x10000000
1154+#define PCI_NPEM_IND_SPEC_5 0x20000000
1155+#define PCI_NPEM_IND_SPEC_6 0x40000000
1156+#define PCI_NPEM_IND_SPEC_7 0x80000000
1157+
1158+#define PCI_NPEM_STATUS 0x0c /* NPEM status register */
1159+#define PCI_NPEM_STATUS_CC 0x00000001 /* Command Completed */
1160+
11241161 /* Data Object Exchange */
11251162 #define PCI_DOE_CAP 0x04 /* DOE Capabilities Register */
11261163 #define PCI_DOE_CAP_INT_SUP 0x00000001 /* Interrupt Support */
include/uapi/linux/pkt_cls.h+13−10
@@ -246,16 +246,19 @@ struct tc_u32_key { · 245 unmodified lines
246246 };
247247
248248 struct tc_u32_sel {
249− unsigned char flags;
250− unsigned char offshift;
251− unsigned char nkeys;
252−
253− __be16 offmask;
254− __u16 off;
255− short offoff;
256−
257− short hoff;
258− __be32 hmask;
249+ /* New members MUST be added within the __struct_group() macro below. */
250+ __struct_group(tc_u32_sel_hdr, hdr, /* no attrs */,
251+ unsigned char flags;
252+ unsigned char offshift;
253+ unsigned char nkeys;
254+
255+ __be16 offmask;
256+ __u16 off;
257+ short offoff;
258+
259+ short hoff;
260+ __be32 hmask;
261+ );
259262 struct tc_u32_key keys[];
260263 };
261264
include/uapi/linux/ptp_clock.h+18−6
@@ -155,13 +155,25 @@ struct ptp_sys_offset { · 154 unmodified lines
155155 struct ptp_clock_time ts[2 * PTP_MAX_SAMPLES + 1];
156156 };
157157
158+/*
159+ * ptp_sys_offset_extended - data structure for IOCTL operation
160+ * PTP_SYS_OFFSET_EXTENDED
161+ *
162+ * @n_samples: Desired number of measurements.
163+ * @clockid: clockid of a clock-base used for pre/post timestamps.
164+ * @rsv: Reserved for future use.
165+ * @ts: Array of samples in the form [pre-TS, PHC, post-TS]. The
166+ * kernel provides @n_samples.
167+ *
168+ * Starting from kernel 6.12 and onwards, the first word of the reserved-field
169+ * is used for @clockid. That's backward compatible since previous kernel
170+ * expect all three reserved words (@rsv[3]) to be 0 while the clockid (first
171+ * word in the new structure) for CLOCK_REALTIME is '0'.
172+ */
158173 struct ptp_sys_offset_extended {
159− unsigned int n_samples; /* Desired number of measurements. */
160− unsigned int rsv[3]; /* Reserved for future use. */
161− /*
162− * Array of [system, phc, system] time stamps. The kernel will provide
163− * 3*n_samples time stamps.
164− */
174+ unsigned int n_samples;
175+ __kernel_clockid_t clockid;
176+ unsigned int rsv[2];
165177 struct ptp_clock_time ts[PTP_MAX_SAMPLES][3];
166178 };
167179
include/uapi/linux/rkisp1-config.h+578−0
@@ -164,6 +164,11 @@ · 163 unmodified lines
164164 #define RKISP1_CIF_ISP_DPF_MAX_NLF_COEFFS 17
165165 #define RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS 6
166166
167+/*
168+ * Compand
169+ */
170+#define RKISP1_CIF_ISP_COMPAND_NUM_POINTS 64
171+
167172 /*
168173 * Measurement types
169174 */
@@ -851,6 +856,39 @@ struct rkisp1_params_cfg { · 681 unmodified lines
851856 struct rkisp1_cif_isp_isp_other_cfg others;
852857 };
853858
859+/**
860+ * struct rkisp1_cif_isp_compand_bls_config - Rockchip ISP1 Companding parameters (BLS)
861+ * @r: Fixed subtraction value for Bayer pattern R
862+ * @gr: Fixed subtraction value for Bayer pattern Gr
863+ * @gb: Fixed subtraction value for Bayer pattern Gb
864+ * @b: Fixed subtraction value for Bayer pattern B
865+ *
866+ * The values will be subtracted from the sensor values. Note that unlike the
867+ * dedicated BLS block, the BLS values in the compander are 20-bit unsigned.
868+ */
869+struct rkisp1_cif_isp_compand_bls_config {
870+ __u32 r;
871+ __u32 gr;
872+ __u32 gb;
873+ __u32 b;
874+};
875+
876+/**
877+ * struct rkisp1_cif_isp_compand_curve_config - Rockchip ISP1 Companding
878+ * parameters (expand and compression curves)
879+ * @px: Compand curve x-values. Each value stores the distance from the
880+ * previous x-value, expressed as log2 of the distance on 5 bits.
881+ * @x: Compand curve x-values. The functionality of these parameters are
882+ * unknown due to do a lack of hardware documentation, but these are left
883+ * here for future compatibility purposes.
884+ * @y: Compand curve y-values
885+ */
886+struct rkisp1_cif_isp_compand_curve_config {
887+ __u8 px[RKISP1_CIF_ISP_COMPAND_NUM_POINTS];
888+ __u32 x[RKISP1_CIF_ISP_COMPAND_NUM_POINTS];
889+ __u32 y[RKISP1_CIF_ISP_COMPAND_NUM_POINTS];
890+};
891+
854892 /*---------- PART2: Measurement Statistics ------------*/
855893
856894 /**
@@ -996,4 +1034,544 @@ struct rkisp1_stat_buffer { · 139 unmodified lines
9961034 struct rkisp1_cif_isp_stat params;
9971035 };
9981036
1037+/*---------- PART3: Extensible Configuration Parameters ------------*/
1038+
1039+/**
1040+ * enum rkisp1_ext_params_block_type - RkISP1 extensible params block type
1041+ *
1042+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS: Black level subtraction
1043+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_DPCC: Defect pixel cluster correction
1044+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_SDG: Sensor de-gamma
1045+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_GAIN: Auto white balance gains
1046+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_FLT: ISP filtering
1047+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_BDM: Bayer de-mosaic
1048+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_CTK: Cross-talk correction
1049+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_GOC: Gamma out correction
1050+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_DPF: De-noise pre-filter
1051+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_DPF_STRENGTH: De-noise pre-filter strength
1052+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_CPROC: Color processing
1053+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_IE: Image effects
1054+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_LSC: Lens shading correction
1055+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_MEAS: Auto white balance statistics
1056+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_HST_MEAS: Histogram statistics
1057+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_AEC_MEAS: Auto exposure statistics
1058+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_AFC_MEAS: Auto-focus statistics
1059+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS: BLS in the compand block
1060+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND: Companding expand curve
1061+ * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS: Companding compress curve
1062+ */
1063+enum rkisp1_ext_params_block_type {
1064+ RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS,
1065+ RKISP1_EXT_PARAMS_BLOCK_TYPE_DPCC,
1066+ RKISP1_EXT_PARAMS_BLOCK_TYPE_SDG,
1067+ RKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_GAIN,
1068+ RKISP1_EXT_PARAMS_BLOCK_TYPE_FLT,
1069+ RKISP1_EXT_PARAMS_BLOCK_TYPE_BDM,
1070+ RKISP1_EXT_PARAMS_BLOCK_TYPE_CTK,
1071+ RKISP1_EXT_PARAMS_BLOCK_TYPE_GOC,
1072+ RKISP1_EXT_PARAMS_BLOCK_TYPE_DPF,
1073+ RKISP1_EXT_PARAMS_BLOCK_TYPE_DPF_STRENGTH,
1074+ RKISP1_EXT_PARAMS_BLOCK_TYPE_CPROC,
1075+ RKISP1_EXT_PARAMS_BLOCK_TYPE_IE,
1076+ RKISP1_EXT_PARAMS_BLOCK_TYPE_LSC,
1077+ RKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_MEAS,
1078+ RKISP1_EXT_PARAMS_BLOCK_TYPE_HST_MEAS,
1079+ RKISP1_EXT_PARAMS_BLOCK_TYPE_AEC_MEAS,
1080+ RKISP1_EXT_PARAMS_BLOCK_TYPE_AFC_MEAS,
1081+ RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS,
1082+ RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND,
1083+ RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS,
1084+};
1085+
1086+#define RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE (1U << 0)
1087+#define RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE (1U << 1)
1088+
1089+/**
1090+ * struct rkisp1_ext_params_block_header - RkISP1 extensible parameters block
1091+ * header
1092+ *
1093+ * This structure represents the common part of all the ISP configuration
1094+ * blocks. Each parameters block shall embed an instance of this structure type
1095+ * as its first member, followed by the block-specific configuration data. The
1096+ * driver inspects this common header to discern the block type and its size and
1097+ * properly handle the block content by casting it to the correct block-specific
1098+ * type.
1099+ *
1100+ * The @type field is one of the values enumerated by
1101+ * :c:type:`rkisp1_ext_params_block_type` and specifies how the data should be
1102+ * interpreted by the driver. The @size field specifies the size of the
1103+ * parameters block and is used by the driver for validation purposes.
1104+ *
1105+ * The @flags field is a bitmask of per-block flags RKISP1_EXT_PARAMS_FL_*.
1106+ *
1107+ * When userspace wants to configure and enable an ISP block it shall fully
1108+ * populate the block configuration and set the
1109+ * RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE bit in the @flags field.
1110+ *
1111+ * When userspace simply wants to disable an ISP block the
1112+ * RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE bit should be set in @flags field. The
1113+ * driver ignores the rest of the block configuration structure in this case.
1114+ *
1115+ * If a new configuration of an ISP block has to be applied userspace shall
1116+ * fully populate the ISP block configuration and omit setting the
1117+ * RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE and RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE bits
1118+ * in the @flags field.
1119+ *
1120+ * Setting both the RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE and
1121+ * RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE bits in the @flags field is not allowed
1122+ * and not accepted by the driver.
1123+ *
1124+ * Userspace is responsible for correctly populating the parameters block header
1125+ * fields (@type, @flags and @size) and the block-specific parameters.
1126+ *
1127+ * For example:
1128+ *
1129+ * .. code-block:: c
1130+ *
1131+ * void populate_bls(struct rkisp1_ext_params_block_header *block) {
1132+ * struct rkisp1_ext_params_bls_config *bls =
1133+ * (struct rkisp1_ext_params_bls_config *)block;
1134+ *
1135+ * bls->header.type = RKISP1_EXT_PARAMS_BLOCK_ID_BLS;
1136+ * bls->header.flags = RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE;
1137+ * bls->header.size = sizeof(*bls);
1138+ *
1139+ * bls->config.enable_auto = 0;
1140+ * bls->config.fixed_val.r = blackLevelRed_;
1141+ * bls->config.fixed_val.gr = blackLevelGreenR_;
1142+ * bls->config.fixed_val.gb = blackLevelGreenB_;
1143+ * bls->config.fixed_val.b = blackLevelBlue_;
1144+ * }
1145+ *
1146+ * @type: The parameters block type, see
1147+ * :c:type:`rkisp1_ext_params_block_type`
1148+ * @flags: A bitmask of block flags
1149+ * @size: Size (in bytes) of the parameters block, including this header
1150+ */
1151+struct rkisp1_ext_params_block_header {
1152+ __u16 type;
1153+ __u16 flags;
1154+ __u32 size;
1155+};
1156+
1157+/**
1158+ * struct rkisp1_ext_params_bls_config - RkISP1 extensible params BLS config
1159+ *
1160+ * RkISP1 extensible parameters Black Level Subtraction configuration block.
1161+ * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS`.
1162+ *
1163+ * @header: The RkISP1 extensible parameters header, see
1164+ * :c:type:`rkisp1_ext_params_block_header`
1165+ * @config: Black Level Subtraction configuration, see
1166+ * :c:type:`rkisp1_cif_isp_bls_config`
1167+ */
1168+struct rkisp1_ext_params_bls_config {
1169+ struct rkisp1_ext_params_block_header header;
1170+ struct rkisp1_cif_isp_bls_config config;
1171+} __attribute__((aligned(8)));
1172+
1173+/**
1174+ * struct rkisp1_ext_params_dpcc_config - RkISP1 extensible params DPCC config
1175+ *
1176+ * RkISP1 extensible parameters Defective Pixel Cluster Correction configuration
1177+ * block. Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_DPCC`.
1178+ *
1179+ * @header: The RkISP1 extensible parameters header, see
1180+ * :c:type:`rkisp1_ext_params_block_header`
1181+ * @config: Defective Pixel Cluster Correction configuration, see
1182+ * :c:type:`rkisp1_cif_isp_dpcc_config`
1183+ */
1184+struct rkisp1_ext_params_dpcc_config {
1185+ struct rkisp1_ext_params_block_header header;
1186+ struct rkisp1_cif_isp_dpcc_config config;
1187+} __attribute__((aligned(8)));
1188+
1189+/**
1190+ * struct rkisp1_ext_params_sdg_config - RkISP1 extensible params SDG config
1191+ *
1192+ * RkISP1 extensible parameters Sensor Degamma configuration block. Identified
1193+ * by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_SDG`.
1194+ *
1195+ * @header: The RkISP1 extensible parameters header, see
1196+ * :c:type:`rkisp1_ext_params_block_header`
1197+ * @config: Sensor Degamma configuration, see
1198+ * :c:type:`rkisp1_cif_isp_sdg_config`
1199+ */
1200+struct rkisp1_ext_params_sdg_config {
1201+ struct rkisp1_ext_params_block_header header;
1202+ struct rkisp1_cif_isp_sdg_config config;
1203+} __attribute__((aligned(8)));
1204+
1205+/**
1206+ * struct rkisp1_ext_params_lsc_config - RkISP1 extensible params LSC config
1207+ *
1208+ * RkISP1 extensible parameters Lens Shading Correction configuration block.
1209+ * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_LSC`.
1210+ *
1211+ * @header: The RkISP1 extensible parameters header, see
1212+ * :c:type:`rkisp1_ext_params_block_header`
1213+ * @config: Lens Shading Correction configuration, see
1214+ * :c:type:`rkisp1_cif_isp_lsc_config`
1215+ */
1216+struct rkisp1_ext_params_lsc_config {
1217+ struct rkisp1_ext_params_block_header header;
1218+ struct rkisp1_cif_isp_lsc_config config;
1219+} __attribute__((aligned(8)));
1220+
1221+/**
1222+ * struct rkisp1_ext_params_awb_gain_config - RkISP1 extensible params AWB
1223+ * gain config
1224+ *
1225+ * RkISP1 extensible parameters Auto-White Balance Gains configuration block.
1226+ * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_GAIN`.
1227+ *
1228+ * @header: The RkISP1 extensible parameters header, see
1229+ * :c:type:`rkisp1_ext_params_block_header`
1230+ * @config: Auto-White Balance Gains configuration, see
1231+ * :c:type:`rkisp1_cif_isp_awb_gain_config`
1232+ */
1233+struct rkisp1_ext_params_awb_gain_config {
1234+ struct rkisp1_ext_params_block_header header;
1235+ struct rkisp1_cif_isp_awb_gain_config config;
1236+} __attribute__((aligned(8)));
1237+
1238+/**
1239+ * struct rkisp1_ext_params_flt_config - RkISP1 extensible params FLT config
1240+ *
1241+ * RkISP1 extensible parameters Filter configuration block. Identified by
1242+ * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_FLT`.
1243+ *
1244+ * @header: The RkISP1 extensible parameters header, see
1245+ * :c:type:`rkisp1_ext_params_block_header`
1246+ * @config: Filter configuration, see :c:type:`rkisp1_cif_isp_flt_config`
1247+ */
1248+struct rkisp1_ext_params_flt_config {
1249+ struct rkisp1_ext_params_block_header header;
1250+ struct rkisp1_cif_isp_flt_config config;
1251+} __attribute__((aligned(8)));
1252+
1253+/**
1254+ * struct rkisp1_ext_params_bdm_config - RkISP1 extensible params BDM config
1255+ *
1256+ * RkISP1 extensible parameters Demosaicing configuration block. Identified by
1257+ * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_BDM`.
1258+ *
1259+ * @header: The RkISP1 extensible parameters header, see
1260+ * :c:type:`rkisp1_ext_params_block_header`
1261+ * @config: Demosaicing configuration, see :c:type:`rkisp1_cif_isp_bdm_config`
1262+ */
1263+struct rkisp1_ext_params_bdm_config {
1264+ struct rkisp1_ext_params_block_header header;
1265+ struct rkisp1_cif_isp_bdm_config config;
1266+} __attribute__((aligned(8)));
1267+
1268+/**
1269+ * struct rkisp1_ext_params_ctk_config - RkISP1 extensible params CTK config
1270+ *
1271+ * RkISP1 extensible parameters Cross-Talk configuration block. Identified by
1272+ * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_CTK`.
1273+ *
1274+ * @header: The RkISP1 extensible parameters header, see
1275+ * :c:type:`rkisp1_ext_params_block_header`
1276+ * @config: Cross-Talk configuration, see :c:type:`rkisp1_cif_isp_ctk_config`
1277+ */
1278+struct rkisp1_ext_params_ctk_config {
1279+ struct rkisp1_ext_params_block_header header;
1280+ struct rkisp1_cif_isp_ctk_config config;
1281+} __attribute__((aligned(8)));
1282+
1283+/**
1284+ * struct rkisp1_ext_params_goc_config - RkISP1 extensible params GOC config
1285+ *
1286+ * RkISP1 extensible parameters Gamma-Out configuration block. Identified by
1287+ * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_GOC`.
1288+ *
1289+ * @header: The RkISP1 extensible parameters header, see
1290+ * :c:type:`rkisp1_ext_params_block_header`
1291+ * @config: Gamma-Out configuration, see :c:type:`rkisp1_cif_isp_goc_config`
1292+ */
1293+struct rkisp1_ext_params_goc_config {
1294+ struct rkisp1_ext_params_block_header header;
1295+ struct rkisp1_cif_isp_goc_config config;
1296+} __attribute__((aligned(8)));
1297+
1298+/**
1299+ * struct rkisp1_ext_params_dpf_config - RkISP1 extensible params DPF config
1300+ *
1301+ * RkISP1 extensible parameters De-noise Pre-Filter configuration block.
1302+ * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_DPF`.
1303+ *
1304+ * @header: The RkISP1 extensible parameters header, see
1305+ * :c:type:`rkisp1_ext_params_block_header`
1306+ * @config: De-noise Pre-Filter configuration, see
1307+ * :c:type:`rkisp1_cif_isp_dpf_config`
1308+ */
1309+struct rkisp1_ext_params_dpf_config {
1310+ struct rkisp1_ext_params_block_header header;
1311+ struct rkisp1_cif_isp_dpf_config config;
1312+} __attribute__((aligned(8)));
1313+
1314+/**
1315+ * struct rkisp1_ext_params_dpf_strength_config - RkISP1 extensible params DPF
1316+ * strength config
1317+ *
1318+ * RkISP1 extensible parameters De-noise Pre-Filter strength configuration
1319+ * block. Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_DPF_STRENGTH`.
1320+ *
1321+ * @header: The RkISP1 extensible parameters header, see
1322+ * :c:type:`rkisp1_ext_params_block_header`
1323+ * @config: De-noise Pre-Filter strength configuration, see
1324+ * :c:type:`rkisp1_cif_isp_dpf_strength_config`
1325+ */
1326+struct rkisp1_ext_params_dpf_strength_config {
1327+ struct rkisp1_ext_params_block_header header;
1328+ struct rkisp1_cif_isp_dpf_strength_config config;
1329+} __attribute__((aligned(8)));
1330+
1331+/**
1332+ * struct rkisp1_ext_params_cproc_config - RkISP1 extensible params CPROC config
1333+ *
1334+ * RkISP1 extensible parameters Color Processing configuration block.
1335+ * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_CPROC`.
1336+ *
1337+ * @header: The RkISP1 extensible parameters header, see
1338+ * :c:type:`rkisp1_ext_params_block_header`
1339+ * @config: Color processing configuration, see
1340+ * :c:type:`rkisp1_cif_isp_cproc_config`
1341+ */
1342+struct rkisp1_ext_params_cproc_config {
1343+ struct rkisp1_ext_params_block_header header;
1344+ struct rkisp1_cif_isp_cproc_config config;
1345+} __attribute__((aligned(8)));
1346+
1347+/**
1348+ * struct rkisp1_ext_params_ie_config - RkISP1 extensible params IE config
1349+ *
1350+ * RkISP1 extensible parameters Image Effect configuration block. Identified by
1351+ * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_IE`.
1352+ *
1353+ * @header: The RkISP1 extensible parameters header, see
1354+ * :c:type:`rkisp1_ext_params_block_header`
1355+ * @config: Image Effect configuration, see :c:type:`rkisp1_cif_isp_ie_config`
1356+ */
1357+struct rkisp1_ext_params_ie_config {
1358+ struct rkisp1_ext_params_block_header header;
1359+ struct rkisp1_cif_isp_ie_config config;
1360+} __attribute__((aligned(8)));
1361+
1362+/**
1363+ * struct rkisp1_ext_params_awb_meas_config - RkISP1 extensible params AWB
1364+ * Meas config
1365+ *
1366+ * RkISP1 extensible parameters Auto-White Balance Measurement configuration
1367+ * block. Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_MEAS`.
1368+ *
1369+ * @header: The RkISP1 extensible parameters header, see
1370+ * :c:type:`rkisp1_ext_params_block_header`
1371+ * @config: Auto-White Balance measure configuration, see
1372+ * :c:type:`rkisp1_cif_isp_awb_meas_config`
1373+ */
1374+struct rkisp1_ext_params_awb_meas_config {
1375+ struct rkisp1_ext_params_block_header header;
1376+ struct rkisp1_cif_isp_awb_meas_config config;
1377+} __attribute__((aligned(8)));
1378+
1379+/**
1380+ * struct rkisp1_ext_params_hst_config - RkISP1 extensible params Histogram config
1381+ *
1382+ * RkISP1 extensible parameters Histogram statistics configuration block.
1383+ * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_HST_MEAS`.
1384+ *
1385+ * @header: The RkISP1 extensible parameters header, see
1386+ * :c:type:`rkisp1_ext_params_block_header`
1387+ * @config: Histogram statistics configuration, see
1388+ * :c:type:`rkisp1_cif_isp_hst_config`
1389+ */
1390+struct rkisp1_ext_params_hst_config {
1391+ struct rkisp1_ext_params_block_header header;
1392+ struct rkisp1_cif_isp_hst_config config;
1393+} __attribute__((aligned(8)));
1394+
1395+/**
1396+ * struct rkisp1_ext_params_aec_config - RkISP1 extensible params AEC config
1397+ *
1398+ * RkISP1 extensible parameters Auto-Exposure statistics configuration block.
1399+ * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_AEC_MEAS`.
1400+ *
1401+ * @header: The RkISP1 extensible parameters header, see
1402+ * :c:type:`rkisp1_ext_params_block_header`
1403+ * @config: Auto-Exposure statistics configuration, see
1404+ * :c:type:`rkisp1_cif_isp_aec_config`
1405+ */
1406+struct rkisp1_ext_params_aec_config {
1407+ struct rkisp1_ext_params_block_header header;
1408+ struct rkisp1_cif_isp_aec_config config;
1409+} __attribute__((aligned(8)));
1410+
1411+/**
1412+ * struct rkisp1_ext_params_afc_config - RkISP1 extensible params AFC config
1413+ *
1414+ * RkISP1 extensible parameters Auto-Focus statistics configuration block.
1415+ * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_AFC_MEAS`.
1416+ *
1417+ * @header: The RkISP1 extensible parameters header, see
1418+ * :c:type:`rkisp1_ext_params_block_header`
1419+ * @config: Auto-Focus statistics configuration, see
1420+ * :c:type:`rkisp1_cif_isp_afc_config`
1421+ */
1422+struct rkisp1_ext_params_afc_config {
1423+ struct rkisp1_ext_params_block_header header;
1424+ struct rkisp1_cif_isp_afc_config config;
1425+} __attribute__((aligned(8)));
1426+
1427+/**
1428+ * struct rkisp1_ext_params_compand_bls_config - RkISP1 extensible params
1429+ * Compand BLS config
1430+ *
1431+ * RkISP1 extensible parameters Companding configuration block (black level
1432+ * subtraction). Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS`.
1433+ *
1434+ * @header: The RkISP1 extensible parameters header, see
1435+ * :c:type:`rkisp1_ext_params_block_header`
1436+ * @config: Companding BLS configuration, see
1437+ * :c:type:`rkisp1_cif_isp_compand_bls_config`
1438+ */
1439+struct rkisp1_ext_params_compand_bls_config {
1440+ struct rkisp1_ext_params_block_header header;
1441+ struct rkisp1_cif_isp_compand_bls_config config;
1442+} __attribute__((aligned(8)));
1443+
1444+/**
1445+ * struct rkisp1_ext_params_compand_curve_config - RkISP1 extensible params
1446+ * Compand curve config
1447+ *
1448+ * RkISP1 extensible parameters Companding configuration block (expand and
1449+ * compression curves). Identified by
1450+ * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND` or
1451+ * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS`.
1452+ *
1453+ * @header: The RkISP1 extensible parameters header, see
1454+ * :c:type:`rkisp1_ext_params_block_header`
1455+ * @config: Companding curve configuration, see
1456+ * :c:type:`rkisp1_cif_isp_compand_curve_config`
1457+ */
1458+struct rkisp1_ext_params_compand_curve_config {
1459+ struct rkisp1_ext_params_block_header header;
1460+ struct rkisp1_cif_isp_compand_curve_config config;
1461+} __attribute__((aligned(8)));
1462+
1463+/*
1464+ * The rkisp1_ext_params_compand_curve_config structure is counted twice as it
1465+ * is used for both the COMPAND_EXPAND and COMPAND_COMPRESS block types.
1466+ */
1467+#define RKISP1_EXT_PARAMS_MAX_SIZE \
1468+ (sizeof(struct rkisp1_ext_params_bls_config) +\
1469+ sizeof(struct rkisp1_ext_params_dpcc_config) +\
1470+ sizeof(struct rkisp1_ext_params_sdg_config) +\
1471+ sizeof(struct rkisp1_ext_params_lsc_config) +\
1472+ sizeof(struct rkisp1_ext_params_awb_gain_config) +\
1473+ sizeof(struct rkisp1_ext_params_flt_config) +\
1474+ sizeof(struct rkisp1_ext_params_bdm_config) +\
1475+ sizeof(struct rkisp1_ext_params_ctk_config) +\
1476+ sizeof(struct rkisp1_ext_params_goc_config) +\
1477+ sizeof(struct rkisp1_ext_params_dpf_config) +\
1478+ sizeof(struct rkisp1_ext_params_dpf_strength_config) +\
1479+ sizeof(struct rkisp1_ext_params_cproc_config) +\
1480+ sizeof(struct rkisp1_ext_params_ie_config) +\
1481+ sizeof(struct rkisp1_ext_params_awb_meas_config) +\
1482+ sizeof(struct rkisp1_ext_params_hst_config) +\
1483+ sizeof(struct rkisp1_ext_params_aec_config) +\
1484+ sizeof(struct rkisp1_ext_params_afc_config) +\
1485+ sizeof(struct rkisp1_ext_params_compand_bls_config) +\
1486+ sizeof(struct rkisp1_ext_params_compand_curve_config) +\
1487+ sizeof(struct rkisp1_ext_params_compand_curve_config))
1488+
1489+/**
1490+ * enum rksip1_ext_param_buffer_version - RkISP1 extensible parameters version
1491+ *
1492+ * @RKISP1_EXT_PARAM_BUFFER_V1: First version of RkISP1 extensible parameters
1493+ */
1494+enum rksip1_ext_param_buffer_version {
1495+ RKISP1_EXT_PARAM_BUFFER_V1 = 1,
1496+};
1497+
1498+/**
1499+ * struct rkisp1_ext_params_cfg - RkISP1 extensible parameters configuration
1500+ *
1501+ * This struct contains the configuration parameters of the RkISP1 ISP
1502+ * algorithms, serialized by userspace into a data buffer. Each configuration
1503+ * parameter block is represented by a block-specific structure which contains a
1504+ * :c:type:`rkisp1_ext_params_block_header` entry as first member. Userspace
1505+ * populates the @data buffer with configuration parameters for the blocks that
1506+ * it intends to configure. As a consequence, the data buffer effective size
1507+ * changes according to the number of ISP blocks that userspace intends to
1508+ * configure and is set by userspace in the @data_size field.
1509+ *
1510+ * The parameters buffer is versioned by the @version field to allow modifying
1511+ * and extending its definition. Userspace shall populate the @version field to
1512+ * inform the driver about the version it intends to use. The driver will parse
1513+ * and handle the @data buffer according to the data layout specific to the
1514+ * indicated version and return an error if the desired version is not
1515+ * supported.
1516+ *
1517+ * Currently the single RKISP1_EXT_PARAM_BUFFER_V1 version is supported.
1518+ * When a new format version will be added, a mechanism for userspace to query
1519+ * the supported format versions will be implemented in the form of a read-only
1520+ * V4L2 control. If such control is not available, userspace should assume only
1521+ * RKISP1_EXT_PARAM_BUFFER_V1 is supported by the driver.
1522+ *
1523+ * For each ISP block that userspace wants to configure, a block-specific
1524+ * structure is appended to the @data buffer, one after the other without gaps
1525+ * in between nor overlaps. Userspace shall populate the @data_size field with
1526+ * the effective size, in bytes, of the @data buffer.
1527+ *
1528+ * The expected memory layout of the parameters buffer is::
1529+ *
1530+ * +-------------------- struct rkisp1_ext_params_cfg -------------------+
1531+ * | version = RKISP_EXT_PARAMS_BUFFER_V1; |
1532+ * | data_size = sizeof(struct rkisp1_ext_params_bls_config) |
1533+ * | + sizeof(struct rkisp1_ext_params_dpcc_config); |
1534+ * | +------------------------- data ---------------------------------+ |
1535+ * | | +------------- struct rkisp1_ext_params_bls_config -----------+ | |
1536+ * | | | +-------- struct rkisp1_ext_params_block_header ---------+ | | |
1537+ * | | | | type = RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS; | | | |
1538+ * | | | | flags = RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE; | | | |
1539+ * | | | | size = sizeof(struct rkisp1_ext_params_bls_config); | | | |
1540+ * | | | +---------------------------------------------------------+ | | |
1541+ * | | | +---------- struct rkisp1_cif_isp_bls_config -------------+ | | |
1542+ * | | | | enable_auto = 0; | | | |
1543+ * | | | | fixed_val.r = 256; | | | |
1544+ * | | | | fixed_val.gr = 256; | | | |
1545+ * | | | | fixed_val.gb = 256; | | | |
1546+ * | | | | fixed_val.b = 256; | | | |
1547+ * | | | +---------------------------------------------------------+ | | |
1548+ * | | +------------ struct rkisp1_ext_params_dpcc_config -----------+ | |
1549+ * | | | +-------- struct rkisp1_ext_params_block_header ---------+ | | |
1550+ * | | | | type = RKISP1_EXT_PARAMS_BLOCK_TYPE_DPCC; | | | |
1551+ * | | | | flags = RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE; | | | |
1552+ * | | | | size = sizeof(struct rkisp1_ext_params_dpcc_config); | | | |
1553+ * | | | +---------------------------------------------------------+ | | |
1554+ * | | | +---------- struct rkisp1_cif_isp_dpcc_config ------------+ | | |
1555+ * | | | | mode = RKISP1_CIF_ISP_DPCC_MODE_STAGE1_ENABLE; | | | |
1556+ * | | | | output_mode = | | | |
1557+ * | | | | RKISP1_CIF_ISP_DPCC_OUTPUT_MODE_STAGE1_INCL_G_CENTER; | | | |
1558+ * | | | | set_use = ... ; | | | |
1559+ * | | | | ... = ... ; | | | |
1560+ * | | | +---------------------------------------------------------+ | | |
1561+ * | | +-------------------------------------------------------------+ | |
1562+ * | +-----------------------------------------------------------------+ |
1563+ * +---------------------------------------------------------------------+
1564+ *
1565+ * @version: The RkISP1 extensible parameters buffer version, see
1566+ * :c:type:`rksip1_ext_param_buffer_version`
1567+ * @data_size: The RkISP1 configuration data effective size, excluding this
1568+ * header
1569+ * @data: The RkISP1 extensible configuration data blocks
1570+ */
1571+struct rkisp1_ext_params_cfg {
1572+ __u32 version;
1573+ __u32 data_size;
1574+ __u8 data[RKISP1_EXT_PARAMS_MAX_SIZE];
1575+};
1576+
9991577 #endif /* _UAPI_RKISP1_CONFIG_H */
include/uapi/linux/sched.h+1−0
@@ -118,6 +118,7 @@ struct clone_args { · 117 unmodified lines
118118 /* SCHED_ISO: reserved but not implemented yet */
119119 #define SCHED_IDLE 5
120120 #define SCHED_DEADLINE 6
121+#define SCHED_EXT 7
121122
122123 /* Can be ORed in to make sure the process is reverted back to SCHED_NORMAL on fork */
123124 #define SCHED_RESET_ON_FORK 0x40000000
include/uapi/linux/sched/types.h+3−3
@@ -58,9 +58,9 @@ · 57 unmodified lines
5858 *
5959 * This is reflected by the following fields of the sched_attr structure:
6060 *
61− * @sched_deadline representative of the task's deadline
62− * @sched_runtime representative of the task's runtime
63− * @sched_period representative of the task's period
61+ * @sched_deadline representative of the task's deadline in nanoseconds
62+ * @sched_runtime representative of the task's runtime in nanoseconds
63+ * @sched_period representative of the task's period in nanoseconds
6464 *
6565 * Given this task model, there are a multiplicity of scheduling algorithms
6666 * and policies, that can be used to ensure all the tasks will make their
include/uapi/linux/serio.h+1−0
@@ -83,5 +83,6 @@ · 82 unmodified lines
8383 #define SERIO_PULSE8_CEC 0x40
8484 #define SERIO_RAINSHADOW_CEC 0x41
8585 #define SERIO_FSIA6B 0x42
86+#define SERIO_EXTRON_DA_HD_4K_PLUS 0x43
8687
8788 #endif /* _UAPI_SERIO_H */
include/uapi/linux/smc.h+6−0
@@ -127,6 +127,8 @@ enum { · 126 unmodified lines
127127 SMC_NLA_LGR_R_NET_COOKIE, /* u64 */
128128 SMC_NLA_LGR_R_PAD, /* flag */
129129 SMC_NLA_LGR_R_BUF_TYPE, /* u8 */
130+ SMC_NLA_LGR_R_SNDBUF_ALLOC, /* uint */
131+ SMC_NLA_LGR_R_RMB_ALLOC, /* uint */
130132 __SMC_NLA_LGR_R_MAX,
131133 SMC_NLA_LGR_R_MAX = __SMC_NLA_LGR_R_MAX - 1
132134 };
@@ -162,6 +164,8 @@ enum { · 29 unmodified lines
162164 SMC_NLA_LGR_D_V2_COMMON, /* nest */
163165 SMC_NLA_LGR_D_EXT_GID, /* u64 */
164166 SMC_NLA_LGR_D_PEER_EXT_GID, /* u64 */
167+ SMC_NLA_LGR_D_SNDBUF_ALLOC, /* uint */
168+ SMC_NLA_LGR_D_DMB_ALLOC, /* uint */
165169 __SMC_NLA_LGR_D_MAX,
166170 SMC_NLA_LGR_D_MAX = __SMC_NLA_LGR_D_MAX - 1
167171 };
@@ -249,6 +253,8 @@ enum { · 81 unmodified lines
249253 SMC_NLA_STATS_T_TX_BYTES, /* u64 */
250254 SMC_NLA_STATS_T_RX_CNT, /* u64 */
251255 SMC_NLA_STATS_T_TX_CNT, /* u64 */
256+ SMC_NLA_STATS_T_RX_RMB_USAGE, /* uint */
257+ SMC_NLA_STATS_T_TX_RMB_USAGE, /* uint */
252258 __SMC_NLA_STATS_T_MAX,
253259 SMC_NLA_STATS_T_MAX = __SMC_NLA_STATS_T_MAX - 1
254260 };
include/uapi/linux/spi/spi.h+3−2
@@ -28,7 +28,8 @@ · 27 unmodified lines
2828 #define SPI_RX_OCTAL _BITUL(14) /* receive with 8 wires */
2929 #define SPI_3WIRE_HIZ _BITUL(15) /* high impedance turnaround */
3030 #define SPI_RX_CPHA_FLIP _BITUL(16) /* flip CPHA on Rx only xfer */
31−#define SPI_MOSI_IDLE_LOW _BITUL(17) /* leave mosi line low when idle */
31+#define SPI_MOSI_IDLE_LOW _BITUL(17) /* leave MOSI line low when idle */
32+#define SPI_MOSI_IDLE_HIGH _BITUL(18) /* leave MOSI line high when idle */
3233
3334 /*
3435 * All the bits defined above should be covered by SPI_MODE_USER_MASK.
@@ -38,6 +39,6 @@ · 3 unmodified lines
3839 * These bits must not overlap. A static assert check should make sure of that.
3940 * If adding extra bits, make sure to increase the bit index below as well.
4041 */
41−#define SPI_MODE_USER_MASK (_BITUL(18) - 1)
42+#define SPI_MODE_USER_MASK (_BITUL(19) - 1)
4243
4344 #endif /* _UAPI_SPI_H */
include/uapi/linux/uio.h+18−0
@@ -20,6 +20,24 @@ struct iovec · 19 unmodified lines
2020 __kernel_size_t iov_len; /* Must be size_t (1003.1g) */
2121 };
2222
23+struct dmabuf_cmsg {
24+ __u64 frag_offset; /* offset into the dmabuf where the frag starts.
25+ */
26+ __u32 frag_size; /* size of the frag. */
27+ __u32 frag_token; /* token representing this frag for
28+ * DEVMEM_DONTNEED.
29+ */
30+ __u32 dmabuf_id; /* dmabuf id this frag belongs to. */
31+ __u32 flags; /* Currently unused. Reserved for future
32+ * uses.
33+ */
34+};
35+
36+struct dmabuf_token {
37+ __u32 token_start;
38+ __u32 token_count;
39+};
40+
2341 /*
2442 * UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1)
2543 */
include/uapi/linux/usb/ch9.h+6−2
@@ -254,6 +254,9 @@ struct usb_ctrlrequest { · 253 unmodified lines
254254 #define USB_DT_DEVICE_CAPABILITY 0x10
255255 #define USB_DT_WIRELESS_ENDPOINT_COMP 0x11
256256 #define USB_DT_WIRE_ADAPTER 0x21
257+/* From USB Device Firmware Upgrade Specification, Revision 1.1 */
258+#define USB_DT_DFU_FUNCTIONAL 0x21
259+/* these are from the Wireless USB spec */
257260 #define USB_DT_RPIPE 0x22
258261 #define USB_DT_CS_RADIO_CONTROL 0x23
259262 /* From the T10 UAS specification */
@@ -329,9 +332,10 @@ struct usb_device_descriptor { · 69 unmodified lines
329332 #define USB_CLASS_USB_TYPE_C_BRIDGE 0x12
330333 #define USB_CLASS_MISC 0xef
331334 #define USB_CLASS_APP_SPEC 0xfe
332−#define USB_CLASS_VENDOR_SPEC 0xff
335+#define USB_SUBCLASS_DFU 0x01
333336
334−#define USB_SUBCLASS_VENDOR_SPEC 0xff
337+#define USB_CLASS_VENDOR_SPEC 0xff
338+#define USB_SUBCLASS_VENDOR_SPEC 0xff
335339
336340 /*-------------------------------------------------------------------------*/
337341
include/uapi/linux/usb/functionfs.h+89−8
@@ -3,6 +3,7 @@ · 2 unmodified lines
33 #define _UAPI__LINUX_FUNCTIONFS_H__
44
55
6+#include <linux/const.h>
67 #include <linux/types.h>
78 #include <linux/ioctl.h>
89
@@ -37,6 +38,31 @@ struct usb_endpoint_descriptor_no_audio { · 28 unmodified lines
3738 __u8 bInterval;
3839 } __attribute__((packed));
3940
41+/**
42+ * struct usb_dfu_functional_descriptor - DFU Functional descriptor
43+ * @bLength: Size of the descriptor (bytes)
44+ * @bDescriptorType: USB_DT_DFU_FUNCTIONAL
45+ * @bmAttributes: DFU attributes
46+ * @wDetachTimeOut: Maximum time to wait after DFU_DETACH (ms, le16)
47+ * @wTransferSize: Maximum number of bytes per control-write (le16)
48+ * @bcdDFUVersion: DFU Spec version (BCD, le16)
49+ */
50+struct usb_dfu_functional_descriptor {
51+ __u8 bLength;
52+ __u8 bDescriptorType;
53+ __u8 bmAttributes;
54+ __le16 wDetachTimeOut;
55+ __le16 wTransferSize;
56+ __le16 bcdDFUVersion;
57+} __attribute__ ((packed));
58+
59+/* from DFU functional descriptor bmAttributes */
60+#define DFU_FUNC_ATT_CAN_DOWNLOAD _BITUL(0)
61+#define DFU_FUNC_ATT_CAN_UPLOAD _BITUL(1)
62+#define DFU_FUNC_ATT_MANIFEST_TOLERANT _BITUL(2)
63+#define DFU_FUNC_ATT_WILL_DETACH _BITUL(3)
64+
65+
4066 struct usb_functionfs_descs_head_v2 {
4167 __le32 magic;
4268 __le32 length;
@@ -104,23 +130,38 @@ struct usb_ffs_dmabuf_transfer_req { · 61 unmodified lines
104130
105131 #ifndef __KERNEL__
106132
107−/*
133+/**
134+ * DOC: descriptors
135+ *
108136 * Descriptors format:
109137 *
138+ * +-----+-----------+--------------+--------------------------------------+
110139 * | off | name | type | description |
111− * |-----+-----------+--------------+--------------------------------------|
140+ * +-----+-----------+--------------+--------------------------------------+
112141 * | 0 | magic | LE32 | FUNCTIONFS_DESCRIPTORS_MAGIC_V2 |
142+ * +-----+-----------+--------------+--------------------------------------+
113143 * | 4 | length | LE32 | length of the whole data chunk |
144+ * +-----+-----------+--------------+--------------------------------------+
114145 * | 8 | flags | LE32 | combination of functionfs_flags |
146+ * +-----+-----------+--------------+--------------------------------------+
115147 * | | eventfd | LE32 | eventfd file descriptor |
148+ * +-----+-----------+--------------+--------------------------------------+
116149 * | | fs_count | LE32 | number of full-speed descriptors |
150+ * +-----+-----------+--------------+--------------------------------------+
117151 * | | hs_count | LE32 | number of high-speed descriptors |
152+ * +-----+-----------+--------------+--------------------------------------+
118153 * | | ss_count | LE32 | number of super-speed descriptors |
154+ * +-----+-----------+--------------+--------------------------------------+
119155 * | | os_count | LE32 | number of MS OS descriptors |
156+ * +-----+-----------+--------------+--------------------------------------+
120157 * | | fs_descrs | Descriptor[] | list of full-speed descriptors |
158+ * +-----+-----------+--------------+--------------------------------------+
121159 * | | hs_descrs | Descriptor[] | list of high-speed descriptors |
160+ * +-----+-----------+--------------+--------------------------------------+
122161 * | | ss_descrs | Descriptor[] | list of super-speed descriptors |
162+ * +-----+-----------+--------------+--------------------------------------+
123163 * | | os_descrs | OSDesc[] | list of MS OS descriptors |
164+ * +-----+-----------+--------------+--------------------------------------+
124165 *
125166 * Depending on which flags are set, various fields may be missing in the
126167 * structure. Any flags that are not recognised cause the whole block to be
@@ -128,71 +169,111 @@ struct usb_ffs_dmabuf_transfer_req { · 1 unmodified line
128169 *
129170 * Legacy descriptors format (deprecated as of 3.14):
130171 *
172+ * +-----+-----------+--------------+--------------------------------------+
131173 * | off | name | type | description |
132− * |-----+-----------+--------------+--------------------------------------|
174+ * +-----+-----------+--------------+--------------------------------------+
133175 * | 0 | magic | LE32 | FUNCTIONFS_DESCRIPTORS_MAGIC |
176+ * +-----+-----------+--------------+--------------------------------------+
134177 * | 4 | length | LE32 | length of the whole data chunk |
178+ * +-----+-----------+--------------+--------------------------------------+
135179 * | 8 | fs_count | LE32 | number of full-speed descriptors |
180+ * +-----+-----------+--------------+--------------------------------------+
136181 * | 12 | hs_count | LE32 | number of high-speed descriptors |
182+ * +-----+-----------+--------------+--------------------------------------+
137183 * | 16 | fs_descrs | Descriptor[] | list of full-speed descriptors |
184+ * +-----+-----------+--------------+--------------------------------------+
138185 * | | hs_descrs | Descriptor[] | list of high-speed descriptors |
186+ * +-----+-----------+--------------+--------------------------------------+
139187 *
140188 * All numbers must be in little endian order.
141189 *
142190 * Descriptor[] is an array of valid USB descriptors which have the following
143191 * format:
144192 *
193+ * +-----+-----------------+------+--------------------------+
145194 * | off | name | type | description |
146− * |-----+-----------------+------+--------------------------|
195+ * +-----+-----------------+------+--------------------------+
147196 * | 0 | bLength | U8 | length of the descriptor |
197+ * +-----+-----------------+------+--------------------------+
148198 * | 1 | bDescriptorType | U8 | descriptor type |
199+ * +-----+-----------------+------+--------------------------+
149200 * | 2 | payload | | descriptor's payload |
201+ * +-----+-----------------+------+--------------------------+
150202 *
151203 * OSDesc[] is an array of valid MS OS Feature Descriptors which have one of
152204 * the following formats:
153205 *
206+ * +-----+-----------------+------+--------------------------+
154207 * | off | name | type | description |
155− * |-----+-----------------+------+--------------------------|
208+ * +-----+-----------------+------+--------------------------+
156209 * | 0 | inteface | U8 | related interface number |
210+ * +-----+-----------------+------+--------------------------+
157211 * | 1 | dwLength | U32 | length of the descriptor |
212+ * +-----+-----------------+------+--------------------------+
158213 * | 5 | bcdVersion | U16 | currently supported: 1 |
214+ * +-----+-----------------+------+--------------------------+
159215 * | 7 | wIndex | U16 | currently supported: 4 |
216+ * +-----+-----------------+------+--------------------------+
160217 * | 9 | bCount | U8 | number of ext. compat. |
218+ * +-----+-----------------+------+--------------------------+
161219 * | 10 | Reserved | U8 | 0 |
220+ * +-----+-----------------+------+--------------------------+
162221 * | 11 | ExtCompat[] | | list of ext. compat. d. |
222+ * +-----+-----------------+------+--------------------------+
163223 *
224+ * +-----+-----------------+------+--------------------------+
164225 * | off | name | type | description |
165− * |-----+-----------------+------+--------------------------|
226+ * +-----+-----------------+------+--------------------------+
166227 * | 0 | inteface | U8 | related interface number |
228+ * +-----+-----------------+------+--------------------------+
167229 * | 1 | dwLength | U32 | length of the descriptor |
230+ * +-----+-----------------+------+--------------------------+
168231 * | 5 | bcdVersion | U16 | currently supported: 1 |
232+ * +-----+-----------------+------+--------------------------+
169233 * | 7 | wIndex | U16 | currently supported: 5 |
234+ * +-----+-----------------+------+--------------------------+
170235 * | 9 | wCount | U16 | number of ext. compat. |
236+ * +-----+-----------------+------+--------------------------+
171237 * | 11 | ExtProp[] | | list of ext. prop. d. |
238+ * +-----+-----------------+------+--------------------------+
172239 *
173240 * ExtCompat[] is an array of valid Extended Compatiblity descriptors
174241 * which have the following format:
175242 *
243+ * +-----+-----------------------+------+-------------------------------------+
176244 * | off | name | type | description |
177− * |-----+-----------------------+------+-------------------------------------|
245+ * +-----+-----------------------+------+-------------------------------------+
178246 * | 0 | bFirstInterfaceNumber | U8 | index of the interface or of the 1st|
247+ * +-----+-----------------------+------+-------------------------------------+
179248 * | | | | interface in an IAD group |
249+ * +-----+-----------------------+------+-------------------------------------+
180250 * | 1 | Reserved | U8 | 1 |
251+ * +-----+-----------------------+------+-------------------------------------+
181252 * | 2 | CompatibleID | U8[8]| compatible ID string |
253+ * +-----+-----------------------+------+-------------------------------------+
182254 * | 10 | SubCompatibleID | U8[8]| subcompatible ID string |
255+ * +-----+-----------------------+------+-------------------------------------+
183256 * | 18 | Reserved | U8[6]| 0 |
257+ * +-----+-----------------------+------+-------------------------------------+
184258 *
185259 * ExtProp[] is an array of valid Extended Properties descriptors
186260 * which have the following format:
187261 *
262+ * +-----+-----------------------+------+-------------------------------------+
188263 * | off | name | type | description |
189− * |-----+-----------------------+------+-------------------------------------|
264+ * +-----+-----------------------+------+-------------------------------------+
190265 * | 0 | dwSize | U32 | length of the descriptor |
266+ * +-----+-----------------------+------+-------------------------------------+
191267 * | 4 | dwPropertyDataType | U32 | 1..7 |
268+ * +-----+-----------------------+------+-------------------------------------+
192269 * | 8 | wPropertyNameLength | U16 | bPropertyName length (NL) |
270+ * +-----+-----------------------+------+-------------------------------------+
193271 * | 10 | bPropertyName |U8[NL]| name of this property |
272+ * +-----+-----------------------+------+-------------------------------------+
194273 * |10+NL| dwPropertyDataLength | U32 | bPropertyData length (DL) |
274+ * +-----+-----------------------+------+-------------------------------------+
195275 * |14+NL| bProperty |U8[DL]| payload of this property |
276+ * +-----+-----------------------+------+-------------------------------------+
196277 */
197278
198279 struct usb_functionfs_strings_head {
include/uapi/linux/usb/g_hid.h+40−0
@@ -0,0 +1,40 @@
1+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2+
3+#ifndef __UAPI_LINUX_USB_G_HID_H
4+#define __UAPI_LINUX_USB_G_HID_H
5+
6+#include <linux/types.h>
7+
8+/* Maximum HID report length for High-Speed USB (i.e. USB 2.0) */
9+#define MAX_REPORT_LENGTH 64
10+
11+/**
12+ * struct usb_hidg_report - response to GET_REPORT
13+ * @report_id: report ID that this is a response for
14+ * @userspace_req:
15+ * !0 this report is used for any pending GET_REPORT request
16+ * but wait on userspace to issue a new report on future requests
17+ * 0 this report is to be used for any future GET_REPORT requests
18+ * @length: length of the report response
19+ * @data: report response
20+ * @padding: padding for 32/64 bit compatibility
21+ *
22+ * Structure used by GADGET_HID_WRITE_GET_REPORT ioctl on /dev/hidg*.
23+ */
24+struct usb_hidg_report {
25+ __u8 report_id;
26+ __u8 userspace_req;
27+ __u16 length;
28+ __u8 data[MAX_REPORT_LENGTH];
29+ __u8 padding[4];
30+};
31+
32+/* The 'g' code is used by gadgetfs and hid gadget ioctl requests.
33+ * Don't add any colliding codes to either driver, and keep
34+ * them in unique ranges.
35+ */
36+
37+#define GADGET_HID_READ_GET_REPORT_ID _IOR('g', 0x41, __u8)
38+#define GADGET_HID_WRITE_GET_REPORT _IOW('g', 0x42, struct usb_hidg_report)
39+
40+#endif /* __UAPI_LINUX_USB_G_HID_H */
include/uapi/linux/usb/gadgetfs.h+1−1
@@ -62,7 +62,7 @@ struct usb_gadgetfs_event { · 61 unmodified lines
6262 };
6363
6464
65−/* The 'g' code is also used by printer gadget ioctl requests.
65+/* The 'g' code is also used by printer and hid gadget ioctl requests.
6666 * Don't add any colliding codes to either driver, and keep
6767 * them in unique ranges (size 0x20 for now).
6868 */
include/uapi/linux/vbox_vmmdev_types.h+4−1
@@ -282,7 +282,10 @@ struct vmmdev_hgcm_pagelist { · 281 unmodified lines
282282 __u32 flags; /** VMMDEV_HGCM_F_PARM_*. */
283283 __u16 offset_first_page; /** Data offset in the first page. */
284284 __u16 page_count; /** Number of pages. */
285− __u64 pages[1]; /** Page addresses. */
285+ union {
286+ __u64 unused; /** Deprecated place-holder for first "pages" entry. */
287+ __DECLARE_FLEX_ARRAY(__u64, pages); /** Page addresses. */
288+ };
286289 };
287290 VMMDEV_ASSERT_SIZE(vmmdev_hgcm_pagelist, 4 + 2 + 2 + 8);
288291
include/uapi/linux/vdpa.h+1−0
@@ -19,6 +19,7 @@ enum vdpa_command { · 18 unmodified lines
1919 VDPA_CMD_DEV_GET, /* can dump */
2020 VDPA_CMD_DEV_CONFIG_GET, /* can dump */
2121 VDPA_CMD_DEV_VSTATS_GET,
22+ VDPA_CMD_DEV_ATTR_SET,
2223 };
2324
2425 enum vdpa_attr {
include/uapi/linux/videodev2.h+2−0
@@ -502,6 +502,7 @@ struct v4l2_capability { · 501 unmodified lines
502502 #define V4L2_CAP_META_CAPTURE 0x00800000 /* Is a metadata capture device */
503503
504504 #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */
505+#define V4L2_CAP_EDID 0x02000000 /* Is an EDID-only device */
505506 #define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */
506507 #define V4L2_CAP_META_OUTPUT 0x08000000 /* Is a metadata output device */
507508
@@ -854,6 +855,7 @@ struct v4l2_pix_format { · 346 unmodified lines
854855 /* Vendor specific - used for RK_ISP1 camera sub-system */
855856 #define V4L2_META_FMT_RK_ISP1_PARAMS v4l2_fourcc('R', 'K', '1', 'P') /* Rockchip ISP1 3A Parameters */
856857 #define V4L2_META_FMT_RK_ISP1_STAT_3A v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A Statistics */
858+#define V4L2_META_FMT_RK_ISP1_EXT_PARAMS v4l2_fourcc('R', 'K', '1', 'E') /* Rockchip ISP1 3a Extensible Parameters */
857859
858860 /* Vendor specific - used for RaspberryPi PiSP */
859861 #define V4L2_META_FMT_RPI_BE_CFG v4l2_fourcc('R', 'P', 'B', 'C') /* PiSP BE configuration */
include/uapi/linux/virtio_balloon.h+14−2
@@ -71,7 +71,13 @@ struct virtio_balloon_config { · 70 unmodified lines
7171 #define VIRTIO_BALLOON_S_CACHES 7 /* Disk caches */
7272 #define VIRTIO_BALLOON_S_HTLB_PGALLOC 8 /* Hugetlb page allocations */
7373 #define VIRTIO_BALLOON_S_HTLB_PGFAIL 9 /* Hugetlb page allocation failures */
74−#define VIRTIO_BALLOON_S_NR 10
74+#define VIRTIO_BALLOON_S_OOM_KILL 10 /* OOM killer invocations */
75+#define VIRTIO_BALLOON_S_ALLOC_STALL 11 /* Stall count of memory allocatoin */
76+#define VIRTIO_BALLOON_S_ASYNC_SCAN 12 /* Amount of memory scanned asynchronously */
77+#define VIRTIO_BALLOON_S_DIRECT_SCAN 13 /* Amount of memory scanned directly */
78+#define VIRTIO_BALLOON_S_ASYNC_RECLAIM 14 /* Amount of memory reclaimed asynchronously */
79+#define VIRTIO_BALLOON_S_DIRECT_RECLAIM 15 /* Amount of memory reclaimed directly */
80+#define VIRTIO_BALLOON_S_NR 16
7581
7682 #define VIRTIO_BALLOON_S_NAMES_WITH_PREFIX(VIRTIO_BALLOON_S_NAMES_prefix) { \
7783 VIRTIO_BALLOON_S_NAMES_prefix "swap-in", \
@@ -83,7 +89,13 @@ struct virtio_balloon_config { · 5 unmodified lines
8389 VIRTIO_BALLOON_S_NAMES_prefix "available-memory", \
8490 VIRTIO_BALLOON_S_NAMES_prefix "disk-caches", \
8591 VIRTIO_BALLOON_S_NAMES_prefix "hugetlb-allocations", \
86− VIRTIO_BALLOON_S_NAMES_prefix "hugetlb-failures" \
92+ VIRTIO_BALLOON_S_NAMES_prefix "hugetlb-failures", \
93+ VIRTIO_BALLOON_S_NAMES_prefix "oom-kills", \
94+ VIRTIO_BALLOON_S_NAMES_prefix "alloc-stalls", \
95+ VIRTIO_BALLOON_S_NAMES_prefix "async-scans", \
96+ VIRTIO_BALLOON_S_NAMES_prefix "direct-scans", \
97+ VIRTIO_BALLOON_S_NAMES_prefix "async-reclaims", \
98+ VIRTIO_BALLOON_S_NAMES_prefix "direct-reclaims" \
8799 }
88100
89101 #define VIRTIO_BALLOON_S_NAMES VIRTIO_BALLOON_S_NAMES_WITH_PREFIX("")
include/uapi/rdma/bnxt_re-abi.h+13−0
@@ -66,6 +66,7 @@ enum bnxt_re_wqe_mode { · 65 unmodified lines
6666
6767 enum {
6868 BNXT_RE_COMP_MASK_REQ_UCNTX_POW2_SUPPORT = 0x01,
69+ BNXT_RE_COMP_MASK_REQ_UCNTX_VAR_WQE_SUPPORT = 0x02,
6970 };
7071
7172 struct bnxt_re_uctx_req {
@@ -118,10 +119,16 @@ struct bnxt_re_resize_cq_req { · 46 unmodified lines
118119 __aligned_u64 cq_va;
119120 };
120121
122+enum bnxt_re_qp_mask {
123+ BNXT_RE_QP_REQ_MASK_VAR_WQE_SQ_SLOTS = 0x1,
124+};
125+
121126 struct bnxt_re_qp_req {
122127 __aligned_u64 qpsva;
123128 __aligned_u64 qprva;
124129 __aligned_u64 qp_handle;
130+ __aligned_u64 comp_mask;
131+ __u32 sq_slots;
125132 };
126133
127134 struct bnxt_re_qp_resp {
@@ -134,8 +141,14 @@ struct bnxt_re_srq_req { · 6 unmodified lines
134141 __aligned_u64 srq_handle;
135142 };
136143
144+enum bnxt_re_srq_mask {
145+ BNXT_RE_SRQ_TOGGLE_PAGE_SUPPORT = 0x1,
146+};
147+
137148 struct bnxt_re_srq_resp {
138149 __u32 srqid;
150+ __u32 rsvd; /* padding */
151+ __aligned_u64 comp_mask;
139152 };
140153
141154 enum bnxt_re_shpg_offt {
include/uapi/rdma/mlx5_user_ioctl_cmds.h+9−0
@@ -274,6 +274,10 @@ enum mlx5_ib_create_cq_attrs { · 273 unmodified lines
274274 MLX5_IB_ATTR_CREATE_CQ_UAR_INDEX = UVERBS_ID_DRIVER_NS_WITH_UHW,
275275 };
276276
277+enum mlx5_ib_reg_dmabuf_mr_attrs {
278+ MLX5_IB_ATTR_REG_DMABUF_MR_ACCESS_FLAGS = (1U << UVERBS_ID_NS_SHIFT),
279+};
280+
277281 #define MLX5_IB_DW_MATCH_PARAM 0xA0
278282
279283 struct mlx5_ib_match_params {
@@ -344,6 +348,7 @@ enum mlx5_ib_pd_methods { · 64 unmodified lines
344348
345349 enum mlx5_ib_device_methods {
346350 MLX5_IB_METHOD_QUERY_PORT = (1U << UVERBS_ID_NS_SHIFT),
351+ MLX5_IB_METHOD_GET_DATA_DIRECT_SYSFS_PATH,
347352 };
348353
349354 enum mlx5_ib_query_port_attrs {
@@ -351,4 +356,8 @@ enum mlx5_ib_query_port_attrs { · 1 unmodified line
351356 MLX5_IB_ATTR_QUERY_PORT,
352357 };
353358
359+enum mlx5_ib_get_data_direct_sysfs_path_attrs {
360+ MLX5_IB_ATTR_GET_DATA_DIRECT_SYSFS_PATH = (1U << UVERBS_ID_NS_SHIFT),
361+};
362+
354363 #endif
include/uapi/rdma/mlx5_user_ioctl_verbs.h+4−0
@@ -54,6 +54,10 @@ enum mlx5_ib_uapi_flow_action_packet_reformat_type { · 53 unmodified lines
5454 MLX5_IB_UAPI_FLOW_ACTION_PACKET_REFORMAT_TYPE_L2_TO_L3_TUNNEL = 0x3,
5555 };
5656
57+enum mlx5_ib_uapi_reg_dmabuf_flags {
58+ MLX5_IB_UAPI_REG_DMABUF_ACCESS_DATA_DIRECT = 1 << 0,
59+};
60+
5761 struct mlx5_ib_uapi_devx_async_cmd_hdr {
5862 __aligned_u64 wr_id;
5963 __u8 out_data[];
include/uapi/rdma/rdma_netlink.h+16−0
@@ -15,6 +15,7 @@ enum { · 14 unmodified lines
1515 enum {
1616 RDMA_NL_GROUP_IWPM = 2,
1717 RDMA_NL_GROUP_LS,
18+ RDMA_NL_GROUP_NOTIFY,
1819 RDMA_NL_NUM_GROUPS
1920 };
2021
@@ -305,6 +306,8 @@ enum rdma_nldev_command { · 284 unmodified lines
305306
306307 RDMA_NLDEV_CMD_DELDEV,
307308
309+ RDMA_NLDEV_CMD_MONITOR,
310+
308311 RDMA_NLDEV_NUM_OPS
309312 };
310313
@@ -574,6 +577,9 @@ enum rdma_nldev_attr { · 263 unmodified lines
574577
575578 RDMA_NLDEV_ATTR_NAME_ASSIGN_TYPE, /* u8 */
576579
580+ RDMA_NLDEV_ATTR_EVENT_TYPE, /* u8 */
581+
582+ RDMA_NLDEV_SYS_ATTR_MONITOR_MODE, /* u8 */
577583 /*
578584 * Always the end
579585 */
@@ -624,4 +630,14 @@ enum rdma_nl_name_assign_type { · 44 unmodified lines
624630 RDMA_NAME_ASSIGN_TYPE_USER = 1, /* Provided by user-space */
625631 };
626632
633+/*
634+ * Supported rdma monitoring event types.
635+ */
636+enum rdma_nl_notify_event_type {
637+ RDMA_REGISTER_EVENT,
638+ RDMA_UNREGISTER_EVENT,
639+ RDMA_NETDEV_ATTACH_EVENT,
640+ RDMA_NETDEV_DETACH_EVENT,
641+};
642+
627643 #endif /* _UAPI_RDMA_NETLINK_H */
include/uapi/sound/asequencer.h+2−0
@@ -461,6 +461,8 @@ struct snd_seq_remove_events { · 460 unmodified lines
461461 #define SNDRV_SEQ_PORT_FLG_TIMESTAMP (1<<1)
462462 #define SNDRV_SEQ_PORT_FLG_TIME_REAL (1<<2)
463463
464+#define SNDRV_SEQ_PORT_FLG_IS_MIDI1 (1<<3) /* Keep MIDI 1.0 protocol */
465+
464466 /* port direction */
465467 #define SNDRV_SEQ_PORT_DIR_UNKNOWN 0
466468 #define SNDRV_SEQ_PORT_DIR_INPUT 1
include/uapi/sound/asound.h+16−1
@@ -869,7 +869,7 @@ struct snd_ump_block_info { · 868 unmodified lines
869869 * Timer section - /dev/snd/timer
870870 */
871871
872−#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 7)
872+#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 8)
873873
874874 enum {
875875 SNDRV_TIMER_CLASS_NONE = -1,
@@ -894,6 +894,7 @@ enum { · 18 unmodified lines
894894 #define SNDRV_TIMER_GLOBAL_RTC 1 /* unused */
895895 #define SNDRV_TIMER_GLOBAL_HPET 2
896896 #define SNDRV_TIMER_GLOBAL_HRTIMER 3
897+#define SNDRV_TIMER_GLOBAL_UDRIVEN 4
897898
898899 /* info flags */
899900 #define SNDRV_TIMER_FLG_SLAVE (1<<0) /* cannot be controlled */
@@ -974,6 +975,18 @@ struct snd_timer_status { · 74 unmodified lines
974975 };
975976 #endif
976977
978+/*
979+ * This structure describes the userspace-driven timer. Such timers are purely virtual,
980+ * and can only be triggered from software (for instance, by userspace application).
981+ */
982+struct snd_timer_uinfo {
983+ /* To pretend being a normal timer, we need to know the resolution in ns. */
984+ __u64 resolution;
985+ int fd;
986+ unsigned int id;
987+ unsigned char reserved[16];
988+};
989+
977990 #define SNDRV_TIMER_IOCTL_PVERSION _IOR('T', 0x00, int)
978991 #define SNDRV_TIMER_IOCTL_NEXT_DEVICE _IOWR('T', 0x01, struct snd_timer_id)
979992 #define SNDRV_TIMER_IOCTL_TREAD_OLD _IOW('T', 0x02, int)
@@ -990,6 +1003,8 @@ struct snd_timer_status { · 10 unmodified lines
9901003 #define SNDRV_TIMER_IOCTL_CONTINUE _IO('T', 0xa2)
9911004 #define SNDRV_TIMER_IOCTL_PAUSE _IO('T', 0xa3)
9921005 #define SNDRV_TIMER_IOCTL_TREAD64 _IOW('T', 0xa4, int)
1006+#define SNDRV_TIMER_IOCTL_CREATE _IOWR('T', 0xa5, struct snd_timer_uinfo)
1007+#define SNDRV_TIMER_IOCTL_TRIGGER _IO('T', 0xa6)
9931008
9941009 #if __BITS_PER_LONG == 64
9951010 #define SNDRV_TIMER_IOCTL_TREAD SNDRV_TIMER_IOCTL_TREAD_OLD
include/uapi/xen/privcmd.h+7−0
@@ -126,6 +126,11 @@ struct privcmd_ioeventfd { · 125 unmodified lines
126126 __u8 pad[2];
127127 };
128128
129+struct privcmd_pcidev_get_gsi {
130+ __u32 sbdf;
131+ __u32 gsi;
132+};
133+
129134 /*
130135 * @cmd: IOCTL_PRIVCMD_HYPERCALL
131136 * @arg: &privcmd_hypercall_t
@@ -157,5 +162,7 @@ struct privcmd_ioeventfd { · 25 unmodified lines
157162 _IOW('P', 8, struct privcmd_irqfd)
158163 #define IOCTL_PRIVCMD_IOEVENTFD \
159164 _IOW('P', 9, struct privcmd_ioeventfd)
165+#define IOCTL_PRIVCMD_PCIDEV_GET_GSI \
166+ _IOC(_IOC_NONE, 'P', 10, sizeof(struct privcmd_pcidev_get_gsi))
160167
161168 #endif /* __LINUX_PUBLIC_PRIVCMD_H__ */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t