Merge an immutable branch between MFD, GPIO, Input and PWM to resolve conflicts for the merge window pull request.
Showing the changes to include/uapi/linux (62 of 13062 files). Show all
Unified · Split
| @@ -49,7 +49,7 @@ enum blktrace_act { · 48 unmodified lines | ||
| 49 | 49 | __BLK_TA_UNPLUG_TIMER, /* queue was unplugged by timer */ |
| 50 | 50 | __BLK_TA_INSERT, /* insert request */ |
| 51 | 51 | __BLK_TA_SPLIT, /* bio was split */ |
| 52 | − __BLK_TA_BOUNCE, /* bio was bounced */ | |
| 52 | + __BLK_TA_BOUNCE, /* unused, was: bio was bounced */ | |
| 53 | 53 | __BLK_TA_REMAP, /* bio was remapped */ |
| 54 | 54 | __BLK_TA_ABORT, /* request aborted */ |
| 55 | 55 | __BLK_TA_DRV_DATA, /* driver-specific binary data */ |
| @@ -1506,7 +1506,7 @@ union bpf_attr { · 1505 unmodified lines | ||
| 1506 | 1506 | __s32 map_token_fd; |
| 1507 | 1507 | }; |
| 1508 | 1508 | |
| 1509 | − struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ | |
| 1509 | + struct { /* anonymous struct used by BPF_MAP_*_ELEM and BPF_MAP_FREEZE commands */ | |
| 1510 | 1510 | __u32 map_fd; |
| 1511 | 1511 | __aligned_u64 key; |
| 1512 | 1512 | union { |
| @@ -1995,11 +1995,15 @@ union bpf_attr { · 482 unmodified lines | ||
| 1995 | 1995 | * long bpf_skb_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len, u64 flags) |
| 1996 | 1996 | * Description |
| 1997 | 1997 | * Store *len* bytes from address *from* into the packet |
| 1998 | − * associated to *skb*, at *offset*. *flags* are a combination of | |
| 1999 | − * **BPF_F_RECOMPUTE_CSUM** (automatically recompute the | |
| 2000 | − * checksum for the packet after storing the bytes) and | |
| 2001 | − * **BPF_F_INVALIDATE_HASH** (set *skb*\ **->hash**, *skb*\ | |
| 2002 | − * **->swhash** and *skb*\ **->l4hash** to 0). | |
| 1998 | + * associated to *skb*, at *offset*. The *flags* are a combination | |
| 1999 | + * of the following values: | |
| 2000 | + * | |
| 2001 | + * **BPF_F_RECOMPUTE_CSUM** | |
| 2002 | + * Automatically update *skb*\ **->csum** after storing the | |
| 2003 | + * bytes. | |
| 2004 | + * **BPF_F_INVALIDATE_HASH** | |
| 2005 | + * Set *skb*\ **->hash**, *skb*\ **->swhash** and *skb*\ | |
| 2006 | + * **->l4hash** to 0. | |
| 2003 | 2007 | * |
| 2004 | 2008 | * A call to this helper is susceptible to change the underlying |
| 2005 | 2009 | * packet buffer. Therefore, at load time, all checks on pointers |
| @@ -2051,7 +2055,8 @@ union bpf_attr { · 45 unmodified lines | ||
| 2051 | 2055 | * untouched (unless **BPF_F_MARK_ENFORCE** is added as well), and |
| 2052 | 2056 | * for updates resulting in a null checksum the value is set to |
| 2053 | 2057 | * **CSUM_MANGLED_0** instead. Flag **BPF_F_PSEUDO_HDR** indicates |
| 2054 | − * the checksum is to be computed against a pseudo-header. | |
| 2058 | + * that the modified header field is part of the pseudo-header. | |
| 2059 | + * Flag **BPF_F_IPV6** should be set for IPv6 packets. | |
| 2055 | 2060 | * |
| 2056 | 2061 | * This helper works in combination with **bpf_csum_diff**\ (), |
| 2057 | 2062 | * which does not update the checksum in-place, but offers more |
| @@ -6068,6 +6073,7 @@ enum { · 4010 unmodified lines | ||
| 6068 | 6073 | BPF_F_PSEUDO_HDR = (1ULL << 4), |
| 6069 | 6074 | BPF_F_MARK_MANGLED_0 = (1ULL << 5), |
| 6070 | 6075 | BPF_F_MARK_ENFORCE = (1ULL << 6), |
| 6076 | + BPF_F_IPV6 = (1ULL << 7), | |
| 6071 | 6077 | }; |
| 6072 | 6078 | |
| 6073 | 6079 | /* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */ |
| @@ -6723,6 +6729,7 @@ struct bpf_link_info { · 649 unmodified lines | ||
| 6723 | 6729 | __u32 name_len; |
| 6724 | 6730 | __u32 offset; /* offset from file_name */ |
| 6725 | 6731 | __u64 cookie; |
| 6732 | + __u64 ref_ctr_offset; | |
| 6726 | 6733 | } uprobe; /* BPF_PERF_EVENT_UPROBE, BPF_PERF_EVENT_URETPROBE */ |
| 6727 | 6734 | struct { |
| 6728 | 6735 | __aligned_u64 func_name; /* in/out */ |
| @@ -14,7 +14,7 @@ · 13 unmodified lines | ||
| 14 | 14 | static inline void cec_msg_active_source(struct cec_msg *msg, __u16 phys_addr) |
| 15 | 15 | { |
| 16 | 16 | msg->len = 4; |
| 17 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 17 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 18 | 18 | msg->msg[1] = CEC_MSG_ACTIVE_SOURCE; |
| 19 | 19 | msg->msg[2] = phys_addr >> 8; |
| 20 | 20 | msg->msg[3] = phys_addr & 0xff; |
| @@ -59,7 +59,7 @@ static inline void cec_msg_request_active_source(struct cec_msg *msg, · 38 unmodified lines | ||
| 59 | 59 | int reply) |
| 60 | 60 | { |
| 61 | 61 | msg->len = 2; |
| 62 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 62 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 63 | 63 | msg->msg[1] = CEC_MSG_REQUEST_ACTIVE_SOURCE; |
| 64 | 64 | msg->reply = reply ? CEC_MSG_ACTIVE_SOURCE : 0; |
| 65 | 65 | } |
| @@ -68,7 +68,7 @@ static inline void cec_msg_routing_information(struct cec_msg *msg, · 2 unmodified lines | ||
| 68 | 68 | __u16 phys_addr) |
| 69 | 69 | { |
| 70 | 70 | msg->len = 4; |
| 71 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 71 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 72 | 72 | msg->msg[1] = CEC_MSG_ROUTING_INFORMATION; |
| 73 | 73 | msg->msg[2] = phys_addr >> 8; |
| 74 | 74 | msg->msg[3] = phys_addr & 0xff; |
| @@ -86,7 +86,7 @@ static inline void cec_msg_routing_change(struct cec_msg *msg, · 11 unmodified lines | ||
| 86 | 86 | __u16 new_phys_addr) |
| 87 | 87 | { |
| 88 | 88 | msg->len = 6; |
| 89 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 89 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 90 | 90 | msg->msg[1] = CEC_MSG_ROUTING_CHANGE; |
| 91 | 91 | msg->msg[2] = orig_phys_addr >> 8; |
| 92 | 92 | msg->msg[3] = orig_phys_addr & 0xff; |
| @@ -106,7 +106,7 @@ static inline void cec_ops_routing_change(const struct cec_msg *msg, · 13 unmodified lines | ||
| 106 | 106 | static inline void cec_msg_set_stream_path(struct cec_msg *msg, __u16 phys_addr) |
| 107 | 107 | { |
| 108 | 108 | msg->len = 4; |
| 109 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 109 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 110 | 110 | msg->msg[1] = CEC_MSG_SET_STREAM_PATH; |
| 111 | 111 | msg->msg[2] = phys_addr >> 8; |
| 112 | 112 | msg->msg[3] = phys_addr & 0xff; |
| @@ -791,7 +791,7 @@ static inline void cec_msg_report_physical_addr(struct cec_msg *msg, · 678 unmodified lines | ||
| 791 | 791 | __u16 phys_addr, __u8 prim_devtype) |
| 792 | 792 | { |
| 793 | 793 | msg->len = 5; |
| 794 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 794 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 795 | 795 | msg->msg[1] = CEC_MSG_REPORT_PHYSICAL_ADDR; |
| 796 | 796 | msg->msg[2] = phys_addr >> 8; |
| 797 | 797 | msg->msg[3] = phys_addr & 0xff; |
| @@ -817,7 +817,7 @@ static inline void cec_msg_set_menu_language(struct cec_msg *msg, · 19 unmodified lines | ||
| 817 | 817 | const char *language) |
| 818 | 818 | { |
| 819 | 819 | msg->len = 5; |
| 820 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 820 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 821 | 821 | msg->msg[1] = CEC_MSG_SET_MENU_LANGUAGE; |
| 822 | 822 | memcpy(msg->msg + 2, language, 3); |
| 823 | 823 | } |
| @@ -850,7 +850,7 @@ static inline void cec_msg_report_features(struct cec_msg *msg, · 26 unmodified lines | ||
| 850 | 850 | __u8 rc_profile, __u8 dev_features) |
| 851 | 851 | { |
| 852 | 852 | msg->len = 6; |
| 853 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 853 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 854 | 854 | msg->msg[1] = CEC_MSG_REPORT_FEATURES; |
| 855 | 855 | msg->msg[2] = cec_version; |
| 856 | 856 | msg->msg[3] = all_device_types; |
| @@ -1092,7 +1092,7 @@ static inline void cec_msg_tuner_step_increment(struct cec_msg *msg) · 235 unmodified lines | ||
| 1092 | 1092 | static inline void cec_msg_device_vendor_id(struct cec_msg *msg, __u32 vendor_id) |
| 1093 | 1093 | { |
| 1094 | 1094 | msg->len = 5; |
| 1095 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 1095 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 1096 | 1096 | msg->msg[1] = CEC_MSG_DEVICE_VENDOR_ID; |
| 1097 | 1097 | msg->msg[2] = vendor_id >> 16; |
| 1098 | 1098 | msg->msg[3] = (vendor_id >> 8) & 0xff; |
| @@ -1655,7 +1655,7 @@ static inline void cec_msg_report_current_latency(struct cec_msg *msg, · 556 unmodified lines | ||
| 1655 | 1655 | __u8 audio_out_delay) |
| 1656 | 1656 | { |
| 1657 | 1657 | msg->len = 6; |
| 1658 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 1658 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 1659 | 1659 | msg->msg[1] = CEC_MSG_REPORT_CURRENT_LATENCY; |
| 1660 | 1660 | msg->msg[2] = phys_addr >> 8; |
| 1661 | 1661 | msg->msg[3] = phys_addr & 0xff; |
| @@ -1687,7 +1687,7 @@ static inline void cec_msg_request_current_latency(struct cec_msg *msg, · 25 unmodified lines | ||
| 1687 | 1687 | __u16 phys_addr) |
| 1688 | 1688 | { |
| 1689 | 1689 | msg->len = 4; |
| 1690 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 1690 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 1691 | 1691 | msg->msg[1] = CEC_MSG_REQUEST_CURRENT_LATENCY; |
| 1692 | 1692 | msg->msg[2] = phys_addr >> 8; |
| 1693 | 1693 | msg->msg[3] = phys_addr & 0xff; |
| @@ -1707,7 +1707,7 @@ static inline void cec_msg_cdc_hec_inquire_state(struct cec_msg *msg, · 13 unmodified lines | ||
| 1707 | 1707 | __u16 phys_addr2) |
| 1708 | 1708 | { |
| 1709 | 1709 | msg->len = 9; |
| 1710 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 1710 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 1711 | 1711 | msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1712 | 1712 | /* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1713 | 1713 | msg->msg[4] = CEC_MSG_CDC_HEC_INQUIRE_STATE; |
| @@ -1737,7 +1737,7 @@ static inline void cec_msg_cdc_hec_report_state(struct cec_msg *msg, · 23 unmodified lines | ||
| 1737 | 1737 | __u16 hec_field) |
| 1738 | 1738 | { |
| 1739 | 1739 | msg->len = has_field ? 10 : 8; |
| 1740 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 1740 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 1741 | 1741 | msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1742 | 1742 | /* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1743 | 1743 | msg->msg[4] = CEC_MSG_CDC_HEC_REPORT_STATE; |
| @@ -1782,7 +1782,7 @@ static inline void cec_msg_cdc_hec_set_state(struct cec_msg *msg, · 38 unmodified lines | ||
| 1782 | 1782 | __u16 phys_addr5) |
| 1783 | 1783 | { |
| 1784 | 1784 | msg->len = 10; |
| 1785 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 1785 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 1786 | 1786 | msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1787 | 1787 | /* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1788 | 1788 | msg->msg[4] = CEC_MSG_CDC_HEC_INQUIRE_STATE; |
| @@ -1832,7 +1832,7 @@ static inline void cec_msg_cdc_hec_set_state_adjacent(struct cec_msg *msg, · 43 unmodified lines | ||
| 1832 | 1832 | __u8 hec_set_state) |
| 1833 | 1833 | { |
| 1834 | 1834 | msg->len = 8; |
| 1835 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 1835 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 1836 | 1836 | msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1837 | 1837 | /* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1838 | 1838 | msg->msg[4] = CEC_MSG_CDC_HEC_SET_STATE_ADJACENT; |
| @@ -1857,7 +1857,7 @@ static inline void cec_msg_cdc_hec_request_deactivation(struct cec_msg *msg, · 18 unmodified lines | ||
| 1857 | 1857 | __u16 phys_addr3) |
| 1858 | 1858 | { |
| 1859 | 1859 | msg->len = 11; |
| 1860 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 1860 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 1861 | 1861 | msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1862 | 1862 | /* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1863 | 1863 | msg->msg[4] = CEC_MSG_CDC_HEC_REQUEST_DEACTIVATION; |
| @@ -1884,7 +1884,7 @@ static inline void cec_ops_cdc_hec_request_deactivation(const struct cec_msg *ms · 20 unmodified lines | ||
| 1884 | 1884 | static inline void cec_msg_cdc_hec_notify_alive(struct cec_msg *msg) |
| 1885 | 1885 | { |
| 1886 | 1886 | msg->len = 5; |
| 1887 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 1887 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 1888 | 1888 | msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1889 | 1889 | /* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1890 | 1890 | msg->msg[4] = CEC_MSG_CDC_HEC_NOTIFY_ALIVE; |
| @@ -1899,7 +1899,7 @@ static inline void cec_ops_cdc_hec_notify_alive(const struct cec_msg *msg, · 8 unmodified lines | ||
| 1899 | 1899 | static inline void cec_msg_cdc_hec_discover(struct cec_msg *msg) |
| 1900 | 1900 | { |
| 1901 | 1901 | msg->len = 5; |
| 1902 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 1902 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 1903 | 1903 | msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1904 | 1904 | /* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1905 | 1905 | msg->msg[4] = CEC_MSG_CDC_HEC_DISCOVER; |
| @@ -1916,7 +1916,7 @@ static inline void cec_msg_cdc_hpd_set_state(struct cec_msg *msg, · 10 unmodified lines | ||
| 1916 | 1916 | __u8 hpd_state) |
| 1917 | 1917 | { |
| 1918 | 1918 | msg->len = 6; |
| 1919 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 1919 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 1920 | 1920 | msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1921 | 1921 | /* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1922 | 1922 | msg->msg[4] = CEC_MSG_CDC_HPD_SET_STATE; |
| @@ -1938,7 +1938,7 @@ static inline void cec_msg_cdc_hpd_report_state(struct cec_msg *msg, · 15 unmodified lines | ||
| 1938 | 1938 | __u8 hpd_error) |
| 1939 | 1939 | { |
| 1940 | 1940 | msg->len = 6; |
| 1941 | − msg->msg[0] |= 0xf; /* broadcast */ | |
| 1941 | + msg->msg[0] |= CEC_LOG_ADDR_BROADCAST; | |
| 1942 | 1942 | msg->msg[1] = CEC_MSG_CDC_MESSAGE; |
| 1943 | 1943 | /* msg[2] and msg[3] (phys_addr) are filled in by the CEC framework */ |
| 1944 | 1944 | msg->msg[4] = CEC_MSG_CDC_HPD_REPORT_STATE; |
| @@ -385,6 +385,21 @@ enum devlink_linecard_state { · 384 unmodified lines | ||
| 385 | 385 | DEVLINK_LINECARD_STATE_MAX = __DEVLINK_LINECARD_STATE_MAX - 1 |
| 386 | 386 | }; |
| 387 | 387 | |
| 388 | +/* Variable attribute type. */ | |
| 389 | +enum devlink_var_attr_type { | |
| 390 | + /* Following values relate to the internal NLA_* values */ | |
| 391 | + DEVLINK_VAR_ATTR_TYPE_U8 = 1, | |
| 392 | + DEVLINK_VAR_ATTR_TYPE_U16, | |
| 393 | + DEVLINK_VAR_ATTR_TYPE_U32, | |
| 394 | + DEVLINK_VAR_ATTR_TYPE_U64, | |
| 395 | + DEVLINK_VAR_ATTR_TYPE_STRING, | |
| 396 | + DEVLINK_VAR_ATTR_TYPE_FLAG, | |
| 397 | + DEVLINK_VAR_ATTR_TYPE_NUL_STRING = 10, | |
| 398 | + DEVLINK_VAR_ATTR_TYPE_BINARY, | |
| 399 | + __DEVLINK_VAR_ATTR_TYPE_CUSTOM_BASE = 0x80, | |
| 400 | + /* Any possible custom types, unrelated to NLA_* values go below */ | |
| 401 | +}; | |
| 402 | + | |
| 388 | 403 | enum devlink_attr { |
| 389 | 404 | /* don't change the order or add anything between, this is ABI! */ |
| 390 | 405 | DEVLINK_ATTR_UNSPEC, |
| @@ -258,10 +258,12 @@ enum { · 257 unmodified lines | ||
| 258 | 258 | DM_DEV_SET_GEOMETRY_CMD, |
| 259 | 259 | DM_DEV_ARM_POLL_CMD, |
| 260 | 260 | DM_GET_TARGET_VERSION_CMD, |
| 261 | + DM_MPATH_PROBE_PATHS_CMD, | |
| 261 | 262 | }; |
| 262 | 263 | |
| 263 | 264 | #define DM_IOCTL 0xfd |
| 264 | 265 | |
| 266 | +/* Control device ioctls */ | |
| 265 | 267 | #define DM_VERSION _IOWR(DM_IOCTL, DM_VERSION_CMD, struct dm_ioctl) |
| 266 | 268 | #define DM_REMOVE_ALL _IOWR(DM_IOCTL, DM_REMOVE_ALL_CMD, struct dm_ioctl) |
| 267 | 269 | #define DM_LIST_DEVICES _IOWR(DM_IOCTL, DM_LIST_DEVICES_CMD, struct dm_ioctl) |
| @@ -285,10 +287,13 @@ enum { · 17 unmodified lines | ||
| 285 | 287 | #define DM_TARGET_MSG _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl) |
| 286 | 288 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
| 287 | 289 | |
| 290 | +/* Block device ioctls */ | |
| 291 | +#define DM_MPATH_PROBE_PATHS _IO(DM_IOCTL, DM_MPATH_PROBE_PATHS_CMD) | |
| 292 | + | |
| 288 | 293 | #define DM_VERSION_MAJOR 4 |
| 289 | −#define DM_VERSION_MINOR 49 | |
| 294 | +#define DM_VERSION_MINOR 50 | |
| 290 | 295 | #define DM_VERSION_PATCHLEVEL 0 |
| 291 | −#define DM_VERSION_EXTRA "-ioctl (2025-01-17)" | |
| 296 | +#define DM_VERSION_EXTRA "-ioctl (2025-04-28)" | |
| 292 | 297 | |
| 293 | 298 | /* Status bits */ |
| 294 | 299 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
| @@ -2295,71 +2295,75 @@ static inline int ethtool_validate_duplex(__u8 duplex) · 2294 unmodified lines | ||
| 2295 | 2295 | #define RXH_XFRM_SYM_OR_XOR (1 << 1) |
| 2296 | 2296 | #define RXH_XFRM_NO_CHANGE 0xff |
| 2297 | 2297 | |
| 2298 | −/* L2-L4 network traffic flow types */ | |
| 2299 | −#define TCP_V4_FLOW 0x01 /* hash or spec (tcp_ip4_spec) */ | |
| 2300 | −#define UDP_V4_FLOW 0x02 /* hash or spec (udp_ip4_spec) */ | |
| 2301 | −#define SCTP_V4_FLOW 0x03 /* hash or spec (sctp_ip4_spec) */ | |
| 2302 | −#define AH_ESP_V4_FLOW 0x04 /* hash only */ | |
| 2303 | −#define TCP_V6_FLOW 0x05 /* hash or spec (tcp_ip6_spec; nfc only) */ | |
| 2304 | −#define UDP_V6_FLOW 0x06 /* hash or spec (udp_ip6_spec; nfc only) */ | |
| 2305 | −#define SCTP_V6_FLOW 0x07 /* hash or spec (sctp_ip6_spec; nfc only) */ | |
| 2306 | −#define AH_ESP_V6_FLOW 0x08 /* hash only */ | |
| 2307 | −#define AH_V4_FLOW 0x09 /* hash or spec (ah_ip4_spec) */ | |
| 2308 | −#define ESP_V4_FLOW 0x0a /* hash or spec (esp_ip4_spec) */ | |
| 2309 | −#define AH_V6_FLOW 0x0b /* hash or spec (ah_ip6_spec; nfc only) */ | |
| 2310 | −#define ESP_V6_FLOW 0x0c /* hash or spec (esp_ip6_spec; nfc only) */ | |
| 2311 | −#define IPV4_USER_FLOW 0x0d /* spec only (usr_ip4_spec) */ | |
| 2312 | −#define IP_USER_FLOW IPV4_USER_FLOW | |
| 2313 | −#define IPV6_USER_FLOW 0x0e /* spec only (usr_ip6_spec; nfc only) */ | |
| 2314 | −#define IPV4_FLOW 0x10 /* hash only */ | |
| 2315 | −#define IPV6_FLOW 0x11 /* hash only */ | |
| 2316 | −#define ETHER_FLOW 0x12 /* spec only (ether_spec) */ | |
| 2317 | − | |
| 2318 | −/* Used for GTP-U IPv4 and IPv6. | |
| 2319 | − * The format of GTP packets only includes | |
| 2320 | − * elements such as TEID and GTP version. | |
| 2321 | − * It is primarily intended for data communication of the UE. | |
| 2322 | − */ | |
| 2323 | −#define GTPU_V4_FLOW 0x13 /* hash only */ | |
| 2324 | −#define GTPU_V6_FLOW 0x14 /* hash only */ | |
| 2325 | − | |
| 2326 | −/* Use for GTP-C IPv4 and v6. | |
| 2327 | − * The format of these GTP packets does not include TEID. | |
| 2328 | − * Primarily expected to be used for communication | |
| 2329 | − * to create sessions for UE data communication, | |
| 2330 | − * commonly referred to as CSR (Create Session Request). | |
| 2331 | − */ | |
| 2332 | −#define GTPC_V4_FLOW 0x15 /* hash only */ | |
| 2333 | −#define GTPC_V6_FLOW 0x16 /* hash only */ | |
| 2334 | − | |
| 2335 | −/* Use for GTP-C IPv4 and v6. | |
| 2336 | − * Unlike GTPC_V4_FLOW, the format of these GTP packets includes TEID. | |
| 2337 | − * After session creation, it becomes this packet. | |
| 2338 | − * This is mainly used for requests to realize UE handover. | |
| 2339 | − */ | |
| 2340 | −#define GTPC_TEID_V4_FLOW 0x17 /* hash only */ | |
| 2341 | −#define GTPC_TEID_V6_FLOW 0x18 /* hash only */ | |
| 2342 | − | |
| 2343 | −/* Use for GTP-U and extended headers for the PSC (PDU Session Container). | |
| 2344 | − * The format of these GTP packets includes TEID and QFI. | |
| 2345 | − * In 5G communication using UPF (User Plane Function), | |
| 2346 | − * data communication with this extended header is performed. | |
| 2347 | − */ | |
| 2348 | −#define GTPU_EH_V4_FLOW 0x19 /* hash only */ | |
| 2349 | −#define GTPU_EH_V6_FLOW 0x1a /* hash only */ | |
| 2350 | − | |
| 2351 | −/* Use for GTP-U IPv4 and v6 PSC (PDU Session Container) extended headers. | |
| 2352 | − * This differs from GTPU_EH_V(4|6)_FLOW in that it is distinguished by | |
| 2353 | − * UL/DL included in the PSC. | |
| 2354 | − * There are differences in the data included based on Downlink/Uplink, | |
| 2355 | − * and can be used to distinguish packets. | |
| 2356 | − * The functions described so far are useful when you want to | |
| 2357 | − * handle communication from the mobile network in UPF, PGW, etc. | |
| 2358 | − */ | |
| 2359 | −#define GTPU_UL_V4_FLOW 0x1b /* hash only */ | |
| 2360 | −#define GTPU_UL_V6_FLOW 0x1c /* hash only */ | |
| 2361 | −#define GTPU_DL_V4_FLOW 0x1d /* hash only */ | |
| 2362 | −#define GTPU_DL_V6_FLOW 0x1e /* hash only */ | |
| 2298 | +enum { | |
| 2299 | + /* L2-L4 network traffic flow types */ | |
| 2300 | + TCP_V4_FLOW = 0x01, /* hash or spec (tcp_ip4_spec) */ | |
| 2301 | + UDP_V4_FLOW = 0x02, /* hash or spec (udp_ip4_spec) */ | |
| 2302 | + SCTP_V4_FLOW = 0x03, /* hash or spec (sctp_ip4_spec) */ | |
| 2303 | + AH_ESP_V4_FLOW = 0x04, /* hash only */ | |
| 2304 | + TCP_V6_FLOW = 0x05, /* hash or spec (tcp_ip6_spec; nfc only) */ | |
| 2305 | + UDP_V6_FLOW = 0x06, /* hash or spec (udp_ip6_spec; nfc only) */ | |
| 2306 | + SCTP_V6_FLOW = 0x07, /* hash or spec (sctp_ip6_spec; nfc only) */ | |
| 2307 | + AH_ESP_V6_FLOW = 0x08, /* hash only */ | |
| 2308 | + AH_V4_FLOW = 0x09, /* hash or spec (ah_ip4_spec) */ | |
| 2309 | + ESP_V4_FLOW = 0x0a, /* hash or spec (esp_ip4_spec) */ | |
| 2310 | + AH_V6_FLOW = 0x0b, /* hash or spec (ah_ip6_spec; nfc only) */ | |
| 2311 | + ESP_V6_FLOW = 0x0c, /* hash or spec (esp_ip6_spec; nfc only) */ | |
| 2312 | + IPV4_USER_FLOW = 0x0d, /* spec only (usr_ip4_spec) */ | |
| 2313 | + IP_USER_FLOW = IPV4_USER_FLOW, | |
| 2314 | + IPV6_USER_FLOW = 0x0e, /* spec only (usr_ip6_spec; nfc only) */ | |
| 2315 | + IPV4_FLOW = 0x10, /* hash only */ | |
| 2316 | + IPV6_FLOW = 0x11, /* hash only */ | |
| 2317 | + ETHER_FLOW = 0x12, /* spec only (ether_spec) */ | |
| 2318 | + | |
| 2319 | + /* Used for GTP-U IPv4 and IPv6. | |
| 2320 | + * The format of GTP packets only includes | |
| 2321 | + * elements such as TEID and GTP version. | |
| 2322 | + * It is primarily intended for data communication of the UE. | |
| 2323 | + */ | |
| 2324 | + GTPU_V4_FLOW = 0x13, /* hash only */ | |
| 2325 | + GTPU_V6_FLOW = 0x14, /* hash only */ | |
| 2326 | + | |
| 2327 | + /* Use for GTP-C IPv4 and v6. | |
| 2328 | + * The format of these GTP packets does not include TEID. | |
| 2329 | + * Primarily expected to be used for communication | |
| 2330 | + * to create sessions for UE data communication, | |
| 2331 | + * commonly referred to as CSR (Create Session Request). | |
| 2332 | + */ | |
| 2333 | + GTPC_V4_FLOW = 0x15, /* hash only */ | |
| 2334 | + GTPC_V6_FLOW = 0x16, /* hash only */ | |
| 2335 | + | |
| 2336 | + /* Use for GTP-C IPv4 and v6. | |
| 2337 | + * Unlike GTPC_V4_FLOW, the format of these GTP packets includes TEID. | |
| 2338 | + * After session creation, it becomes this packet. | |
| 2339 | + * This is mainly used for requests to realize UE handover. | |
| 2340 | + */ | |
| 2341 | + GTPC_TEID_V4_FLOW = 0x17, /* hash only */ | |
| 2342 | + GTPC_TEID_V6_FLOW = 0x18, /* hash only */ | |
| 2343 | + | |
| 2344 | + /* Use for GTP-U and extended headers for the PSC (PDU Session Container). | |
| 2345 | + * The format of these GTP packets includes TEID and QFI. | |
| 2346 | + * In 5G communication using UPF (User Plane Function), | |
| 2347 | + * data communication with this extended header is performed. | |
| 2348 | + */ | |
| 2349 | + GTPU_EH_V4_FLOW = 0x19, /* hash only */ | |
| 2350 | + GTPU_EH_V6_FLOW = 0x1a, /* hash only */ | |
| 2351 | + | |
| 2352 | + /* Use for GTP-U IPv4 and v6 PSC (PDU Session Container) extended headers. | |
| 2353 | + * This differs from GTPU_EH_V(4|6)_FLOW in that it is distinguished by | |
| 2354 | + * UL/DL included in the PSC. | |
| 2355 | + * There are differences in the data included based on Downlink/Uplink, | |
| 2356 | + * and can be used to distinguish packets. | |
| 2357 | + * The functions described so far are useful when you want to | |
| 2358 | + * handle communication from the mobile network in UPF, PGW, etc. | |
| 2359 | + */ | |
| 2360 | + GTPU_UL_V4_FLOW = 0x1b, /* hash only */ | |
| 2361 | + GTPU_UL_V6_FLOW = 0x1c, /* hash only */ | |
| 2362 | + GTPU_DL_V4_FLOW = 0x1d, /* hash only */ | |
| 2363 | + GTPU_DL_V6_FLOW = 0x1e, /* hash only */ | |
| 2364 | + | |
| 2365 | + __FLOW_TYPE_COUNT, | |
| 2366 | +}; | |
| 2363 | 2367 | |
| 2364 | 2368 | /* Flag to enable additional fields in struct ethtool_rx_flow_spec */ |
| 2365 | 2369 | #define FLOW_EXT 0x80000000 |
| @@ -37,6 +37,18 @@ enum ethtool_tcp_data_split { · 36 unmodified lines | ||
| 37 | 37 | ETHTOOL_TCP_DATA_SPLIT_ENABLED, |
| 38 | 38 | }; |
| 39 | 39 | |
| 40 | +/** | |
| 41 | + * enum hwtstamp_source - Source of the hardware timestamp | |
| 42 | + * @HWTSTAMP_SOURCE_NETDEV: Hardware timestamp comes from a MAC or a device | |
| 43 | + * which has MAC and PHY integrated | |
| 44 | + * @HWTSTAMP_SOURCE_PHYLIB: Hardware timestamp comes from one PHY device of the | |
| 45 | + * network topology | |
| 46 | + */ | |
| 47 | +enum hwtstamp_source { | |
| 48 | + HWTSTAMP_SOURCE_NETDEV = 1, | |
| 49 | + HWTSTAMP_SOURCE_PHYLIB, | |
| 50 | +}; | |
| 51 | + | |
| 40 | 52 | enum { |
| 41 | 53 | ETHTOOL_A_HEADER_UNSPEC, |
| 42 | 54 | ETHTOOL_A_HEADER_DEV_INDEX, |
| @@ -401,6 +413,8 @@ enum { · 358 unmodified lines | ||
| 401 | 413 | ETHTOOL_A_TSINFO_PHC_INDEX, |
| 402 | 414 | ETHTOOL_A_TSINFO_STATS, |
| 403 | 415 | ETHTOOL_A_TSINFO_HWTSTAMP_PROVIDER, |
| 416 | + ETHTOOL_A_TSINFO_HWTSTAMP_SOURCE, | |
| 417 | + ETHTOOL_A_TSINFO_HWTSTAMP_PHYINDEX, | |
| 404 | 418 | |
| 405 | 419 | __ETHTOOL_A_TSINFO_CNT, |
| 406 | 420 | ETHTOOL_A_TSINFO_MAX = (__ETHTOOL_A_TSINFO_CNT - 1) |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | −#ifndef __LINUX_FIB_RULES_H | |
| 3 | −#define __LINUX_FIB_RULES_H | |
| 2 | +#ifndef _UAPI__LINUX_FIB_RULES_H | |
| 3 | +#define _UAPI__LINUX_FIB_RULES_H | |
| 4 | 4 | |
| 5 | 5 | #include <linux/types.h> |
| 6 | 6 | #include <linux/rtnetlink.h> |
| @@ -361,6 +361,7 @@ typedef int __bitwise __kernel_rwf_t; · 360 unmodified lines | ||
| 361 | 361 | #define PAGE_IS_PFNZERO (1 << 5) |
| 362 | 362 | #define PAGE_IS_HUGE (1 << 6) |
| 363 | 363 | #define PAGE_IS_SOFT_DIRTY (1 << 7) |
| 364 | +#define PAGE_IS_GUARD (1 << 8) | |
| 364 | 365 | |
| 365 | 366 | /* |
| 366 | 367 | * struct page_region - Page region with flags |
| @@ -119,7 +119,7 @@ struct fscrypt_key_specifier { · 118 unmodified lines | ||
| 119 | 119 | */ |
| 120 | 120 | struct fscrypt_provisioning_key_payload { |
| 121 | 121 | __u32 type; |
| 122 | − __u32 __reserved; | |
| 122 | + __u32 flags; | |
| 123 | 123 | __u8 raw[]; |
| 124 | 124 | }; |
| 125 | 125 | |
| @@ -128,7 +128,9 @@ struct fscrypt_add_key_arg { · 2 unmodified lines | ||
| 128 | 128 | struct fscrypt_key_specifier key_spec; |
| 129 | 129 | __u32 raw_size; |
| 130 | 130 | __u32 key_id; |
| 131 | − __u32 __reserved[8]; | |
| 131 | +#define FSCRYPT_ADD_KEY_FLAG_HW_WRAPPED 0x00000001 | |
| 132 | + __u32 flags; | |
| 133 | + __u32 __reserved[7]; | |
| 132 | 134 | __u8 raw[]; |
| 133 | 135 | }; |
| 134 | 136 | |
| @@ -232,6 +232,9 @@ · 231 unmodified lines | ||
| 232 | 232 | * |
| 233 | 233 | * 7.43 |
| 234 | 234 | * - add FUSE_REQUEST_TIMEOUT |
| 235 | + * | |
| 236 | + * 7.44 | |
| 237 | + * - add FUSE_NOTIFY_INC_EPOCH | |
| 235 | 238 | */ |
| 236 | 239 | |
| 237 | 240 | #ifndef _LINUX_FUSE_H |
| @@ -267,7 +270,7 @@ · 29 unmodified lines | ||
| 267 | 270 | #define FUSE_KERNEL_VERSION 7 |
| 268 | 271 | |
| 269 | 272 | /** Minor version number of this interface */ |
| 270 | −#define FUSE_KERNEL_MINOR_VERSION 43 | |
| 273 | +#define FUSE_KERNEL_MINOR_VERSION 44 | |
| 271 | 274 | |
| 272 | 275 | /** The node ID of the root inode */ |
| 273 | 276 | #define FUSE_ROOT_ID 1 |
| @@ -671,6 +674,7 @@ enum fuse_notify_code { · 397 unmodified lines | ||
| 671 | 674 | FUSE_NOTIFY_RETRIEVE = 5, |
| 672 | 675 | FUSE_NOTIFY_DELETE = 6, |
| 673 | 676 | FUSE_NOTIFY_RESEND = 7, |
| 677 | + FUSE_NOTIFY_INC_EPOCH = 8, | |
| 674 | 678 | FUSE_NOTIFY_CODE_MAX, |
| 675 | 679 | }; |
| 676 | 680 | |
| @@ -63,7 +63,7 @@ · 62 unmodified lines | ||
| 63 | 63 | #define FUTEX2_SIZE_U32 0x02 |
| 64 | 64 | #define FUTEX2_SIZE_U64 0x03 |
| 65 | 65 | #define FUTEX2_NUMA 0x04 |
| 66 | − /* 0x08 */ | |
| 66 | +#define FUTEX2_MPOL 0x08 | |
| 67 | 67 | /* 0x10 */ |
| 68 | 68 | /* 0x20 */ |
| 69 | 69 | /* 0x40 */ |
| @@ -74,6 +74,13 @@ · 4 unmodified lines | ||
| 74 | 74 | /* do not use */ |
| 75 | 75 | #define FUTEX_32 FUTEX2_SIZE_U32 /* historical accident :-( */ |
| 76 | 76 | |
| 77 | +/* | |
| 78 | + * When FUTEX2_NUMA doubles the futex word, the second word is a node value. | |
| 79 | + * The special value -1 indicates no-node. This is the same value as | |
| 80 | + * NUMA_NO_NODE, except that value is not ABI, this is. | |
| 81 | + */ | |
| 82 | +#define FUTEX_NO_NODE (-1) | |
| 83 | + | |
| 77 | 84 | /* |
| 78 | 85 | * Max numbers of elements in a futex_waitv array |
| 79 | 86 | */ |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | −#ifndef __LINUX_IF_ADDR_H | |
| 3 | −#define __LINUX_IF_ADDR_H | |
| 2 | +#ifndef _UAPI__LINUX_IF_ADDR_H | |
| 3 | +#define _UAPI__LINUX_IF_ADDR_H | |
| 4 | 4 | |
| 5 | 5 | #include <linux/types.h> |
| 6 | 6 | #include <linux/netlink.h> |
| @@ -8,8 +8,8 @@ · 7 unmodified lines | ||
| 8 | 8 | * YOSHIFUJI Hideaki @ USAGI/WIDE <yoshfuji@linux-ipv6.org> |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | −#ifndef __LINUX_IF_ADDRLABEL_H | |
| 12 | −#define __LINUX_IF_ADDRLABEL_H | |
| 11 | +#ifndef _UAPI__LINUX_IF_ADDRLABEL_H | |
| 12 | +#define _UAPI__LINUX_IF_ADDRLABEL_H | |
| 13 | 13 | |
| 14 | 14 | #include <linux/types.h> |
| 15 | 15 | |
| @@ -11,8 +11,8 @@ · 10 unmodified lines | ||
| 11 | 11 | * |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | −#ifndef _LINUX_IF_ALG_H | |
| 15 | −#define _LINUX_IF_ALG_H | |
| 14 | +#ifndef _UAPI_LINUX_IF_ALG_H | |
| 15 | +#define _UAPI_LINUX_IF_ALG_H | |
| 16 | 16 | |
| 17 | 17 | #include <linux/types.h> |
| 18 | 18 | |
| @@ -58,4 +58,4 @@ struct af_alg_iv { · 39 unmodified lines | ||
| 58 | 58 | #define ALG_OP_DECRYPT 0 |
| 59 | 59 | #define ALG_OP_ENCRYPT 1 |
| 60 | 60 | |
| 61 | −#endif /* _LINUX_IF_ALG_H */ | |
| 61 | +#endif /* _UAPI_LINUX_IF_ALG_H */ | |
| @@ -14,8 +14,8 @@ · 13 unmodified lines | ||
| 14 | 14 | * 2 of the License, or (at your option) any later version. |
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | −#ifndef _LINUX_IF_ARCNET_H | |
| 18 | −#define _LINUX_IF_ARCNET_H | |
| 17 | +#ifndef _UAPI_LINUX_IF_ARCNET_H | |
| 18 | +#define _UAPI_LINUX_IF_ARCNET_H | |
| 19 | 19 | |
| 20 | 20 | #include <linux/types.h> |
| 21 | 21 | #include <linux/if_ether.h> |
| @@ -127,4 +127,4 @@ struct archdr { · 105 unmodified lines | ||
| 127 | 127 | } soft; |
| 128 | 128 | }; |
| 129 | 129 | |
| 130 | −#endif /* _LINUX_IF_ARCNET_H */ | |
| 130 | +#endif /* _UAPI_LINUX_IF_ARCNET_H */ | |
| @@ -41,8 +41,8 @@ · 40 unmodified lines | ||
| 41 | 41 | * - added definitions for various XOR hashing policies |
| 42 | 42 | */ |
| 43 | 43 | |
| 44 | −#ifndef _LINUX_IF_BONDING_H | |
| 45 | −#define _LINUX_IF_BONDING_H | |
| 44 | +#ifndef _UAPI_LINUX_IF_BONDING_H | |
| 45 | +#define _UAPI_LINUX_IF_BONDING_H | |
| 46 | 46 | |
| 47 | 47 | #include <linux/if.h> |
| 48 | 48 | #include <linux/types.h> |
| @@ -152,4 +152,4 @@ enum { · 103 unmodified lines | ||
| 152 | 152 | }; |
| 153 | 153 | #define BOND_3AD_STAT_MAX (__BOND_3AD_STAT_MAX - 1) |
| 154 | 154 | |
| 155 | −#endif /* _LINUX_IF_BONDING_H */ | |
| 155 | +#endif /* _UAPI_LINUX_IF_BONDING_H */ | |
| @@ -699,10 +699,11 @@ struct br_mdb_entry { · 698 unmodified lines | ||
| 699 | 699 | #define MDB_TEMPORARY 0 |
| 700 | 700 | #define MDB_PERMANENT 1 |
| 701 | 701 | __u8 state; |
| 702 | −#define MDB_FLAGS_OFFLOAD (1 << 0) | |
| 703 | −#define MDB_FLAGS_FAST_LEAVE (1 << 1) | |
| 704 | −#define MDB_FLAGS_STAR_EXCL (1 << 2) | |
| 705 | −#define MDB_FLAGS_BLOCKED (1 << 3) | |
| 702 | +#define MDB_FLAGS_OFFLOAD (1 << 0) | |
| 703 | +#define MDB_FLAGS_FAST_LEAVE (1 << 1) | |
| 704 | +#define MDB_FLAGS_STAR_EXCL (1 << 2) | |
| 705 | +#define MDB_FLAGS_BLOCKED (1 << 3) | |
| 706 | +#define MDB_FLAGS_OFFLOAD_FAILED (1 << 4) | |
| 706 | 707 | __u8 flags; |
| 707 | 708 | __u16 vid; |
| 708 | 709 | struct { |
| @@ -830,6 +831,7 @@ enum br_boolopt_id { · 121 unmodified lines | ||
| 830 | 831 | BR_BOOLOPT_NO_LL_LEARN, |
| 831 | 832 | BR_BOOLOPT_MCAST_VLAN_SNOOPING, |
| 832 | 833 | BR_BOOLOPT_MST_ENABLE, |
| 834 | + BR_BOOLOPT_MDB_OFFLOAD_FAIL_NOTIFICATION, | |
| 833 | 835 | BR_BOOLOPT_MAX |
| 834 | 836 | }; |
| 835 | 837 | |
| @@ -18,8 +18,8 @@ · 17 unmodified lines | ||
| 18 | 18 | * as published by the Free Software Foundation; either version |
| 19 | 19 | * 2 of the License, or (at your option) any later version. |
| 20 | 20 | */ |
| 21 | −#ifndef _LINUX_IF_FC_H | |
| 22 | −#define _LINUX_IF_FC_H | |
| 21 | +#ifndef _UAPI_LINUX_IF_FC_H | |
| 22 | +#define _UAPI_LINUX_IF_FC_H | |
| 23 | 23 | |
| 24 | 24 | #include <linux/types.h> |
| 25 | 25 | |
| @@ -49,4 +49,4 @@ struct fcllc { · 23 unmodified lines | ||
| 49 | 49 | __be16 ethertype; /* ether type field */ |
| 50 | 50 | }; |
| 51 | 51 | |
| 52 | −#endif /* _LINUX_IF_FC_H */ | |
| 52 | +#endif /* _UAPI_LINUX_IF_FC_H */ | |
| @@ -20,8 +20,8 @@ · 19 unmodified lines | ||
| 20 | 20 | * 2 of the License, or (at your option) any later version. |
| 21 | 21 | */ |
| 22 | 22 | |
| 23 | −#ifndef _LINUX_IF_HIPPI_H | |
| 24 | −#define _LINUX_IF_HIPPI_H | |
| 23 | +#ifndef _UAPI_LINUX_IF_HIPPI_H | |
| 24 | +#define _UAPI_LINUX_IF_HIPPI_H | |
| 25 | 25 | |
| 26 | 26 | #include <linux/types.h> |
| 27 | 27 | #include <asm/byteorder.h> |
| @@ -151,4 +151,4 @@ struct hippi_hdr { · 123 unmodified lines | ||
| 151 | 151 | struct hippi_snap_hdr snap; |
| 152 | 152 | } __attribute__((packed)); |
| 153 | 153 | |
| 154 | −#endif /* _LINUX_IF_HIPPI_H */ | |
| 154 | +#endif /* _UAPI_LINUX_IF_HIPPI_H */ | |
| @@ -1986,4 +1986,19 @@ enum { · 1985 unmodified lines | ||
| 1986 | 1986 | |
| 1987 | 1987 | #define IFLA_DSA_MAX (__IFLA_DSA_MAX - 1) |
| 1988 | 1988 | |
| 1989 | +/* OVPN section */ | |
| 1990 | + | |
| 1991 | +enum ovpn_mode { | |
| 1992 | + OVPN_MODE_P2P, | |
| 1993 | + OVPN_MODE_MP, | |
| 1994 | +}; | |
| 1995 | + | |
| 1996 | +enum { | |
| 1997 | + IFLA_OVPN_UNSPEC, | |
| 1998 | + IFLA_OVPN_MODE, | |
| 1999 | + __IFLA_OVPN_MAX, | |
| 2000 | +}; | |
| 2001 | + | |
| 2002 | +#define IFLA_OVPN_MAX (__IFLA_OVPN_MAX - 1) | |
| 2003 | + | |
| 1989 | 2004 | #endif /* _UAPI_LINUX_IF_LINK_H */ |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | −#ifndef __LINUX_IF_PACKET_H | |
| 3 | −#define __LINUX_IF_PACKET_H | |
| 2 | +#ifndef _UAPI__LINUX_IF_PACKET_H | |
| 3 | +#define _UAPI__LINUX_IF_PACKET_H | |
| 4 | 4 | |
| 5 | 5 | #include <asm/byteorder.h> |
| 6 | 6 | #include <linux/types.h> |
| @@ -9,8 +9,8 @@ · 8 unmodified lines | ||
| 9 | 9 | * |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | −#ifndef _LINUX_IF_PLIP_H | |
| 13 | −#define _LINUX_IF_PLIP_H | |
| 12 | +#ifndef _UAPI_LINUX_IF_PLIP_H | |
| 13 | +#define _UAPI_LINUX_IF_PLIP_H | |
| 14 | 14 | |
| 15 | 15 | #include <linux/sockios.h> |
| 16 | 16 | |
| @@ -6,8 +6,8 @@ · 5 unmodified lines | ||
| 6 | 6 | * KISS TNC driver. |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | −#ifndef __LINUX_SLIP_H | |
| 10 | −#define __LINUX_SLIP_H | |
| 9 | +#ifndef _UAPI__LINUX_SLIP_H | |
| 10 | +#define _UAPI__LINUX_SLIP_H | |
| 11 | 11 | |
| 12 | 12 | #define SL_MODE_SLIP 0 |
| 13 | 13 | #define SL_MODE_CSLIP 1 |
| @@ -13,8 +13,8 @@ · 12 unmodified lines | ||
| 13 | 13 | * GNU General Public License for more details. |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | −#ifndef _IF_X25_H | |
| 17 | −#define _IF_X25_H | |
| 16 | +#ifndef _UAPI_IF_X25_H | |
| 17 | +#define _UAPI_IF_X25_H | |
| 18 | 18 | |
| 19 | 19 | #include <linux/types.h> |
| 20 | 20 | |
| @@ -24,4 +24,4 @@ · 3 unmodified lines | ||
| 24 | 24 | #define X25_IFACE_DISCONNECT 0x02 |
| 25 | 25 | #define X25_IFACE_PARAMS 0x03 |
| 26 | 26 | |
| 27 | −#endif /* _IF_X25_H */ | |
| 27 | +#endif /* _UAPI_IF_X25_H */ | |
| @@ -7,8 +7,8 @@ · 6 unmodified lines | ||
| 7 | 7 | * Magnus Karlsson <magnus.karlsson@intel.com> |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | −#ifndef _LINUX_IF_XDP_H | |
| 11 | −#define _LINUX_IF_XDP_H | |
| 10 | +#ifndef _UAPI_LINUX_IF_XDP_H | |
| 11 | +#define _UAPI_LINUX_IF_XDP_H | |
| 12 | 12 | |
| 13 | 13 | #include <linux/types.h> |
| 14 | 14 | |
| @@ -180,4 +180,4 @@ struct xdp_desc { · 165 unmodified lines | ||
| 180 | 180 | /* TX packet carries valid metadata. */ |
| 181 | 181 | #define XDP_TX_METADATA (1 << 1) |
| 182 | 182 | |
| 183 | −#endif /* _LINUX_IF_XDP_H */ | |
| 183 | +#endif /* _UAPI_LINUX_IF_XDP_H */ | |
| @@ -930,7 +930,8 @@ · 929 unmodified lines | ||
| 930 | 930 | #define SW_MUTE_DEVICE 0x0e /* set = device disabled */ |
| 931 | 931 | #define SW_PEN_INSERTED 0x0f /* set = pen inserted */ |
| 932 | 932 | #define SW_MACHINE_COVER 0x10 /* set = cover closed */ |
| 933 | −#define SW_MAX 0x10 | |
| 933 | +#define SW_USB_INSERT 0x11 /* set = USB audio device connected */ | |
| 934 | +#define SW_MAX 0x11 | |
| 934 | 935 | #define SW_CNT (SW_MAX+1) |
| 935 | 936 | |
| 936 | 937 | /* |
| @@ -73,6 +73,7 @@ struct io_uring_sqe { · 72 unmodified lines | ||
| 73 | 73 | __u32 futex_flags; |
| 74 | 74 | __u32 install_fd_flags; |
| 75 | 75 | __u32 nop_flags; |
| 76 | + __u32 pipe_flags; | |
| 76 | 77 | }; |
| 77 | 78 | __u64 user_data; /* data to be passed back at completion time */ |
| 78 | 79 | /* pack this to avoid bogus arm OABI complaints */ |
| @@ -93,6 +94,10 @@ struct io_uring_sqe { · 14 unmodified lines | ||
| 93 | 94 | __u16 addr_len; |
| 94 | 95 | __u16 __pad3[1]; |
| 95 | 96 | }; |
| 97 | + struct { | |
| 98 | + __u8 write_stream; | |
| 99 | + __u8 __pad4[3]; | |
| 100 | + }; | |
| 96 | 101 | }; |
| 97 | 102 | union { |
| 98 | 103 | struct { |
| @@ -283,6 +288,7 @@ enum io_uring_op { · 184 unmodified lines | ||
| 283 | 288 | IORING_OP_EPOLL_WAIT, |
| 284 | 289 | IORING_OP_READV_FIXED, |
| 285 | 290 | IORING_OP_WRITEV_FIXED, |
| 291 | + IORING_OP_PIPE, | |
| 286 | 292 | |
| 287 | 293 | /* this goes last, obviously */ |
| 288 | 294 | IORING_OP_LAST, |
| @@ -988,12 +994,16 @@ struct io_uring_zcrx_offsets { · 699 unmodified lines | ||
| 988 | 994 | __u64 __resv[2]; |
| 989 | 995 | }; |
| 990 | 996 | |
| 997 | +enum io_uring_zcrx_area_flags { | |
| 998 | + IORING_ZCRX_AREA_DMABUF = 1, | |
| 999 | +}; | |
| 1000 | + | |
| 991 | 1001 | struct io_uring_zcrx_area_reg { |
| 992 | 1002 | __u64 addr; |
| 993 | 1003 | __u64 len; |
| 994 | 1004 | __u64 rq_area_token; |
| 995 | 1005 | __u32 flags; |
| 996 | − __u32 __resv1; | |
| 1006 | + __u32 dmabuf_fd; | |
| 997 | 1007 | __u64 __resv2[2]; |
| 998 | 1008 | }; |
| 999 | 1009 | |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | −#ifndef _IP6_TUNNEL_H | |
| 3 | −#define _IP6_TUNNEL_H | |
| 2 | +#ifndef _UAPI_IP6_TUNNEL_H | |
| 3 | +#define _UAPI_IP6_TUNNEL_H | |
| 4 | 4 | |
| 5 | 5 | #include <linux/types.h> |
| 6 | 6 | #include <linux/if.h> /* For IFNAMSIZ. */ |
| @@ -375,6 +375,30 @@ struct isst_perf_level_data_info { · 374 unmodified lines | ||
| 375 | 375 | __u16 trl_freq_mhz[TRL_MAX_LEVELS][TRL_MAX_BUCKETS]; |
| 376 | 376 | }; |
| 377 | 377 | |
| 378 | +#define MAX_FABRIC_COUNT 8 | |
| 379 | + | |
| 380 | +/** | |
| 381 | + * struct isst_perf_level_fabric_info - Structure to get SST-PP fabric details | |
| 382 | + * @socket_id: Socket/package id | |
| 383 | + * @power_domain_id: Power Domain id | |
| 384 | + * @level: SST-PP level for which caller wants to get information | |
| 385 | + * @max_fabrics: Count of fabrics in resonse | |
| 386 | + * @p0_fabric_freq_mhz: Fabric (Uncore) maximum frequency | |
| 387 | + * @p1_fabric_freq_mhz: Fabric (Uncore) TDP frequency | |
| 388 | + * @pm_fabric_freq_mhz: Fabric (Uncore) minimum frequency | |
| 389 | + * | |
| 390 | + * Structure used to get information on frequencies for fabrics. | |
| 391 | + */ | |
| 392 | +struct isst_perf_level_fabric_info { | |
| 393 | + __u8 socket_id; | |
| 394 | + __u8 power_domain_id; | |
| 395 | + __u16 level; | |
| 396 | + __u16 max_fabrics; | |
| 397 | + __u16 p0_fabric_freq_mhz[MAX_FABRIC_COUNT]; | |
| 398 | + __u16 p1_fabric_freq_mhz[MAX_FABRIC_COUNT]; | |
| 399 | + __u16 pm_fabric_freq_mhz[MAX_FABRIC_COUNT]; | |
| 400 | +}; | |
| 401 | + | |
| 378 | 402 | /** |
| 379 | 403 | * struct isst_perf_level_cpu_mask - Structure to get SST-PP level CPU mask |
| 380 | 404 | * @socket_id: Socket/package id |
| @@ -471,5 +495,7 @@ struct isst_turbo_freq_info { · 90 unmodified lines | ||
| 471 | 495 | #define ISST_IF_GET_BASE_FREQ_INFO _IOR(ISST_IF_MAGIC, 14, struct isst_base_freq_info *) |
| 472 | 496 | #define ISST_IF_GET_BASE_FREQ_CPU_MASK _IOR(ISST_IF_MAGIC, 15, struct isst_perf_level_cpu_mask *) |
| 473 | 497 | #define ISST_IF_GET_TURBO_FREQ_INFO _IOR(ISST_IF_MAGIC, 16, struct isst_turbo_freq_info *) |
| 498 | +#define ISST_IF_GET_PERF_LEVEL_FABRIC_INFO _IOR(ISST_IF_MAGIC, 17,\ | |
| 499 | + struct isst_perf_level_fabric_info *) | |
| 474 | 500 | |
| 475 | 501 | #endif |
| @@ -536,6 +536,8 @@ enum kfd_smi_event { · 535 unmodified lines | ||
| 536 | 536 | KFD_SMI_EVENT_QUEUE_EVICTION = 9, |
| 537 | 537 | KFD_SMI_EVENT_QUEUE_RESTORE = 10, |
| 538 | 538 | KFD_SMI_EVENT_UNMAP_FROM_GPU = 11, |
| 539 | + KFD_SMI_EVENT_PROCESS_START = 12, | |
| 540 | + KFD_SMI_EVENT_PROCESS_END = 13, | |
| 539 | 541 | |
| 540 | 542 | /* |
| 541 | 543 | * max event number, as a flag bit to get events from all processes, |
| @@ -651,6 +653,9 @@ struct kfd_ioctl_smi_events_args { · 109 unmodified lines | ||
| 651 | 653 | "%lld -%d @%lx(%lx) %x %d\n", (ns), (pid), (addr), (size),\ |
| 652 | 654 | (node), (unmap_trigger) |
| 653 | 655 | |
| 656 | +#define KFD_EVENT_FMT_PROCESS(pid, task_name)\ | |
| 657 | + "%x %s\n", (pid), (task_name) | |
| 658 | + | |
| 654 | 659 | /************************************************************************************************** |
| 655 | 660 | * CRIU IOCTLs (Checkpoint Restore In Userspace) |
| 656 | 661 | * |
| @@ -375,6 +375,7 @@ struct kvm_run { · 374 unmodified lines | ||
| 375 | 375 | #define KVM_SYSTEM_EVENT_WAKEUP 4 |
| 376 | 376 | #define KVM_SYSTEM_EVENT_SUSPEND 5 |
| 377 | 377 | #define KVM_SYSTEM_EVENT_SEV_TERM 6 |
| 378 | +#define KVM_SYSTEM_EVENT_TDX_FATAL 7 | |
| 378 | 379 | __u32 type; |
| 379 | 380 | __u32 ndata; |
| 380 | 381 | union { |
| @@ -930,6 +931,9 @@ struct kvm_enable_cap { · 549 unmodified lines | ||
| 930 | 931 | #define KVM_CAP_X86_APIC_BUS_CYCLES_NS 237 |
| 931 | 932 | #define KVM_CAP_X86_GUEST_MODE 238 |
| 932 | 933 | #define KVM_CAP_ARM_WRITABLE_IMP_ID_REGS 239 |
| 934 | +#define KVM_CAP_ARM_EL2 240 | |
| 935 | +#define KVM_CAP_ARM_EL2_E2H0 241 | |
| 936 | +#define KVM_CAP_RISCV_MP_STATE_RESET 242 | |
| 933 | 937 | |
| 934 | 938 | struct kvm_irq_routing_irqchip { |
| 935 | 939 | __u32 irqchip; |
| @@ -0,0 +1,564 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ | |
| 2 | +/* | |
| 3 | + * Copyright (C) 2024 Amlogic, Inc. All rights reserved | |
| 4 | + */ | |
| 5 | + | |
| 6 | +#ifndef _UAPI_C3_ISP_CONFIG_H_ | |
| 7 | +#define _UAPI_C3_ISP_CONFIG_H_ | |
| 8 | + | |
| 9 | +#include <linux/types.h> | |
| 10 | + | |
| 11 | +/* | |
| 12 | + * Frames are split into zones of almost equal width and height - a zone is a | |
| 13 | + * rectangular tile of a frame. The metering blocks within the ISP collect | |
| 14 | + * aggregated statistics per zone. | |
| 15 | + */ | |
| 16 | +#define C3_ISP_AE_MAX_ZONES (17 * 15) | |
| 17 | +#define C3_ISP_AF_MAX_ZONES (17 * 15) | |
| 18 | +#define C3_ISP_AWB_MAX_ZONES (32 * 24) | |
| 19 | + | |
| 20 | +/* The maximum number of point on the diagonal of the frame for statistics */ | |
| 21 | +#define C3_ISP_AE_MAX_PT_NUM 18 | |
| 22 | +#define C3_ISP_AF_MAX_PT_NUM 18 | |
| 23 | +#define C3_ISP_AWB_MAX_PT_NUM 33 | |
| 24 | + | |
| 25 | +/** | |
| 26 | + * struct c3_isp_awb_zone_stats - AWB statistics of a zone | |
| 27 | + * | |
| 28 | + * AWB zone stats is aligned with 8 bytes | |
| 29 | + * | |
| 30 | + * @rg: the ratio of R / G in a zone | |
| 31 | + * @bg: the ratio of B / G in a zone | |
| 32 | + * @pixel_sum: the total number of pixels used in a zone | |
| 33 | + */ | |
| 34 | +struct c3_isp_awb_zone_stats { | |
| 35 | + __u16 rg; | |
| 36 | + __u16 bg; | |
| 37 | + __u32 pixel_sum; | |
| 38 | +}; | |
| 39 | + | |
| 40 | +/** | |
| 41 | + * struct c3_isp_awb_stats - Auto white balance statistics information. | |
| 42 | + * | |
| 43 | + * AWB statistical information of all zones. | |
| 44 | + * | |
| 45 | + * @stats: array of auto white balance statistics | |
| 46 | + */ | |
| 47 | +struct c3_isp_awb_stats { | |
| 48 | + struct c3_isp_awb_zone_stats stats[C3_ISP_AWB_MAX_ZONES]; | |
| 49 | +} __attribute__((aligned(16))); | |
| 50 | + | |
| 51 | +/** | |
| 52 | + * struct c3_isp_ae_zone_stats - AE statistics of a zone | |
| 53 | + * | |
| 54 | + * AE zone stats is aligned with 8 bytes. | |
| 55 | + * This is a 5-bin histogram and the total sum is normalized to 0xffff. | |
| 56 | + * So hist2 = 0xffff - (hist0 + hist1 + hist3 + hist4) | |
| 57 | + * | |
| 58 | + * @hist0: the global normalized pixel count for bin 0 | |
| 59 | + * @hist1: the global normalized pixel count for bin 1 | |
| 60 | + * @hist3: the global normalized pixel count for bin 3 | |
| 61 | + * @hist4: the global normalized pixel count for bin 4 | |
| 62 | + */ | |
| 63 | +struct c3_isp_ae_zone_stats { | |
| 64 | + __u16 hist0; | |
| 65 | + __u16 hist1; | |
| 66 | + __u16 hist3; | |
| 67 | + __u16 hist4; | |
| 68 | +}; | |
| 69 | + | |
| 70 | +/** | |
| 71 | + * struct c3_isp_ae_stats - Exposure statistics information | |
| 72 | + * | |
| 73 | + * AE statistical information consists of all blocks information and a 1024-bin | |
| 74 | + * histogram. | |
| 75 | + * | |
| 76 | + * @stats: array of auto exposure block statistics | |
| 77 | + * @reserved: undefined buffer space | |
| 78 | + * @hist: a 1024-bin histogram for the entire image | |
| 79 | + */ | |
| 80 | +struct c3_isp_ae_stats { | |
| 81 | + struct c3_isp_ae_zone_stats stats[C3_ISP_AE_MAX_ZONES]; | |
| 82 | + __u32 reserved[2]; | |
| 83 | + __u32 hist[1024]; | |
| 84 | +} __attribute__((aligned(16))); | |
| 85 | + | |
| 86 | +/** | |
| 87 | + * struct c3_isp_af_zone_stats - AF statistics of a zone | |
| 88 | + * | |
| 89 | + * AF zone stats is aligned with 8 bytes. | |
| 90 | + * The zonal accumulated contrast metrics are stored in floating point format | |
| 91 | + * with 16 bits mantissa and 5 or 6 bits exponent. Apart from contrast metrics | |
| 92 | + * we accumulate squared image and quartic image data over the zone. | |
| 93 | + * | |
| 94 | + * @i2_mat: the mantissa of zonal squared image pixel sum | |
| 95 | + * @i4_mat: the mantissa of zonal quartic image pixel sum | |
| 96 | + * @e4_mat: the mantissa of zonal multi-directional quartic edge sum | |
| 97 | + * @e4_exp: the exponent of zonal multi-directional quartic edge sum | |
| 98 | + * @i2_exp: the exponent of zonal squared image pixel sum | |
| 99 | + * @i4_exp: the exponent of zonal quartic image pixel sum | |
| 100 | + */ | |
| 101 | +struct c3_isp_af_zone_stats { | |
| 102 | + __u16 i2_mat; | |
| 103 | + __u16 i4_mat; | |
| 104 | + __u16 e4_mat; | |
| 105 | + __u16 e4_exp : 5; | |
| 106 | + __u16 i2_exp : 5; | |
| 107 | + __u16 i4_exp : 6; | |
| 108 | +}; | |
| 109 | + | |
| 110 | +/** | |
| 111 | + * struct c3_isp_af_stats - Auto Focus statistics information | |
| 112 | + * | |
| 113 | + * AF statistical information of each zone | |
| 114 | + * | |
| 115 | + * @stats: array of auto focus block statistics | |
| 116 | + * @reserved: undefined buffer space | |
| 117 | + */ | |
| 118 | +struct c3_isp_af_stats { | |
| 119 | + struct c3_isp_af_zone_stats stats[C3_ISP_AF_MAX_ZONES]; | |
| 120 | + __u32 reserved[2]; | |
| 121 | +} __attribute__((aligned(16))); | |
| 122 | + | |
| 123 | +/** | |
| 124 | + * struct c3_isp_stats_info - V4L2_META_FMT_C3ISP_STATS | |
| 125 | + * | |
| 126 | + * Contains ISP statistics | |
| 127 | + * | |
| 128 | + * @awb: auto white balance stats | |
| 129 | + * @ae: auto exposure stats | |
| 130 | + * @af: auto focus stats | |
| 131 | + */ | |
| 132 | +struct c3_isp_stats_info { | |
| 133 | + struct c3_isp_awb_stats awb; | |
| 134 | + struct c3_isp_ae_stats ae; | |
| 135 | + struct c3_isp_af_stats af; | |
| 136 | +}; | |
| 137 | + | |
| 138 | +/** | |
| 139 | + * enum c3_isp_params_buffer_version - C3 ISP parameters block versioning | |
| 140 | + * | |
| 141 | + * @C3_ISP_PARAMS_BUFFER_V0: First version of C3 ISP parameters block | |
| 142 | + */ | |
| 143 | +enum c3_isp_params_buffer_version { | |
| 144 | + C3_ISP_PARAMS_BUFFER_V0, | |
| 145 | +}; | |
| 146 | + | |
| 147 | +/** | |
| 148 | + * enum c3_isp_params_block_type - Enumeration of C3 ISP parameter blocks | |
| 149 | + * | |
| 150 | + * Each block configures a specific processing block of the C3 ISP. | |
| 151 | + * The block type allows the driver to correctly interpret the parameters block | |
| 152 | + * data. | |
| 153 | + * | |
| 154 | + * @C3_ISP_PARAMS_BLOCK_AWB_GAINS: White balance gains | |
| 155 | + * @C3_ISP_PARAMS_BLOCK_AWB_CONFIG: AWB statistic format configuration for all | |
| 156 | + * blocks that control how stats are generated | |
| 157 | + * @C3_ISP_PARAMS_BLOCK_AE_CONFIG: AE statistic format configuration for all | |
| 158 | + * blocks that control how stats are generated | |
| 159 | + * @C3_ISP_PARAMS_BLOCK_AF_CONFIG: AF statistic format configuration for all | |
| 160 | + * blocks that control how stats are generated | |
| 161 | + * @C3_ISP_PARAMS_BLOCK_PST_GAMMA: post gamma parameters | |
| 162 | + * @C3_ISP_PARAMS_BLOCK_CCM: Color correction matrix parameters | |
| 163 | + * @C3_ISP_PARAMS_BLOCK_CSC: Color space conversion parameters | |
| 164 | + * @C3_ISP_PARAMS_BLOCK_BLC: Black level correction parameters | |
| 165 | + * @C3_ISP_PARAMS_BLOCK_SENTINEL: First non-valid block index | |
| 166 | + */ | |
| 167 | +enum c3_isp_params_block_type { | |
| 168 | + C3_ISP_PARAMS_BLOCK_AWB_GAINS, | |
| 169 | + C3_ISP_PARAMS_BLOCK_AWB_CONFIG, | |
| 170 | + C3_ISP_PARAMS_BLOCK_AE_CONFIG, | |
| 171 | + C3_ISP_PARAMS_BLOCK_AF_CONFIG, | |
| 172 | + C3_ISP_PARAMS_BLOCK_PST_GAMMA, | |
| 173 | + C3_ISP_PARAMS_BLOCK_CCM, | |
| 174 | + C3_ISP_PARAMS_BLOCK_CSC, | |
| 175 | + C3_ISP_PARAMS_BLOCK_BLC, | |
| 176 | + C3_ISP_PARAMS_BLOCK_SENTINEL | |
| 177 | +}; | |
| 178 | + | |
| 179 | +#define C3_ISP_PARAMS_BLOCK_FL_DISABLE (1U << 0) | |
| 180 | +#define C3_ISP_PARAMS_BLOCK_FL_ENABLE (1U << 1) | |
| 181 | + | |
| 182 | +/** | |
| 183 | + * struct c3_isp_params_block_header - C3 ISP parameter block header | |
| 184 | + * | |
| 185 | + * This structure represents the common part of all the ISP configuration | |
| 186 | + * blocks. Each parameters block shall embed an instance of this structure type | |
| 187 | + * as its first member, followed by the block-specific configuration data. The | |
| 188 | + * driver inspects this common header to discern the block type and its size and | |
| 189 | + * properly handle the block content by casting it to the correct block-specific | |
| 190 | + * type. | |
| 191 | + * | |
| 192 | + * The @type field is one of the values enumerated by | |
| 193 | + * :c:type:`c3_isp_params_block_type` and specifies how the data should be | |
| 194 | + * interpreted by the driver. The @size field specifies the size of the | |
| 195 | + * parameters block and is used by the driver for validation purposes. The | |
| 196 | + * @flags field is a bitmask of per-block flags C3_ISP_PARAMS_FL*. | |
| 197 | + * | |
| 198 | + * When userspace wants to disable an ISP block the | |
| 199 | + * C3_ISP_PARAMS_BLOCK_FL_DISABLED bit should be set in the @flags field. In | |
| 200 | + * this case userspace may optionally omit the remainder of the configuration | |
| 201 | + * block, which will be ignored by the driver. | |
| 202 | + * | |
| 203 | + * When a new configuration of an ISP block needs to be applied userspace | |
| 204 | + * shall fully populate the ISP block and omit setting the | |
| 205 | + * C3_ISP_PARAMS_BLOCK_FL_DISABLED bit in the @flags field. | |
| 206 | + * | |
| 207 | + * Userspace is responsible for correctly populating the parameters block header | |
| 208 | + * fields (@type, @flags and @size) and the block-specific parameters. | |
| 209 | + * | |
| 210 | + * For example: | |
| 211 | + * | |
| 212 | + * .. code-block:: c | |
| 213 | + * | |
| 214 | + * void populate_pst_gamma(struct c3_isp_params_block_header *block) { | |
| 215 | + * struct c3_isp_params_pst_gamma *gamma = | |
| 216 | + * (struct c3_isp_params_pst_gamma *)block; | |
| 217 | + * | |
| 218 | + * gamma->header.type = C3_ISP_PARAMS_BLOCK_PST_GAMMA; | |
| 219 | + * gamma->header.flags = C3_ISP_PARAMS_BLOCK_FL_ENABLE; | |
| 220 | + * gamma->header.size = sizeof(*gamma); | |
| 221 | + * | |
| 222 | + * for (unsigned int i = 0; i < 129; i++) | |
| 223 | + * gamma->pst_gamma_lut[i] = i; | |
| 224 | + * } | |
| 225 | + * | |
| 226 | + * @type: The parameters block type from :c:type:`c3_isp_params_block_type` | |
| 227 | + * @flags: A bitmask of block flags | |
| 228 | + * @size: Size (in bytes) of the parameters block, including this header | |
| 229 | + */ | |
| 230 | +struct c3_isp_params_block_header { | |
| 231 | + __u16 type; | |
| 232 | + __u16 flags; | |
| 233 | + __u32 size; | |
| 234 | +}; | |
| 235 | + | |
| 236 | +/** | |
| 237 | + * struct c3_isp_params_awb_gains - Gains for auto-white balance | |
| 238 | + * | |
| 239 | + * This struct allows users to configure the gains for white balance. | |
| 240 | + * There are four gain settings corresponding to each colour channel in | |
| 241 | + * the bayer domain. All of the gains are stored in Q4.8 format. | |
| 242 | + * | |
| 243 | + * header.type should be set to C3_ISP_PARAMS_BLOCK_AWB_GAINS | |
| 244 | + * from :c:type:`c3_isp_params_block_type` | |
| 245 | + * | |
| 246 | + * @header: The C3 ISP parameters block header | |
| 247 | + * @gr_gain: Multiplier for Gr channel (Q4.8 format) | |
| 248 | + * @r_gain: Multiplier for R channel (Q4.8 format) | |
| 249 | + * @b_gain: Multiplier for B channel (Q4.8 format) | |
| 250 | + * @gb_gain: Multiplier for Gb channel (Q4.8 format) | |
| 251 | + */ | |
| 252 | +struct c3_isp_params_awb_gains { | |
| 253 | + struct c3_isp_params_block_header header; | |
| 254 | + __u16 gr_gain; | |
| 255 | + __u16 r_gain; | |
| 256 | + __u16 b_gain; | |
| 257 | + __u16 gb_gain; | |
| 258 | +} __attribute__((aligned(8))); | |
| 259 | + | |
| 260 | +/** | |
| 261 | + * enum c3_isp_params_awb_tap_points - Tap points for the AWB statistics | |
| 262 | + * @C3_ISP_AWB_STATS_TAP_OFE: immediately after the optical frontend block | |
| 263 | + * @C3_ISP_AWB_STATS_TAP_GE: immediately after the green equal block | |
| 264 | + * @C3_ISP_AWB_STATS_TAP_BEFORE_WB: immediately before the white balance block | |
| 265 | + * @C3_ISP_AWB_STATS_TAP_AFTER_WB: immediately after the white balance block | |
| 266 | + */ | |
| 267 | +enum c3_isp_params_awb_tap_points { | |
| 268 | + C3_ISP_AWB_STATS_TAP_OFE = 0, | |
| 269 | + C3_ISP_AWB_STATS_TAP_GE, | |
| 270 | + C3_ISP_AWB_STATS_TAP_BEFORE_WB, | |
| 271 | + C3_ISP_AWB_STATS_TAP_AFTER_WB, | |
| 272 | +}; | |
| 273 | + | |
| 274 | +/** | |
| 275 | + * struct c3_isp_params_awb_config - Stats settings for auto-white balance | |
| 276 | + * | |
| 277 | + * This struct allows the configuration of the statistics generated for auto | |
| 278 | + * white balance. | |
| 279 | + * | |
| 280 | + * header.type should be set to C3_ISP_PARAMS_BLOCK_AWB_CONFIG | |
| 281 | + * from :c:type:`c3_isp_params_block_type` | |
| 282 | + * | |
| 283 | + * @header: the C3 ISP parameters block header | |
| 284 | + * @tap_point: the tap point from enum c3_isp_params_awb_tap_point | |
| 285 | + * @satur_vald: AWB statistic over saturation control | |
| 286 | + * value: 0: disable, 1: enable | |
| 287 | + * @horiz_zones_num: active number of hotizontal zones [0..32] | |
| 288 | + * @vert_zones_num: active number of vertical zones [0..24] | |
| 289 | + * @rg_min: minimum R/G ratio (Q4.8 format) | |
| 290 | + * @rg_max: maximum R/G ratio (Q4.8 format) | |
| 291 | + * @bg_min: minimum B/G ratio (Q4.8 format) | |
| 292 | + * @bg_max: maximum B/G ratio (Q4.8 format) | |
| 293 | + * @rg_low: R/G ratio trim low (Q4.8 format) | |
| 294 | + * @rg_high: R/G ratio trim hight (Q4.8 format) | |
| 295 | + * @bg_low: B/G ratio trim low (Q4.8 format) | |
| 296 | + * @bg_high: B/G ratio trim high (Q4.8 format) | |
| 297 | + * @zone_weight: array of weights for AWB statistics zones [0..15] | |
| 298 | + * @horiz_coord: the horizontal coordinate of points on the diagonal [0..2888] | |
| 299 | + * @vert_coord: the vertical coordinate of points on the diagonal [0..2240] | |
| 300 | + */ | |
| 301 | +struct c3_isp_params_awb_config { | |
| 302 | + struct c3_isp_params_block_header header; | |
| 303 | + __u8 tap_point; | |
| 304 | + __u8 satur_vald; | |
| 305 | + __u8 horiz_zones_num; | |
| 306 | + __u8 vert_zones_num; | |
| 307 | + __u16 rg_min; | |
| 308 | + __u16 rg_max; | |
| 309 | + __u16 bg_min; | |
| 310 | + __u16 bg_max; | |
| 311 | + __u16 rg_low; | |
| 312 | + __u16 rg_high; | |
| 313 | + __u16 bg_low; | |
| 314 | + __u16 bg_high; | |
| 315 | + __u8 zone_weight[C3_ISP_AWB_MAX_ZONES]; | |
| 316 | + __u16 horiz_coord[C3_ISP_AWB_MAX_PT_NUM]; | |
| 317 | + __u16 vert_coord[C3_ISP_AWB_MAX_PT_NUM]; | |
| 318 | +} __attribute__((aligned(8))); | |
| 319 | + | |
| 320 | +/** | |
| 321 | + * enum c3_isp_params_ae_tap_points - Tap points for the AE statistics | |
| 322 | + * @C3_ISP_AE_STATS_TAP_GE: immediately after the green equal block | |
| 323 | + * @C3_ISP_AE_STATS_TAP_MLS: immediately after the mesh lens shading block | |
| 324 | + */ | |
| 325 | +enum c3_isp_params_ae_tap_points { | |
| 326 | + C3_ISP_AE_STATS_TAP_GE = 0, | |
| 327 | + C3_ISP_AE_STATS_TAP_MLS, | |
| 328 | +}; | |
| 329 | + | |
| 330 | +/** | |
| 331 | + * struct c3_isp_params_ae_config - Stats settings for auto-exposure | |
| 332 | + * | |
| 333 | + * This struct allows the configuration of the statistics generated for | |
| 334 | + * auto exposure. | |
| 335 | + * | |
| 336 | + * header.type should be set to C3_ISP_PARAMS_BLOCK_AE_CONFIG | |
| 337 | + * from :c:type:`c3_isp_params_block_type` | |
| 338 | + * | |
| 339 | + * @header: the C3 ISP parameters block header | |
| 340 | + * @horiz_zones_num: active number of horizontal zones [0..17] | |
| 341 | + * @vert_zones_num: active number of vertical zones [0..15] | |
| 342 | + * @tap_point: the tap point from enum c3_isp_params_ae_tap_point | |
| 343 | + * @zone_weight: array of weights for AE statistics zones [0..15] | |
| 344 | + * @horiz_coord: the horizontal coordinate of points on the diagonal [0..2888] | |
| 345 | + * @vert_coord: the vertical coordinate of points on the diagonal [0..2240] | |
| 346 | + * @reserved: applications must zero this array | |
| 347 | + */ | |
| 348 | +struct c3_isp_params_ae_config { | |
| 349 | + struct c3_isp_params_block_header header; | |
| 350 | + __u8 tap_point; | |
| 351 | + __u8 horiz_zones_num; | |
| 352 | + __u8 vert_zones_num; | |
| 353 | + __u8 zone_weight[C3_ISP_AE_MAX_ZONES]; | |
| 354 | + __u16 horiz_coord[C3_ISP_AE_MAX_PT_NUM]; | |
| 355 | + __u16 vert_coord[C3_ISP_AE_MAX_PT_NUM]; | |
| 356 | + __u16 reserved[3]; | |
| 357 | +} __attribute__((aligned(8))); | |
| 358 | + | |
| 359 | +/** | |
| 360 | + * enum c3_isp_params_af_tap_points - Tap points for the AF statistics | |
| 361 | + * @C3_ISP_AF_STATS_TAP_SNR: immediately after the spatial noise reduce block | |
| 362 | + * @C3_ISP_AF_STATS_TAP_DMS: immediately after the demosaic block | |
| 363 | + */ | |
| 364 | +enum c3_isp_params_af_tap_points { | |
| 365 | + C3_ISP_AF_STATS_TAP_SNR = 0, | |
| 366 | + C3_ISP_AF_STATS_TAP_DMS, | |
| 367 | +}; | |
| 368 | + | |
| 369 | +/** | |
| 370 | + * struct c3_isp_params_af_config - Stats settings for auto-focus | |
| 371 | + * | |
| 372 | + * This struct allows the configuration of the statistics generated for | |
| 373 | + * auto focus. | |
| 374 | + * | |
| 375 | + * header.type should be set to C3_ISP_PARAMS_BLOCK_AF_CONFIG | |
| 376 | + * from :c:type:`c3_isp_params_block_type` | |
| 377 | + * | |
| 378 | + * @header: the C3 ISP parameters block header | |
| 379 | + * @tap_point: the tap point from enum c3_isp_params_af_tap_point | |
| 380 | + * @horiz_zones_num: active number of hotizontal zones [0..17] | |
| 381 | + * @vert_zones_num: active number of vertical zones [0..15] | |
| 382 | + * @reserved: applications must zero this array | |
| 383 | + * @horiz_coord: the horizontal coordinate of points on the diagonal [0..2888] | |
| 384 | + * @vert_coord: the vertical coordinate of points on the diagonal [0..2240] | |
| 385 | + */ | |
| 386 | +struct c3_isp_params_af_config { | |
| 387 | + struct c3_isp_params_block_header header; | |
| 388 | + __u8 tap_point; | |
| 389 | + __u8 horiz_zones_num; | |
| 390 | + __u8 vert_zones_num; | |
| 391 | + __u8 reserved[5]; | |
| 392 | + __u16 horiz_coord[C3_ISP_AF_MAX_PT_NUM]; | |
| 393 | + __u16 vert_coord[C3_ISP_AF_MAX_PT_NUM]; | |
| 394 | +} __attribute__((aligned(8))); | |
| 395 | + | |
| 396 | +/** | |
| 397 | + * struct c3_isp_params_pst_gamma - Post gamma configuration | |
| 398 | + * | |
| 399 | + * This struct allows the configuration of the look up table for | |
| 400 | + * post gamma. The gamma curve consists of 129 points, so need to | |
| 401 | + * set lut[129]. | |
| 402 | + * | |
| 403 | + * header.type should be set to C3_ISP_PARAMS_BLOCK_PST_GAMMA | |
| 404 | + * from :c:type:`c3_isp_params_block_type` | |
| 405 | + * | |
| 406 | + * @header: the C3 ISP parameters block header | |
| 407 | + * @lut: lookup table for P-Stitch gamma [0..1023] | |
| 408 | + * @reserved: applications must zero this array | |
| 409 | + */ | |
| 410 | +struct c3_isp_params_pst_gamma { | |
| 411 | + struct c3_isp_params_block_header header; | |
| 412 | + __u16 lut[129]; | |
| 413 | + __u16 reserved[3]; | |
| 414 | +} __attribute__((aligned(8))); | |
| 415 | + | |
| 416 | +/** | |
| 417 | + * struct c3_isp_params_ccm - ISP CCM configuration | |
| 418 | + * | |
| 419 | + * This struct allows the configuration of the matrix for | |
| 420 | + * color correction. The matrix consists of 3 x 3 points, | |
| 421 | + * so need to set matrix[3][3]. | |
| 422 | + * | |
| 423 | + * header.type should be set to C3_ISP_PARAMS_BLOCK_CCM | |
| 424 | + * from :c:type:`c3_isp_params_block_type` | |
| 425 | + * | |
| 426 | + * @header: the C3 ISP parameters block header | |
| 427 | + * @matrix: a 3 x 3 matrix used for color correction, | |
| 428 | + * the value of matrix[x][y] is orig_value x 256. [-4096..4095] | |
| 429 | + * @reserved: applications must zero this array | |
| 430 | + */ | |
| 431 | +struct c3_isp_params_ccm { | |
| 432 | + struct c3_isp_params_block_header header; | |
| 433 | + __s16 matrix[3][3]; | |
| 434 | + __u16 reserved[3]; | |
| 435 | +} __attribute__((aligned(8))); | |
| 436 | + | |
| 437 | +/** | |
| 438 | + * struct c3_isp_params_csc - ISP Color Space Conversion configuration | |
| 439 | + * | |
| 440 | + * This struct allows the configuration of the matrix for color space | |
| 441 | + * conversion. The matrix consists of 3 x 3 points, so need to set matrix[3][3]. | |
| 442 | + * | |
| 443 | + * header.type should be set to C3_ISP_PARAMS_BLOCK_CSC | |
| 444 | + * from :c:type:`c3_isp_params_block_type` | |
| 445 | + * | |
| 446 | + * @header: the C3 ISP parameters block header | |
| 447 | + * @matrix: a 3x3 matrix used for the color space conversion, | |
| 448 | + * the value of matrix[x][y] is orig_value x 256. [-4096..4095] | |
| 449 | + * @reserved: applications must zero this array | |
| 450 | + */ | |
| 451 | +struct c3_isp_params_csc { | |
| 452 | + struct c3_isp_params_block_header header; | |
| 453 | + __s16 matrix[3][3]; | |
| 454 | + __u16 reserved[3]; | |
| 455 | +} __attribute__((aligned(8))); | |
| 456 | + | |
| 457 | +/** | |
| 458 | + * struct c3_isp_params_blc - ISP Black Level Correction configuration | |
| 459 | + * | |
| 460 | + * This struct allows the configuration of the block level offset for each | |
| 461 | + * color channel. | |
| 462 | + * | |
| 463 | + * header.type should be set to C3_ISP_PARAMS_BLOCK_BLC | |
| 464 | + * from :c:type:`c3_isp_params_block_type` | |
| 465 | + * | |
| 466 | + * @header: the C3 ISP parameters block header | |
| 467 | + * @gr_ofst: Gr blc offset (Q4.12 format) | |
| 468 | + * @r_ofst: R blc offset (Q4.12 format) | |
| 469 | + * @b_ofst: B blc offset (Q4.12 format) | |
| 470 | + * @gb_ofst: Gb blc offset(Q4.12 format) | |
| 471 | + */ | |
| 472 | +struct c3_isp_params_blc { | |
| 473 | + struct c3_isp_params_block_header header; | |
| 474 | + __u16 gr_ofst; | |
| 475 | + __u16 r_ofst; | |
| 476 | + __u16 b_ofst; | |
| 477 | + __u16 gb_ofst; | |
| 478 | +}; | |
| 479 | + | |
| 480 | +/** | |
| 481 | + * define C3_ISP_PARAMS_MAX_SIZE - Maximum size of all C3 ISP Parameters | |
| 482 | + * | |
| 483 | + * Though the parameters for the C3 ISP are passed as optional blocks, the | |
| 484 | + * driver still needs to know the absolute maximum size so that it can allocate | |
| 485 | + * a buffer sized appropriately to accommodate userspace attempting to set all | |
| 486 | + * possible parameters in a single frame. | |
| 487 | + */ | |
| 488 | +#define C3_ISP_PARAMS_MAX_SIZE \ | |
| 489 | + (sizeof(struct c3_isp_params_awb_gains) + \ | |
| 490 | + sizeof(struct c3_isp_params_awb_config) + \ | |
| 491 | + sizeof(struct c3_isp_params_ae_config) + \ | |
| 492 | + sizeof(struct c3_isp_params_af_config) + \ | |
| 493 | + sizeof(struct c3_isp_params_pst_gamma) + \ | |
| 494 | + sizeof(struct c3_isp_params_ccm) + \ | |
| 495 | + sizeof(struct c3_isp_params_csc) + \ | |
| 496 | + sizeof(struct c3_isp_params_blc)) | |
| 497 | + | |
| 498 | +/** | |
| 499 | + * struct c3_isp_params_cfg - C3 ISP configuration parameters | |
| 500 | + * | |
| 501 | + * This struct contains the configuration parameters of the C3 ISP | |
| 502 | + * algorithms, serialized by userspace into an opaque data buffer. Each | |
| 503 | + * configuration parameter block is represented by a block-specific structure | |
| 504 | + * which contains a :c:type:`c3_isp_param_block_header` entry as first | |
| 505 | + * member. Userspace populates the @data buffer with configuration parameters | |
| 506 | + * for the blocks that it intends to configure. As a consequence, the data | |
| 507 | + * buffer effective size changes according to the number of ISP blocks that | |
| 508 | + * userspace intends to configure. | |
| 509 | + * | |
| 510 | + * The parameters buffer is versioned by the @version field to allow modifying | |
| 511 | + * and extending its definition. Userspace should populate the @version field to | |
| 512 | + * inform the driver about the version it intends to use. The driver will parse | |
| 513 | + * and handle the @data buffer according to the data layout specific to the | |
| 514 | + * indicated revision and return an error if the desired revision is not | |
| 515 | + * supported. | |
| 516 | + * | |
| 517 | + * For each ISP block that userspace wants to configure, a block-specific | |
| 518 | + * structure is appended to the @data buffer, one after the other without gaps | |
| 519 | + * in between nor overlaps. Userspace shall populate the @total_size field with | |
| 520 | + * the effective size, in bytes, of the @data buffer. | |
| 521 | + * | |
| 522 | + * The expected memory layout of the parameters buffer is:: | |
| 523 | + * | |
| 524 | + * +-------------------- struct c3_isp_params_cfg ---- ------------------+ | |
| 525 | + * | version = C3_ISP_PARAM_BUFFER_V0; | | |
| 526 | + * | data_size = sizeof(struct c3_isp_params_awb_gains) + | | |
| 527 | + * | sizeof(struct c3_isp_params_awb_config); | | |
| 528 | + * | +------------------------- data ---------------------------------+ | | |
| 529 | + * | | +------------ struct c3_isp_params_awb_gains) ------------------+ | | |
| 530 | + * | | | +--------- struct c3_isp_params_block_header header -----+ | | | | |
| 531 | + * | | | | type = C3_ISP_PARAMS_BLOCK_AWB_GAINS; | | | | | |
| 532 | + * | | | | flags = C3_ISP_PARAMS_BLOCK_FL_NONE; | | | | | |
| 533 | + * | | | | size = sizeof(struct c3_isp_params_awb_gains); | | | | | |
| 534 | + * | | | +---------------------------------------------------------+ | | | | |
| 535 | + * | | | gr_gain = ...; | | | | |
| 536 | + * | | | r_gain = ...; | | | | |
| 537 | + * | | | b_gain = ...; | | | | |
| 538 | + * | | | gb_gain = ...; | | | | |
| 539 | + * | | +------------------ struct c3_isp_params_awb_config ----------+ | | | |
| 540 | + * | | | +---------- struct c3_isp_param_block_header header ------+ | | | | |
| 541 | + * | | | | type = C3_ISP_PARAMS_BLOCK_AWB_CONFIG; | | | | | |
| 542 | + * | | | | flags = C3_ISP_PARAMS_BLOCK_FL_NONE; | | | | | |
| 543 | + * | | | | size = sizeof(struct c3_isp_params_awb_config) | | | | | |
| 544 | + * | | | +---------------------------------------------------------+ | | | | |
| 545 | + * | | | tap_point = ...; | | | | |
| 546 | + * | | | satur_vald = ...; | | | | |
| 547 | + * | | | horiz_zones_num = ...; | | | | |
| 548 | + * | | | vert_zones_num = ...; | | | | |
| 549 | + * | | +-------------------------------------------------------------+ | | | |
| 550 | + * | +-----------------------------------------------------------------+ | | |
| 551 | + * +---------------------------------------------------------------------+ | |
| 552 | + * | |
| 553 | + * @version: The C3 ISP parameters buffer version | |
| 554 | + * @data_size: The C3 ISP configuration data effective size, excluding this | |
| 555 | + * header | |
| 556 | + * @data: The C3 ISP configuration blocks data | |
| 557 | + */ | |
| 558 | +struct c3_isp_params_cfg { | |
| 559 | + __u32 version; | |
| 560 | + __u32 data_size; | |
| 561 | + __u8 data[C3_ISP_PARAMS_MAX_SIZE]; | |
| 562 | +}; | |
| 563 | + | |
| 564 | +#endif | |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | −#ifndef __LINUX_NEIGHBOUR_H | |
| 3 | −#define __LINUX_NEIGHBOUR_H | |
| 2 | +#ifndef _UAPI__LINUX_NEIGHBOUR_H | |
| 3 | +#define _UAPI__LINUX_NEIGHBOUR_H | |
| 4 | 4 | |
| 5 | 5 | #include <linux/types.h> |
| 6 | 6 | #include <linux/netlink.h> |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | −#ifndef __NET_DROPMON_H | |
| 3 | −#define __NET_DROPMON_H | |
| 2 | +#ifndef _UAPI__NET_DROPMON_H | |
| 3 | +#define _UAPI__NET_DROPMON_H | |
| 4 | 4 | |
| 5 | 5 | #include <linux/types.h> |
| 6 | 6 | #include <linux/netlink.h> |
| @@ -7,8 +7,8 @@ · 6 unmodified lines | ||
| 7 | 7 | * |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | −#ifndef _NET_TIMESTAMPING_H | |
| 11 | −#define _NET_TIMESTAMPING_H | |
| 10 | +#ifndef _UAPI_NET_TIMESTAMPING_H | |
| 11 | +#define _UAPI_NET_TIMESTAMPING_H | |
| 12 | 12 | |
| 13 | 13 | #include <linux/types.h> |
| 14 | 14 | #include <linux/socket.h> /* for SO_TIMESTAMPING */ |
| @@ -216,4 +216,4 @@ struct sock_txtime { · 201 unmodified lines | ||
| 216 | 216 | __u32 flags; /* as defined by enum txtime_flags */ |
| 217 | 217 | }; |
| 218 | 218 | |
| 219 | −#endif /* _NET_TIMESTAMPING_H */ | |
| 219 | +#endif /* _UAPI_NET_TIMESTAMPING_H */ | |
| @@ -219,6 +219,7 @@ enum { · 218 unmodified lines | ||
| 219 | 219 | NETDEV_CMD_QSTATS_GET, |
| 220 | 220 | NETDEV_CMD_BIND_RX, |
| 221 | 221 | NETDEV_CMD_NAPI_SET, |
| 222 | + NETDEV_CMD_BIND_TX, | |
| 222 | 223 | |
| 223 | 224 | __NETDEV_CMD_MAX, |
| 224 | 225 | NETDEV_CMD_MAX = (__NETDEV_CMD_MAX - 1) |
| @@ -142,6 +142,8 @@ enum nf_tables_msg_types { · 141 unmodified lines | ||
| 142 | 142 | NFT_MSG_DESTROYOBJ, |
| 143 | 143 | NFT_MSG_DESTROYFLOWTABLE, |
| 144 | 144 | NFT_MSG_GETSETELEM_RESET, |
| 145 | + NFT_MSG_NEWDEV, | |
| 146 | + NFT_MSG_DELDEV, | |
| 145 | 147 | NFT_MSG_MAX, |
| 146 | 148 | }; |
| 147 | 149 | |
| @@ -394,6 +396,8 @@ enum nft_set_field_attributes { · 246 unmodified lines | ||
| 394 | 396 | * @NFTA_SET_HANDLE: set handle (NLA_U64) |
| 395 | 397 | * @NFTA_SET_EXPR: set expression (NLA_NESTED: nft_expr_attributes) |
| 396 | 398 | * @NFTA_SET_EXPRESSIONS: list of expressions (NLA_NESTED: nft_list_attributes) |
| 399 | + * @NFTA_SET_TYPE: set backend type (NLA_STRING) | |
| 400 | + * @NFTA_SET_COUNT: number of set elements (NLA_U32) | |
| 397 | 401 | */ |
| 398 | 402 | enum nft_set_attributes { |
| 399 | 403 | NFTA_SET_UNSPEC, |
| @@ -415,6 +419,8 @@ enum nft_set_attributes { · 15 unmodified lines | ||
| 415 | 419 | NFTA_SET_HANDLE, |
| 416 | 420 | NFTA_SET_EXPR, |
| 417 | 421 | NFTA_SET_EXPRESSIONS, |
| 422 | + NFTA_SET_TYPE, | |
| 423 | + NFTA_SET_COUNT, | |
| 418 | 424 | __NFTA_SET_MAX |
| 419 | 425 | }; |
| 420 | 426 | #define NFTA_SET_MAX (__NFTA_SET_MAX - 1) |
| @@ -1780,10 +1786,18 @@ enum nft_synproxy_attributes { · 1359 unmodified lines | ||
| 1780 | 1786 | * enum nft_device_attributes - nf_tables device netlink attributes |
| 1781 | 1787 | * |
| 1782 | 1788 | * @NFTA_DEVICE_NAME: name of this device (NLA_STRING) |
| 1789 | + * @NFTA_DEVICE_TABLE: table containing the flowtable or chain hooking into the device (NLA_STRING) | |
| 1790 | + * @NFTA_DEVICE_FLOWTABLE: flowtable hooking into the device (NLA_STRING) | |
| 1791 | + * @NFTA_DEVICE_CHAIN: chain hooking into the device (NLA_STRING) | |
| 1792 | + * @NFTA_DEVICE_SPEC: hook spec matching the device (NLA_STRING) | |
| 1783 | 1793 | */ |
| 1784 | 1794 | enum nft_devices_attributes { |
| 1785 | 1795 | NFTA_DEVICE_UNSPEC, |
| 1786 | 1796 | NFTA_DEVICE_NAME, |
| 1797 | + NFTA_DEVICE_TABLE, | |
| 1798 | + NFTA_DEVICE_FLOWTABLE, | |
| 1799 | + NFTA_DEVICE_CHAIN, | |
| 1800 | + NFTA_DEVICE_SPEC, | |
| 1787 | 1801 | __NFTA_DEVICE_MAX |
| 1788 | 1802 | }; |
| 1789 | 1803 | #define NFTA_DEVICE_MAX (__NFTA_DEVICE_MAX - 1) |
| @@ -1837,6 +1851,10 @@ enum nft_xfrm_keys { · 47 unmodified lines | ||
| 1837 | 1851 | * @NFTA_TRACE_MARK: nfmark (NLA_U32) |
| 1838 | 1852 | * @NFTA_TRACE_NFPROTO: nf protocol processed (NLA_U32) |
| 1839 | 1853 | * @NFTA_TRACE_POLICY: policy that decided fate of packet (NLA_U32) |
| 1854 | + * @NFTA_TRACE_CT_ID: conntrack id (NLA_U32) | |
| 1855 | + * @NFTA_TRACE_CT_DIRECTION: packets direction (NLA_U8) | |
| 1856 | + * @NFTA_TRACE_CT_STATUS: conntrack status (NLA_U32) | |
| 1857 | + * @NFTA_TRACE_CT_STATE: packet state (new, established, ...) (NLA_U32) | |
| 1840 | 1858 | */ |
| 1841 | 1859 | enum nft_trace_attributes { |
| 1842 | 1860 | NFTA_TRACE_UNSPEC, |
| @@ -1857,6 +1875,10 @@ enum nft_trace_attributes { · 14 unmodified lines | ||
| 1857 | 1875 | NFTA_TRACE_NFPROTO, |
| 1858 | 1876 | NFTA_TRACE_POLICY, |
| 1859 | 1877 | NFTA_TRACE_PAD, |
| 1878 | + NFTA_TRACE_CT_ID, | |
| 1879 | + NFTA_TRACE_CT_DIRECTION, | |
| 1880 | + NFTA_TRACE_CT_STATUS, | |
| 1881 | + NFTA_TRACE_CT_STATE, | |
| 1860 | 1882 | __NFTA_TRACE_MAX |
| 1861 | 1883 | }; |
| 1862 | 1884 | #define NFTA_TRACE_MAX (__NFTA_TRACE_MAX - 1) |
| @@ -25,6 +25,8 @@ enum nfnetlink_groups { · 24 unmodified lines | ||
| 25 | 25 | #define NFNLGRP_ACCT_QUOTA NFNLGRP_ACCT_QUOTA |
| 26 | 26 | NFNLGRP_NFTRACE, |
| 27 | 27 | #define NFNLGRP_NFTRACE NFNLGRP_NFTRACE |
| 28 | + NFNLGRP_NFT_DEV, | |
| 29 | +#define NFNLGRP_NFT_DEV NFNLGRP_NFT_DEV | |
| 28 | 30 | __NFNLGRP_MAX, |
| 29 | 31 | }; |
| 30 | 32 | #define NFNLGRP_MAX (__NFNLGRP_MAX - 1) |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | −#ifndef __NETLINK_DIAG_H__ | |
| 3 | −#define __NETLINK_DIAG_H__ | |
| 2 | +#ifndef _UAPI__NETLINK_DIAG_H__ | |
| 3 | +#define _UAPI__NETLINK_DIAG_H__ | |
| 4 | 4 | |
| 5 | 5 | #include <linux/types.h> |
| 6 | 6 | |
| @@ -8036,6 +8036,11 @@ enum nl80211_sar_specs_attrs { · 8035 unmodified lines | ||
| 8036 | 8036 | * Setting this flag is permitted only if the driver advertises EMA support |
| 8037 | 8037 | * by setting wiphy->ema_max_profile_periodicity to non-zero. |
| 8038 | 8038 | * |
| 8039 | + * @NL80211_MBSSID_CONFIG_ATTR_TX_LINK_ID: Link ID of the transmitted profile. | |
| 8040 | + * This parameter is mandatory when NL80211_ATTR_MBSSID_CONFIG attributes | |
| 8041 | + * are sent for a non-transmitted profile and if the transmitted profile | |
| 8042 | + * is part of an MLD. For all other cases this parameter is unnecessary. | |
| 8043 | + * | |
| 8039 | 8044 | * @__NL80211_MBSSID_CONFIG_ATTR_LAST: Internal |
| 8040 | 8045 | * @NL80211_MBSSID_CONFIG_ATTR_MAX: highest attribute |
| 8041 | 8046 | */ |
| @@ -8047,6 +8052,7 @@ enum nl80211_mbssid_config_attributes { · 5 unmodified lines | ||
| 8047 | 8052 | NL80211_MBSSID_CONFIG_ATTR_INDEX, |
| 8048 | 8053 | NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX, |
| 8049 | 8054 | NL80211_MBSSID_CONFIG_ATTR_EMA, |
| 8055 | + NL80211_MBSSID_CONFIG_ATTR_TX_LINK_ID, | |
| 8050 | 8056 | |
| 8051 | 8057 | /* keep last */ |
| 8052 | 8058 | __NL80211_MBSSID_CONFIG_ATTR_LAST, |
| @@ -0,0 +1,109 @@ | ||
| 1 | +/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ | |
| 2 | +/* Do not edit directly, auto-generated from: */ | |
| 3 | +/* Documentation/netlink/specs/ovpn.yaml */ | |
| 4 | +/* YNL-GEN uapi header */ | |
| 5 | + | |
| 6 | +#ifndef _UAPI_LINUX_OVPN_H | |
| 7 | +#define _UAPI_LINUX_OVPN_H | |
| 8 | + | |
| 9 | +#define OVPN_FAMILY_NAME "ovpn" | |
| 10 | +#define OVPN_FAMILY_VERSION 1 | |
| 11 | + | |
| 12 | +#define OVPN_NONCE_TAIL_SIZE 8 | |
| 13 | + | |
| 14 | +enum ovpn_cipher_alg { | |
| 15 | + OVPN_CIPHER_ALG_NONE, | |
| 16 | + OVPN_CIPHER_ALG_AES_GCM, | |
| 17 | + OVPN_CIPHER_ALG_CHACHA20_POLY1305, | |
| 18 | +}; | |
| 19 | + | |
| 20 | +enum ovpn_del_peer_reason { | |
| 21 | + OVPN_DEL_PEER_REASON_TEARDOWN, | |
| 22 | + OVPN_DEL_PEER_REASON_USERSPACE, | |
| 23 | + OVPN_DEL_PEER_REASON_EXPIRED, | |
| 24 | + OVPN_DEL_PEER_REASON_TRANSPORT_ERROR, | |
| 25 | + OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT, | |
| 26 | +}; | |
| 27 | + | |
| 28 | +enum ovpn_key_slot { | |
| 29 | + OVPN_KEY_SLOT_PRIMARY, | |
| 30 | + OVPN_KEY_SLOT_SECONDARY, | |
| 31 | +}; | |
| 32 | + | |
| 33 | +enum { | |
| 34 | + OVPN_A_PEER_ID = 1, | |
| 35 | + OVPN_A_PEER_REMOTE_IPV4, | |
| 36 | + OVPN_A_PEER_REMOTE_IPV6, | |
| 37 | + OVPN_A_PEER_REMOTE_IPV6_SCOPE_ID, | |
| 38 | + OVPN_A_PEER_REMOTE_PORT, | |
| 39 | + OVPN_A_PEER_SOCKET, | |
| 40 | + OVPN_A_PEER_SOCKET_NETNSID, | |
| 41 | + OVPN_A_PEER_VPN_IPV4, | |
| 42 | + OVPN_A_PEER_VPN_IPV6, | |
| 43 | + OVPN_A_PEER_LOCAL_IPV4, | |
| 44 | + OVPN_A_PEER_LOCAL_IPV6, | |
| 45 | + OVPN_A_PEER_LOCAL_PORT, | |
| 46 | + OVPN_A_PEER_KEEPALIVE_INTERVAL, | |
| 47 | + OVPN_A_PEER_KEEPALIVE_TIMEOUT, | |
| 48 | + OVPN_A_PEER_DEL_REASON, | |
| 49 | + OVPN_A_PEER_VPN_RX_BYTES, | |
| 50 | + OVPN_A_PEER_VPN_TX_BYTES, | |
| 51 | + OVPN_A_PEER_VPN_RX_PACKETS, | |
| 52 | + OVPN_A_PEER_VPN_TX_PACKETS, | |
| 53 | + OVPN_A_PEER_LINK_RX_BYTES, | |
| 54 | + OVPN_A_PEER_LINK_TX_BYTES, | |
| 55 | + OVPN_A_PEER_LINK_RX_PACKETS, | |
| 56 | + OVPN_A_PEER_LINK_TX_PACKETS, | |
| 57 | + | |
| 58 | + __OVPN_A_PEER_MAX, | |
| 59 | + OVPN_A_PEER_MAX = (__OVPN_A_PEER_MAX - 1) | |
| 60 | +}; | |
| 61 | + | |
| 62 | +enum { | |
| 63 | + OVPN_A_KEYCONF_PEER_ID = 1, | |
| 64 | + OVPN_A_KEYCONF_SLOT, | |
| 65 | + OVPN_A_KEYCONF_KEY_ID, | |
| 66 | + OVPN_A_KEYCONF_CIPHER_ALG, | |
| 67 | + OVPN_A_KEYCONF_ENCRYPT_DIR, | |
| 68 | + OVPN_A_KEYCONF_DECRYPT_DIR, | |
| 69 | + | |
| 70 | + __OVPN_A_KEYCONF_MAX, | |
| 71 | + OVPN_A_KEYCONF_MAX = (__OVPN_A_KEYCONF_MAX - 1) | |
| 72 | +}; | |
| 73 | + | |
| 74 | +enum { | |
| 75 | + OVPN_A_KEYDIR_CIPHER_KEY = 1, | |
| 76 | + OVPN_A_KEYDIR_NONCE_TAIL, | |
| 77 | + | |
| 78 | + __OVPN_A_KEYDIR_MAX, | |
| 79 | + OVPN_A_KEYDIR_MAX = (__OVPN_A_KEYDIR_MAX - 1) | |
| 80 | +}; | |
| 81 | + | |
| 82 | +enum { | |
| 83 | + OVPN_A_IFINDEX = 1, | |
| 84 | + OVPN_A_PEER, | |
| 85 | + OVPN_A_KEYCONF, | |
| 86 | + | |
| 87 | + __OVPN_A_MAX, | |
| 88 | + OVPN_A_MAX = (__OVPN_A_MAX - 1) | |
| 89 | +}; | |
| 90 | + | |
| 91 | +enum { | |
| 92 | + OVPN_CMD_PEER_NEW = 1, | |
| 93 | + OVPN_CMD_PEER_SET, | |
| 94 | + OVPN_CMD_PEER_GET, | |
| 95 | + OVPN_CMD_PEER_DEL, | |
| 96 | + OVPN_CMD_PEER_DEL_NTF, | |
| 97 | + OVPN_CMD_KEY_NEW, | |
| 98 | + OVPN_CMD_KEY_GET, | |
| 99 | + OVPN_CMD_KEY_SWAP, | |
| 100 | + OVPN_CMD_KEY_SWAP_NTF, | |
| 101 | + OVPN_CMD_KEY_DEL, | |
| 102 | + | |
| 103 | + __OVPN_CMD_MAX, | |
| 104 | + OVPN_CMD_MAX = (__OVPN_CMD_MAX - 1) | |
| 105 | +}; | |
| 106 | + | |
| 107 | +#define OVPN_MCGRP_PEERS "peers" | |
| 108 | + | |
| 109 | +#endif /* _UAPI_LINUX_OVPN_H */ | |
| @@ -750,7 +750,8 @@ · 749 unmodified lines | ||
| 750 | 750 | #define PCI_EXT_CAP_ID_NPEM 0x29 /* Native PCIe Enclosure Management */ |
| 751 | 751 | #define PCI_EXT_CAP_ID_PL_32GT 0x2A /* Physical Layer 32.0 GT/s */ |
| 752 | 752 | #define PCI_EXT_CAP_ID_DOE 0x2E /* Data Object Exchange */ |
| 753 | −#define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_DOE | |
| 753 | +#define PCI_EXT_CAP_ID_PL_64GT 0x31 /* Physical Layer 64.0 GT/s */ | |
| 754 | +#define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_PL_64GT | |
| 754 | 755 | |
| 755 | 756 | #define PCI_EXT_CAP_DSN_SIZEOF 12 |
| 756 | 757 | #define PCI_EXT_CAP_MCAST_ENDPOINT_SIZEOF 40 |
| @@ -1144,12 +1145,21 @@ · 387 unmodified lines | ||
| 1144 | 1145 | #define PCI_DLF_CAP 0x04 /* Capabilities Register */ |
| 1145 | 1146 | #define PCI_DLF_EXCHANGE_ENABLE 0x80000000 /* Data Link Feature Exchange Enable */ |
| 1146 | 1147 | |
| 1148 | +/* Secondary PCIe Capability 8.0 GT/s */ | |
| 1149 | +#define PCI_SECPCI_LE_CTRL 0x0c /* Lane Equalization Control Register */ | |
| 1150 | + | |
| 1147 | 1151 | /* Physical Layer 16.0 GT/s */ |
| 1148 | 1152 | #define PCI_PL_16GT_LE_CTRL 0x20 /* Lane Equalization Control Register */ |
| 1149 | 1153 | #define PCI_PL_16GT_LE_CTRL_DSP_TX_PRESET_MASK 0x0000000F |
| 1150 | 1154 | #define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_MASK 0x000000F0 |
| 1151 | 1155 | #define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_SHIFT 4 |
| 1152 | 1156 | |
| 1157 | +/* Physical Layer 32.0 GT/s */ | |
| 1158 | +#define PCI_PL_32GT_LE_CTRL 0x20 /* Lane Equalization Control Register */ | |
| 1159 | + | |
| 1160 | +/* Physical Layer 64.0 GT/s */ | |
| 1161 | +#define PCI_PL_64GT_LE_CTRL 0x20 /* Lane Equalization Control Register */ | |
| 1162 | + | |
| 1153 | 1163 | /* Native PCIe Enclosure Management */ |
| 1154 | 1164 | #define PCI_NPEM_CAP 0x04 /* NPEM capability register */ |
| 1155 | 1165 | #define PCI_NPEM_CAP_CAPABLE 0x00000001 /* NPEM Capable */ |
| @@ -39,18 +39,21 @@ enum perf_type_id { · 38 unmodified lines | ||
| 39 | 39 | |
| 40 | 40 | /* |
| 41 | 41 | * attr.config layout for type PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE |
| 42 | + * | |
| 42 | 43 | * PERF_TYPE_HARDWARE: 0xEEEEEEEE000000AA |
| 43 | 44 | * AA: hardware event ID |
| 44 | 45 | * EEEEEEEE: PMU type ID |
| 46 | + * | |
| 45 | 47 | * PERF_TYPE_HW_CACHE: 0xEEEEEEEE00DDCCBB |
| 46 | 48 | * BB: hardware cache ID |
| 47 | 49 | * CC: hardware cache op ID |
| 48 | 50 | * DD: hardware cache op result ID |
| 49 | 51 | * EEEEEEEE: PMU type ID |
| 50 | − * If the PMU type ID is 0, the PERF_TYPE_RAW will be applied. | |
| 52 | + * | |
| 53 | + * If the PMU type ID is 0, PERF_TYPE_RAW will be applied. | |
| 51 | 54 | */ |
| 52 | −#define PERF_PMU_TYPE_SHIFT 32 | |
| 53 | −#define PERF_HW_EVENT_MASK 0xffffffff | |
| 55 | +#define PERF_PMU_TYPE_SHIFT 32 | |
| 56 | +#define PERF_HW_EVENT_MASK 0xffffffff | |
| 54 | 57 | |
| 55 | 58 | /* |
| 56 | 59 | * Generalized performance event event_id types, used by the |
| @@ -112,7 +115,7 @@ enum perf_hw_cache_op_result_id { · 55 unmodified lines | ||
| 112 | 115 | /* |
| 113 | 116 | * Special "software" events provided by the kernel, even if the hardware |
| 114 | 117 | * does not support performance events. These events measure various |
| 115 | − * physical and sw events of the kernel (and allow the profiling of them as | |
| 118 | + * physical and SW events of the kernel (and allow the profiling of them as | |
| 116 | 119 | * well): |
| 117 | 120 | */ |
| 118 | 121 | enum perf_sw_ids { |
| @@ -167,8 +170,9 @@ enum perf_event_sample_format { · 48 unmodified lines | ||
| 167 | 170 | }; |
| 168 | 171 | |
| 169 | 172 | #define PERF_SAMPLE_WEIGHT_TYPE (PERF_SAMPLE_WEIGHT | PERF_SAMPLE_WEIGHT_STRUCT) |
| 173 | + | |
| 170 | 174 | /* |
| 171 | − * values to program into branch_sample_type when PERF_SAMPLE_BRANCH is set | |
| 175 | + * Values to program into branch_sample_type when PERF_SAMPLE_BRANCH is set. | |
| 172 | 176 | * |
| 173 | 177 | * If the user does not pass priv level information via branch_sample_type, |
| 174 | 178 | * the kernel uses the event's priv level. Branch and event priv levels do |
| @@ -178,20 +182,20 @@ enum perf_event_sample_format { · 3 unmodified lines | ||
| 178 | 182 | * of branches and therefore it supersedes all the other types. |
| 179 | 183 | */ |
| 180 | 184 | enum perf_branch_sample_type_shift { |
| 181 | − PERF_SAMPLE_BRANCH_USER_SHIFT = 0, /* user branches */ | |
| 182 | − PERF_SAMPLE_BRANCH_KERNEL_SHIFT = 1, /* kernel branches */ | |
| 183 | − PERF_SAMPLE_BRANCH_HV_SHIFT = 2, /* hypervisor branches */ | |
| 184 | − | |
| 185 | − PERF_SAMPLE_BRANCH_ANY_SHIFT = 3, /* any branch types */ | |
| 186 | − PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT = 4, /* any call branch */ | |
| 187 | − PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT = 5, /* any return branch */ | |
| 188 | − PERF_SAMPLE_BRANCH_IND_CALL_SHIFT = 6, /* indirect calls */ | |
| 189 | − PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT = 7, /* transaction aborts */ | |
| 190 | − PERF_SAMPLE_BRANCH_IN_TX_SHIFT = 8, /* in transaction */ | |
| 191 | − PERF_SAMPLE_BRANCH_NO_TX_SHIFT = 9, /* not in transaction */ | |
| 185 | + PERF_SAMPLE_BRANCH_USER_SHIFT = 0, /* user branches */ | |
| 186 | + PERF_SAMPLE_BRANCH_KERNEL_SHIFT = 1, /* kernel branches */ | |
| 187 | + PERF_SAMPLE_BRANCH_HV_SHIFT = 2, /* hypervisor branches */ | |
| 188 | + | |
| 189 | + PERF_SAMPLE_BRANCH_ANY_SHIFT = 3, /* any branch types */ | |
| 190 | + PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT = 4, /* any call branch */ | |
| 191 | + PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT = 5, /* any return branch */ | |
| 192 | + PERF_SAMPLE_BRANCH_IND_CALL_SHIFT = 6, /* indirect calls */ | |
| 193 | + PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT = 7, /* transaction aborts */ | |
| 194 | + PERF_SAMPLE_BRANCH_IN_TX_SHIFT = 8, /* in transaction */ | |
| 195 | + PERF_SAMPLE_BRANCH_NO_TX_SHIFT = 9, /* not in transaction */ | |
| 192 | 196 | PERF_SAMPLE_BRANCH_COND_SHIFT = 10, /* conditional branches */ |
| 193 | 197 | |
| 194 | − PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT = 11, /* call/ret stack */ | |
| 198 | + PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT = 11, /* CALL/RET stack */ | |
| 195 | 199 | PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT = 12, /* indirect jumps */ |
| 196 | 200 | PERF_SAMPLE_BRANCH_CALL_SHIFT = 13, /* direct call */ |
| 197 | 201 | |
| @@ -210,96 +214,95 @@ enum perf_branch_sample_type_shift { · 12 unmodified lines | ||
| 210 | 214 | }; |
| 211 | 215 | |
| 212 | 216 | enum perf_branch_sample_type { |
| 213 | − PERF_SAMPLE_BRANCH_USER = 1U << PERF_SAMPLE_BRANCH_USER_SHIFT, | |
| 214 | − PERF_SAMPLE_BRANCH_KERNEL = 1U << PERF_SAMPLE_BRANCH_KERNEL_SHIFT, | |
| 215 | − PERF_SAMPLE_BRANCH_HV = 1U << PERF_SAMPLE_BRANCH_HV_SHIFT, | |
| 217 | + PERF_SAMPLE_BRANCH_USER = 1U << PERF_SAMPLE_BRANCH_USER_SHIFT, | |
| 218 | + PERF_SAMPLE_BRANCH_KERNEL = 1U << PERF_SAMPLE_BRANCH_KERNEL_SHIFT, | |
| 219 | + PERF_SAMPLE_BRANCH_HV = 1U << PERF_SAMPLE_BRANCH_HV_SHIFT, | |
| 216 | 220 | |
| 217 | − PERF_SAMPLE_BRANCH_ANY = 1U << PERF_SAMPLE_BRANCH_ANY_SHIFT, | |
| 218 | − PERF_SAMPLE_BRANCH_ANY_CALL = 1U << PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT, | |
| 219 | − PERF_SAMPLE_BRANCH_ANY_RETURN = 1U << PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT, | |
| 220 | − PERF_SAMPLE_BRANCH_IND_CALL = 1U << PERF_SAMPLE_BRANCH_IND_CALL_SHIFT, | |
| 221 | − PERF_SAMPLE_BRANCH_ABORT_TX = 1U << PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT, | |
| 222 | − PERF_SAMPLE_BRANCH_IN_TX = 1U << PERF_SAMPLE_BRANCH_IN_TX_SHIFT, | |
| 223 | − PERF_SAMPLE_BRANCH_NO_TX = 1U << PERF_SAMPLE_BRANCH_NO_TX_SHIFT, | |
| 224 | − PERF_SAMPLE_BRANCH_COND = 1U << PERF_SAMPLE_BRANCH_COND_SHIFT, | |
| 221 | + PERF_SAMPLE_BRANCH_ANY = 1U << PERF_SAMPLE_BRANCH_ANY_SHIFT, | |
| 222 | + PERF_SAMPLE_BRANCH_ANY_CALL = 1U << PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT, | |
| 223 | + PERF_SAMPLE_BRANCH_ANY_RETURN = 1U << PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT, | |
| 224 | + PERF_SAMPLE_BRANCH_IND_CALL = 1U << PERF_SAMPLE_BRANCH_IND_CALL_SHIFT, | |
| 225 | + PERF_SAMPLE_BRANCH_ABORT_TX = 1U << PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT, | |
| 226 | + PERF_SAMPLE_BRANCH_IN_TX = 1U << PERF_SAMPLE_BRANCH_IN_TX_SHIFT, | |
| 227 | + PERF_SAMPLE_BRANCH_NO_TX = 1U << PERF_SAMPLE_BRANCH_NO_TX_SHIFT, | |
| 228 | + PERF_SAMPLE_BRANCH_COND = 1U << PERF_SAMPLE_BRANCH_COND_SHIFT, | |
| 225 | 229 | |
| 226 | − PERF_SAMPLE_BRANCH_CALL_STACK = 1U << PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT, | |
| 227 | − PERF_SAMPLE_BRANCH_IND_JUMP = 1U << PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT, | |
| 228 | − PERF_SAMPLE_BRANCH_CALL = 1U << PERF_SAMPLE_BRANCH_CALL_SHIFT, | |
| 230 | + PERF_SAMPLE_BRANCH_CALL_STACK = 1U << PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT, | |
| 231 | + PERF_SAMPLE_BRANCH_IND_JUMP = 1U << PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT, | |
| 232 | + PERF_SAMPLE_BRANCH_CALL = 1U << PERF_SAMPLE_BRANCH_CALL_SHIFT, | |
| 229 | 233 | |
| 230 | − PERF_SAMPLE_BRANCH_NO_FLAGS = 1U << PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT, | |
| 231 | − PERF_SAMPLE_BRANCH_NO_CYCLES = 1U << PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT, | |
| 234 | + PERF_SAMPLE_BRANCH_NO_FLAGS = 1U << PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT, | |
| 235 | + PERF_SAMPLE_BRANCH_NO_CYCLES = 1U << PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT, | |
| 232 | 236 | |
| 233 | − PERF_SAMPLE_BRANCH_TYPE_SAVE = | |
| 234 | − 1U << PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT, | |
| 237 | + PERF_SAMPLE_BRANCH_TYPE_SAVE = 1U << PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT, | |
| 235 | 238 | |
| 236 | − PERF_SAMPLE_BRANCH_HW_INDEX = 1U << PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT, | |
| 239 | + PERF_SAMPLE_BRANCH_HW_INDEX = 1U << PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT, | |
| 237 | 240 | |
| 238 | − PERF_SAMPLE_BRANCH_PRIV_SAVE = 1U << PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT, | |
| 241 | + PERF_SAMPLE_BRANCH_PRIV_SAVE = 1U << PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT, | |
| 239 | 242 | |
| 240 | − PERF_SAMPLE_BRANCH_COUNTERS = 1U << PERF_SAMPLE_BRANCH_COUNTERS_SHIFT, | |
| 243 | + PERF_SAMPLE_BRANCH_COUNTERS = 1U << PERF_SAMPLE_BRANCH_COUNTERS_SHIFT, | |
| 241 | 244 | |
| 242 | − PERF_SAMPLE_BRANCH_MAX = 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT, | |
| 245 | + PERF_SAMPLE_BRANCH_MAX = 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT, | |
| 243 | 246 | }; |
| 244 | 247 | |
| 245 | 248 | /* |
| 246 | − * Common flow change classification | |
| 249 | + * Common control flow change classifications: | |
| 247 | 250 | */ |
| 248 | 251 | enum { |
| 249 | − PERF_BR_UNKNOWN = 0, /* unknown */ | |
| 250 | − PERF_BR_COND = 1, /* conditional */ | |
| 251 | − PERF_BR_UNCOND = 2, /* unconditional */ | |
| 252 | − PERF_BR_IND = 3, /* indirect */ | |
| 253 | − PERF_BR_CALL = 4, /* function call */ | |
| 254 | − PERF_BR_IND_CALL = 5, /* indirect function call */ | |
| 255 | − PERF_BR_RET = 6, /* function return */ | |
| 256 | − PERF_BR_SYSCALL = 7, /* syscall */ | |
| 257 | − PERF_BR_SYSRET = 8, /* syscall return */ | |
| 258 | − PERF_BR_COND_CALL = 9, /* conditional function call */ | |
| 259 | − PERF_BR_COND_RET = 10, /* conditional function return */ | |
| 260 | − PERF_BR_ERET = 11, /* exception return */ | |
| 261 | − PERF_BR_IRQ = 12, /* irq */ | |
| 262 | − PERF_BR_SERROR = 13, /* system error */ | |
| 263 | − PERF_BR_NO_TX = 14, /* not in transaction */ | |
| 264 | − PERF_BR_EXTEND_ABI = 15, /* extend ABI */ | |
| 252 | + PERF_BR_UNKNOWN = 0, /* Unknown */ | |
| 253 | + PERF_BR_COND = 1, /* Conditional */ | |
| 254 | + PERF_BR_UNCOND = 2, /* Unconditional */ | |
| 255 | + PERF_BR_IND = 3, /* Indirect */ | |
| 256 | + PERF_BR_CALL = 4, /* Function call */ | |
| 257 | + PERF_BR_IND_CALL = 5, /* Indirect function call */ | |
| 258 | + PERF_BR_RET = 6, /* Function return */ | |
| 259 | + PERF_BR_SYSCALL = 7, /* Syscall */ | |
| 260 | + PERF_BR_SYSRET = 8, /* Syscall return */ | |
| 261 | + PERF_BR_COND_CALL = 9, /* Conditional function call */ | |
| 262 | + PERF_BR_COND_RET = 10, /* Conditional function return */ | |
| 263 | + PERF_BR_ERET = 11, /* Exception return */ | |
| 264 | + PERF_BR_IRQ = 12, /* IRQ */ | |
| 265 | + PERF_BR_SERROR = 13, /* System error */ | |
| 266 | + PERF_BR_NO_TX = 14, /* Not in transaction */ | |
| 267 | + PERF_BR_EXTEND_ABI = 15, /* Extend ABI */ | |
| 265 | 268 | PERF_BR_MAX, |
| 266 | 269 | }; |
| 267 | 270 | |
| 268 | 271 | /* |
| 269 | − * Common branch speculation outcome classification | |
| 272 | + * Common branch speculation outcome classifications: | |
| 270 | 273 | */ |
| 271 | 274 | enum { |
| 272 | − PERF_BR_SPEC_NA = 0, /* Not available */ | |
| 273 | − PERF_BR_SPEC_WRONG_PATH = 1, /* Speculative but on wrong path */ | |
| 274 | − PERF_BR_NON_SPEC_CORRECT_PATH = 2, /* Non-speculative but on correct path */ | |
| 275 | − PERF_BR_SPEC_CORRECT_PATH = 3, /* Speculative and on correct path */ | |
| 275 | + PERF_BR_SPEC_NA = 0, /* Not available */ | |
| 276 | + PERF_BR_SPEC_WRONG_PATH = 1, /* Speculative but on wrong path */ | |
| 277 | + PERF_BR_NON_SPEC_CORRECT_PATH = 2, /* Non-speculative but on correct path */ | |
| 278 | + PERF_BR_SPEC_CORRECT_PATH = 3, /* Speculative and on correct path */ | |
| 276 | 279 | PERF_BR_SPEC_MAX, |
| 277 | 280 | }; |
| 278 | 281 | |
| 279 | 282 | enum { |
| 280 | − PERF_BR_NEW_FAULT_ALGN = 0, /* Alignment fault */ | |
| 281 | − PERF_BR_NEW_FAULT_DATA = 1, /* Data fault */ | |
| 282 | − PERF_BR_NEW_FAULT_INST = 2, /* Inst fault */ | |
| 283 | − PERF_BR_NEW_ARCH_1 = 3, /* Architecture specific */ | |
| 284 | − PERF_BR_NEW_ARCH_2 = 4, /* Architecture specific */ | |
| 285 | − PERF_BR_NEW_ARCH_3 = 5, /* Architecture specific */ | |
| 286 | − PERF_BR_NEW_ARCH_4 = 6, /* Architecture specific */ | |
| 287 | − PERF_BR_NEW_ARCH_5 = 7, /* Architecture specific */ | |
| 283 | + PERF_BR_NEW_FAULT_ALGN = 0, /* Alignment fault */ | |
| 284 | + PERF_BR_NEW_FAULT_DATA = 1, /* Data fault */ | |
| 285 | + PERF_BR_NEW_FAULT_INST = 2, /* Inst fault */ | |
| 286 | + PERF_BR_NEW_ARCH_1 = 3, /* Architecture specific */ | |
| 287 | + PERF_BR_NEW_ARCH_2 = 4, /* Architecture specific */ | |
| 288 | + PERF_BR_NEW_ARCH_3 = 5, /* Architecture specific */ | |
| 289 | + PERF_BR_NEW_ARCH_4 = 6, /* Architecture specific */ | |
| 290 | + PERF_BR_NEW_ARCH_5 = 7, /* Architecture specific */ | |
| 288 | 291 | PERF_BR_NEW_MAX, |
| 289 | 292 | }; |
| 290 | 293 | |
| 291 | 294 | enum { |
| 292 | − PERF_BR_PRIV_UNKNOWN = 0, | |
| 293 | − PERF_BR_PRIV_USER = 1, | |
| 294 | − PERF_BR_PRIV_KERNEL = 2, | |
| 295 | − PERF_BR_PRIV_HV = 3, | |
| 295 | + PERF_BR_PRIV_UNKNOWN = 0, | |
| 296 | + PERF_BR_PRIV_USER = 1, | |
| 297 | + PERF_BR_PRIV_KERNEL = 2, | |
| 298 | + PERF_BR_PRIV_HV = 3, | |
| 296 | 299 | }; |
| 297 | 300 | |
| 298 | −#define PERF_BR_ARM64_FIQ PERF_BR_NEW_ARCH_1 | |
| 299 | −#define PERF_BR_ARM64_DEBUG_HALT PERF_BR_NEW_ARCH_2 | |
| 300 | −#define PERF_BR_ARM64_DEBUG_EXIT PERF_BR_NEW_ARCH_3 | |
| 301 | −#define PERF_BR_ARM64_DEBUG_INST PERF_BR_NEW_ARCH_4 | |
| 302 | −#define PERF_BR_ARM64_DEBUG_DATA PERF_BR_NEW_ARCH_5 | |
| 301 | +#define PERF_BR_ARM64_FIQ PERF_BR_NEW_ARCH_1 | |
| 302 | +#define PERF_BR_ARM64_DEBUG_HALT PERF_BR_NEW_ARCH_2 | |
| 303 | +#define PERF_BR_ARM64_DEBUG_EXIT PERF_BR_NEW_ARCH_3 | |
| 304 | +#define PERF_BR_ARM64_DEBUG_INST PERF_BR_NEW_ARCH_4 | |
| 305 | +#define PERF_BR_ARM64_DEBUG_DATA PERF_BR_NEW_ARCH_5 | |
| 303 | 306 | |
| 304 | 307 | #define PERF_SAMPLE_BRANCH_PLM_ALL \ |
| 305 | 308 | (PERF_SAMPLE_BRANCH_USER|\ |
| @@ -310,9 +313,9 @@ enum { · 4 unmodified lines | ||
| 310 | 313 | * Values to determine ABI of the registers dump. |
| 311 | 314 | */ |
| 312 | 315 | enum perf_sample_regs_abi { |
| 313 | − PERF_SAMPLE_REGS_ABI_NONE = 0, | |
| 314 | − PERF_SAMPLE_REGS_ABI_32 = 1, | |
| 315 | − PERF_SAMPLE_REGS_ABI_64 = 2, | |
| 316 | + PERF_SAMPLE_REGS_ABI_NONE = 0, | |
| 317 | + PERF_SAMPLE_REGS_ABI_32 = 1, | |
| 318 | + PERF_SAMPLE_REGS_ABI_64 = 2, | |
| 316 | 319 | }; |
| 317 | 320 | |
| 318 | 321 | /* |
| @@ -320,21 +323,21 @@ enum perf_sample_regs_abi { · 1 unmodified line | ||
| 320 | 323 | * abort events. Multiple bits can be set. |
| 321 | 324 | */ |
| 322 | 325 | enum { |
| 323 | − PERF_TXN_ELISION = (1 << 0), /* From elision */ | |
| 324 | − PERF_TXN_TRANSACTION = (1 << 1), /* From transaction */ | |
| 325 | − PERF_TXN_SYNC = (1 << 2), /* Instruction is related */ | |
| 326 | − PERF_TXN_ASYNC = (1 << 3), /* Instruction not related */ | |
| 327 | − PERF_TXN_RETRY = (1 << 4), /* Retry possible */ | |
| 328 | − PERF_TXN_CONFLICT = (1 << 5), /* Conflict abort */ | |
| 329 | − PERF_TXN_CAPACITY_WRITE = (1 << 6), /* Capacity write abort */ | |
| 330 | − PERF_TXN_CAPACITY_READ = (1 << 7), /* Capacity read abort */ | |
| 326 | + PERF_TXN_ELISION = (1 << 0), /* From elision */ | |
| 327 | + PERF_TXN_TRANSACTION = (1 << 1), /* From transaction */ | |
| 328 | + PERF_TXN_SYNC = (1 << 2), /* Instruction is related */ | |
| 329 | + PERF_TXN_ASYNC = (1 << 3), /* Instruction is not related */ | |
| 330 | + PERF_TXN_RETRY = (1 << 4), /* Retry possible */ | |
| 331 | + PERF_TXN_CONFLICT = (1 << 5), /* Conflict abort */ | |
| 332 | + PERF_TXN_CAPACITY_WRITE = (1 << 6), /* Capacity write abort */ | |
| 333 | + PERF_TXN_CAPACITY_READ = (1 << 7), /* Capacity read abort */ | |
| 331 | 334 | |
| 332 | − PERF_TXN_MAX = (1 << 8), /* non-ABI */ | |
| 335 | + PERF_TXN_MAX = (1 << 8), /* non-ABI */ | |
| 333 | 336 | |
| 334 | − /* bits 32..63 are reserved for the abort code */ | |
| 337 | + /* Bits 32..63 are reserved for the abort code */ | |
| 335 | 338 | |
| 336 | − PERF_TXN_ABORT_MASK = (0xffffffffULL << 32), | |
| 337 | − PERF_TXN_ABORT_SHIFT = 32, | |
| 339 | + PERF_TXN_ABORT_MASK = (0xffffffffULL << 32), | |
| 340 | + PERF_TXN_ABORT_SHIFT = 32, | |
| 338 | 341 | }; |
| 339 | 342 | |
| 340 | 343 | /* |
| @@ -369,24 +372,22 @@ enum perf_event_read_format { · 28 unmodified lines | ||
| 369 | 372 | PERF_FORMAT_MAX = 1U << 5, /* non-ABI */ |
| 370 | 373 | }; |
| 371 | 374 | |
| 372 | −#define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */ | |
| 373 | −#define PERF_ATTR_SIZE_VER1 72 /* add: config2 */ | |
| 374 | −#define PERF_ATTR_SIZE_VER2 80 /* add: branch_sample_type */ | |
| 375 | −#define PERF_ATTR_SIZE_VER3 96 /* add: sample_regs_user */ | |
| 376 | − /* add: sample_stack_user */ | |
| 377 | −#define PERF_ATTR_SIZE_VER4 104 /* add: sample_regs_intr */ | |
| 378 | −#define PERF_ATTR_SIZE_VER5 112 /* add: aux_watermark */ | |
| 379 | −#define PERF_ATTR_SIZE_VER6 120 /* add: aux_sample_size */ | |
| 380 | −#define PERF_ATTR_SIZE_VER7 128 /* add: sig_data */ | |
| 381 | −#define PERF_ATTR_SIZE_VER8 136 /* add: config3 */ | |
| 375 | +#define PERF_ATTR_SIZE_VER0 64 /* Size of first published 'struct perf_event_attr' */ | |
| 376 | +#define PERF_ATTR_SIZE_VER1 72 /* Add: config2 */ | |
| 377 | +#define PERF_ATTR_SIZE_VER2 80 /* Add: branch_sample_type */ | |
| 378 | +#define PERF_ATTR_SIZE_VER3 96 /* Add: sample_regs_user */ | |
| 379 | + /* Add: sample_stack_user */ | |
| 380 | +#define PERF_ATTR_SIZE_VER4 104 /* Add: sample_regs_intr */ | |
| 381 | +#define PERF_ATTR_SIZE_VER5 112 /* Add: aux_watermark */ | |
| 382 | +#define PERF_ATTR_SIZE_VER6 120 /* Add: aux_sample_size */ | |
| 383 | +#define PERF_ATTR_SIZE_VER7 128 /* Add: sig_data */ | |
| 384 | +#define PERF_ATTR_SIZE_VER8 136 /* Add: config3 */ | |
| 382 | 385 | |
| 383 | 386 | /* |
| 384 | − * Hardware event_id to monitor via a performance monitoring event: | |
| 385 | − * | |
| 386 | − * @sample_max_stack: Max number of frame pointers in a callchain, | |
| 387 | − * should be < /proc/sys/kernel/perf_event_max_stack | |
| 388 | − * Max number of entries of branch stack | |
| 389 | − * should be < hardware limit | |
| 387 | + * 'struct perf_event_attr' contains various attributes that define | |
| 388 | + * a performance event - most of them hardware related configuration | |
| 389 | + * details, but also a lot of behavioral switches and values implemented | |
| 390 | + * by the kernel. | |
| 390 | 391 | */ |
| 391 | 392 | struct perf_event_attr { |
| 392 | 393 | |
| @@ -396,7 +397,7 @@ struct perf_event_attr { · 3 unmodified lines | ||
| 396 | 397 | __u32 type; |
| 397 | 398 | |
| 398 | 399 | /* |
| 399 | − * Size of the attr structure, for fwd/bwd compat. | |
| 400 | + * Size of the attr structure, for forward/backwards compatibility. | |
| 400 | 401 | */ |
| 401 | 402 | __u32 size; |
| 402 | 403 | |
| @@ -451,21 +452,21 @@ struct perf_event_attr { · 48 unmodified lines | ||
| 451 | 452 | comm_exec : 1, /* flag comm events that are due to an exec */ |
| 452 | 453 | use_clockid : 1, /* use @clockid for time fields */ |
| 453 | 454 | context_switch : 1, /* context switch data */ |
| 454 | − write_backward : 1, /* Write ring buffer from end to beginning */ | |
| 455 | + write_backward : 1, /* write ring buffer from end to beginning */ | |
| 455 | 456 | namespaces : 1, /* include namespaces data */ |
| 456 | 457 | ksymbol : 1, /* include ksymbol events */ |
| 457 | − bpf_event : 1, /* include bpf events */ | |
| 458 | + bpf_event : 1, /* include BPF events */ | |
| 458 | 459 | aux_output : 1, /* generate AUX records instead of events */ |
| 459 | 460 | cgroup : 1, /* include cgroup events */ |
| 460 | 461 | text_poke : 1, /* include text poke events */ |
| 461 | − build_id : 1, /* use build id in mmap2 events */ | |
| 462 | + build_id : 1, /* use build ID in mmap2 events */ | |
| 462 | 463 | inherit_thread : 1, /* children only inherit if cloned with CLONE_THREAD */ |
| 463 | 464 | remove_on_exec : 1, /* event is removed from task on exec */ |
| 464 | 465 | sigtrap : 1, /* send synchronous SIGTRAP on event */ |
| 465 | 466 | __reserved_1 : 26; |
| 466 | 467 | |
| 467 | 468 | union { |
| 468 | − __u32 wakeup_events; /* wakeup every n events */ | |
| 469 | + __u32 wakeup_events; /* wake up every n events */ | |
| 469 | 470 | __u32 wakeup_watermark; /* bytes before wakeup */ |
| 470 | 471 | }; |
| 471 | 472 | |
| @@ -474,13 +475,13 @@ struct perf_event_attr { · 2 unmodified lines | ||
| 474 | 475 | __u64 bp_addr; |
| 475 | 476 | __u64 kprobe_func; /* for perf_kprobe */ |
| 476 | 477 | __u64 uprobe_path; /* for perf_uprobe */ |
| 477 | − __u64 config1; /* extension of config */ | |
| 478 | + __u64 config1; /* extension of config */ | |
| 478 | 479 | }; |
| 479 | 480 | union { |
| 480 | 481 | __u64 bp_len; |
| 481 | − __u64 kprobe_addr; /* when kprobe_func == NULL */ | |
| 482 | + __u64 kprobe_addr; /* when kprobe_func == NULL */ | |
| 482 | 483 | __u64 probe_offset; /* for perf_[k,u]probe */ |
| 483 | − __u64 config2; /* extension of config1 */ | |
| 484 | + __u64 config2; /* extension of config1 */ | |
| 484 | 485 | }; |
| 485 | 486 | __u64 branch_sample_type; /* enum perf_branch_sample_type */ |
| 486 | 487 | |
| @@ -510,7 +511,16 @@ struct perf_event_attr { · 23 unmodified lines | ||
| 510 | 511 | * Wakeup watermark for AUX area |
| 511 | 512 | */ |
| 512 | 513 | __u32 aux_watermark; |
| 514 | + | |
| 515 | + /* | |
| 516 | + * Max number of frame pointers in a callchain, should be | |
| 517 | + * lower than /proc/sys/kernel/perf_event_max_stack. | |
| 518 | + * | |
| 519 | + * Max number of entries of branch stack should be lower | |
| 520 | + * than the hardware limit. | |
| 521 | + */ | |
| 513 | 522 | __u16 sample_max_stack; |
| 523 | + | |
| 514 | 524 | __u16 __reserved_2; |
| 515 | 525 | __u32 aux_sample_size; |
| 516 | 526 | |
| @@ -537,7 +547,7 @@ struct perf_event_attr { · 20 unmodified lines | ||
| 537 | 547 | |
| 538 | 548 | /* |
| 539 | 549 | * Structure used by below PERF_EVENT_IOC_QUERY_BPF command |
| 540 | − * to query bpf programs attached to the same perf tracepoint | |
| 550 | + * to query BPF programs attached to the same perf tracepoint | |
| 541 | 551 | * as the given perf event. |
| 542 | 552 | */ |
| 543 | 553 | struct perf_event_query_bpf { |
| @@ -559,21 +569,21 @@ struct perf_event_query_bpf { · 15 unmodified lines | ||
| 559 | 569 | /* |
| 560 | 570 | * Ioctls that can be done on a perf event fd: |
| 561 | 571 | */ |
| 562 | −#define PERF_EVENT_IOC_ENABLE _IO ('$', 0) | |
| 563 | −#define PERF_EVENT_IOC_DISABLE _IO ('$', 1) | |
| 564 | −#define PERF_EVENT_IOC_REFRESH _IO ('$', 2) | |
| 565 | −#define PERF_EVENT_IOC_RESET _IO ('$', 3) | |
| 566 | −#define PERF_EVENT_IOC_PERIOD _IOW('$', 4, __u64) | |
| 567 | −#define PERF_EVENT_IOC_SET_OUTPUT _IO ('$', 5) | |
| 568 | −#define PERF_EVENT_IOC_SET_FILTER _IOW('$', 6, char *) | |
| 569 | −#define PERF_EVENT_IOC_ID _IOR('$', 7, __u64 *) | |
| 570 | −#define PERF_EVENT_IOC_SET_BPF _IOW('$', 8, __u32) | |
| 571 | −#define PERF_EVENT_IOC_PAUSE_OUTPUT _IOW('$', 9, __u32) | |
| 572 | +#define PERF_EVENT_IOC_ENABLE _IO ('$', 0) | |
| 573 | +#define PERF_EVENT_IOC_DISABLE _IO ('$', 1) | |
| 574 | +#define PERF_EVENT_IOC_REFRESH _IO ('$', 2) | |
| 575 | +#define PERF_EVENT_IOC_RESET _IO ('$', 3) | |
| 576 | +#define PERF_EVENT_IOC_PERIOD _IOW ('$', 4, __u64) | |
| 577 | +#define PERF_EVENT_IOC_SET_OUTPUT _IO ('$', 5) | |
| 578 | +#define PERF_EVENT_IOC_SET_FILTER _IOW ('$', 6, char *) | |
| 579 | +#define PERF_EVENT_IOC_ID _IOR ('$', 7, __u64 *) | |
| 580 | +#define PERF_EVENT_IOC_SET_BPF _IOW ('$', 8, __u32) | |
| 581 | +#define PERF_EVENT_IOC_PAUSE_OUTPUT _IOW ('$', 9, __u32) | |
| 572 | 582 | #define PERF_EVENT_IOC_QUERY_BPF _IOWR('$', 10, struct perf_event_query_bpf *) |
| 573 | −#define PERF_EVENT_IOC_MODIFY_ATTRIBUTES _IOW('$', 11, struct perf_event_attr *) | |
| 583 | +#define PERF_EVENT_IOC_MODIFY_ATTRIBUTES _IOW ('$', 11, struct perf_event_attr *) | |
| 574 | 584 | |
| 575 | 585 | enum perf_event_ioc_flags { |
| 576 | − PERF_IOC_FLAG_GROUP = 1U << 0, | |
| 586 | + PERF_IOC_FLAG_GROUP = 1U << 0, | |
| 577 | 587 | }; |
| 578 | 588 | |
| 579 | 589 | /* |
| @@ -584,7 +594,7 @@ struct perf_event_mmap_page { · 4 unmodified lines | ||
| 584 | 594 | __u32 compat_version; /* lowest version this is compat with */ |
| 585 | 595 | |
| 586 | 596 | /* |
| 587 | − * Bits needed to read the hw events in user-space. | |
| 597 | + * Bits needed to read the HW events in user-space. | |
| 588 | 598 | * |
| 589 | 599 | * u32 seq, time_mult, time_shift, index, width; |
| 590 | 600 | * u64 count, enabled, running; |
| @@ -622,7 +632,7 @@ struct perf_event_mmap_page { · 31 unmodified lines | ||
| 622 | 632 | __u32 index; /* hardware event identifier */ |
| 623 | 633 | __s64 offset; /* add to hardware event value */ |
| 624 | 634 | __u64 time_enabled; /* time event active */ |
| 625 | − __u64 time_running; /* time event on cpu */ | |
| 635 | + __u64 time_running; /* time event on CPU */ | |
| 626 | 636 | union { |
| 627 | 637 | __u64 capabilities; |
| 628 | 638 | struct { |
| @@ -650,7 +660,7 @@ struct perf_event_mmap_page { · 21 unmodified lines | ||
| 650 | 660 | |
| 651 | 661 | /* |
| 652 | 662 | * If cap_usr_time the below fields can be used to compute the time |
| 653 | − * delta since time_enabled (in ns) using rdtsc or similar. | |
| 663 | + * delta since time_enabled (in ns) using RDTSC or similar. | |
| 654 | 664 | * |
| 655 | 665 | * u64 quot, rem; |
| 656 | 666 | * u64 delta; |
| @@ -723,7 +733,7 @@ struct perf_event_mmap_page { · 66 unmodified lines | ||
| 723 | 733 | * after reading this value. |
| 724 | 734 | * |
| 725 | 735 | * When the mapping is PROT_WRITE the @data_tail value should be |
| 726 | − * written by userspace to reflect the last read data, after issueing | |
| 736 | + * written by user-space to reflect the last read data, after issuing | |
| 727 | 737 | * an smp_mb() to separate the data read from the ->data_tail store. |
| 728 | 738 | * In this case the kernel will not over-write unread data. |
| 729 | 739 | * |
| @@ -739,7 +749,7 @@ struct perf_event_mmap_page { · 9 unmodified lines | ||
| 739 | 749 | |
| 740 | 750 | /* |
| 741 | 751 | * AUX area is defined by aux_{offset,size} fields that should be set |
| 742 | − * by the userspace, so that | |
| 752 | + * by the user-space, so that | |
| 743 | 753 | * |
| 744 | 754 | * aux_offset >= data_offset + data_size |
| 745 | 755 | * |
| @@ -813,7 +823,7 @@ struct perf_event_mmap_page { · 67 unmodified lines | ||
| 813 | 823 | * Indicates that thread was preempted in TASK_RUNNING state. |
| 814 | 824 | * |
| 815 | 825 | * PERF_RECORD_MISC_MMAP_BUILD_ID: |
| 816 | − * Indicates that mmap2 event carries build id data. | |
| 826 | + * Indicates that mmap2 event carries build ID data. | |
| 817 | 827 | */ |
| 818 | 828 | #define PERF_RECORD_MISC_EXACT_IP (1 << 14) |
| 819 | 829 | #define PERF_RECORD_MISC_SWITCH_OUT_PREEMPT (1 << 14) |
| @@ -824,26 +834,26 @@ struct perf_event_mmap_page { · 4 unmodified lines | ||
| 824 | 834 | #define PERF_RECORD_MISC_EXT_RESERVED (1 << 15) |
| 825 | 835 | |
| 826 | 836 | struct perf_event_header { |
| 827 | − __u32 type; | |
| 828 | − __u16 misc; | |
| 829 | − __u16 size; | |
| 837 | + __u32 type; | |
| 838 | + __u16 misc; | |
| 839 | + __u16 size; | |
| 830 | 840 | }; |
| 831 | 841 | |
| 832 | 842 | struct perf_ns_link_info { |
| 833 | − __u64 dev; | |
| 834 | − __u64 ino; | |
| 843 | + __u64 dev; | |
| 844 | + __u64 ino; | |
| 835 | 845 | }; |
| 836 | 846 | |
| 837 | 847 | enum { |
| 838 | − NET_NS_INDEX = 0, | |
| 839 | − UTS_NS_INDEX = 1, | |
| 840 | − IPC_NS_INDEX = 2, | |
| 841 | − PID_NS_INDEX = 3, | |
| 842 | − USER_NS_INDEX = 4, | |
| 843 | − MNT_NS_INDEX = 5, | |
| 844 | − CGROUP_NS_INDEX = 6, | |
| 845 | − | |
| 846 | − NR_NAMESPACES, /* number of available namespaces */ | |
| 848 | + NET_NS_INDEX = 0, | |
| 849 | + UTS_NS_INDEX = 1, | |
| 850 | + IPC_NS_INDEX = 2, | |
| 851 | + PID_NS_INDEX = 3, | |
| 852 | + USER_NS_INDEX = 4, | |
| 853 | + MNT_NS_INDEX = 5, | |
| 854 | + CGROUP_NS_INDEX = 6, | |
| 855 | + | |
| 856 | + NR_NAMESPACES, /* number of available namespaces */ | |
| 847 | 857 | }; |
| 848 | 858 | |
| 849 | 859 | enum perf_event_type { |
| @@ -859,11 +869,11 @@ enum perf_event_type { · 9 unmodified lines | ||
| 859 | 869 | * optional fields being ignored. |
| 860 | 870 | * |
| 861 | 871 | * struct sample_id { |
| 862 | − * { u32 pid, tid; } && PERF_SAMPLE_TID | |
| 863 | − * { u64 time; } && PERF_SAMPLE_TIME | |
| 864 | − * { u64 id; } && PERF_SAMPLE_ID | |
| 865 | − * { u64 stream_id;} && PERF_SAMPLE_STREAM_ID | |
| 866 | − * { u32 cpu, res; } && PERF_SAMPLE_CPU | |
| 872 | + * { u32 pid, tid; } && PERF_SAMPLE_TID | |
| 873 | + * { u64 time; } && PERF_SAMPLE_TIME | |
| 874 | + * { u64 id; } && PERF_SAMPLE_ID | |
| 875 | + * { u64 stream_id;} && PERF_SAMPLE_STREAM_ID | |
| 876 | + * { u32 cpu, res; } && PERF_SAMPLE_CPU | |
| 867 | 877 | * { u64 id; } && PERF_SAMPLE_IDENTIFIER |
| 868 | 878 | * } && perf_event_attr::sample_id_all |
| 869 | 879 | * |
| @@ -874,7 +884,7 @@ enum perf_event_type { · 4 unmodified lines | ||
| 874 | 884 | |
| 875 | 885 | /* |
| 876 | 886 | * The MMAP events record the PROT_EXEC mappings so that we can |
| 877 | − * correlate userspace IPs to code. They have the following structure: | |
| 887 | + * correlate user-space IPs to code. They have the following structure: | |
| 878 | 888 | * |
| 879 | 889 | * struct { |
| 880 | 890 | * struct perf_event_header header; |
| @@ -884,7 +894,7 @@ enum perf_event_type { · 3 unmodified lines | ||
| 884 | 894 | * u64 len; |
| 885 | 895 | * u64 pgoff; |
| 886 | 896 | * char filename[]; |
| 887 | − * struct sample_id sample_id; | |
| 897 | + * struct sample_id sample_id; | |
| 888 | 898 | * }; |
| 889 | 899 | */ |
| 890 | 900 | PERF_RECORD_MMAP = 1, |
| @@ -894,7 +904,7 @@ enum perf_event_type { · 3 unmodified lines | ||
| 894 | 904 | * struct perf_event_header header; |
| 895 | 905 | * u64 id; |
| 896 | 906 | * u64 lost; |
| 897 | − * struct sample_id sample_id; | |
| 907 | + * struct sample_id sample_id; | |
| 898 | 908 | * }; |
| 899 | 909 | */ |
| 900 | 910 | PERF_RECORD_LOST = 2, |
| @@ -905,7 +915,7 @@ enum perf_event_type { · 4 unmodified lines | ||
| 905 | 915 | * |
| 906 | 916 | * u32 pid, tid; |
| 907 | 917 | * char comm[]; |
| 908 | − * struct sample_id sample_id; | |
| 918 | + * struct sample_id sample_id; | |
| 909 | 919 | * }; |
| 910 | 920 | */ |
| 911 | 921 | PERF_RECORD_COMM = 3, |
| @@ -916,7 +926,7 @@ enum perf_event_type { · 4 unmodified lines | ||
| 916 | 926 | * u32 pid, ppid; |
| 917 | 927 | * u32 tid, ptid; |
| 918 | 928 | * u64 time; |
| 919 | − * struct sample_id sample_id; | |
| 929 | + * struct sample_id sample_id; | |
| 920 | 930 | * }; |
| 921 | 931 | */ |
| 922 | 932 | PERF_RECORD_EXIT = 4, |
| @@ -927,7 +937,7 @@ enum perf_event_type { · 4 unmodified lines | ||
| 927 | 937 | * u64 time; |
| 928 | 938 | * u64 id; |
| 929 | 939 | * u64 stream_id; |
| 930 | − * struct sample_id sample_id; | |
| 940 | + * struct sample_id sample_id; | |
| 931 | 941 | * }; |
| 932 | 942 | */ |
| 933 | 943 | PERF_RECORD_THROTTLE = 5, |
| @@ -939,7 +949,7 @@ enum perf_event_type { · 5 unmodified lines | ||
| 939 | 949 | * u32 pid, ppid; |
| 940 | 950 | * u32 tid, ptid; |
| 941 | 951 | * u64 time; |
| 942 | − * struct sample_id sample_id; | |
| 952 | + * struct sample_id sample_id; | |
| 943 | 953 | * }; |
| 944 | 954 | */ |
| 945 | 955 | PERF_RECORD_FORK = 7, |
| @@ -950,7 +960,7 @@ enum perf_event_type { · 4 unmodified lines | ||
| 950 | 960 | * u32 pid, tid; |
| 951 | 961 | * |
| 952 | 962 | * struct read_format values; |
| 953 | − * struct sample_id sample_id; | |
| 963 | + * struct sample_id sample_id; | |
| 954 | 964 | * }; |
| 955 | 965 | */ |
| 956 | 966 | PERF_RECORD_READ = 8, |
| @@ -1005,12 +1015,12 @@ enum perf_event_type { · 48 unmodified lines | ||
| 1005 | 1015 | * { u64 counters; } cntr[nr] && PERF_SAMPLE_BRANCH_COUNTERS |
| 1006 | 1016 | * } && PERF_SAMPLE_BRANCH_STACK |
| 1007 | 1017 | * |
| 1008 | − * { u64 abi; # enum perf_sample_regs_abi | |
| 1009 | − * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_USER | |
| 1018 | + * { u64 abi; # enum perf_sample_regs_abi | |
| 1019 | + * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_USER | |
| 1010 | 1020 | * |
| 1011 | − * { u64 size; | |
| 1012 | − * char data[size]; | |
| 1013 | − * u64 dyn_size; } && PERF_SAMPLE_STACK_USER | |
| 1021 | + * { u64 size; | |
| 1022 | + * char data[size]; | |
| 1023 | + * u64 dyn_size; } && PERF_SAMPLE_STACK_USER | |
| 1014 | 1024 | * |
| 1015 | 1025 | * { union perf_sample_weight |
| 1016 | 1026 | * { |
| @@ -1035,10 +1045,11 @@ enum perf_event_type { · 18 unmodified lines | ||
| 1035 | 1045 | * { u64 abi; # enum perf_sample_regs_abi |
| 1036 | 1046 | * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_INTR |
| 1037 | 1047 | * { u64 phys_addr;} && PERF_SAMPLE_PHYS_ADDR |
| 1038 | − * { u64 size; | |
| 1039 | − * char data[size]; } && PERF_SAMPLE_AUX | |
| 1048 | + * { u64 cgroup;} && PERF_SAMPLE_CGROUP | |
| 1040 | 1049 | * { u64 data_page_size;} && PERF_SAMPLE_DATA_PAGE_SIZE |
| 1041 | 1050 | * { u64 code_page_size;} && PERF_SAMPLE_CODE_PAGE_SIZE |
| 1051 | + * { u64 size; | |
| 1052 | + * char data[size]; } && PERF_SAMPLE_AUX | |
| 1042 | 1053 | * }; |
| 1043 | 1054 | */ |
| 1044 | 1055 | PERF_RECORD_SAMPLE = 9, |
| @@ -1070,7 +1081,7 @@ enum perf_event_type { · 25 unmodified lines | ||
| 1070 | 1081 | * }; |
| 1071 | 1082 | * u32 prot, flags; |
| 1072 | 1083 | * char filename[]; |
| 1073 | − * struct sample_id sample_id; | |
| 1084 | + * struct sample_id sample_id; | |
| 1074 | 1085 | * }; |
| 1075 | 1086 | */ |
| 1076 | 1087 | PERF_RECORD_MMAP2 = 10, |
| @@ -1079,12 +1090,12 @@ enum perf_event_type { · 2 unmodified lines | ||
| 1079 | 1090 | * Records that new data landed in the AUX buffer part. |
| 1080 | 1091 | * |
| 1081 | 1092 | * struct { |
| 1082 | − * struct perf_event_header header; | |
| 1093 | + * struct perf_event_header header; | |
| 1083 | 1094 | * |
| 1084 | − * u64 aux_offset; | |
| 1085 | − * u64 aux_size; | |
| 1095 | + * u64 aux_offset; | |
| 1096 | + * u64 aux_size; | |
| 1086 | 1097 | * u64 flags; |
| 1087 | − * struct sample_id sample_id; | |
| 1098 | + * struct sample_id sample_id; | |
| 1088 | 1099 | * }; |
| 1089 | 1100 | */ |
| 1090 | 1101 | PERF_RECORD_AUX = 11, |
| @@ -1167,7 +1178,7 @@ enum perf_event_type { · 76 unmodified lines | ||
| 1167 | 1178 | PERF_RECORD_KSYMBOL = 17, |
| 1168 | 1179 | |
| 1169 | 1180 | /* |
| 1170 | − * Record bpf events: | |
| 1181 | + * Record BPF events: | |
| 1171 | 1182 | * enum perf_bpf_event_type { |
| 1172 | 1183 | * PERF_BPF_EVENT_UNKNOWN = 0, |
| 1173 | 1184 | * PERF_BPF_EVENT_PROG_LOAD = 1, |
| @@ -1245,181 +1256,181 @@ enum perf_record_ksymbol_type { · 71 unmodified lines | ||
| 1245 | 1256 | #define PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER (1 << 0) |
| 1246 | 1257 | |
| 1247 | 1258 | enum perf_bpf_event_type { |
| 1248 | − PERF_BPF_EVENT_UNKNOWN = 0, | |
| 1249 | − PERF_BPF_EVENT_PROG_LOAD = 1, | |
| 1250 | − PERF_BPF_EVENT_PROG_UNLOAD = 2, | |
| 1251 | − PERF_BPF_EVENT_MAX, /* non-ABI */ | |
| 1259 | + PERF_BPF_EVENT_UNKNOWN = 0, | |
| 1260 | + PERF_BPF_EVENT_PROG_LOAD = 1, | |
| 1261 | + PERF_BPF_EVENT_PROG_UNLOAD = 2, | |
| 1262 | + PERF_BPF_EVENT_MAX, /* non-ABI */ | |
| 1252 | 1263 | }; |
| 1253 | 1264 | |
| 1254 | −#define PERF_MAX_STACK_DEPTH 127 | |
| 1255 | −#define PERF_MAX_CONTEXTS_PER_STACK 8 | |
| 1265 | +#define PERF_MAX_STACK_DEPTH 127 | |
| 1266 | +#define PERF_MAX_CONTEXTS_PER_STACK 8 | |
| 1256 | 1267 | |
| 1257 | 1268 | enum perf_callchain_context { |
| 1258 | − PERF_CONTEXT_HV = (__u64)-32, | |
| 1259 | − PERF_CONTEXT_KERNEL = (__u64)-128, | |
| 1260 | − PERF_CONTEXT_USER = (__u64)-512, | |
| 1269 | + PERF_CONTEXT_HV = (__u64)-32, | |
| 1270 | + PERF_CONTEXT_KERNEL = (__u64)-128, | |
| 1271 | + PERF_CONTEXT_USER = (__u64)-512, | |
| 1261 | 1272 | |
| 1262 | − PERF_CONTEXT_GUEST = (__u64)-2048, | |
| 1263 | − PERF_CONTEXT_GUEST_KERNEL = (__u64)-2176, | |
| 1264 | − PERF_CONTEXT_GUEST_USER = (__u64)-2560, | |
| 1273 | + PERF_CONTEXT_GUEST = (__u64)-2048, | |
| 1274 | + PERF_CONTEXT_GUEST_KERNEL = (__u64)-2176, | |
| 1275 | + PERF_CONTEXT_GUEST_USER = (__u64)-2560, | |
| 1265 | 1276 | |
| 1266 | − PERF_CONTEXT_MAX = (__u64)-4095, | |
| 1277 | + PERF_CONTEXT_MAX = (__u64)-4095, | |
| 1267 | 1278 | }; |
| 1268 | 1279 | |
| 1269 | 1280 | /** |
| 1270 | 1281 | * PERF_RECORD_AUX::flags bits |
| 1271 | 1282 | */ |
| 1272 | −#define PERF_AUX_FLAG_TRUNCATED 0x01 /* record was truncated to fit */ | |
| 1273 | −#define PERF_AUX_FLAG_OVERWRITE 0x02 /* snapshot from overwrite mode */ | |
| 1274 | −#define PERF_AUX_FLAG_PARTIAL 0x04 /* record contains gaps */ | |
| 1275 | −#define PERF_AUX_FLAG_COLLISION 0x08 /* sample collided with another */ | |
| 1283 | +#define PERF_AUX_FLAG_TRUNCATED 0x0001 /* Record was truncated to fit */ | |
| 1284 | +#define PERF_AUX_FLAG_OVERWRITE 0x0002 /* Snapshot from overwrite mode */ | |
| 1285 | +#define PERF_AUX_FLAG_PARTIAL 0x0004 /* Record contains gaps */ | |
| 1286 | +#define PERF_AUX_FLAG_COLLISION 0x0008 /* Sample collided with another */ | |
| 1276 | 1287 | #define PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK 0xff00 /* PMU specific trace format type */ |
| 1277 | 1288 | |
| 1278 | 1289 | /* CoreSight PMU AUX buffer formats */ |
| 1279 | −#define PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT 0x0000 /* Default for backward compatibility */ | |
| 1280 | −#define PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW 0x0100 /* Raw format of the source */ | |
| 1290 | +#define PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT 0x0000 /* Default for backward compatibility */ | |
| 1291 | +#define PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW 0x0100 /* Raw format of the source */ | |
| 1281 | 1292 | |
| 1282 | −#define PERF_FLAG_FD_NO_GROUP (1UL << 0) | |
| 1283 | −#define PERF_FLAG_FD_OUTPUT (1UL << 1) | |
| 1284 | −#define PERF_FLAG_PID_CGROUP (1UL << 2) /* pid=cgroup id, per-cpu mode only */ | |
| 1285 | −#define PERF_FLAG_FD_CLOEXEC (1UL << 3) /* O_CLOEXEC */ | |
| 1293 | +#define PERF_FLAG_FD_NO_GROUP (1UL << 0) | |
| 1294 | +#define PERF_FLAG_FD_OUTPUT (1UL << 1) | |
| 1295 | +#define PERF_FLAG_PID_CGROUP (1UL << 2) /* pid=cgroup ID, per-CPU mode only */ | |
| 1296 | +#define PERF_FLAG_FD_CLOEXEC (1UL << 3) /* O_CLOEXEC */ | |
| 1286 | 1297 | |
| 1287 | 1298 | #if defined(__LITTLE_ENDIAN_BITFIELD) |
| 1288 | 1299 | union perf_mem_data_src { |
| 1289 | 1300 | __u64 val; |
| 1290 | 1301 | struct { |
| 1291 | − __u64 mem_op:5, /* type of opcode */ | |
| 1292 | − mem_lvl:14, /* memory hierarchy level */ | |
| 1293 | − mem_snoop:5, /* snoop mode */ | |
| 1294 | − mem_lock:2, /* lock instr */ | |
| 1295 | − mem_dtlb:7, /* tlb access */ | |
| 1296 | − mem_lvl_num:4, /* memory hierarchy level number */ | |
| 1297 | − mem_remote:1, /* remote */ | |
| 1298 | − mem_snoopx:2, /* snoop mode, ext */ | |
| 1299 | − mem_blk:3, /* access blocked */ | |
| 1300 | − mem_hops:3, /* hop level */ | |
| 1301 | − mem_rsvd:18; | |
| 1302 | + __u64 mem_op : 5, /* Type of opcode */ | |
| 1303 | + mem_lvl : 14, /* Memory hierarchy level */ | |
| 1304 | + mem_snoop : 5, /* Snoop mode */ | |
| 1305 | + mem_lock : 2, /* Lock instr */ | |
| 1306 | + mem_dtlb : 7, /* TLB access */ | |
| 1307 | + mem_lvl_num : 4, /* Memory hierarchy level number */ | |
| 1308 | + mem_remote : 1, /* Remote */ | |
| 1309 | + mem_snoopx : 2, /* Snoop mode, ext */ | |
| 1310 | + mem_blk : 3, /* Access blocked */ | |
| 1311 | + mem_hops : 3, /* Hop level */ | |
| 1312 | + mem_rsvd : 18; | |
| 1302 | 1313 | }; |
| 1303 | 1314 | }; |
| 1304 | 1315 | #elif defined(__BIG_ENDIAN_BITFIELD) |
| 1305 | 1316 | union perf_mem_data_src { |
| 1306 | 1317 | __u64 val; |
| 1307 | 1318 | struct { |
| 1308 | − __u64 mem_rsvd:18, | |
| 1309 | − mem_hops:3, /* hop level */ | |
| 1310 | − mem_blk:3, /* access blocked */ | |
| 1311 | − mem_snoopx:2, /* snoop mode, ext */ | |
| 1312 | − mem_remote:1, /* remote */ | |
| 1313 | − mem_lvl_num:4, /* memory hierarchy level number */ | |
| 1314 | − mem_dtlb:7, /* tlb access */ | |
| 1315 | − mem_lock:2, /* lock instr */ | |
| 1316 | − mem_snoop:5, /* snoop mode */ | |
| 1317 | − mem_lvl:14, /* memory hierarchy level */ | |
| 1318 | − mem_op:5; /* type of opcode */ | |
| 1319 | + __u64 mem_rsvd : 18, | |
| 1320 | + mem_hops : 3, /* Hop level */ | |
| 1321 | + mem_blk : 3, /* Access blocked */ | |
| 1322 | + mem_snoopx : 2, /* Snoop mode, ext */ | |
| 1323 | + mem_remote : 1, /* Remote */ | |
| 1324 | + mem_lvl_num : 4, /* Memory hierarchy level number */ | |
| 1325 | + mem_dtlb : 7, /* TLB access */ | |
| 1326 | + mem_lock : 2, /* Lock instr */ | |
| 1327 | + mem_snoop : 5, /* Snoop mode */ | |
| 1328 | + mem_lvl : 14, /* Memory hierarchy level */ | |
| 1329 | + mem_op : 5; /* Type of opcode */ | |
| 1319 | 1330 | }; |
| 1320 | 1331 | }; |
| 1321 | 1332 | #else |
| 1322 | −#error "Unknown endianness" | |
| 1333 | +# error "Unknown endianness" | |
| 1323 | 1334 | #endif |
| 1324 | 1335 | |
| 1325 | −/* type of opcode (load/store/prefetch,code) */ | |
| 1326 | −#define PERF_MEM_OP_NA 0x01 /* not available */ | |
| 1327 | −#define PERF_MEM_OP_LOAD 0x02 /* load instruction */ | |
| 1328 | −#define PERF_MEM_OP_STORE 0x04 /* store instruction */ | |
| 1329 | −#define PERF_MEM_OP_PFETCH 0x08 /* prefetch */ | |
| 1330 | −#define PERF_MEM_OP_EXEC 0x10 /* code (execution) */ | |
| 1331 | −#define PERF_MEM_OP_SHIFT 0 | |
| 1336 | +/* Type of memory opcode: */ | |
| 1337 | +#define PERF_MEM_OP_NA 0x0001 /* Not available */ | |
| 1338 | +#define PERF_MEM_OP_LOAD 0x0002 /* Load instruction */ | |
| 1339 | +#define PERF_MEM_OP_STORE 0x0004 /* Store instruction */ | |
| 1340 | +#define PERF_MEM_OP_PFETCH 0x0008 /* Prefetch */ | |
| 1341 | +#define PERF_MEM_OP_EXEC 0x0010 /* Code (execution) */ | |
| 1342 | +#define PERF_MEM_OP_SHIFT 0 | |
| 1332 | 1343 | |
| 1333 | 1344 | /* |
| 1334 | − * PERF_MEM_LVL_* namespace being depricated to some extent in the | |
| 1345 | + * The PERF_MEM_LVL_* namespace is being deprecated to some extent in | |
| 1335 | 1346 | * favour of newer composite PERF_MEM_{LVLNUM_,REMOTE_,SNOOPX_} fields. |
| 1336 | − * Supporting this namespace inorder to not break defined ABIs. | |
| 1347 | + * We support this namespace in order to not break defined ABIs. | |
| 1337 | 1348 | * |
| 1338 | − * memory hierarchy (memory level, hit or miss) | |
| 1349 | + * Memory hierarchy (memory level, hit or miss) | |
| 1339 | 1350 | */ |
| 1340 | −#define PERF_MEM_LVL_NA 0x01 /* not available */ | |
| 1341 | −#define PERF_MEM_LVL_HIT 0x02 /* hit level */ | |
| 1342 | −#define PERF_MEM_LVL_MISS 0x04 /* miss level */ | |
| 1343 | −#define PERF_MEM_LVL_L1 0x08 /* L1 */ | |
| 1344 | −#define PERF_MEM_LVL_LFB 0x10 /* Line Fill Buffer */ | |
| 1345 | −#define PERF_MEM_LVL_L2 0x20 /* L2 */ | |
| 1346 | −#define PERF_MEM_LVL_L3 0x40 /* L3 */ | |
| 1347 | −#define PERF_MEM_LVL_LOC_RAM 0x80 /* Local DRAM */ | |
| 1348 | −#define PERF_MEM_LVL_REM_RAM1 0x100 /* Remote DRAM (1 hop) */ | |
| 1349 | −#define PERF_MEM_LVL_REM_RAM2 0x200 /* Remote DRAM (2 hops) */ | |
| 1350 | −#define PERF_MEM_LVL_REM_CCE1 0x400 /* Remote Cache (1 hop) */ | |
| 1351 | −#define PERF_MEM_LVL_REM_CCE2 0x800 /* Remote Cache (2 hops) */ | |
| 1352 | −#define PERF_MEM_LVL_IO 0x1000 /* I/O memory */ | |
| 1353 | −#define PERF_MEM_LVL_UNC 0x2000 /* Uncached memory */ | |
| 1354 | −#define PERF_MEM_LVL_SHIFT 5 | |
| 1355 | − | |
| 1356 | −#define PERF_MEM_REMOTE_REMOTE 0x01 /* Remote */ | |
| 1357 | −#define PERF_MEM_REMOTE_SHIFT 37 | |
| 1358 | − | |
| 1359 | −#define PERF_MEM_LVLNUM_L1 0x01 /* L1 */ | |
| 1360 | −#define PERF_MEM_LVLNUM_L2 0x02 /* L2 */ | |
| 1361 | −#define PERF_MEM_LVLNUM_L3 0x03 /* L3 */ | |
| 1362 | −#define PERF_MEM_LVLNUM_L4 0x04 /* L4 */ | |
| 1363 | −#define PERF_MEM_LVLNUM_L2_MHB 0x05 /* L2 Miss Handling Buffer */ | |
| 1364 | −#define PERF_MEM_LVLNUM_MSC 0x06 /* Memory-side Cache */ | |
| 1365 | −/* 0x7 available */ | |
| 1366 | −#define PERF_MEM_LVLNUM_UNC 0x08 /* Uncached */ | |
| 1367 | −#define PERF_MEM_LVLNUM_CXL 0x09 /* CXL */ | |
| 1368 | −#define PERF_MEM_LVLNUM_IO 0x0a /* I/O */ | |
| 1369 | −#define PERF_MEM_LVLNUM_ANY_CACHE 0x0b /* Any cache */ | |
| 1370 | −#define PERF_MEM_LVLNUM_LFB 0x0c /* LFB / L1 Miss Handling Buffer */ | |
| 1371 | −#define PERF_MEM_LVLNUM_RAM 0x0d /* RAM */ | |
| 1372 | −#define PERF_MEM_LVLNUM_PMEM 0x0e /* PMEM */ | |
| 1373 | −#define PERF_MEM_LVLNUM_NA 0x0f /* N/A */ | |
| 1374 | − | |
| 1375 | −#define PERF_MEM_LVLNUM_SHIFT 33 | |
| 1376 | − | |
| 1377 | −/* snoop mode */ | |
| 1378 | −#define PERF_MEM_SNOOP_NA 0x01 /* not available */ | |
| 1379 | −#define PERF_MEM_SNOOP_NONE 0x02 /* no snoop */ | |
| 1380 | −#define PERF_MEM_SNOOP_HIT 0x04 /* snoop hit */ | |
| 1381 | −#define PERF_MEM_SNOOP_MISS 0x08 /* snoop miss */ | |
| 1382 | −#define PERF_MEM_SNOOP_HITM 0x10 /* snoop hit modified */ | |
| 1383 | −#define PERF_MEM_SNOOP_SHIFT 19 | |
| 1384 | − | |
| 1385 | −#define PERF_MEM_SNOOPX_FWD 0x01 /* forward */ | |
| 1386 | −#define PERF_MEM_SNOOPX_PEER 0x02 /* xfer from peer */ | |
| 1387 | −#define PERF_MEM_SNOOPX_SHIFT 38 | |
| 1388 | − | |
| 1389 | −/* locked instruction */ | |
| 1390 | −#define PERF_MEM_LOCK_NA 0x01 /* not available */ | |
| 1391 | −#define PERF_MEM_LOCK_LOCKED 0x02 /* locked transaction */ | |
| 1392 | −#define PERF_MEM_LOCK_SHIFT 24 | |
| 1351 | +#define PERF_MEM_LVL_NA 0x0001 /* Not available */ | |
| 1352 | +#define PERF_MEM_LVL_HIT 0x0002 /* Hit level */ | |
| 1353 | +#define PERF_MEM_LVL_MISS 0x0004 /* Miss level */ | |
| 1354 | +#define PERF_MEM_LVL_L1 0x0008 /* L1 */ | |
| 1355 | +#define PERF_MEM_LVL_LFB 0x0010 /* Line Fill Buffer */ | |
| 1356 | +#define PERF_MEM_LVL_L2 0x0020 /* L2 */ | |
| 1357 | +#define PERF_MEM_LVL_L3 0x0040 /* L3 */ | |
| 1358 | +#define PERF_MEM_LVL_LOC_RAM 0x0080 /* Local DRAM */ | |
| 1359 | +#define PERF_MEM_LVL_REM_RAM1 0x0100 /* Remote DRAM (1 hop) */ | |
| 1360 | +#define PERF_MEM_LVL_REM_RAM2 0x0200 /* Remote DRAM (2 hops) */ | |
| 1361 | +#define PERF_MEM_LVL_REM_CCE1 0x0400 /* Remote Cache (1 hop) */ | |
| 1362 | +#define PERF_MEM_LVL_REM_CCE2 0x0800 /* Remote Cache (2 hops) */ | |
| 1363 | +#define PERF_MEM_LVL_IO 0x1000 /* I/O memory */ | |
| 1364 | +#define PERF_MEM_LVL_UNC 0x2000 /* Uncached memory */ | |
| 1365 | +#define PERF_MEM_LVL_SHIFT 5 | |
| 1366 | + | |
| 1367 | +#define PERF_MEM_REMOTE_REMOTE 0x0001 /* Remote */ | |
| 1368 | +#define PERF_MEM_REMOTE_SHIFT 37 | |
| 1369 | + | |
| 1370 | +#define PERF_MEM_LVLNUM_L1 0x0001 /* L1 */ | |
| 1371 | +#define PERF_MEM_LVLNUM_L2 0x0002 /* L2 */ | |
| 1372 | +#define PERF_MEM_LVLNUM_L3 0x0003 /* L3 */ | |
| 1373 | +#define PERF_MEM_LVLNUM_L4 0x0004 /* L4 */ | |
| 1374 | +#define PERF_MEM_LVLNUM_L2_MHB 0x0005 /* L2 Miss Handling Buffer */ | |
| 1375 | +#define PERF_MEM_LVLNUM_MSC 0x0006 /* Memory-side Cache */ | |
| 1376 | +/* 0x007 available */ | |
| 1377 | +#define PERF_MEM_LVLNUM_UNC 0x0008 /* Uncached */ | |
| 1378 | +#define PERF_MEM_LVLNUM_CXL 0x0009 /* CXL */ | |
| 1379 | +#define PERF_MEM_LVLNUM_IO 0x000a /* I/O */ | |
| 1380 | +#define PERF_MEM_LVLNUM_ANY_CACHE 0x000b /* Any cache */ | |
| 1381 | +#define PERF_MEM_LVLNUM_LFB 0x000c /* LFB / L1 Miss Handling Buffer */ | |
| 1382 | +#define PERF_MEM_LVLNUM_RAM 0x000d /* RAM */ | |
| 1383 | +#define PERF_MEM_LVLNUM_PMEM 0x000e /* PMEM */ | |
| 1384 | +#define PERF_MEM_LVLNUM_NA 0x000f /* N/A */ | |
| 1385 | + | |
| 1386 | +#define PERF_MEM_LVLNUM_SHIFT 33 | |
| 1387 | + | |
| 1388 | +/* Snoop mode */ | |
| 1389 | +#define PERF_MEM_SNOOP_NA 0x0001 /* Not available */ | |
| 1390 | +#define PERF_MEM_SNOOP_NONE 0x0002 /* No snoop */ | |
| 1391 | +#define PERF_MEM_SNOOP_HIT 0x0004 /* Snoop hit */ | |
| 1392 | +#define PERF_MEM_SNOOP_MISS 0x0008 /* Snoop miss */ | |
| 1393 | +#define PERF_MEM_SNOOP_HITM 0x0010 /* Snoop hit modified */ | |
| 1394 | +#define PERF_MEM_SNOOP_SHIFT 19 | |
| 1395 | + | |
| 1396 | +#define PERF_MEM_SNOOPX_FWD 0x0001 /* Forward */ | |
| 1397 | +#define PERF_MEM_SNOOPX_PEER 0x0002 /* Transfer from peer */ | |
| 1398 | +#define PERF_MEM_SNOOPX_SHIFT 38 | |
| 1399 | + | |
| 1400 | +/* Locked instruction */ | |
| 1401 | +#define PERF_MEM_LOCK_NA 0x0001 /* Not available */ | |
| 1402 | +#define PERF_MEM_LOCK_LOCKED 0x0002 /* Locked transaction */ | |
| 1403 | +#define PERF_MEM_LOCK_SHIFT 24 | |
| 1393 | 1404 | |
| 1394 | 1405 | /* TLB access */ |
| 1395 | −#define PERF_MEM_TLB_NA 0x01 /* not available */ | |
| 1396 | −#define PERF_MEM_TLB_HIT 0x02 /* hit level */ | |
| 1397 | −#define PERF_MEM_TLB_MISS 0x04 /* miss level */ | |
| 1398 | −#define PERF_MEM_TLB_L1 0x08 /* L1 */ | |
| 1399 | −#define PERF_MEM_TLB_L2 0x10 /* L2 */ | |
| 1400 | −#define PERF_MEM_TLB_WK 0x20 /* Hardware Walker*/ | |
| 1401 | −#define PERF_MEM_TLB_OS 0x40 /* OS fault handler */ | |
| 1402 | −#define PERF_MEM_TLB_SHIFT 26 | |
| 1406 | +#define PERF_MEM_TLB_NA 0x0001 /* Not available */ | |
| 1407 | +#define PERF_MEM_TLB_HIT 0x0002 /* Hit level */ | |
| 1408 | +#define PERF_MEM_TLB_MISS 0x0004 /* Miss level */ | |
| 1409 | +#define PERF_MEM_TLB_L1 0x0008 /* L1 */ | |
| 1410 | +#define PERF_MEM_TLB_L2 0x0010 /* L2 */ | |
| 1411 | +#define PERF_MEM_TLB_WK 0x0020 /* Hardware Walker*/ | |
| 1412 | +#define PERF_MEM_TLB_OS 0x0040 /* OS fault handler */ | |
| 1413 | +#define PERF_MEM_TLB_SHIFT 26 | |
| 1403 | 1414 | |
| 1404 | 1415 | /* Access blocked */ |
| 1405 | −#define PERF_MEM_BLK_NA 0x01 /* not available */ | |
| 1406 | −#define PERF_MEM_BLK_DATA 0x02 /* data could not be forwarded */ | |
| 1407 | −#define PERF_MEM_BLK_ADDR 0x04 /* address conflict */ | |
| 1408 | −#define PERF_MEM_BLK_SHIFT 40 | |
| 1409 | − | |
| 1410 | −/* hop level */ | |
| 1411 | −#define PERF_MEM_HOPS_0 0x01 /* remote core, same node */ | |
| 1412 | −#define PERF_MEM_HOPS_1 0x02 /* remote node, same socket */ | |
| 1413 | −#define PERF_MEM_HOPS_2 0x03 /* remote socket, same board */ | |
| 1414 | −#define PERF_MEM_HOPS_3 0x04 /* remote board */ | |
| 1416 | +#define PERF_MEM_BLK_NA 0x0001 /* Not available */ | |
| 1417 | +#define PERF_MEM_BLK_DATA 0x0002 /* Data could not be forwarded */ | |
| 1418 | +#define PERF_MEM_BLK_ADDR 0x0004 /* Address conflict */ | |
| 1419 | +#define PERF_MEM_BLK_SHIFT 40 | |
| 1420 | + | |
| 1421 | +/* Hop level */ | |
| 1422 | +#define PERF_MEM_HOPS_0 0x0001 /* Remote core, same node */ | |
| 1423 | +#define PERF_MEM_HOPS_1 0x0002 /* Remote node, same socket */ | |
| 1424 | +#define PERF_MEM_HOPS_2 0x0003 /* Remote socket, same board */ | |
| 1425 | +#define PERF_MEM_HOPS_3 0x0004 /* Remote board */ | |
| 1415 | 1426 | /* 5-7 available */ |
| 1416 | −#define PERF_MEM_HOPS_SHIFT 43 | |
| 1427 | +#define PERF_MEM_HOPS_SHIFT 43 | |
| 1417 | 1428 | |
| 1418 | 1429 | #define PERF_MEM_S(a, s) \ |
| 1419 | 1430 | (((__u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT) |
| 1420 | 1431 | |
| 1421 | 1432 | /* |
| 1422 | − * single taken branch record layout: | |
| 1433 | + * Layout of single taken branch records: | |
| 1423 | 1434 | * |
| 1424 | 1435 | * from: source instruction (may not always be a branch insn) |
| 1425 | 1436 | * to: branch target |
| @@ -1438,37 +1449,37 @@ union perf_mem_data_src { · 12 unmodified lines | ||
| 1438 | 1449 | struct perf_branch_entry { |
| 1439 | 1450 | __u64 from; |
| 1440 | 1451 | __u64 to; |
| 1441 | − __u64 mispred:1, /* target mispredicted */ | |
| 1442 | − predicted:1,/* target predicted */ | |
| 1443 | − in_tx:1, /* in transaction */ | |
| 1444 | − abort:1, /* transaction abort */ | |
| 1445 | − cycles:16, /* cycle count to last branch */ | |
| 1446 | − type:4, /* branch type */ | |
| 1447 | − spec:2, /* branch speculation info */ | |
| 1448 | − new_type:4, /* additional branch type */ | |
| 1449 | − priv:3, /* privilege level */ | |
| 1450 | − reserved:31; | |
| 1452 | + __u64 mispred : 1, /* target mispredicted */ | |
| 1453 | + predicted : 1, /* target predicted */ | |
| 1454 | + in_tx : 1, /* in transaction */ | |
| 1455 | + abort : 1, /* transaction abort */ | |
| 1456 | + cycles : 16, /* cycle count to last branch */ | |
| 1457 | + type : 4, /* branch type */ | |
| 1458 | + spec : 2, /* branch speculation info */ | |
| 1459 | + new_type : 4, /* additional branch type */ | |
| 1460 | + priv : 3, /* privilege level */ | |
| 1461 | + reserved : 31; | |
| 1451 | 1462 | }; |
| 1452 | 1463 | |
| 1453 | 1464 | /* Size of used info bits in struct perf_branch_entry */ |
| 1454 | 1465 | #define PERF_BRANCH_ENTRY_INFO_BITS_MAX 33 |
| 1455 | 1466 | |
| 1456 | 1467 | union perf_sample_weight { |
| 1457 | − __u64 full; | |
| 1468 | + __u64 full; | |
| 1458 | 1469 | #if defined(__LITTLE_ENDIAN_BITFIELD) |
| 1459 | 1470 | struct { |
| 1460 | − __u32 var1_dw; | |
| 1461 | − __u16 var2_w; | |
| 1462 | − __u16 var3_w; | |
| 1471 | + __u32 var1_dw; | |
| 1472 | + __u16 var2_w; | |
| 1473 | + __u16 var3_w; | |
| 1463 | 1474 | }; |
| 1464 | 1475 | #elif defined(__BIG_ENDIAN_BITFIELD) |
| 1465 | 1476 | struct { |
| 1466 | − __u16 var3_w; | |
| 1467 | − __u16 var2_w; | |
| 1468 | − __u32 var1_dw; | |
| 1477 | + __u16 var3_w; | |
| 1478 | + __u16 var2_w; | |
| 1479 | + __u32 var1_dw; | |
| 1469 | 1480 | }; |
| 1470 | 1481 | #else |
| 1471 | −#error "Unknown endianness" | |
| 1482 | +# error "Unknown endianness" | |
| 1472 | 1483 | #endif |
| 1473 | 1484 | }; |
| 1474 | 1485 | |
| @@ -12,7 +12,7 @@ · 11 unmodified lines | ||
| 12 | 12 | #define PIDFD_THREAD O_EXCL |
| 13 | 13 | #ifdef __KERNEL__ |
| 14 | 14 | #include <linux/sched.h> |
| 15 | −#define PIDFD_CLONE CLONE_PIDFD | |
| 15 | +#define PIDFD_STALE CLONE_PIDFD | |
| 16 | 16 | #endif |
| 17 | 17 | |
| 18 | 18 | /* Flags for pidfd_send_signal(). */ |
| @@ -25,9 +25,23 @@ · 6 unmodified lines | ||
| 25 | 25 | #define PIDFD_INFO_CREDS (1UL << 1) /* Always returned, even if not requested */ |
| 26 | 26 | #define PIDFD_INFO_CGROUPID (1UL << 2) /* Always returned if available, even if not requested */ |
| 27 | 27 | #define PIDFD_INFO_EXIT (1UL << 3) /* Only returned if requested. */ |
| 28 | +#define PIDFD_INFO_COREDUMP (1UL << 4) /* Only returned if requested. */ | |
| 28 | 29 | |
| 29 | 30 | #define PIDFD_INFO_SIZE_VER0 64 /* sizeof first published struct */ |
| 30 | 31 | |
| 32 | +/* | |
| 33 | + * Values for @coredump_mask in pidfd_info. | |
| 34 | + * Only valid if PIDFD_INFO_COREDUMP is set in @mask. | |
| 35 | + * | |
| 36 | + * Note, the @PIDFD_COREDUMP_ROOT flag indicates that the generated | |
| 37 | + * coredump should be treated as sensitive and access should only be | |
| 38 | + * granted to privileged users. | |
| 39 | + */ | |
| 40 | +#define PIDFD_COREDUMPED (1U << 0) /* Did crash and... */ | |
| 41 | +#define PIDFD_COREDUMP_SKIP (1U << 1) /* coredumping generation was skipped. */ | |
| 42 | +#define PIDFD_COREDUMP_USER (1U << 2) /* coredump was done as the user. */ | |
| 43 | +#define PIDFD_COREDUMP_ROOT (1U << 3) /* coredump was done as root. */ | |
| 44 | + | |
| 31 | 45 | /* |
| 32 | 46 | * The concept of process and threads in userland and the kernel is a confusing |
| 33 | 47 | * one - within the kernel every thread is a 'task' with its own individual PID, |
| @@ -92,6 +106,8 @@ struct pidfd_info { · 58 unmodified lines | ||
| 92 | 106 | __u32 fsuid; |
| 93 | 107 | __u32 fsgid; |
| 94 | 108 | __s32 exit_code; |
| 109 | + __u32 coredump_mask; | |
| 110 | + __u32 __spare1; | |
| 95 | 111 | }; |
| 96 | 112 | |
| 97 | 113 | #define PIDFS_IOCTL_MAGIC 0xFF |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | −#ifndef __LINUX_PKT_CLS_H | |
| 3 | −#define __LINUX_PKT_CLS_H | |
| 2 | +#ifndef _UAPI__LINUX_PKT_CLS_H | |
| 3 | +#define _UAPI__LINUX_PKT_CLS_H | |
| 4 | 4 | |
| 5 | 5 | #include <linux/types.h> |
| 6 | 6 | #include <linux/pkt_sched.h> |
| @@ -697,6 +697,7 @@ enum { · 690 unmodified lines | ||
| 697 | 697 | }; |
| 698 | 698 | |
| 699 | 699 | #define TCA_FLOWER_KEY_CFM_OPT_MAX (__TCA_FLOWER_KEY_CFM_OPT_MAX - 1) |
| 700 | +#define TCA_FLOWER_KEY_CFM_MAX (__TCA_FLOWER_KEY_CFM_OPT_MAX - 1) | |
| 700 | 701 | |
| 701 | 702 | #define TCA_FLOWER_MASK_FLAGS_RANGE (1 << 0) /* Range-based match */ |
| 702 | 703 | |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | −#ifndef __LINUX_PKT_SCHED_H | |
| 3 | −#define __LINUX_PKT_SCHED_H | |
| 2 | +#ifndef _UAPI__LINUX_PKT_SCHED_H | |
| 3 | +#define _UAPI__LINUX_PKT_SCHED_H | |
| 4 | 4 | |
| 5 | 5 | #include <linux/const.h> |
| 6 | 6 | #include <linux/types.h> |
| @@ -1182,6 +1182,7 @@ enum { · 1175 unmodified lines | ||
| 1182 | 1182 | TCA_TAPRIO_ATTR_SCHED_SINGLE_ENTRY, /* single entry */ |
| 1183 | 1183 | TCA_TAPRIO_ATTR_SCHED_CLOCKID, /* s32 */ |
| 1184 | 1184 | TCA_TAPRIO_PAD, |
| 1185 | + TCA_TAPRIO_ATTR_PAD = TCA_TAPRIO_PAD, | |
| 1185 | 1186 | TCA_TAPRIO_ATTR_ADMIN_SCHED, /* The admin sched, only used in dump */ |
| 1186 | 1187 | TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME, /* s64 */ |
| 1187 | 1188 | TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME_EXTENSION, /* s64 */ |
| @@ -364,4 +364,11 @@ struct prctl_mm_map { · 363 unmodified lines | ||
| 364 | 364 | # define PR_TIMER_CREATE_RESTORE_IDS_ON 1 |
| 365 | 365 | # define PR_TIMER_CREATE_RESTORE_IDS_GET 2 |
| 366 | 366 | |
| 367 | +/* FUTEX hash management */ | |
| 368 | +#define PR_FUTEX_HASH 78 | |
| 369 | +# define PR_FUTEX_HASH_SET_SLOTS 1 | |
| 370 | +# define FH_FLAG_IMMUTABLE (1ULL << 0) | |
| 371 | +# define PR_FUTEX_HASH_GET_SLOTS 2 | |
| 372 | +# define PR_FUTEX_HASH_GET_IMMUTABLE 3 | |
| 373 | + | |
| 367 | 374 | #endif /* _LINUX_PRCTL_H */ |
| @@ -74,6 +74,7 @@ struct seccomp_metadata { · 73 unmodified lines | ||
| 74 | 74 | }; |
| 75 | 75 | |
| 76 | 76 | #define PTRACE_GET_SYSCALL_INFO 0x420e |
| 77 | +#define PTRACE_SET_SYSCALL_INFO 0x4212 | |
| 77 | 78 | #define PTRACE_SYSCALL_INFO_NONE 0 |
| 78 | 79 | #define PTRACE_SYSCALL_INFO_ENTRY 1 |
| 79 | 80 | #define PTRACE_SYSCALL_INFO_EXIT 2 |
| @@ -81,7 +82,8 @@ struct seccomp_metadata { · 1 unmodified line | ||
| 81 | 82 | |
| 82 | 83 | struct ptrace_syscall_info { |
| 83 | 84 | __u8 op; /* PTRACE_SYSCALL_INFO_* */ |
| 84 | − __u8 pad[3]; | |
| 85 | + __u8 reserved; | |
| 86 | + __u16 flags; | |
| 85 | 87 | __u32 arch; |
| 86 | 88 | __u64 instruction_pointer; |
| 87 | 89 | __u64 stack_pointer; |
| @@ -98,6 +100,7 @@ struct ptrace_syscall_info { · 10 unmodified lines | ||
| 98 | 100 | __u64 nr; |
| 99 | 101 | __u64 args[6]; |
| 100 | 102 | __u32 ret_data; |
| 103 | + __u32 reserved2; | |
| 101 | 104 | } seccomp; |
| 102 | 105 | }; |
| 103 | 106 | }; |
| @@ -142,6 +145,8 @@ struct ptrace_sud_config { · 38 unmodified lines | ||
| 142 | 145 | __u64 len; |
| 143 | 146 | }; |
| 144 | 147 | |
| 148 | +/* 0x4212 is PTRACE_SET_SYSCALL_INFO */ | |
| 149 | + | |
| 145 | 150 | /* |
| 146 | 151 | * These values are stored in task->ptrace_message |
| 147 | 152 | * by ptrace_stop to describe the current syscall-stop. |
| @@ -36,26 +36,33 @@ struct sockaddr_rxrpc { · 35 unmodified lines | ||
| 36 | 36 | #define RXRPC_MIN_SECURITY_LEVEL 4 /* minimum security level */ |
| 37 | 37 | #define RXRPC_UPGRADEABLE_SERVICE 5 /* Upgrade service[0] -> service[1] */ |
| 38 | 38 | #define RXRPC_SUPPORTED_CMSG 6 /* Get highest supported control message type */ |
| 39 | +#define RXRPC_MANAGE_RESPONSE 7 /* [clnt] Want to manage RESPONSE packets */ | |
| 39 | 40 | |
| 40 | 41 | /* |
| 41 | 42 | * RxRPC control messages |
| 42 | 43 | * - If neither abort or accept are specified, the message is a data message. |
| 43 | 44 | * - terminal messages mean that a user call ID tag can be recycled |
| 45 | + * - C/S/- indicate whether these are applicable to client, server or both | |
| 44 | 46 | * - s/r/- indicate whether these are applicable to sendmsg() and/or recvmsg() |
| 45 | 47 | */ |
| 46 | 48 | enum rxrpc_cmsg_type { |
| 47 | − RXRPC_USER_CALL_ID = 1, /* sr: user call ID specifier */ | |
| 48 | − RXRPC_ABORT = 2, /* sr: abort request / notification [terminal] */ | |
| 49 | − RXRPC_ACK = 3, /* -r: [Service] RPC op final ACK received [terminal] */ | |
| 50 | − RXRPC_NET_ERROR = 5, /* -r: network error received [terminal] */ | |
| 51 | − RXRPC_BUSY = 6, /* -r: server busy received [terminal] */ | |
| 52 | − RXRPC_LOCAL_ERROR = 7, /* -r: local error generated [terminal] */ | |
| 53 | − RXRPC_NEW_CALL = 8, /* -r: [Service] new incoming call notification */ | |
| 54 | − RXRPC_EXCLUSIVE_CALL = 10, /* s-: Call should be on exclusive connection */ | |
| 55 | − RXRPC_UPGRADE_SERVICE = 11, /* s-: Request service upgrade for client call */ | |
| 56 | − RXRPC_TX_LENGTH = 12, /* s-: Total length of Tx data */ | |
| 57 | − RXRPC_SET_CALL_TIMEOUT = 13, /* s-: Set one or more call timeouts */ | |
| 58 | − RXRPC_CHARGE_ACCEPT = 14, /* s-: Charge the accept pool with a user call ID */ | |
| 49 | + RXRPC_USER_CALL_ID = 1, /* -sr: User call ID specifier */ | |
| 50 | + RXRPC_ABORT = 2, /* -sr: Abort request / notification [terminal] */ | |
| 51 | + RXRPC_ACK = 3, /* S-r: RPC op final ACK received [terminal] */ | |
| 52 | + RXRPC_NET_ERROR = 5, /* --r: Network error received [terminal] */ | |
| 53 | + RXRPC_BUSY = 6, /* C-r: Server busy received [terminal] */ | |
| 54 | + RXRPC_LOCAL_ERROR = 7, /* --r: Local error generated [terminal] */ | |
| 55 | + RXRPC_NEW_CALL = 8, /* S-r: New incoming call notification */ | |
| 56 | + RXRPC_EXCLUSIVE_CALL = 10, /* Cs-: Call should be on exclusive connection */ | |
| 57 | + RXRPC_UPGRADE_SERVICE = 11, /* Cs-: Request service upgrade for client call */ | |
| 58 | + RXRPC_TX_LENGTH = 12, /* -s-: Total length of Tx data */ | |
| 59 | + RXRPC_SET_CALL_TIMEOUT = 13, /* -s-: Set one or more call timeouts */ | |
| 60 | + RXRPC_CHARGE_ACCEPT = 14, /* Ss-: Charge the accept pool with a user call ID */ | |
| 61 | + RXRPC_OOB_ID = 15, /* -sr: OOB message ID */ | |
| 62 | + RXRPC_CHALLENGED = 16, /* C-r: Info on a received CHALLENGE */ | |
| 63 | + RXRPC_RESPOND = 17, /* Cs-: Respond to a challenge */ | |
| 64 | + RXRPC_RESPONDED = 18, /* S-r: Data received in RESPONSE */ | |
| 65 | + RXRPC_RESP_RXGK_APPDATA = 19, /* Cs-: RESPONSE: RxGK app data to include */ | |
| 59 | 66 | RXRPC__SUPPORTED |
| 60 | 67 | }; |
| 61 | 68 | |
| @@ -73,6 +80,7 @@ enum rxrpc_cmsg_type { · 11 unmodified lines | ||
| 73 | 80 | #define RXRPC_SECURITY_RXKAD 2 /* kaserver or kerberos 4 */ |
| 74 | 81 | #define RXRPC_SECURITY_RXGK 4 /* gssapi-based */ |
| 75 | 82 | #define RXRPC_SECURITY_RXK5 5 /* kerberos 5 */ |
| 83 | +#define RXRPC_SECURITY_YFS_RXGK 6 /* YFS gssapi-based */ | |
| 76 | 84 | |
| 77 | 85 | /* |
| 78 | 86 | * RxRPC-level abort codes |
| @@ -118,4 +126,49 @@ enum rxrpc_cmsg_type { · 39 unmodified lines | ||
| 118 | 126 | #define RXKADDATALEN 19270411 /* user data too long */ |
| 119 | 127 | #define RXKADILLEGALLEVEL 19270412 /* caller not authorised to use encrypted conns */ |
| 120 | 128 | |
| 129 | +/* | |
| 130 | + * RxGK GSSAPI security abort codes. | |
| 131 | + */ | |
| 132 | +#if 0 /* Original standard abort codes (used by OpenAFS) */ | |
| 133 | +#define RXGK_INCONSISTENCY 1233242880 /* Security module structure inconsistent */ | |
| 134 | +#define RXGK_PACKETSHORT 1233242881 /* Packet too short for security challenge */ | |
| 135 | +#define RXGK_BADCHALLENGE 1233242882 /* Invalid security challenge */ | |
| 136 | +#define RXGK_BADETYPE 1233242883 /* Invalid or impermissible encryption type */ | |
| 137 | +#define RXGK_BADLEVEL 1233242884 /* Invalid or impermissible security level */ | |
| 138 | +#define RXGK_BADKEYNO 1233242885 /* Key version number not found */ | |
| 139 | +#define RXGK_EXPIRED 1233242886 /* Token has expired */ | |
| 140 | +#define RXGK_NOTAUTH 1233242887 /* Caller not authorized */ | |
| 141 | +#define RXGK_BAD_TOKEN 1233242888 /* Security object was passed a bad token */ | |
| 142 | +#define RXGK_SEALED_INCON 1233242889 /* Sealed data inconsistent */ | |
| 143 | +#define RXGK_DATA_LEN 1233242890 /* User data too long */ | |
| 144 | +#define RXGK_BAD_QOP 1233242891 /* Inadequate quality of protection available */ | |
| 145 | +#else /* Revised standard abort codes (used by YFS) */ | |
| 146 | +#define RXGK_INCONSISTENCY 1233242880 /* Security module structure inconsistent */ | |
| 147 | +#define RXGK_PACKETSHORT 1233242881 /* Packet too short for security challenge */ | |
| 148 | +#define RXGK_BADCHALLENGE 1233242882 /* Security challenge/response failed */ | |
| 149 | +#define RXGK_SEALEDINCON 1233242883 /* Sealed data is inconsistent */ | |
| 150 | +#define RXGK_NOTAUTH 1233242884 /* Caller not authorised */ | |
| 151 | +#define RXGK_EXPIRED 1233242885 /* Authentication expired */ | |
| 152 | +#define RXGK_BADLEVEL 1233242886 /* Unsupported or not permitted security level */ | |
| 153 | +#define RXGK_BADKEYNO 1233242887 /* Bad transport key number */ | |
| 154 | +#define RXGK_NOTRXGK 1233242888 /* Security layer is not rxgk */ | |
| 155 | +#define RXGK_UNSUPPORTED 1233242889 /* Endpoint does not support rxgk */ | |
| 156 | +#define RXGK_GSSERROR 1233242890 /* GSSAPI mechanism error */ | |
| 157 | +#endif | |
| 158 | + | |
| 159 | +/* | |
| 160 | + * Challenge information in the RXRPC_CHALLENGED control message. | |
| 161 | + */ | |
| 162 | +struct rxrpc_challenge { | |
| 163 | + __u16 service_id; /* The service ID of the connection (may be upgraded) */ | |
| 164 | + __u8 security_index; /* The security index of the connection */ | |
| 165 | + __u8 pad; /* Round out to a multiple of 4 bytes. */ | |
| 166 | + /* ... The security class gets to append extra information ... */ | |
| 167 | +}; | |
| 168 | + | |
| 169 | +struct rxgk_challenge { | |
| 170 | + struct rxrpc_challenge base; | |
| 171 | + __u32 enctype; /* Krb5 encoding type */ | |
| 172 | +}; | |
| 173 | + | |
| 121 | 174 | #endif /* _UAPI_LINUX_RXRPC_H */ |
| @@ -188,6 +188,7 @@ enum · 187 unmodified lines | ||
| 188 | 188 | LINUX_MIB_PAWSESTABREJECTED, /* PAWSEstabRejected */ |
| 189 | 189 | LINUX_MIB_TSECRREJECTED, /* TSEcrRejected */ |
| 190 | 190 | LINUX_MIB_PAWS_OLD_ACK, /* PAWSOldAck */ |
| 191 | + LINUX_MIB_PAWS_TW_REJECTED, /* PAWSTimewait */ | |
| 191 | 192 | LINUX_MIB_DELAYEDACKS, /* DelayedACKs */ |
| 192 | 193 | LINUX_MIB_DELAYEDACKLOCKED, /* DelayedACKLocked */ |
| 193 | 194 | LINUX_MIB_DELAYEDACKLOST, /* DelayedACKLost */ |
| @@ -182,8 +182,12 @@ struct statx { · 181 unmodified lines | ||
| 182 | 182 | /* File offset alignment for direct I/O reads */ |
| 183 | 183 | __u32 stx_dio_read_offset_align; |
| 184 | 184 | |
| 185 | − /* 0xb8 */ | |
| 186 | − __u64 __spare3[9]; /* Spare space for future expansion */ | |
| 185 | + /* Optimised max atomic write unit in bytes */ | |
| 186 | + __u32 stx_atomic_write_unit_max_opt; | |
| 187 | + __u32 __spare2[1]; | |
| 188 | + | |
| 189 | + /* 0xc0 */ | |
| 190 | + __u64 __spare3[8]; /* Spare space for future expansion */ | |
| 187 | 191 | |
| 188 | 192 | /* 0x100 */ |
| 189 | 193 | }; |
| @@ -34,7 +34,7 @@ · 33 unmodified lines | ||
| 34 | 34 | */ |
| 35 | 35 | |
| 36 | 36 | |
| 37 | −#define TASKSTATS_VERSION 15 | |
| 37 | +#define TASKSTATS_VERSION 16 | |
| 38 | 38 | #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN |
| 39 | 39 | * in linux/sched.h */ |
| 40 | 40 | |
| @@ -72,8 +72,6 @@ struct taskstats { · 31 unmodified lines | ||
| 72 | 72 | */ |
| 73 | 73 | __u64 cpu_count __attribute__((aligned(8))); |
| 74 | 74 | __u64 cpu_delay_total; |
| 75 | − __u64 cpu_delay_max; | |
| 76 | − __u64 cpu_delay_min; | |
| 77 | 75 | |
| 78 | 76 | /* Following four fields atomically updated using task->delays->lock */ |
| 79 | 77 | |
| @@ -82,14 +80,10 @@ struct taskstats { · 2 unmodified lines | ||
| 82 | 80 | */ |
| 83 | 81 | __u64 blkio_count; |
| 84 | 82 | __u64 blkio_delay_total; |
| 85 | − __u64 blkio_delay_max; | |
| 86 | − __u64 blkio_delay_min; | |
| 87 | 83 | |
| 88 | 84 | /* Delay waiting for page fault I/O (swap in only) */ |
| 89 | 85 | __u64 swapin_count; |
| 90 | 86 | __u64 swapin_delay_total; |
| 91 | − __u64 swapin_delay_max; | |
| 92 | − __u64 swapin_delay_min; | |
| 93 | 87 | |
| 94 | 88 | /* cpu "wall-clock" running time |
| 95 | 89 | * On some architectures, value will adjust for cpu time stolen |
| @@ -172,14 +166,11 @@ struct taskstats { · 76 unmodified lines | ||
| 172 | 166 | /* Delay waiting for memory reclaim */ |
| 173 | 167 | __u64 freepages_count; |
| 174 | 168 | __u64 freepages_delay_total; |
| 175 | − __u64 freepages_delay_max; | |
| 176 | − __u64 freepages_delay_min; | |
| 169 | + | |
| 177 | 170 | |
| 178 | 171 | /* Delay waiting for thrashing page */ |
| 179 | 172 | __u64 thrashing_count; |
| 180 | 173 | __u64 thrashing_delay_total; |
| 181 | − __u64 thrashing_delay_max; | |
| 182 | − __u64 thrashing_delay_min; | |
| 183 | 174 | |
| 184 | 175 | /* v10: 64-bit btime to avoid overflow */ |
| 185 | 176 | __u64 ac_btime64; /* 64-bit begin time */ |
| @@ -187,8 +178,6 @@ struct taskstats { · 1 unmodified line | ||
| 187 | 178 | /* v11: Delay waiting for memory compact */ |
| 188 | 179 | __u64 compact_count; |
| 189 | 180 | __u64 compact_delay_total; |
| 190 | − __u64 compact_delay_max; | |
| 191 | − __u64 compact_delay_min; | |
| 192 | 181 | |
| 193 | 182 | /* v12 begin */ |
| 194 | 183 | __u32 ac_tgid; /* thread group ID */ |
| @@ -210,15 +199,37 @@ struct taskstats { · 15 unmodified lines | ||
| 210 | 199 | /* v13: Delay waiting for write-protect copy */ |
| 211 | 200 | __u64 wpcopy_count; |
| 212 | 201 | __u64 wpcopy_delay_total; |
| 213 | − __u64 wpcopy_delay_max; | |
| 214 | − __u64 wpcopy_delay_min; | |
| 215 | 202 | |
| 216 | 203 | /* v14: Delay waiting for IRQ/SOFTIRQ */ |
| 217 | 204 | __u64 irq_count; |
| 218 | 205 | __u64 irq_delay_total; |
| 219 | − __u64 irq_delay_max; | |
| 220 | − __u64 irq_delay_min; | |
| 221 | − /* v15: add Delay max */ | |
| 206 | + | |
| 207 | + /* v15: add Delay max and Delay min */ | |
| 208 | + | |
| 209 | + /* v16: move Delay max and Delay min to the end of taskstat */ | |
| 210 | + __u64 cpu_delay_max; | |
| 211 | + __u64 cpu_delay_min; | |
| 212 | + | |
| 213 | + __u64 blkio_delay_max; | |
| 214 | + __u64 blkio_delay_min; | |
| 215 | + | |
| 216 | + __u64 swapin_delay_max; | |
| 217 | + __u64 swapin_delay_min; | |
| 218 | + | |
| 219 | + __u64 freepages_delay_max; | |
| 220 | + __u64 freepages_delay_min; | |
| 221 | + | |
| 222 | + __u64 thrashing_delay_max; | |
| 223 | + __u64 thrashing_delay_min; | |
| 224 | + | |
| 225 | + __u64 compact_delay_max; | |
| 226 | + __u64 compact_delay_min; | |
| 227 | + | |
| 228 | + __u64 wpcopy_delay_max; | |
| 229 | + __u64 wpcopy_delay_min; | |
| 230 | + | |
| 231 | + __u64 irq_delay_max; | |
| 232 | + __u64 irq_delay_min; | |
| 222 | 233 | }; |
| 223 | 234 | |
| 224 | 235 | |
| @@ -184,6 +184,7 @@ enum tcp_fastopen_client_fail { · 183 unmodified lines | ||
| 184 | 184 | #define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */ |
| 185 | 185 | #define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */ |
| 186 | 186 | #define TCPI_OPT_USEC_TS 64 /* usec timestamps */ |
| 187 | +#define TCPI_OPT_TFO_CHILD 128 /* child from a Fast Open option on SYN */ | |
| 187 | 188 | |
| 188 | 189 | /* |
| 189 | 190 | * Sender's congestion state indicating normal or abnormal situations |
| @@ -36,5 +36,6 @@ struct tiocl_selection { · 35 unmodified lines | ||
| 36 | 36 | #define TIOCL_BLANKSCREEN 14 /* keep screen blank even if a key is pressed */ |
| 37 | 37 | #define TIOCL_BLANKEDSCREEN 15 /* return which vt was blanked */ |
| 38 | 38 | #define TIOCL_GETKMSGREDIRECT 17 /* get the vt the kernel messages are restricted to */ |
| 39 | +#define TIOCL_GETBRACKETEDPASTE 18 /* get whether paste may be bracketed */ | |
| 39 | 40 | |
| 40 | 41 | #endif /* _LINUX_TIOCL_H */ |
| @@ -51,6 +51,10 @@ · 50 unmodified lines | ||
| 51 | 51 | _IOR('u', 0x13, struct ublksrv_ctrl_cmd) |
| 52 | 52 | #define UBLK_U_CMD_DEL_DEV_ASYNC \ |
| 53 | 53 | _IOR('u', 0x14, struct ublksrv_ctrl_cmd) |
| 54 | +#define UBLK_U_CMD_UPDATE_SIZE \ | |
| 55 | + _IOWR('u', 0x15, struct ublksrv_ctrl_cmd) | |
| 56 | +#define UBLK_U_CMD_QUIESCE_DEV \ | |
| 57 | + _IOWR('u', 0x16, struct ublksrv_ctrl_cmd) | |
| 54 | 58 | |
| 55 | 59 | /* |
| 56 | 60 | * 64bits are enough now, and it should be easy to extend in case of |
| @@ -211,6 +215,72 @@ · 154 unmodified lines | ||
| 211 | 215 | */ |
| 212 | 216 | #define UBLK_F_USER_RECOVERY_FAIL_IO (1ULL << 9) |
| 213 | 217 | |
| 218 | +/* | |
| 219 | + * Resizing a block device is possible with UBLK_U_CMD_UPDATE_SIZE | |
| 220 | + * New size is passed in cmd->data[0] and is in units of sectors | |
| 221 | + */ | |
| 222 | +#define UBLK_F_UPDATE_SIZE (1ULL << 10) | |
| 223 | + | |
| 224 | +/* | |
| 225 | + * request buffer is registered automatically to uring_cmd's io_uring | |
| 226 | + * context before delivering this io command to ublk server, meantime | |
| 227 | + * it is un-registered automatically when completing this io command. | |
| 228 | + * | |
| 229 | + * For using this feature: | |
| 230 | + * | |
| 231 | + * - ublk server has to create sparse buffer table on the same `io_ring_ctx` | |
| 232 | + * for issuing `UBLK_IO_FETCH_REQ` and `UBLK_IO_COMMIT_AND_FETCH_REQ`. | |
| 233 | + * If uring_cmd isn't issued on same `io_ring_ctx`, it is ublk server's | |
| 234 | + * responsibility to unregister the buffer by issuing `IO_UNREGISTER_IO_BUF` | |
| 235 | + * manually, otherwise this ublk request won't complete. | |
| 236 | + * | |
| 237 | + * - ublk server passes auto buf register data via uring_cmd's sqe->addr, | |
| 238 | + * `struct ublk_auto_buf_reg` is populated from sqe->addr, please see | |
| 239 | + * the definition of ublk_sqe_addr_to_auto_buf_reg() | |
| 240 | + * | |
| 241 | + * - pass buffer index from `ublk_auto_buf_reg.index` | |
| 242 | + * | |
| 243 | + * - all reserved fields in `ublk_auto_buf_reg` need to be zeroed | |
| 244 | + * | |
| 245 | + * - pass flags from `ublk_auto_buf_reg.flags` if needed | |
| 246 | + * | |
| 247 | + * This way avoids extra cost from two uring_cmd, but also simplifies backend | |
| 248 | + * implementation, such as, the dependency on IO_REGISTER_IO_BUF and | |
| 249 | + * IO_UNREGISTER_IO_BUF becomes not necessary. | |
| 250 | + * | |
| 251 | + * If wrong data or flags are provided, both IO_FETCH_REQ and | |
| 252 | + * IO_COMMIT_AND_FETCH_REQ are failed, for the latter, the ublk IO request | |
| 253 | + * won't be completed until new IO_COMMIT_AND_FETCH_REQ command is issued | |
| 254 | + * successfully | |
| 255 | + */ | |
| 256 | +#define UBLK_F_AUTO_BUF_REG (1ULL << 11) | |
| 257 | + | |
| 258 | +/* | |
| 259 | + * Control command `UBLK_U_CMD_QUIESCE_DEV` is added for quiescing device, | |
| 260 | + * which state can be transitioned to `UBLK_S_DEV_QUIESCED` or | |
| 261 | + * `UBLK_S_DEV_FAIL_IO` finally, and it needs ublk server cooperation for | |
| 262 | + * handling `UBLK_IO_RES_ABORT` correctly. | |
| 263 | + * | |
| 264 | + * Typical use case is for supporting to upgrade ublk server application, | |
| 265 | + * meantime keep ublk block device persistent during the period. | |
| 266 | + * | |
| 267 | + * This feature is only available when UBLK_F_USER_RECOVERY is enabled. | |
| 268 | + * | |
| 269 | + * Note, this command returns -EBUSY in case that all IO commands are being | |
| 270 | + * handled by ublk server and not completed in specified time period which | |
| 271 | + * is passed from the control command parameter. | |
| 272 | + */ | |
| 273 | +#define UBLK_F_QUIESCE (1ULL << 12) | |
| 274 | + | |
| 275 | +/* | |
| 276 | + * If this feature is set, ublk_drv supports each (qid,tag) pair having | |
| 277 | + * its own independent daemon task that is responsible for handling it. | |
| 278 | + * If it is not set, daemons are per-queue instead, so for two pairs | |
| 279 | + * (qid1,tag1) and (qid2,tag2), if qid1 == qid2, then the same task must | |
| 280 | + * be responsible for handling (qid1,tag1) and (qid2,tag2). | |
| 281 | + */ | |
| 282 | +#define UBLK_F_PER_IO_DAEMON (1ULL << 13) | |
| 283 | + | |
| 214 | 284 | /* device state */ |
| 215 | 285 | #define UBLK_S_DEV_DEAD 0 |
| 216 | 286 | #define UBLK_S_DEV_LIVE 1 |
| @@ -297,6 +367,17 @@ struct ublksrv_ctrl_dev_info { · 80 unmodified lines | ||
| 297 | 367 | #define UBLK_IO_F_FUA (1U << 13) |
| 298 | 368 | #define UBLK_IO_F_NOUNMAP (1U << 15) |
| 299 | 369 | #define UBLK_IO_F_SWAP (1U << 16) |
| 370 | +/* | |
| 371 | + * For UBLK_F_AUTO_BUF_REG & UBLK_AUTO_BUF_REG_FALLBACK only. | |
| 372 | + * | |
| 373 | + * This flag is set if auto buffer register is failed & ublk server passes | |
| 374 | + * UBLK_AUTO_BUF_REG_FALLBACK, and ublk server need to register buffer | |
| 375 | + * manually for handling the delivered IO command if this flag is observed | |
| 376 | + * | |
| 377 | + * ublk server has to check this flag if UBLK_AUTO_BUF_REG_FALLBACK is | |
| 378 | + * passed in. | |
| 379 | + */ | |
| 380 | +#define UBLK_IO_F_NEED_REG_BUF (1U << 17) | |
| 300 | 381 | |
| 301 | 382 | /* |
| 302 | 383 | * io cmd is described by this structure, and stored in share memory, indexed |
| @@ -331,6 +412,62 @@ static inline __u32 ublksrv_get_flags(const struct ublksrv_io_desc *iod) · 28 unmodified lines | ||
| 331 | 412 | return iod->op_flags >> 8; |
| 332 | 413 | } |
| 333 | 414 | |
| 415 | +/* | |
| 416 | + * If this flag is set, fallback by completing the uring_cmd and setting | |
| 417 | + * `UBLK_IO_F_NEED_REG_BUF` in case of auto-buf-register failure; | |
| 418 | + * otherwise the client ublk request is failed silently | |
| 419 | + * | |
| 420 | + * If ublk server passes this flag, it has to check if UBLK_IO_F_NEED_REG_BUF | |
| 421 | + * is set in `ublksrv_io_desc.op_flags`. If UBLK_IO_F_NEED_REG_BUF is set, | |
| 422 | + * ublk server needs to register io buffer manually for handling IO command. | |
| 423 | + */ | |
| 424 | +#define UBLK_AUTO_BUF_REG_FALLBACK (1 << 0) | |
| 425 | +#define UBLK_AUTO_BUF_REG_F_MASK UBLK_AUTO_BUF_REG_FALLBACK | |
| 426 | + | |
| 427 | +struct ublk_auto_buf_reg { | |
| 428 | + /* index for registering the delivered request buffer */ | |
| 429 | + __u16 index; | |
| 430 | + __u8 flags; | |
| 431 | + __u8 reserved0; | |
| 432 | + | |
| 433 | + /* | |
| 434 | + * io_ring FD can be passed via the reserve field in future for | |
| 435 | + * supporting to register io buffer to external io_uring | |
| 436 | + */ | |
| 437 | + __u32 reserved1; | |
| 438 | +}; | |
| 439 | + | |
| 440 | +/* | |
| 441 | + * For UBLK_F_AUTO_BUF_REG, auto buffer register data is carried via | |
| 442 | + * uring_cmd's sqe->addr: | |
| 443 | + * | |
| 444 | + * - bit0 ~ bit15: buffer index | |
| 445 | + * - bit16 ~ bit23: flags | |
| 446 | + * - bit24 ~ bit31: reserved0 | |
| 447 | + * - bit32 ~ bit63: reserved1 | |
| 448 | + */ | |
| 449 | +static inline struct ublk_auto_buf_reg ublk_sqe_addr_to_auto_buf_reg( | |
| 450 | + __u64 sqe_addr) | |
| 451 | +{ | |
| 452 | + struct ublk_auto_buf_reg reg = { | |
| 453 | + .index = sqe_addr & 0xffff, | |
| 454 | + .flags = (sqe_addr >> 16) & 0xff, | |
| 455 | + .reserved0 = (sqe_addr >> 24) & 0xff, | |
| 456 | + .reserved1 = sqe_addr >> 32, | |
| 457 | + }; | |
| 458 | + | |
| 459 | + return reg; | |
| 460 | +} | |
| 461 | + | |
| 462 | +static inline __u64 | |
| 463 | +ublk_auto_buf_reg_to_sqe_addr(const struct ublk_auto_buf_reg *buf) | |
| 464 | +{ | |
| 465 | + __u64 addr = buf->index | (__u64)buf->flags << 16 | (__u64)buf->reserved0 << 24 | | |
| 466 | + (__u64)buf->reserved1 << 32; | |
| 467 | + | |
| 468 | + return addr; | |
| 469 | +} | |
| 470 | + | |
| 334 | 471 | /* issued to ublk driver via /dev/ublkcN */ |
| 335 | 472 | struct ublksrv_io_cmd { |
| 336 | 473 | __u16 q_id; |
| @@ -43,5 +43,6 @@ struct udphdr { · 42 unmodified lines | ||
| 43 | 43 | #define UDP_ENCAP_GTP1U 5 /* 3GPP TS 29.060 */ |
| 44 | 44 | #define UDP_ENCAP_RXRPC 6 |
| 45 | 45 | #define TCP_ENCAP_ESPINTCP 7 /* Yikes, this is really xfrm encap types. */ |
| 46 | +#define UDP_ENCAP_OVPNINUDP 8 /* OpenVPN traffic */ | |
| 46 | 47 | |
| 47 | 48 | #endif /* _UAPI_LINUX_UDP_H */ |
| @@ -153,10 +153,18 @@ enum v4l2_buf_type { · 152 unmodified lines | ||
| 153 | 153 | V4L2_BUF_TYPE_SDR_OUTPUT = 12, |
| 154 | 154 | V4L2_BUF_TYPE_META_CAPTURE = 13, |
| 155 | 155 | V4L2_BUF_TYPE_META_OUTPUT = 14, |
| 156 | + /* | |
| 157 | + * Note: V4L2_TYPE_IS_VALID and V4L2_TYPE_IS_OUTPUT must | |
| 158 | + * be updated if a new type is added. | |
| 159 | + */ | |
| 156 | 160 | /* Deprecated, do not use */ |
| 157 | 161 | V4L2_BUF_TYPE_PRIVATE = 0x80, |
| 158 | 162 | }; |
| 159 | 163 | |
| 164 | +#define V4L2_TYPE_IS_VALID(type) \ | |
| 165 | + ((type) >= V4L2_BUF_TYPE_VIDEO_CAPTURE &&\ | |
| 166 | + (type) <= V4L2_BUF_TYPE_META_OUTPUT) | |
| 167 | + | |
| 160 | 168 | #define V4L2_TYPE_IS_MULTIPLANAR(type) \ |
| 161 | 169 | ((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE \ |
| 162 | 170 | || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) |
| @@ -164,14 +172,14 @@ enum v4l2_buf_type { · 1 unmodified line | ||
| 164 | 172 | #define V4L2_TYPE_IS_OUTPUT(type) \ |
| 165 | 173 | ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT \ |
| 166 | 174 | || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE \ |
| 167 | − || (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY \ | |
| 168 | 175 | || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY \ |
| 169 | 176 | || (type) == V4L2_BUF_TYPE_VBI_OUTPUT \ |
| 170 | 177 | || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT \ |
| 171 | 178 | || (type) == V4L2_BUF_TYPE_SDR_OUTPUT \ |
| 172 | 179 | || (type) == V4L2_BUF_TYPE_META_OUTPUT) |
| 173 | 180 | |
| 174 | −#define V4L2_TYPE_IS_CAPTURE(type) (!V4L2_TYPE_IS_OUTPUT(type)) | |
| 181 | +#define V4L2_TYPE_IS_CAPTURE(type) \ | |
| 182 | + (V4L2_TYPE_IS_VALID(type) && !V4L2_TYPE_IS_OUTPUT(type)) | |
| 175 | 183 | |
| 176 | 184 | enum v4l2_tuner_type { |
| 177 | 185 | V4L2_TUNER_RADIO = 1, |
| @@ -643,8 +651,10 @@ struct v4l2_pix_format { · 465 unmodified lines | ||
| 643 | 651 | /* two planes -- one Y, one Cr + Cb interleaved */ |
| 644 | 652 | #define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ |
| 645 | 653 | #define V4L2_PIX_FMT_NV21 v4l2_fourcc('N', 'V', '2', '1') /* 12 Y/CrCb 4:2:0 */ |
| 654 | +#define V4L2_PIX_FMT_NV15 v4l2_fourcc('N', 'V', '1', '5') /* 15 Y/CbCr 4:2:0 10-bit packed */ | |
| 646 | 655 | #define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */ |
| 647 | 656 | #define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */ |
| 657 | +#define V4L2_PIX_FMT_NV20 v4l2_fourcc('N', 'V', '2', '0') /* 20 Y/CbCr 4:2:2 10-bit packed */ | |
| 648 | 658 | #define V4L2_PIX_FMT_NV24 v4l2_fourcc('N', 'V', '2', '4') /* 24 Y/CbCr 4:4:4 */ |
| 649 | 659 | #define V4L2_PIX_FMT_NV42 v4l2_fourcc('N', 'V', '4', '2') /* 24 Y/CrCb 4:4:4 */ |
| 650 | 660 | #define V4L2_PIX_FMT_P010 v4l2_fourcc('P', '0', '1', '0') /* 24 Y/CbCr 4:2:0 10-bit per component */ |
| @@ -858,6 +868,10 @@ struct v4l2_pix_format { · 207 unmodified lines | ||
| 858 | 868 | #define V4L2_META_FMT_RK_ISP1_STAT_3A v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A Statistics */ |
| 859 | 869 | #define V4L2_META_FMT_RK_ISP1_EXT_PARAMS v4l2_fourcc('R', 'K', '1', 'E') /* Rockchip ISP1 3a Extensible Parameters */ |
| 860 | 870 | |
| 871 | +/* Vendor specific - used for C3_ISP */ | |
| 872 | +#define V4L2_META_FMT_C3ISP_PARAMS v4l2_fourcc('C', '3', 'P', 'M') /* Amlogic C3 ISP Parameters */ | |
| 873 | +#define V4L2_META_FMT_C3ISP_STATS v4l2_fourcc('C', '3', 'S', 'T') /* Amlogic C3 ISP Statistics */ | |
| 874 | + | |
| 861 | 875 | /* Vendor specific - used for RaspberryPi PiSP */ |
| 862 | 876 | #define V4L2_META_FMT_RPI_BE_CFG v4l2_fourcc('R', 'P', 'B', 'C') /* PiSP BE configuration */ |
| 863 | 877 | #define V4L2_META_FMT_RPI_FE_CFG v4l2_fourcc('R', 'P', 'F', 'C') /* PiSP FE configuration */ |
| @@ -309,8 +309,9 @@ struct virtio_gpu_cmd_submit { · 308 unmodified lines | ||
| 309 | 309 | |
| 310 | 310 | #define VIRTIO_GPU_CAPSET_VIRGL 1 |
| 311 | 311 | #define VIRTIO_GPU_CAPSET_VIRGL2 2 |
| 312 | −/* 3 is reserved for gfxstream */ | |
| 312 | +#define VIRTIO_GPU_CAPSET_GFXSTREAM_VULKAN 3 | |
| 313 | 313 | #define VIRTIO_GPU_CAPSET_VENUS 4 |
| 314 | +#define VIRTIO_GPU_CAPSET_CROSS_DOMAIN 5 | |
| 314 | 315 | #define VIRTIO_GPU_CAPSET_DRM 6 |
| 315 | 316 | |
| 316 | 317 | /* VIRTIO_GPU_CMD_GET_CAPSET_INFO */ |
| @@ -0,0 +1,237 @@ | ||
| 1 | +/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */ | |
| 2 | +/* | |
| 3 | + * Copyright (C) 2022-2024 OpenSynergy GmbH | |
| 4 | + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. | |
| 5 | + */ | |
| 6 | + | |
| 7 | +#ifndef _LINUX_VIRTIO_RTC_H | |
| 8 | +#define _LINUX_VIRTIO_RTC_H | |
| 9 | + | |
| 10 | +#include <linux/types.h> | |
| 11 | + | |
| 12 | +/* alarm feature */ | |
| 13 | +#define VIRTIO_RTC_F_ALARM 0 | |
| 14 | + | |
| 15 | +/* read request message types */ | |
| 16 | + | |
| 17 | +#define VIRTIO_RTC_REQ_READ 0x0001 | |
| 18 | +#define VIRTIO_RTC_REQ_READ_CROSS 0x0002 | |
| 19 | + | |
| 20 | +/* control request message types */ | |
| 21 | + | |
| 22 | +#define VIRTIO_RTC_REQ_CFG 0x1000 | |
| 23 | +#define VIRTIO_RTC_REQ_CLOCK_CAP 0x1001 | |
| 24 | +#define VIRTIO_RTC_REQ_CROSS_CAP 0x1002 | |
| 25 | +#define VIRTIO_RTC_REQ_READ_ALARM 0x1003 | |
| 26 | +#define VIRTIO_RTC_REQ_SET_ALARM 0x1004 | |
| 27 | +#define VIRTIO_RTC_REQ_SET_ALARM_ENABLED 0x1005 | |
| 28 | + | |
| 29 | +/* alarmq message types */ | |
| 30 | + | |
| 31 | +#define VIRTIO_RTC_NOTIF_ALARM 0x2000 | |
| 32 | + | |
| 33 | +/* Message headers */ | |
| 34 | + | |
| 35 | +/** common request header */ | |
| 36 | +struct virtio_rtc_req_head { | |
| 37 | + __le16 msg_type; | |
| 38 | + __u8 reserved[6]; | |
| 39 | +}; | |
| 40 | + | |
| 41 | +/** common response header */ | |
| 42 | +struct virtio_rtc_resp_head { | |
| 43 | +#define VIRTIO_RTC_S_OK 0 | |
| 44 | +#define VIRTIO_RTC_S_EOPNOTSUPP 2 | |
| 45 | +#define VIRTIO_RTC_S_ENODEV 3 | |
| 46 | +#define VIRTIO_RTC_S_EINVAL 4 | |
| 47 | +#define VIRTIO_RTC_S_EIO 5 | |
| 48 | + __u8 status; | |
| 49 | + __u8 reserved[7]; | |
| 50 | +}; | |
| 51 | + | |
| 52 | +/** common notification header */ | |
| 53 | +struct virtio_rtc_notif_head { | |
| 54 | + __le16 msg_type; | |
| 55 | + __u8 reserved[6]; | |
| 56 | +}; | |
| 57 | + | |
| 58 | +/* read requests */ | |
| 59 | + | |
| 60 | +/* VIRTIO_RTC_REQ_READ message */ | |
| 61 | + | |
| 62 | +struct virtio_rtc_req_read { | |
| 63 | + struct virtio_rtc_req_head head; | |
| 64 | + __le16 clock_id; | |
| 65 | + __u8 reserved[6]; | |
| 66 | +}; | |
| 67 | + | |
| 68 | +struct virtio_rtc_resp_read { | |
| 69 | + struct virtio_rtc_resp_head head; | |
| 70 | + __le64 clock_reading; | |
| 71 | +}; | |
| 72 | + | |
| 73 | +/* VIRTIO_RTC_REQ_READ_CROSS message */ | |
| 74 | + | |
| 75 | +struct virtio_rtc_req_read_cross { | |
| 76 | + struct virtio_rtc_req_head head; | |
| 77 | + __le16 clock_id; | |
| 78 | +/* Arm Generic Timer Counter-timer Virtual Count Register (CNTVCT_EL0) */ | |
| 79 | +#define VIRTIO_RTC_COUNTER_ARM_VCT 0 | |
| 80 | +/* x86 Time-Stamp Counter */ | |
| 81 | +#define VIRTIO_RTC_COUNTER_X86_TSC 1 | |
| 82 | +/* Invalid */ | |
| 83 | +#define VIRTIO_RTC_COUNTER_INVALID 0xFF | |
| 84 | + __u8 hw_counter; | |
| 85 | + __u8 reserved[5]; | |
| 86 | +}; | |
| 87 | + | |
| 88 | +struct virtio_rtc_resp_read_cross { | |
| 89 | + struct virtio_rtc_resp_head head; | |
| 90 | + __le64 clock_reading; | |
| 91 | + __le64 counter_cycles; | |
| 92 | +}; | |
| 93 | + | |
| 94 | +/* control requests */ | |
| 95 | + | |
| 96 | +/* VIRTIO_RTC_REQ_CFG message */ | |
| 97 | + | |
| 98 | +struct virtio_rtc_req_cfg { | |
| 99 | + struct virtio_rtc_req_head head; | |
| 100 | + /* no request params */ | |
| 101 | +}; | |
| 102 | + | |
| 103 | +struct virtio_rtc_resp_cfg { | |
| 104 | + struct virtio_rtc_resp_head head; | |
| 105 | + /** # of clocks -> clock ids < num_clocks are valid */ | |
| 106 | + __le16 num_clocks; | |
| 107 | + __u8 reserved[6]; | |
| 108 | +}; | |
| 109 | + | |
| 110 | +/* VIRTIO_RTC_REQ_CLOCK_CAP message */ | |
| 111 | + | |
| 112 | +struct virtio_rtc_req_clock_cap { | |
| 113 | + struct virtio_rtc_req_head head; | |
| 114 | + __le16 clock_id; | |
| 115 | + __u8 reserved[6]; | |
| 116 | +}; | |
| 117 | + | |
| 118 | +struct virtio_rtc_resp_clock_cap { | |
| 119 | + struct virtio_rtc_resp_head head; | |
| 120 | +#define VIRTIO_RTC_CLOCK_UTC 0 | |
| 121 | +#define VIRTIO_RTC_CLOCK_TAI 1 | |
| 122 | +#define VIRTIO_RTC_CLOCK_MONOTONIC 2 | |
| 123 | +#define VIRTIO_RTC_CLOCK_UTC_SMEARED 3 | |
| 124 | +#define VIRTIO_RTC_CLOCK_UTC_MAYBE_SMEARED 4 | |
| 125 | + __u8 type; | |
| 126 | +#define VIRTIO_RTC_SMEAR_UNSPECIFIED 0 | |
| 127 | +#define VIRTIO_RTC_SMEAR_NOON_LINEAR 1 | |
| 128 | +#define VIRTIO_RTC_SMEAR_UTC_SLS 2 | |
| 129 | + __u8 leap_second_smearing; | |
| 130 | +#define VIRTIO_RTC_FLAG_ALARM_CAP (1 << 0) | |
| 131 | + __u8 flags; | |
| 132 | + __u8 reserved[5]; | |
| 133 | +}; | |
| 134 | + | |
| 135 | +/* VIRTIO_RTC_REQ_CROSS_CAP message */ | |
| 136 | + | |
| 137 | +struct virtio_rtc_req_cross_cap { | |
| 138 | + struct virtio_rtc_req_head head; | |
| 139 | + __le16 clock_id; | |
| 140 | + __u8 hw_counter; | |
| 141 | + __u8 reserved[5]; | |
| 142 | +}; | |
| 143 | + | |
| 144 | +struct virtio_rtc_resp_cross_cap { | |
| 145 | + struct virtio_rtc_resp_head head; | |
| 146 | +#define VIRTIO_RTC_FLAG_CROSS_CAP (1 << 0) | |
| 147 | + __u8 flags; | |
| 148 | + __u8 reserved[7]; | |
| 149 | +}; | |
| 150 | + | |
| 151 | +/* VIRTIO_RTC_REQ_READ_ALARM message */ | |
| 152 | + | |
| 153 | +struct virtio_rtc_req_read_alarm { | |
| 154 | + struct virtio_rtc_req_head head; | |
| 155 | + __le16 clock_id; | |
| 156 | + __u8 reserved[6]; | |
| 157 | +}; | |
| 158 | + | |
| 159 | +struct virtio_rtc_resp_read_alarm { | |
| 160 | + struct virtio_rtc_resp_head head; | |
| 161 | + __le64 alarm_time; | |
| 162 | +#define VIRTIO_RTC_FLAG_ALARM_ENABLED (1 << 0) | |
| 163 | + __u8 flags; | |
| 164 | + __u8 reserved[7]; | |
| 165 | +}; | |
| 166 | + | |
| 167 | +/* VIRTIO_RTC_REQ_SET_ALARM message */ | |
| 168 | + | |
| 169 | +struct virtio_rtc_req_set_alarm { | |
| 170 | + struct virtio_rtc_req_head head; | |
| 171 | + __le64 alarm_time; | |
| 172 | + __le16 clock_id; | |
| 173 | + /* flag VIRTIO_RTC_FLAG_ALARM_ENABLED */ | |
| 174 | + __u8 flags; | |
| 175 | + __u8 reserved[5]; | |
| 176 | +}; | |
| 177 | + | |
| 178 | +struct virtio_rtc_resp_set_alarm { | |
| 179 | + struct virtio_rtc_resp_head head; | |
| 180 | + /* no response params */ | |
| 181 | +}; | |
| 182 | + | |
| 183 | +/* VIRTIO_RTC_REQ_SET_ALARM_ENABLED message */ | |
| 184 | + | |
| 185 | +struct virtio_rtc_req_set_alarm_enabled { | |
| 186 | + struct virtio_rtc_req_head head; | |
| 187 | + __le16 clock_id; | |
| 188 | + /* flag VIRTIO_RTC_ALARM_ENABLED */ | |
| 189 | + __u8 flags; | |
| 190 | + __u8 reserved[5]; | |
| 191 | +}; | |
| 192 | + | |
| 193 | +struct virtio_rtc_resp_set_alarm_enabled { | |
| 194 | + struct virtio_rtc_resp_head head; | |
| 195 | + /* no response params */ | |
| 196 | +}; | |
| 197 | + | |
| 198 | +/** Union of request types for requestq */ | |
| 199 | +union virtio_rtc_req_requestq { | |
| 200 | + struct virtio_rtc_req_read read; | |
| 201 | + struct virtio_rtc_req_read_cross read_cross; | |
| 202 | + struct virtio_rtc_req_cfg cfg; | |
| 203 | + struct virtio_rtc_req_clock_cap clock_cap; | |
| 204 | + struct virtio_rtc_req_cross_cap cross_cap; | |
| 205 | + struct virtio_rtc_req_read_alarm read_alarm; | |
| 206 | + struct virtio_rtc_req_set_alarm set_alarm; | |
| 207 | + struct virtio_rtc_req_set_alarm_enabled set_alarm_enabled; | |
| 208 | +}; | |
| 209 | + | |
| 210 | +/** Union of response types for requestq */ | |
| 211 | +union virtio_rtc_resp_requestq { | |
| 212 | + struct virtio_rtc_resp_read read; | |
| 213 | + struct virtio_rtc_resp_read_cross read_cross; | |
| 214 | + struct virtio_rtc_resp_cfg cfg; | |
| 215 | + struct virtio_rtc_resp_clock_cap clock_cap; | |
| 216 | + struct virtio_rtc_resp_cross_cap cross_cap; | |
| 217 | + struct virtio_rtc_resp_read_alarm read_alarm; | |
| 218 | + struct virtio_rtc_resp_set_alarm set_alarm; | |
| 219 | + struct virtio_rtc_resp_set_alarm_enabled set_alarm_enabled; | |
| 220 | +}; | |
| 221 | + | |
| 222 | +/* alarmq notifications */ | |
| 223 | + | |
| 224 | +/* VIRTIO_RTC_NOTIF_ALARM notification */ | |
| 225 | + | |
| 226 | +struct virtio_rtc_notif_alarm { | |
| 227 | + struct virtio_rtc_notif_head head; | |
| 228 | + __le16 clock_id; | |
| 229 | + __u8 reserved[6]; | |
| 230 | +}; | |
| 231 | + | |
| 232 | +/** Union of notification types for alarmq */ | |
| 233 | +union virtio_rtc_notif_alarmq { | |
| 234 | + struct virtio_rtc_notif_alarm alarm; | |
| 235 | +}; | |
| 236 | + | |
| 237 | +#endif /* _LINUX_VIRTIO_RTC_H */ | |
| @@ -2,6 +2,8 @@ · 1 unmodified line | ||
| 2 | 2 | #ifndef _UAPI_LINUX_VT_H |
| 3 | 3 | #define _UAPI_LINUX_VT_H |
| 4 | 4 | |
| 5 | +#include <linux/ioctl.h> | |
| 6 | +#include <linux/types.h> | |
| 5 | 7 | |
| 6 | 8 | /* |
| 7 | 9 | * These constants are also useful for user-level apps (e.g., VC |
| @@ -84,4 +86,13 @@ struct vt_setactivate { · 76 unmodified lines | ||
| 84 | 86 | |
| 85 | 87 | #define VT_SETACTIVATE 0x560F /* Activate and set the mode of a console */ |
| 86 | 88 | |
| 89 | +/* get console size and cursor position */ | |
| 90 | +struct vt_consizecsrpos { | |
| 91 | + __u16 con_rows; /* number of console rows */ | |
| 92 | + __u16 con_cols; /* number of console columns */ | |
| 93 | + __u16 csr_row; /* current cursor's row */ | |
| 94 | + __u16 csr_col; /* current cursor's column */ | |
| 95 | +}; | |
| 96 | +#define VT_GETCONSIZECSRPOS _IOR('V', 0x10, struct vt_consizecsrpos) | |
| 97 | + | |
| 87 | 98 | #endif /* _UAPI_LINUX_VT_H */ |
| @@ -101,6 +101,10 @@ · 100 unmodified lines | ||
| 101 | 101 | * WGALLOWEDIP_A_FAMILY: NLA_U16 |
| 102 | 102 | * WGALLOWEDIP_A_IPADDR: struct in_addr or struct in6_addr |
| 103 | 103 | * WGALLOWEDIP_A_CIDR_MASK: NLA_U8 |
| 104 | + * WGALLOWEDIP_A_FLAGS: NLA_U32, WGALLOWEDIP_F_REMOVE_ME if | |
| 105 | + * the specified IP should be removed; | |
| 106 | + * otherwise, this IP will be added if | |
| 107 | + * it is not already present. | |
| 104 | 108 | * 0: NLA_NESTED |
| 105 | 109 | * ... |
| 106 | 110 | * 0: NLA_NESTED |
| @@ -184,11 +188,16 @@ enum wgpeer_attribute { · 77 unmodified lines | ||
| 184 | 188 | }; |
| 185 | 189 | #define WGPEER_A_MAX (__WGPEER_A_LAST - 1) |
| 186 | 190 | |
| 191 | +enum wgallowedip_flag { | |
| 192 | + WGALLOWEDIP_F_REMOVE_ME = 1U << 0, | |
| 193 | + __WGALLOWEDIP_F_ALL = WGALLOWEDIP_F_REMOVE_ME | |
| 194 | +}; | |
| 187 | 195 | enum wgallowedip_attribute { |
| 188 | 196 | WGALLOWEDIP_A_UNSPEC, |
| 189 | 197 | WGALLOWEDIP_A_FAMILY, |
| 190 | 198 | WGALLOWEDIP_A_IPADDR, |
| 191 | 199 | WGALLOWEDIP_A_CIDR_MASK, |
| 200 | + WGALLOWEDIP_A_FLAGS, | |
| 192 | 201 | __WGALLOWEDIP_A_LAST |
| 193 | 202 | }; |
| 194 | 203 | #define WGALLOWEDIP_A_MAX (__WGALLOWEDIP_A_LAST - 1) |