Skip to content

Commit 1140ab5

Browse files
committed
Merge tag 'perf-tools-fixes-for-v5.13-2021-05-10' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix swapping of cpu_map and stat_config records. - Fix dynamic libbpf linking. - Disallow -c and -F option at the same time in 'perf record'. - Update headers with the kernel originals. - Silence warning for JSON ArchStd files. - Fix a build error on arm64 with clang. * tag 'perf-tools-fixes-for-v5.13-2021-05-10' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: tools headers UAPI: Sync perf_event.h with the kernel sources tools headers cpufeatures: Sync with the kernel sources tools include UAPI powerpc: Sync errno.h with the kernel headers tools arch: Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem memcpy' tools headers UAPI: Sync linux/prctl.h with the kernel sources tools headers UAPI: Sync files changed by landlock, quotactl_path and mount_settattr new syscalls perf tools: Fix a build error on arm64 with clang tools headers kvm: Sync kvm headers with the kernel sources tools headers UAPI: Sync linux/kvm.h with the kernel sources perf tools: Fix dynamic libbpf link perf session: Fix swapping of cpu_map and stat_config records perf jevents: Silence warning for ArchStd files perf record: Disallow -c and -F option at the same time tools arch x86: Sync the msr-index.h copy with the kernel sources tools headers UAPI: Sync drm/i915_drm.h with the kernel sources tools headers UAPI: Update tools's copy of drm.h headers
2 parents 142b507 + 71d7924 commit 1140ab5

File tree

26 files changed

+260
-22
lines changed

26 files changed

+260
-22
lines changed

tools/arch/powerpc/include/uapi/asm/errno.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#ifndef _ASM_POWERPC_ERRNO_H
33
#define _ASM_POWERPC_ERRNO_H
44

5+
#undef EDEADLOCK
56
#include <asm-generic/errno.h>
67

78
#undef EDEADLOCK

tools/arch/x86/include/asm/cpufeatures.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484

8585
/* CPU types for specific tunings: */
8686
#define X86_FEATURE_K8 ( 3*32+ 4) /* "" Opteron, Athlon64 */
87-
#define X86_FEATURE_K7 ( 3*32+ 5) /* "" Athlon */
87+
/* FREE, was #define X86_FEATURE_K7 ( 3*32+ 5) "" Athlon */
8888
#define X86_FEATURE_P3 ( 3*32+ 6) /* "" P3 */
8989
#define X86_FEATURE_P4 ( 3*32+ 7) /* "" P4 */
9090
#define X86_FEATURE_CONSTANT_TSC ( 3*32+ 8) /* TSC ticks at a constant rate */
@@ -236,6 +236,8 @@
236236
#define X86_FEATURE_EPT_AD ( 8*32+17) /* Intel Extended Page Table access-dirty bit */
237237
#define X86_FEATURE_VMCALL ( 8*32+18) /* "" Hypervisor supports the VMCALL instruction */
238238
#define X86_FEATURE_VMW_VMMCALL ( 8*32+19) /* "" VMware prefers VMMCALL hypercall instruction */
239+
#define X86_FEATURE_PVUNLOCK ( 8*32+20) /* "" PV unlock function */
240+
#define X86_FEATURE_VCPUPREEMPT ( 8*32+21) /* "" PV vcpu_is_preempted function */
239241

240242
/* Intel-defined CPU features, CPUID level 0x00000007:0 (EBX), word 9 */
241243
#define X86_FEATURE_FSGSBASE ( 9*32+ 0) /* RDFSBASE, WRFSBASE, RDGSBASE, WRGSBASE instructions*/
@@ -290,6 +292,8 @@
290292
#define X86_FEATURE_FENCE_SWAPGS_KERNEL (11*32+ 5) /* "" LFENCE in kernel entry SWAPGS path */
291293
#define X86_FEATURE_SPLIT_LOCK_DETECT (11*32+ 6) /* #AC for split lock */
292294
#define X86_FEATURE_PER_THREAD_MBA (11*32+ 7) /* "" Per-thread Memory Bandwidth Allocation */
295+
#define X86_FEATURE_SGX1 (11*32+ 8) /* "" Basic SGX */
296+
#define X86_FEATURE_SGX2 (11*32+ 9) /* "" SGX Enclave Dynamic Memory Management (EDMM) */
293297

294298
/* Intel-defined CPU features, CPUID level 0x00000007:1 (EAX), word 12 */
295299
#define X86_FEATURE_AVX_VNNI (12*32+ 4) /* AVX VNNI instructions */
@@ -336,6 +340,7 @@
336340
#define X86_FEATURE_AVIC (15*32+13) /* Virtual Interrupt Controller */
337341
#define X86_FEATURE_V_VMSAVE_VMLOAD (15*32+15) /* Virtual VMSAVE VMLOAD */
338342
#define X86_FEATURE_VGIF (15*32+16) /* Virtual GIF */
343+
#define X86_FEATURE_V_SPEC_CTRL (15*32+20) /* Virtual SPEC_CTRL */
339344
#define X86_FEATURE_SVME_ADDR_CHK (15*32+28) /* "" SVME addr check */
340345

341346
/* Intel-defined CPU features, CPUID level 0x00000007:0 (ECX), word 16 */
@@ -354,6 +359,7 @@
354359
#define X86_FEATURE_AVX512_VPOPCNTDQ (16*32+14) /* POPCNT for vectors of DW/QW */
355360
#define X86_FEATURE_LA57 (16*32+16) /* 5-level page tables */
356361
#define X86_FEATURE_RDPID (16*32+22) /* RDPID instruction */
362+
#define X86_FEATURE_BUS_LOCK_DETECT (16*32+24) /* Bus Lock detect */
357363
#define X86_FEATURE_CLDEMOTE (16*32+25) /* CLDEMOTE instruction */
358364
#define X86_FEATURE_MOVDIRI (16*32+27) /* MOVDIRI instruction */
359365
#define X86_FEATURE_MOVDIR64B (16*32+28) /* MOVDIR64B instruction */
@@ -374,6 +380,7 @@
374380
#define X86_FEATURE_MD_CLEAR (18*32+10) /* VERW clears CPU buffers */
375381
#define X86_FEATURE_TSX_FORCE_ABORT (18*32+13) /* "" TSX_FORCE_ABORT */
376382
#define X86_FEATURE_SERIALIZE (18*32+14) /* SERIALIZE instruction */
383+
#define X86_FEATURE_HYBRID_CPU (18*32+15) /* "" This part has CPUs of more than one type */
377384
#define X86_FEATURE_TSXLDTRK (18*32+16) /* TSX Suspend Load Address Tracking */
378385
#define X86_FEATURE_PCONFIG (18*32+18) /* Intel PCONFIG */
379386
#define X86_FEATURE_ARCH_LBR (18*32+19) /* Intel ARCH LBR */

tools/arch/x86/include/asm/msr-index.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@
185185
#define MSR_PEBS_DATA_CFG 0x000003f2
186186
#define MSR_IA32_DS_AREA 0x00000600
187187
#define MSR_IA32_PERF_CAPABILITIES 0x00000345
188+
#define PERF_CAP_METRICS_IDX 15
189+
#define PERF_CAP_PT_IDX 16
190+
188191
#define MSR_PEBS_LD_LAT_THRESHOLD 0x000003f6
189192

190193
#define MSR_IA32_RTIT_CTL 0x00000570
@@ -265,6 +268,7 @@
265268
#define DEBUGCTLMSR_LBR (1UL << 0) /* last branch recording */
266269
#define DEBUGCTLMSR_BTF_SHIFT 1
267270
#define DEBUGCTLMSR_BTF (1UL << 1) /* single-step on branches */
271+
#define DEBUGCTLMSR_BUS_LOCK_DETECT (1UL << 2)
268272
#define DEBUGCTLMSR_TR (1UL << 6)
269273
#define DEBUGCTLMSR_BTS (1UL << 7)
270274
#define DEBUGCTLMSR_BTINT (1UL << 8)

tools/arch/x86/include/uapi/asm/vmx.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828

2929
#define VMX_EXIT_REASONS_FAILED_VMENTRY 0x80000000
30+
#define VMX_EXIT_REASONS_SGX_ENCLAVE_MODE 0x08000000
3031

3132
#define EXIT_REASON_EXCEPTION_NMI 0
3233
#define EXIT_REASON_EXTERNAL_INTERRUPT 1

tools/arch/x86/lib/memcpy_64.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <linux/linkage.h>
55
#include <asm/errno.h>
66
#include <asm/cpufeatures.h>
7-
#include <asm/alternative-asm.h>
7+
#include <asm/alternative.h>
88
#include <asm/export.h>
99

1010
.pushsection .noinstr.text, "ax"

tools/arch/x86/lib/memset_64.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <linux/linkage.h>
55
#include <asm/cpufeatures.h>
6-
#include <asm/alternative-asm.h>
6+
#include <asm/alternative.h>
77
#include <asm/export.h>
88

99
/*
File renamed without changes.

tools/include/uapi/asm-generic/unistd.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,9 +863,18 @@ __SYSCALL(__NR_process_madvise, sys_process_madvise)
863863
__SC_COMP(__NR_epoll_pwait2, sys_epoll_pwait2, compat_sys_epoll_pwait2)
864864
#define __NR_mount_setattr 442
865865
__SYSCALL(__NR_mount_setattr, sys_mount_setattr)
866+
#define __NR_quotactl_path 443
867+
__SYSCALL(__NR_quotactl_path, sys_quotactl_path)
868+
869+
#define __NR_landlock_create_ruleset 444
870+
__SYSCALL(__NR_landlock_create_ruleset, sys_landlock_create_ruleset)
871+
#define __NR_landlock_add_rule 445
872+
__SYSCALL(__NR_landlock_add_rule, sys_landlock_add_rule)
873+
#define __NR_landlock_restrict_self 446
874+
__SYSCALL(__NR_landlock_restrict_self, sys_landlock_restrict_self)
866875

867876
#undef __NR_syscalls
868-
#define __NR_syscalls 443
877+
#define __NR_syscalls 447
869878

870879
/*
871880
* 32 bit systems traditionally used different

tools/include/uapi/drm/drm.h

Lines changed: 121 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,30 +625,147 @@ struct drm_gem_open {
625625
__u64 size;
626626
};
627627

628+
/**
629+
* DRM_CAP_DUMB_BUFFER
630+
*
631+
* If set to 1, the driver supports creating dumb buffers via the
632+
* &DRM_IOCTL_MODE_CREATE_DUMB ioctl.
633+
*/
628634
#define DRM_CAP_DUMB_BUFFER 0x1
635+
/**
636+
* DRM_CAP_VBLANK_HIGH_CRTC
637+
*
638+
* If set to 1, the kernel supports specifying a CRTC index in the high bits of
639+
* &drm_wait_vblank_request.type.
640+
*
641+
* Starting kernel version 2.6.39, this capability is always set to 1.
642+
*/
629643
#define DRM_CAP_VBLANK_HIGH_CRTC 0x2
644+
/**
645+
* DRM_CAP_DUMB_PREFERRED_DEPTH
646+
*
647+
* The preferred bit depth for dumb buffers.
648+
*
649+
* The bit depth is the number of bits used to indicate the color of a single
650+
* pixel excluding any padding. This is different from the number of bits per
651+
* pixel. For instance, XRGB8888 has a bit depth of 24 but has 32 bits per
652+
* pixel.
653+
*
654+
* Note that this preference only applies to dumb buffers, it's irrelevant for
655+
* other types of buffers.
656+
*/
630657
#define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3
658+
/**
659+
* DRM_CAP_DUMB_PREFER_SHADOW
660+
*
661+
* If set to 1, the driver prefers userspace to render to a shadow buffer
662+
* instead of directly rendering to a dumb buffer. For best speed, userspace
663+
* should do streaming ordered memory copies into the dumb buffer and never
664+
* read from it.
665+
*
666+
* Note that this preference only applies to dumb buffers, it's irrelevant for
667+
* other types of buffers.
668+
*/
631669
#define DRM_CAP_DUMB_PREFER_SHADOW 0x4
670+
/**
671+
* DRM_CAP_PRIME
672+
*
673+
* Bitfield of supported PRIME sharing capabilities. See &DRM_PRIME_CAP_IMPORT
674+
* and &DRM_PRIME_CAP_EXPORT.
675+
*
676+
* PRIME buffers are exposed as dma-buf file descriptors. See
677+
* Documentation/gpu/drm-mm.rst, section "PRIME Buffer Sharing".
678+
*/
632679
#define DRM_CAP_PRIME 0x5
680+
/**
681+
* DRM_PRIME_CAP_IMPORT
682+
*
683+
* If this bit is set in &DRM_CAP_PRIME, the driver supports importing PRIME
684+
* buffers via the &DRM_IOCTL_PRIME_FD_TO_HANDLE ioctl.
685+
*/
633686
#define DRM_PRIME_CAP_IMPORT 0x1
687+
/**
688+
* DRM_PRIME_CAP_EXPORT
689+
*
690+
* If this bit is set in &DRM_CAP_PRIME, the driver supports exporting PRIME
691+
* buffers via the &DRM_IOCTL_PRIME_HANDLE_TO_FD ioctl.
692+
*/
634693
#define DRM_PRIME_CAP_EXPORT 0x2
694+
/**
695+
* DRM_CAP_TIMESTAMP_MONOTONIC
696+
*
697+
* If set to 0, the kernel will report timestamps with ``CLOCK_REALTIME`` in
698+
* struct drm_event_vblank. If set to 1, the kernel will report timestamps with
699+
* ``CLOCK_MONOTONIC``. See ``clock_gettime(2)`` for the definition of these
700+
* clocks.
701+
*
702+
* Starting from kernel version 2.6.39, the default value for this capability
703+
* is 1. Starting kernel version 4.15, this capability is always set to 1.
704+
*/
635705
#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6
706+
/**
707+
* DRM_CAP_ASYNC_PAGE_FLIP
708+
*
709+
* If set to 1, the driver supports &DRM_MODE_PAGE_FLIP_ASYNC.
710+
*/
636711
#define DRM_CAP_ASYNC_PAGE_FLIP 0x7
637-
/*
638-
* The CURSOR_WIDTH and CURSOR_HEIGHT capabilities return a valid widthxheight
639-
* combination for the hardware cursor. The intention is that a hardware
640-
* agnostic userspace can query a cursor plane size to use.
712+
/**
713+
* DRM_CAP_CURSOR_WIDTH
714+
*
715+
* The ``CURSOR_WIDTH`` and ``CURSOR_HEIGHT`` capabilities return a valid
716+
* width x height combination for the hardware cursor. The intention is that a
717+
* hardware agnostic userspace can query a cursor plane size to use.
641718
*
642719
* Note that the cross-driver contract is to merely return a valid size;
643720
* drivers are free to attach another meaning on top, eg. i915 returns the
644721
* maximum plane size.
645722
*/
646723
#define DRM_CAP_CURSOR_WIDTH 0x8
724+
/**
725+
* DRM_CAP_CURSOR_HEIGHT
726+
*
727+
* See &DRM_CAP_CURSOR_WIDTH.
728+
*/
647729
#define DRM_CAP_CURSOR_HEIGHT 0x9
730+
/**
731+
* DRM_CAP_ADDFB2_MODIFIERS
732+
*
733+
* If set to 1, the driver supports supplying modifiers in the
734+
* &DRM_IOCTL_MODE_ADDFB2 ioctl.
735+
*/
648736
#define DRM_CAP_ADDFB2_MODIFIERS 0x10
737+
/**
738+
* DRM_CAP_PAGE_FLIP_TARGET
739+
*
740+
* If set to 1, the driver supports the &DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE and
741+
* &DRM_MODE_PAGE_FLIP_TARGET_RELATIVE flags in
742+
* &drm_mode_crtc_page_flip_target.flags for the &DRM_IOCTL_MODE_PAGE_FLIP
743+
* ioctl.
744+
*/
649745
#define DRM_CAP_PAGE_FLIP_TARGET 0x11
746+
/**
747+
* DRM_CAP_CRTC_IN_VBLANK_EVENT
748+
*
749+
* If set to 1, the kernel supports reporting the CRTC ID in
750+
* &drm_event_vblank.crtc_id for the &DRM_EVENT_VBLANK and
751+
* &DRM_EVENT_FLIP_COMPLETE events.
752+
*
753+
* Starting kernel version 4.12, this capability is always set to 1.
754+
*/
650755
#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12
756+
/**
757+
* DRM_CAP_SYNCOBJ
758+
*
759+
* If set to 1, the driver supports sync objects. See
760+
* Documentation/gpu/drm-mm.rst, section "DRM Sync Objects".
761+
*/
651762
#define DRM_CAP_SYNCOBJ 0x13
763+
/**
764+
* DRM_CAP_SYNCOBJ_TIMELINE
765+
*
766+
* If set to 1, the driver supports timeline operations on sync objects. See
767+
* Documentation/gpu/drm-mm.rst, section "DRM Sync Objects".
768+
*/
652769
#define DRM_CAP_SYNCOBJ_TIMELINE 0x14
653770

654771
/* DRM_IOCTL_GET_CAP ioctl argument type */

tools/include/uapi/drm/i915_drm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,7 @@ struct drm_i915_gem_exec_object {
943943
__u64 offset;
944944
};
945945

946+
/* DRM_IOCTL_I915_GEM_EXECBUFFER was removed in Linux 5.13 */
946947
struct drm_i915_gem_execbuffer {
947948
/**
948949
* List of buffers to be validated with their relocations to be

0 commit comments

Comments
 (0)