Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf tooling fixes from Thomas Gleixner:
"A set of updates for perf tools and documentation:

perf header:
- Prevent a division by zero
- Deal with an uninitialized warning proper

libbpf:
- Fix the missiong __WORDSIZE definition for musl & al

UAPI headers:
- Synchronize kernel headers

Documentation:
- Fix the memory units for perf.data size"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
libbpf: fix missing __WORDSIZE definition
perf tools: Fix perf.data documentation units for memory size
perf header: Fix use of unitialized value warning
perf header: Fix divide by zero error if f_header.attr_size==0
tools headers UAPI: Sync if_link.h with the kernel
tools headers UAPI: Sync sched.h with the kernel
tools headers UAPI: Sync usbdevice_fs.h with the kernels to get new ioctl
tools perf beauty: Fix usbdevfs_ioctl table generator to handle _IOC()
tools headers UAPI: Update tools's copy of drm.h headers
tools headers UAPI: Update tools's copy of mman.h headers
tools headers UAPI: Update tools's copy of kvm.h headers
tools include UAPI: Sync x86's syscalls_64.tbl and generic unistd.h to pick up clone3 and pidfd_open

+352 -35
+12
tools/arch/arm/include/uapi/asm/kvm.h
··· 214 214 #define KVM_REG_ARM_FW_REG(r) (KVM_REG_ARM | KVM_REG_SIZE_U64 | \ 215 215 KVM_REG_ARM_FW | ((r) & 0xffff)) 216 216 #define KVM_REG_ARM_PSCI_VERSION KVM_REG_ARM_FW_REG(0) 217 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1 KVM_REG_ARM_FW_REG(1) 218 + /* Higher values mean better protection. */ 219 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_NOT_AVAIL 0 220 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_AVAIL 1 221 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_NOT_REQUIRED 2 222 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2 KVM_REG_ARM_FW_REG(2) 223 + /* Higher values mean better protection. */ 224 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_NOT_AVAIL 0 225 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_UNKNOWN 1 226 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_AVAIL 2 227 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_NOT_REQUIRED 3 228 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_ENABLED (1U << 4) 217 229 218 230 /* Device Control API: ARM VGIC */ 219 231 #define KVM_DEV_ARM_VGIC_GRP_ADDR 0
+10
tools/arch/arm64/include/uapi/asm/kvm.h
··· 229 229 #define KVM_REG_ARM_FW_REG(r) (KVM_REG_ARM64 | KVM_REG_SIZE_U64 | \ 230 230 KVM_REG_ARM_FW | ((r) & 0xffff)) 231 231 #define KVM_REG_ARM_PSCI_VERSION KVM_REG_ARM_FW_REG(0) 232 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1 KVM_REG_ARM_FW_REG(1) 233 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_NOT_AVAIL 0 234 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_AVAIL 1 235 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_NOT_REQUIRED 2 236 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2 KVM_REG_ARM_FW_REG(2) 237 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_NOT_AVAIL 0 238 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_UNKNOWN 1 239 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_AVAIL 2 240 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_NOT_REQUIRED 3 241 + #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_ENABLED (1U << 4) 232 242 233 243 /* SVE registers */ 234 244 #define KVM_REG_ARM64_SVE (0x15 << KVM_REG_ARM_COPROC_SHIFT)
-4
tools/arch/powerpc/include/uapi/asm/mman.h
··· 4 4 #define MAP_DENYWRITE 0x0800 5 5 #define MAP_EXECUTABLE 0x1000 6 6 #define MAP_GROWSDOWN 0x0100 7 - #define MAP_HUGETLB 0x40000 8 7 #define MAP_LOCKED 0x80 9 - #define MAP_NONBLOCK 0x10000 10 8 #define MAP_NORESERVE 0x40 11 - #define MAP_POPULATE 0x8000 12 - #define MAP_STACK 0x20000 13 9 #include <uapi/asm-generic/mman-common.h> 14 10 /* MAP_32BIT is undefined on powerpc, fix it for perf */ 15 11 #define MAP_32BIT 0
-4
tools/arch/sparc/include/uapi/asm/mman.h
··· 4 4 #define MAP_DENYWRITE 0x0800 5 5 #define MAP_EXECUTABLE 0x1000 6 6 #define MAP_GROWSDOWN 0x0200 7 - #define MAP_HUGETLB 0x40000 8 7 #define MAP_LOCKED 0x100 9 - #define MAP_NONBLOCK 0x10000 10 8 #define MAP_NORESERVE 0x40 11 - #define MAP_POPULATE 0x8000 12 - #define MAP_STACK 0x20000 13 9 #include <uapi/asm-generic/mman-common.h> 14 10 /* MAP_32BIT is undefined on sparc, fix it for perf */ 15 11 #define MAP_32BIT 0
+18 -4
tools/arch/x86/include/uapi/asm/kvm.h
··· 378 378 struct kvm_vcpu_events events; 379 379 }; 380 380 381 - #define KVM_X86_QUIRK_LINT0_REENABLED (1 << 0) 382 - #define KVM_X86_QUIRK_CD_NW_CLEARED (1 << 1) 383 - #define KVM_X86_QUIRK_LAPIC_MMIO_HOLE (1 << 2) 384 - #define KVM_X86_QUIRK_OUT_7E_INC_RIP (1 << 3) 381 + #define KVM_X86_QUIRK_LINT0_REENABLED (1 << 0) 382 + #define KVM_X86_QUIRK_CD_NW_CLEARED (1 << 1) 383 + #define KVM_X86_QUIRK_LAPIC_MMIO_HOLE (1 << 2) 384 + #define KVM_X86_QUIRK_OUT_7E_INC_RIP (1 << 3) 385 + #define KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT (1 << 4) 385 386 386 387 #define KVM_STATE_NESTED_FORMAT_VMX 0 387 388 #define KVM_STATE_NESTED_FORMAT_SVM 1 /* unused */ ··· 432 431 struct kvm_vmx_nested_state_data vmx[0]; 433 432 } data; 434 433 }; 434 + 435 + /* for KVM_CAP_PMU_EVENT_FILTER */ 436 + struct kvm_pmu_event_filter { 437 + __u32 action; 438 + __u32 nevents; 439 + __u32 fixed_counter_bitmap; 440 + __u32 flags; 441 + __u32 pad[4]; 442 + __u64 events[0]; 443 + }; 444 + 445 + #define KVM_PMU_EVENT_ALLOW 0 446 + #define KVM_PMU_EVENT_DENY 1 435 447 436 448 #endif /* _ASM_X86_KVM_H */
-1
tools/arch/x86/include/uapi/asm/vmx.h
··· 146 146 147 147 #define VMX_ABORT_SAVE_GUEST_MSR_FAIL 1 148 148 #define VMX_ABORT_LOAD_HOST_PDPTE_FAIL 2 149 - #define VMX_ABORT_VMCS_CORRUPTED 3 150 149 #define VMX_ABORT_LOAD_HOST_MSR_FAIL 4 151 150 152 151 #endif /* _UAPIVMX_H */
+9 -6
tools/include/uapi/asm-generic/mman-common.h
··· 19 19 #define MAP_TYPE 0x0f /* Mask for type of mapping */ 20 20 #define MAP_FIXED 0x10 /* Interpret addr exactly */ 21 21 #define MAP_ANONYMOUS 0x20 /* don't use a file */ 22 - #ifdef CONFIG_MMAP_ALLOW_UNINITIALIZED 23 - # define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be uninitialized */ 24 - #else 25 - # define MAP_UNINITIALIZED 0x0 /* Don't support this flag */ 26 - #endif 27 22 28 - /* 0x0100 - 0x80000 flags are defined in asm-generic/mman.h */ 23 + /* 0x0100 - 0x4000 flags are defined in asm-generic/mman.h */ 24 + #define MAP_POPULATE 0x008000 /* populate (prefault) pagetables */ 25 + #define MAP_NONBLOCK 0x010000 /* do not block on IO */ 26 + #define MAP_STACK 0x020000 /* give out an address that is best suited for process/thread stacks */ 27 + #define MAP_HUGETLB 0x040000 /* create a huge page mapping */ 28 + #define MAP_SYNC 0x080000 /* perform synchronous page faults for the mapping */ 29 29 #define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */ 30 + 31 + #define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be 32 + * uninitialized */ 30 33 31 34 /* 32 35 * Flags for mlock
+4 -6
tools/include/uapi/asm-generic/mman.h
··· 9 9 #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ 10 10 #define MAP_LOCKED 0x2000 /* pages are locked */ 11 11 #define MAP_NORESERVE 0x4000 /* don't check for reservations */ 12 - #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ 13 - #define MAP_NONBLOCK 0x10000 /* do not block on IO */ 14 - #define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ 15 - #define MAP_HUGETLB 0x40000 /* create a huge page mapping */ 16 - #define MAP_SYNC 0x80000 /* perform synchronous page faults for the mapping */ 17 12 18 - /* Bits [26:31] are reserved, see mman-common.h for MAP_HUGETLB usage */ 13 + /* 14 + * Bits [26:31] are reserved, see asm-generic/hugetlb_encode.h 15 + * for MAP_HUGETLB usage 16 + */ 19 17 20 18 #define MCL_CURRENT 1 /* lock all current mappings */ 21 19 #define MCL_FUTURE 2 /* lock all future mappings */
+7 -1
tools/include/uapi/asm-generic/unistd.h
··· 844 844 __SYSCALL(__NR_fsmount, sys_fsmount) 845 845 #define __NR_fspick 433 846 846 __SYSCALL(__NR_fspick, sys_fspick) 847 + #define __NR_pidfd_open 434 848 + __SYSCALL(__NR_pidfd_open, sys_pidfd_open) 849 + #ifdef __ARCH_WANT_SYS_CLONE3 850 + #define __NR_clone3 435 851 + __SYSCALL(__NR_clone3, sys_clone3) 852 + #endif 847 853 848 854 #undef __NR_syscalls 849 - #define __NR_syscalls 434 855 + #define __NR_syscalls 436 850 856 851 857 /* 852 858 * 32 bit systems traditionally used different
+1
tools/include/uapi/drm/drm.h
··· 50 50 51 51 #else /* One of the BSDs */ 52 52 53 + #include <stdint.h> 53 54 #include <sys/ioccom.h> 54 55 #include <sys/types.h> 55 56 typedef int8_t __s8;
+206 -3
tools/include/uapi/drm/i915_drm.h
··· 136 136 struct i915_engine_class_instance { 137 137 __u16 engine_class; /* see enum drm_i915_gem_engine_class */ 138 138 __u16 engine_instance; 139 + #define I915_ENGINE_CLASS_INVALID_NONE -1 140 + #define I915_ENGINE_CLASS_INVALID_VIRTUAL -2 139 141 }; 140 142 141 143 /** ··· 357 355 #define DRM_I915_PERF_ADD_CONFIG 0x37 358 356 #define DRM_I915_PERF_REMOVE_CONFIG 0x38 359 357 #define DRM_I915_QUERY 0x39 358 + #define DRM_I915_GEM_VM_CREATE 0x3a 359 + #define DRM_I915_GEM_VM_DESTROY 0x3b 360 360 /* Must be kept compact -- no holes */ 361 361 362 362 #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) ··· 419 415 #define DRM_IOCTL_I915_PERF_ADD_CONFIG DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_ADD_CONFIG, struct drm_i915_perf_oa_config) 420 416 #define DRM_IOCTL_I915_PERF_REMOVE_CONFIG DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_REMOVE_CONFIG, __u64) 421 417 #define DRM_IOCTL_I915_QUERY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_QUERY, struct drm_i915_query) 418 + #define DRM_IOCTL_I915_GEM_VM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_VM_CREATE, struct drm_i915_gem_vm_control) 419 + #define DRM_IOCTL_I915_GEM_VM_DESTROY DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_VM_DESTROY, struct drm_i915_gem_vm_control) 422 420 423 421 /* Allow drivers to submit batchbuffers directly to hardware, relying 424 422 * on the security mechanisms provided by hardware. ··· 604 598 */ 605 599 #define I915_PARAM_MMAP_GTT_COHERENT 52 606 600 601 + /* 602 + * Query whether DRM_I915_GEM_EXECBUFFER2 supports coordination of parallel 603 + * execution through use of explicit fence support. 604 + * See I915_EXEC_FENCE_OUT and I915_EXEC_FENCE_SUBMIT. 605 + */ 606 + #define I915_PARAM_HAS_EXEC_SUBMIT_FENCE 53 607 607 /* Must be kept compact -- no holes and well documented */ 608 608 609 609 typedef struct drm_i915_getparam { ··· 1132 1120 */ 1133 1121 #define I915_EXEC_FENCE_ARRAY (1<<19) 1134 1122 1135 - #define __I915_EXEC_UNKNOWN_FLAGS (-(I915_EXEC_FENCE_ARRAY<<1)) 1123 + /* 1124 + * Setting I915_EXEC_FENCE_SUBMIT implies that lower_32_bits(rsvd2) represent 1125 + * a sync_file fd to wait upon (in a nonblocking manner) prior to executing 1126 + * the batch. 1127 + * 1128 + * Returns -EINVAL if the sync_file fd cannot be found. 1129 + */ 1130 + #define I915_EXEC_FENCE_SUBMIT (1 << 20) 1131 + 1132 + #define __I915_EXEC_UNKNOWN_FLAGS (-(I915_EXEC_FENCE_SUBMIT << 1)) 1136 1133 1137 1134 #define I915_EXEC_CONTEXT_ID_MASK (0xffffffff) 1138 1135 #define i915_execbuffer2_set_context_id(eb2, context) \ ··· 1485 1464 __u32 ctx_id; /* output: id of new context*/ 1486 1465 __u32 flags; 1487 1466 #define I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS (1u << 0) 1467 + #define I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE (1u << 1) 1488 1468 #define I915_CONTEXT_CREATE_FLAGS_UNKNOWN \ 1489 - (-(I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS << 1)) 1469 + (-(I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE << 1)) 1490 1470 __u64 extensions; 1491 1471 }; 1492 1472 ··· 1529 1507 * On creation, all new contexts are marked as recoverable. 1530 1508 */ 1531 1509 #define I915_CONTEXT_PARAM_RECOVERABLE 0x8 1510 + 1511 + /* 1512 + * The id of the associated virtual memory address space (ppGTT) of 1513 + * this context. Can be retrieved and passed to another context 1514 + * (on the same fd) for both to use the same ppGTT and so share 1515 + * address layouts, and avoid reloading the page tables on context 1516 + * switches between themselves. 1517 + * 1518 + * See DRM_I915_GEM_VM_CREATE and DRM_I915_GEM_VM_DESTROY. 1519 + */ 1520 + #define I915_CONTEXT_PARAM_VM 0x9 1521 + 1522 + /* 1523 + * I915_CONTEXT_PARAM_ENGINES: 1524 + * 1525 + * Bind this context to operate on this subset of available engines. Henceforth, 1526 + * the I915_EXEC_RING selector for DRM_IOCTL_I915_GEM_EXECBUFFER2 operates as 1527 + * an index into this array of engines; I915_EXEC_DEFAULT selecting engine[0] 1528 + * and upwards. Slots 0...N are filled in using the specified (class, instance). 1529 + * Use 1530 + * engine_class: I915_ENGINE_CLASS_INVALID, 1531 + * engine_instance: I915_ENGINE_CLASS_INVALID_NONE 1532 + * to specify a gap in the array that can be filled in later, e.g. by a 1533 + * virtual engine used for load balancing. 1534 + * 1535 + * Setting the number of engines bound to the context to 0, by passing a zero 1536 + * sized argument, will revert back to default settings. 1537 + * 1538 + * See struct i915_context_param_engines. 1539 + * 1540 + * Extensions: 1541 + * i915_context_engines_load_balance (I915_CONTEXT_ENGINES_EXT_LOAD_BALANCE) 1542 + * i915_context_engines_bond (I915_CONTEXT_ENGINES_EXT_BOND) 1543 + */ 1544 + #define I915_CONTEXT_PARAM_ENGINES 0xa 1532 1545 /* Must be kept compact -- no holes and well documented */ 1533 1546 1534 1547 __u64 value; ··· 1597 1540 struct i915_engine_class_instance engine; 1598 1541 1599 1542 /* 1600 - * Unused for now. Must be cleared to zero. 1543 + * Unknown flags must be cleared to zero. 1601 1544 */ 1602 1545 __u32 flags; 1546 + #define I915_CONTEXT_SSEU_FLAG_ENGINE_INDEX (1u << 0) 1603 1547 1604 1548 /* 1605 1549 * Mask of slices to enable for the context. Valid values are a subset ··· 1628 1570 __u32 rsvd; 1629 1571 }; 1630 1572 1573 + /* 1574 + * i915_context_engines_load_balance: 1575 + * 1576 + * Enable load balancing across this set of engines. 1577 + * 1578 + * Into the I915_EXEC_DEFAULT slot [0], a virtual engine is created that when 1579 + * used will proxy the execbuffer request onto one of the set of engines 1580 + * in such a way as to distribute the load evenly across the set. 1581 + * 1582 + * The set of engines must be compatible (e.g. the same HW class) as they 1583 + * will share the same logical GPU context and ring. 1584 + * 1585 + * To intermix rendering with the virtual engine and direct rendering onto 1586 + * the backing engines (bypassing the load balancing proxy), the context must 1587 + * be defined to use a single timeline for all engines. 1588 + */ 1589 + struct i915_context_engines_load_balance { 1590 + struct i915_user_extension base; 1591 + 1592 + __u16 engine_index; 1593 + __u16 num_siblings; 1594 + __u32 flags; /* all undefined flags must be zero */ 1595 + 1596 + __u64 mbz64; /* reserved for future use; must be zero */ 1597 + 1598 + struct i915_engine_class_instance engines[0]; 1599 + } __attribute__((packed)); 1600 + 1601 + #define I915_DEFINE_CONTEXT_ENGINES_LOAD_BALANCE(name__, N__) struct { \ 1602 + struct i915_user_extension base; \ 1603 + __u16 engine_index; \ 1604 + __u16 num_siblings; \ 1605 + __u32 flags; \ 1606 + __u64 mbz64; \ 1607 + struct i915_engine_class_instance engines[N__]; \ 1608 + } __attribute__((packed)) name__ 1609 + 1610 + /* 1611 + * i915_context_engines_bond: 1612 + * 1613 + * Constructed bonded pairs for execution within a virtual engine. 1614 + * 1615 + * All engines are equal, but some are more equal than others. Given 1616 + * the distribution of resources in the HW, it may be preferable to run 1617 + * a request on a given subset of engines in parallel to a request on a 1618 + * specific engine. We enable this selection of engines within a virtual 1619 + * engine by specifying bonding pairs, for any given master engine we will 1620 + * only execute on one of the corresponding siblings within the virtual engine. 1621 + * 1622 + * To execute a request in parallel on the master engine and a sibling requires 1623 + * coordination with a I915_EXEC_FENCE_SUBMIT. 1624 + */ 1625 + struct i915_context_engines_bond { 1626 + struct i915_user_extension base; 1627 + 1628 + struct i915_engine_class_instance master; 1629 + 1630 + __u16 virtual_index; /* index of virtual engine in ctx->engines[] */ 1631 + __u16 num_bonds; 1632 + 1633 + __u64 flags; /* all undefined flags must be zero */ 1634 + __u64 mbz64[4]; /* reserved for future use; must be zero */ 1635 + 1636 + struct i915_engine_class_instance engines[0]; 1637 + } __attribute__((packed)); 1638 + 1639 + #define I915_DEFINE_CONTEXT_ENGINES_BOND(name__, N__) struct { \ 1640 + struct i915_user_extension base; \ 1641 + struct i915_engine_class_instance master; \ 1642 + __u16 virtual_index; \ 1643 + __u16 num_bonds; \ 1644 + __u64 flags; \ 1645 + __u64 mbz64[4]; \ 1646 + struct i915_engine_class_instance engines[N__]; \ 1647 + } __attribute__((packed)) name__ 1648 + 1649 + struct i915_context_param_engines { 1650 + __u64 extensions; /* linked chain of extension blocks, 0 terminates */ 1651 + #define I915_CONTEXT_ENGINES_EXT_LOAD_BALANCE 0 /* see i915_context_engines_load_balance */ 1652 + #define I915_CONTEXT_ENGINES_EXT_BOND 1 /* see i915_context_engines_bond */ 1653 + struct i915_engine_class_instance engines[0]; 1654 + } __attribute__((packed)); 1655 + 1656 + #define I915_DEFINE_CONTEXT_PARAM_ENGINES(name__, N__) struct { \ 1657 + __u64 extensions; \ 1658 + struct i915_engine_class_instance engines[N__]; \ 1659 + } __attribute__((packed)) name__ 1660 + 1631 1661 struct drm_i915_gem_context_create_ext_setparam { 1632 1662 #define I915_CONTEXT_CREATE_EXT_SETPARAM 0 1633 1663 struct i915_user_extension base; 1634 1664 struct drm_i915_gem_context_param param; 1665 + }; 1666 + 1667 + struct drm_i915_gem_context_create_ext_clone { 1668 + #define I915_CONTEXT_CREATE_EXT_CLONE 1 1669 + struct i915_user_extension base; 1670 + __u32 clone_id; 1671 + __u32 flags; 1672 + #define I915_CONTEXT_CLONE_ENGINES (1u << 0) 1673 + #define I915_CONTEXT_CLONE_FLAGS (1u << 1) 1674 + #define I915_CONTEXT_CLONE_SCHEDATTR (1u << 2) 1675 + #define I915_CONTEXT_CLONE_SSEU (1u << 3) 1676 + #define I915_CONTEXT_CLONE_TIMELINE (1u << 4) 1677 + #define I915_CONTEXT_CLONE_VM (1u << 5) 1678 + #define I915_CONTEXT_CLONE_UNKNOWN -(I915_CONTEXT_CLONE_VM << 1) 1679 + __u64 rsvd; 1635 1680 }; 1636 1681 1637 1682 struct drm_i915_gem_context_destroy { ··· 1982 1821 struct drm_i915_query_item { 1983 1822 __u64 query_id; 1984 1823 #define DRM_I915_QUERY_TOPOLOGY_INFO 1 1824 + #define DRM_I915_QUERY_ENGINE_INFO 2 1985 1825 /* Must be kept compact -- no holes and well documented */ 1986 1826 1987 1827 /* ··· 2079 1917 __u16 eu_stride; 2080 1918 2081 1919 __u8 data[]; 1920 + }; 1921 + 1922 + /** 1923 + * struct drm_i915_engine_info 1924 + * 1925 + * Describes one engine and it's capabilities as known to the driver. 1926 + */ 1927 + struct drm_i915_engine_info { 1928 + /** Engine class and instance. */ 1929 + struct i915_engine_class_instance engine; 1930 + 1931 + /** Reserved field. */ 1932 + __u32 rsvd0; 1933 + 1934 + /** Engine flags. */ 1935 + __u64 flags; 1936 + 1937 + /** Capabilities of this engine. */ 1938 + __u64 capabilities; 1939 + #define I915_VIDEO_CLASS_CAPABILITY_HEVC (1 << 0) 1940 + #define I915_VIDEO_AND_ENHANCE_CLASS_CAPABILITY_SFC (1 << 1) 1941 + 1942 + /** Reserved fields. */ 1943 + __u64 rsvd1[4]; 1944 + }; 1945 + 1946 + /** 1947 + * struct drm_i915_query_engine_info 1948 + * 1949 + * Engine info query enumerates all engines known to the driver by filling in 1950 + * an array of struct drm_i915_engine_info structures. 1951 + */ 1952 + struct drm_i915_query_engine_info { 1953 + /** Number of struct drm_i915_engine_info structs following. */ 1954 + __u32 num_engines; 1955 + 1956 + /** MBZ */ 1957 + __u32 rsvd[3]; 1958 + 1959 + /** Marker for drm_i915_engine_info structures. */ 1960 + struct drm_i915_engine_info engines[]; 2082 1961 }; 2083 1962 2084 1963 #if defined(__cplusplus)
+5
tools/include/uapi/linux/if_link.h
··· 695 695 IFLA_VF_IB_NODE_GUID, /* VF Infiniband node GUID */ 696 696 IFLA_VF_IB_PORT_GUID, /* VF Infiniband port GUID */ 697 697 IFLA_VF_VLAN_LIST, /* nested list of vlans, option for QinQ */ 698 + IFLA_VF_BROADCAST, /* VF broadcast */ 698 699 __IFLA_VF_MAX, 699 700 }; 700 701 ··· 704 703 struct ifla_vf_mac { 705 704 __u32 vf; 706 705 __u8 mac[32]; /* MAX_ADDR_LEN */ 706 + }; 707 + 708 + struct ifla_vf_broadcast { 709 + __u8 broadcast[32]; 707 710 }; 708 711 709 712 struct ifla_vf_vlan {
+3
tools/include/uapi/linux/kvm.h
··· 995 995 #define KVM_CAP_ARM_SVE 170 996 996 #define KVM_CAP_ARM_PTRAUTH_ADDRESS 171 997 997 #define KVM_CAP_ARM_PTRAUTH_GENERIC 172 998 + #define KVM_CAP_PMU_EVENT_FILTER 173 998 999 999 1000 #ifdef KVM_CAP_IRQ_ROUTING 1000 1001 ··· 1330 1329 #define KVM_PPC_GET_RMMU_INFO _IOW(KVMIO, 0xb0, struct kvm_ppc_rmmu_info) 1331 1330 /* Available with KVM_CAP_PPC_GET_CPU_CHAR */ 1332 1331 #define KVM_PPC_GET_CPU_CHAR _IOR(KVMIO, 0xb1, struct kvm_ppc_cpu_char) 1332 + /* Available with KVM_CAP_PMU_EVENT_FILTER */ 1333 + #define KVM_SET_PMU_EVENT_FILTER _IOW(KVMIO, 0xb2, struct kvm_pmu_event_filter) 1333 1334 1334 1335 /* ioctl for vm fd */ 1335 1336 #define KVM_CREATE_DEVICE _IOWR(KVMIO, 0xe0, struct kvm_create_device)
+29 -1
tools/include/uapi/linux/sched.h
··· 2 2 #ifndef _UAPI_LINUX_SCHED_H 3 3 #define _UAPI_LINUX_SCHED_H 4 4 5 + #include <linux/types.h> 6 + 5 7 /* 6 8 * cloning flags: 7 9 */ ··· 34 32 #define CLONE_IO 0x80000000 /* Clone io context */ 35 33 36 34 /* 35 + * Arguments for the clone3 syscall 36 + */ 37 + struct clone_args { 38 + __aligned_u64 flags; 39 + __aligned_u64 pidfd; 40 + __aligned_u64 child_tid; 41 + __aligned_u64 parent_tid; 42 + __aligned_u64 exit_signal; 43 + __aligned_u64 stack; 44 + __aligned_u64 stack_size; 45 + __aligned_u64 tls; 46 + }; 47 + 48 + /* 37 49 * Scheduling policies 38 50 */ 39 51 #define SCHED_NORMAL 0 ··· 67 51 #define SCHED_FLAG_RESET_ON_FORK 0x01 68 52 #define SCHED_FLAG_RECLAIM 0x02 69 53 #define SCHED_FLAG_DL_OVERRUN 0x04 54 + #define SCHED_FLAG_KEEP_POLICY 0x08 55 + #define SCHED_FLAG_KEEP_PARAMS 0x10 56 + #define SCHED_FLAG_UTIL_CLAMP_MIN 0x20 57 + #define SCHED_FLAG_UTIL_CLAMP_MAX 0x40 58 + 59 + #define SCHED_FLAG_KEEP_ALL (SCHED_FLAG_KEEP_POLICY | \ 60 + SCHED_FLAG_KEEP_PARAMS) 61 + 62 + #define SCHED_FLAG_UTIL_CLAMP (SCHED_FLAG_UTIL_CLAMP_MIN | \ 63 + SCHED_FLAG_UTIL_CLAMP_MAX) 70 64 71 65 #define SCHED_FLAG_ALL (SCHED_FLAG_RESET_ON_FORK | \ 72 66 SCHED_FLAG_RECLAIM | \ 73 - SCHED_FLAG_DL_OVERRUN) 67 + SCHED_FLAG_DL_OVERRUN | \ 68 + SCHED_FLAG_KEEP_ALL | \ 69 + SCHED_FLAG_UTIL_CLAMP) 74 70 75 71 #endif /* _UAPI_LINUX_SCHED_H */
+26
tools/include/uapi/linux/usbdevice_fs.h
··· 76 76 unsigned char slow; 77 77 }; 78 78 79 + struct usbdevfs_conninfo_ex { 80 + __u32 size; /* Size of the structure from the kernel's */ 81 + /* point of view. Can be used by userspace */ 82 + /* to determine how much data can be */ 83 + /* used/trusted. */ 84 + __u32 busnum; /* USB bus number, as enumerated by the */ 85 + /* kernel, the device is connected to. */ 86 + __u32 devnum; /* Device address on the bus. */ 87 + __u32 speed; /* USB_SPEED_* constants from ch9.h */ 88 + __u8 num_ports; /* Number of ports the device is connected */ 89 + /* to on the way to the root hub. It may */ 90 + /* be bigger than size of 'ports' array so */ 91 + /* userspace can detect overflows. */ 92 + __u8 ports[7]; /* List of ports on the way from the root */ 93 + /* hub to the device. Current limit in */ 94 + /* USB specification is 7 tiers (root hub, */ 95 + /* 5 intermediate hubs, device), which */ 96 + /* gives at most 6 port entries. */ 97 + }; 98 + 79 99 #define USBDEVFS_URB_SHORT_NOT_OK 0x01 80 100 #define USBDEVFS_URB_ISO_ASAP 0x02 81 101 #define USBDEVFS_URB_BULK_CONTINUATION 0x04 ··· 157 137 #define USBDEVFS_CAP_REAP_AFTER_DISCONNECT 0x10 158 138 #define USBDEVFS_CAP_MMAP 0x20 159 139 #define USBDEVFS_CAP_DROP_PRIVILEGES 0x40 140 + #define USBDEVFS_CAP_CONNINFO_EX 0x80 160 141 161 142 /* USBDEVFS_DISCONNECT_CLAIM flags & struct */ 162 143 ··· 218 197 #define USBDEVFS_FREE_STREAMS _IOR('U', 29, struct usbdevfs_streams) 219 198 #define USBDEVFS_DROP_PRIVILEGES _IOW('U', 30, __u32) 220 199 #define USBDEVFS_GET_SPEED _IO('U', 31) 200 + /* 201 + * Returns struct usbdevfs_conninfo_ex; length is variable to allow 202 + * extending size of the data returned. 203 + */ 204 + #define USBDEVFS_CONNINFO_EX(len) _IOC(_IOC_READ, 'U', 32, len) 221 205 222 206 #endif /* _UAPI_LINUX_USBDEVICE_FS_H */
+5
tools/lib/bpf/hashmap.h
··· 10 10 11 11 #include <stdbool.h> 12 12 #include <stddef.h> 13 + #ifdef __GLIBC__ 14 + #include <bits/wordsize.h> 15 + #else 16 + #include <bits/reg.h> 17 + #endif 13 18 #include "libbpf_internal.h" 14 19 15 20 static inline size_t hash_bits(size_t h, int bits)
+1 -1
tools/perf/Documentation/perf.data-file-format.txt
··· 126 126 127 127 HEADER_TOTAL_MEM = 10, 128 128 129 - An uint64_t with the total memory in bytes. 129 + An uint64_t with the total memory in kilobytes. 130 130 131 131 HEADER_CMDLINE = 11, 132 132
+2
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
··· 355 355 431 common fsconfig __x64_sys_fsconfig 356 356 432 common fsmount __x64_sys_fsmount 357 357 433 common fspick __x64_sys_fspick 358 + 434 common pidfd_open __x64_sys_pidfd_open 359 + 435 common clone3 __x64_sys_clone3/ptregs 358 360 359 361 # 360 362 # x32-specific system call numbers start at 512 to avoid cache impact
+6 -3
tools/perf/trace/beauty/usbdevfs_ioctl.sh
··· 3 3 4 4 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/ 5 5 6 + # also as: 7 + # #define USBDEVFS_CONNINFO_EX(len) _IOC(_IOC_READ, 'U', 32, len) 8 + 6 9 printf "static const char *usbdevfs_ioctl_cmds[] = {\n" 7 - regex="^#[[:space:]]*define[[:space:]]+USBDEVFS_(\w+)[[:space:]]+_IO[WR]{0,2}\([[:space:]]*'U'[[:space:]]*,[[:space:]]*([[:digit:]]+).*" 8 - egrep $regex ${header_dir}/usbdevice_fs.h | egrep -v 'USBDEVFS_\w+32[[:space:]]' | \ 9 - sed -r "s/$regex/\2 \1/g" | \ 10 + regex="^#[[:space:]]*define[[:space:]]+USBDEVFS_(\w+)(\(\w+\))?[[:space:]]+_IO[CWR]{0,2}\([[:space:]]*(_IOC_\w+,[[:space:]]*)?'U'[[:space:]]*,[[:space:]]*([[:digit:]]+).*" 11 + egrep "$regex" ${header_dir}/usbdevice_fs.h | egrep -v 'USBDEVFS_\w+32[[:space:]]' | \ 12 + sed -r "s/$regex/\4 \1/g" | \ 10 13 sort | xargs printf "\t[%s] = \"%s\",\n" 11 14 printf "};\n\n" 12 15 printf "#if 0\n"
+8 -1
tools/perf/util/header.c
··· 3559 3559 data->file.path); 3560 3560 } 3561 3561 3562 + if (f_header.attr_size == 0) { 3563 + pr_err("ERROR: The %s file's attr size field is 0 which is unexpected.\n" 3564 + "Was the 'perf record' command properly terminated?\n", 3565 + data->file.path); 3566 + return -EINVAL; 3567 + } 3568 + 3562 3569 nr_attrs = f_header.attrs.size / f_header.attr_size; 3563 3570 lseek(fd, f_header.attrs.offset, SEEK_SET); 3564 3571 ··· 3646 3639 size += sizeof(struct perf_event_header); 3647 3640 size += ids * sizeof(u64); 3648 3641 3649 - ev = malloc(size); 3642 + ev = zalloc(size); 3650 3643 3651 3644 if (ev == NULL) 3652 3645 return -ENOMEM;