aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-11-10 02:21:08 -0500
committerIngo Molnar <mingo@kernel.org>2017-11-10 02:21:08 -0500
commitb5cd3b51e247473e290be5cd09e77171e466cd89 (patch)
treeac8c87e1b38f61a4c879c574dc9373db41f3df01 /tools
parent376f3bcebdc999cc737d9052109cc33b573b3a8b (diff)
parent1c9dbd4615fd751e5e0b99807a3c7c8612e28e20 (diff)
Merge branch 'linus' into x86/platform, to refresh the branch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile1
-rw-r--r--tools/accounting/Makefile1
-rw-r--r--tools/accounting/getdelays.c1
-rw-r--r--tools/arch/alpha/include/asm/barrier.h1
-rw-r--r--tools/arch/alpha/include/uapi/asm/bitsperlong.h1
-rw-r--r--tools/arch/alpha/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/arc/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/arm/include/uapi/asm/kvm.h1
-rw-r--r--tools/arch/arm/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/arm/include/uapi/asm/perf_regs.h1
-rw-r--r--tools/arch/arm64/include/asm/barrier.h1
-rw-r--r--tools/arch/arm64/include/uapi/asm/bitsperlong.h1
-rw-r--r--tools/arch/arm64/include/uapi/asm/kvm.h1
-rw-r--r--tools/arch/arm64/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/arm64/include/uapi/asm/perf_regs.h1
-rw-r--r--tools/arch/frv/include/uapi/asm/bitsperlong.h1
-rw-r--r--tools/arch/frv/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/h8300/include/asm/bitsperlong.h1
-rw-r--r--tools/arch/h8300/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/hexagon/include/uapi/asm/bitsperlong.h1
-rw-r--r--tools/arch/hexagon/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/ia64/include/asm/barrier.h1
-rw-r--r--tools/arch/ia64/include/uapi/asm/bitsperlong.h1
-rw-r--r--tools/arch/ia64/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/m32r/include/uapi/asm/bitsperlong.h1
-rw-r--r--tools/arch/m32r/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/microblaze/include/uapi/asm/bitsperlong.h1
-rw-r--r--tools/arch/microblaze/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/mips/include/asm/barrier.h1
-rw-r--r--tools/arch/mips/include/uapi/asm/bitsperlong.h1
-rw-r--r--tools/arch/mips/include/uapi/asm/kvm.h1
-rw-r--r--tools/arch/mips/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/mn10300/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/parisc/include/uapi/asm/bitsperlong.h1
-rw-r--r--tools/arch/parisc/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/powerpc/include/asm/barrier.h1
-rw-r--r--tools/arch/powerpc/include/uapi/asm/bitsperlong.h1
-rw-r--r--tools/arch/powerpc/include/uapi/asm/kvm.h1
-rw-r--r--tools/arch/powerpc/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/powerpc/include/uapi/asm/perf_regs.h1
-rw-r--r--tools/arch/s390/include/asm/barrier.h1
-rw-r--r--tools/arch/s390/include/uapi/asm/bitsperlong.h1
-rw-r--r--tools/arch/s390/include/uapi/asm/kvm.h1
-rw-r--r--tools/arch/s390/include/uapi/asm/kvm_perf.h1
-rw-r--r--tools/arch/s390/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/s390/include/uapi/asm/sie.h1
-rw-r--r--tools/arch/score/include/uapi/asm/bitsperlong.h1
-rw-r--r--tools/arch/score/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/sh/include/asm/barrier.h1
-rw-r--r--tools/arch/sh/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/sparc/include/asm/barrier.h1
-rw-r--r--tools/arch/sparc/include/asm/barrier_32.h1
-rw-r--r--tools/arch/sparc/include/asm/barrier_64.h1
-rw-r--r--tools/arch/sparc/include/uapi/asm/bitsperlong.h1
-rw-r--r--tools/arch/sparc/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/tile/include/asm/barrier.h1
-rw-r--r--tools/arch/tile/include/uapi/asm/bitsperlong.h1
-rw-r--r--tools/arch/tile/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/x86/include/asm/atomic.h1
-rw-r--r--tools/arch/x86/include/asm/barrier.h1
-rw-r--r--tools/arch/x86/include/asm/cmpxchg.h1
-rw-r--r--tools/arch/x86/include/asm/cpufeatures.h1
-rw-r--r--tools/arch/x86/include/asm/rmwcc.h1
-rw-r--r--tools/arch/x86/include/asm/unistd_32.h1
-rw-r--r--tools/arch/x86/include/asm/unistd_64.h1
-rw-r--r--tools/arch/x86/include/uapi/asm/bitsperlong.h1
-rw-r--r--tools/arch/x86/include/uapi/asm/kvm.h1
-rw-r--r--tools/arch/x86/include/uapi/asm/kvm_perf.h1
-rw-r--r--tools/arch/x86/include/uapi/asm/mman.h1
-rw-r--r--tools/arch/x86/include/uapi/asm/perf_regs.h1
-rw-r--r--tools/arch/x86/include/uapi/asm/svm.h1
-rw-r--r--tools/arch/x86/include/uapi/asm/unistd.h1
-rw-r--r--tools/arch/x86/include/uapi/asm/vmx.h1
-rw-r--r--tools/arch/x86/lib/memcpy_64.S4
-rw-r--r--tools/arch/x86/lib/memset_64.S1
-rw-r--r--tools/arch/xtensa/include/uapi/asm/mman.h1
-rw-r--r--tools/build/Makefile1
-rw-r--r--tools/build/Makefile.build1
-rw-r--r--tools/build/feature/Makefile1
-rw-r--r--tools/build/feature/test-all.c1
-rw-r--r--tools/build/feature/test-backtrace.c1
-rw-r--r--tools/build/feature/test-bionic.c1
-rw-r--r--tools/build/feature/test-bpf.c1
-rw-r--r--tools/build/feature/test-clang.cpp1
-rw-r--r--tools/build/feature/test-compile.c1
-rw-r--r--tools/build/feature/test-cplus-demangle.c1
-rw-r--r--tools/build/feature/test-cxx.cpp1
-rw-r--r--tools/build/feature/test-dwarf.c1
-rw-r--r--tools/build/feature/test-dwarf_getlocations.c1
-rw-r--r--tools/build/feature/test-get_cpuid.c1
-rw-r--r--tools/build/feature/test-glibc.c1
-rw-r--r--tools/build/feature/test-gtk2-infobar.c1
-rw-r--r--tools/build/feature/test-gtk2.c1
-rw-r--r--tools/build/feature/test-jvmti.c1
-rw-r--r--tools/build/feature/test-libaudit.c1
-rw-r--r--tools/build/feature/test-libbabeltrace.c1
-rw-r--r--tools/build/feature/test-libbfd.c1
-rw-r--r--tools/build/feature/test-libcrypto.c1
-rw-r--r--tools/build/feature/test-libdw-dwarf-unwind.c1
-rw-r--r--tools/build/feature/test-libelf-gelf_getnote.c1
-rw-r--r--tools/build/feature/test-libelf-getphdrnum.c1
-rw-r--r--tools/build/feature/test-libelf-getshdrstrndx.c1
-rw-r--r--tools/build/feature/test-libelf-mmap.c1
-rw-r--r--tools/build/feature/test-libelf.c1
-rw-r--r--tools/build/feature/test-libnuma.c1
-rw-r--r--tools/build/feature/test-libperl.c1
-rw-r--r--tools/build/feature/test-libpython-version.c1
-rw-r--r--tools/build/feature/test-libpython.c1
-rw-r--r--tools/build/feature/test-libslang.c1
-rw-r--r--tools/build/feature/test-libunwind-aarch64.c1
-rw-r--r--tools/build/feature/test-libunwind-arm.c1
-rw-r--r--tools/build/feature/test-libunwind-debug-frame-aarch64.c1
-rw-r--r--tools/build/feature/test-libunwind-debug-frame-arm.c1
-rw-r--r--tools/build/feature/test-libunwind-debug-frame.c1
-rw-r--r--tools/build/feature/test-libunwind-x86.c1
-rw-r--r--tools/build/feature/test-libunwind-x86_64.c1
-rw-r--r--tools/build/feature/test-libunwind.c1
-rw-r--r--tools/build/feature/test-llvm-version.cpp1
-rw-r--r--tools/build/feature/test-llvm.cpp1
-rw-r--r--tools/build/feature/test-lzma.c1
-rw-r--r--tools/build/feature/test-numa_num_possible_cpus.c1
-rw-r--r--tools/build/feature/test-pthread-attr-setaffinity-np.c1
-rw-r--r--tools/build/feature/test-sched_getcpu.c1
-rw-r--r--tools/build/feature/test-sdt.c1
-rw-r--r--tools/build/feature/test-stackprotector-all.c1
-rw-r--r--tools/build/feature/test-sync-compare-and-swap.c1
-rw-r--r--tools/build/feature/test-timerfd.c1
-rw-r--r--tools/build/feature/test-zlib.c1
-rw-r--r--tools/build/fixdep.c1
-rw-r--r--tools/build/tests/ex/Makefile1
-rw-r--r--tools/build/tests/ex/a.c1
-rw-r--r--tools/build/tests/ex/arch/e.c1
-rw-r--r--tools/build/tests/ex/arch/f.c1
-rw-r--r--tools/build/tests/ex/b.c1
-rw-r--r--tools/build/tests/ex/c.c1
-rw-r--r--tools/build/tests/ex/d.c1
-rw-r--r--tools/build/tests/ex/ex.c1
-rw-r--r--tools/build/tests/ex/inc.c1
-rwxr-xr-xtools/build/tests/run.sh1
-rw-r--r--tools/cgroup/Makefile1
-rw-r--r--tools/cgroup/cgroup_event_listener.c1
-rw-r--r--tools/firewire/Makefile1
-rw-r--r--tools/firewire/decode-fcp.c1
-rw-r--r--tools/firewire/list.h1
-rw-r--r--tools/firewire/nosy-dump.h1
-rw-r--r--tools/gpio/Makefile1
-rw-r--r--tools/hv/Makefile1
-rwxr-xr-xtools/hv/hv_get_dhcp_info.sh1
-rwxr-xr-xtools/hv/hv_set_ifconfig.sh1
-rw-r--r--tools/hv/lsvmbus1
-rw-r--r--tools/iio/Makefile1
-rw-r--r--tools/include/asm-generic/atomic-gcc.h1
-rw-r--r--tools/include/asm-generic/bitops.h1
-rw-r--r--tools/include/asm-generic/bitops/__ffs.h1
-rw-r--r--tools/include/asm-generic/bitops/__fls.h1
-rw-r--r--tools/include/asm-generic/bitops/arch_hweight.h1
-rw-r--r--tools/include/asm-generic/bitops/atomic.h1
-rw-r--r--tools/include/asm-generic/bitops/const_hweight.h1
-rw-r--r--tools/include/asm-generic/bitops/find.h1
-rw-r--r--tools/include/asm-generic/bitops/fls.h1
-rw-r--r--tools/include/asm-generic/bitops/fls64.h1
-rw-r--r--tools/include/asm-generic/bitops/hweight.h1
-rw-r--r--tools/include/asm-generic/bitsperlong.h1
-rw-r--r--tools/include/asm/alternative-asm.h1
-rw-r--r--tools/include/asm/atomic.h1
-rw-r--r--tools/include/asm/barrier.h1
-rw-r--r--tools/include/asm/bug.h1
-rw-r--r--tools/include/asm/export.h7
-rw-r--r--tools/include/linux/atomic.h1
-rw-r--r--tools/include/linux/bitmap.h1
-rw-r--r--tools/include/linux/bitops.h1
-rw-r--r--tools/include/linux/bug.h1
-rw-r--r--tools/include/linux/compiler-gcc.h1
-rw-r--r--tools/include/linux/compiler.h1
-rw-r--r--tools/include/linux/debug_locks.h1
-rw-r--r--tools/include/linux/err.h1
-rw-r--r--tools/include/linux/filter.h1
-rw-r--r--tools/include/linux/hardirq.h1
-rw-r--r--tools/include/linux/hashtable.h1
-rw-r--r--tools/include/linux/irqflags.h1
-rw-r--r--tools/include/linux/kallsyms.h1
-rw-r--r--tools/include/linux/kern_levels.h1
-rw-r--r--tools/include/linux/kernel.h1
-rw-r--r--tools/include/linux/kmemcheck.h1
-rw-r--r--tools/include/linux/list.h1
-rw-r--r--tools/include/linux/lockdep.h1
-rw-r--r--tools/include/linux/module.h1
-rw-r--r--tools/include/linux/poison.h1
-rw-r--r--tools/include/linux/rcu.h1
-rw-r--r--tools/include/linux/refcount.h1
-rw-r--r--tools/include/linux/spinlock.h1
-rw-r--r--tools/include/linux/stacktrace.h1
-rw-r--r--tools/include/linux/string.h1
-rw-r--r--tools/include/linux/stringify.h1
-rw-r--r--tools/include/linux/time64.h1
-rw-r--r--tools/include/linux/types.h1
-rw-r--r--tools/include/linux/unaligned/packed_struct.h1
-rw-r--r--tools/include/tools/be_byteshift.h1
-rw-r--r--tools/include/tools/endian.h1
-rw-r--r--tools/include/tools/le_byteshift.h1
-rw-r--r--tools/include/uapi/asm-generic/ioctls.h1
-rw-r--r--tools/include/uapi/asm-generic/mman-common.h1
-rw-r--r--tools/include/uapi/asm-generic/mman.h3
-rw-r--r--tools/include/uapi/linux/bpf.h8
-rw-r--r--tools/include/uapi/linux/bpf_common.h1
-rw-r--r--tools/include/uapi/linux/fcntl.h1
-rw-r--r--tools/include/uapi/linux/hw_breakpoint.h1
-rw-r--r--tools/include/uapi/linux/kvm.h1
-rw-r--r--tools/include/uapi/linux/mman.h1
-rw-r--r--tools/include/uapi/linux/perf_event.h1
-rw-r--r--tools/include/uapi/linux/sched.h1
-rw-r--r--tools/include/uapi/linux/stat.h1
-rw-r--r--tools/include/uapi/linux/vhost.h1
-rw-r--r--tools/include/uapi/sound/asound.h1
-rw-r--r--tools/kvm/kvm_stat/Makefile1
-rw-r--r--tools/laptop/dslm/Makefile1
-rw-r--r--tools/laptop/freefall/Makefile1
-rw-r--r--tools/leds/Makefile1
-rw-r--r--tools/leds/led_hw_brightness_mon.c1
-rw-r--r--tools/leds/uledmon.c1
-rw-r--r--tools/lib/api/Makefile1
-rw-r--r--tools/lib/api/cpu.c1
-rw-r--r--tools/lib/api/cpu.h1
-rw-r--r--tools/lib/api/debug-internal.h1
-rw-r--r--tools/lib/api/debug.c1
-rw-r--r--tools/lib/api/debug.h1
-rw-r--r--tools/lib/api/fd/array.h1
-rw-r--r--tools/lib/api/fs/fs.c1
-rw-r--r--tools/lib/api/fs/fs.h1
-rw-r--r--tools/lib/api/fs/tracing_path.c1
-rw-r--r--tools/lib/api/fs/tracing_path.h1
-rw-r--r--tools/lib/bpf/Makefile1
-rw-r--r--tools/lib/hweight.c1
-rw-r--r--tools/lib/lockdep/Makefile1
-rw-r--r--tools/lib/lockdep/common.c1
-rw-r--r--tools/lib/lockdep/include/liblockdep/common.h1
-rw-r--r--tools/lib/lockdep/include/liblockdep/mutex.h1
-rw-r--r--tools/lib/lockdep/include/liblockdep/rwlock.h1
-rw-r--r--tools/lib/lockdep/lockdep.c1
-rw-r--r--tools/lib/lockdep/preload.c1
-rwxr-xr-xtools/lib/lockdep/run_tests.sh1
-rw-r--r--tools/lib/lockdep/tests/AA.c1
-rw-r--r--tools/lib/lockdep/tests/ABA.c1
-rw-r--r--tools/lib/lockdep/tests/ABBA.c1
-rw-r--r--tools/lib/lockdep/tests/ABBA_2threads.c1
-rw-r--r--tools/lib/lockdep/tests/ABBCCA.c1
-rw-r--r--tools/lib/lockdep/tests/ABBCCDDA.c1
-rw-r--r--tools/lib/lockdep/tests/ABCABC.c1
-rw-r--r--tools/lib/lockdep/tests/ABCDBCDA.c1
-rw-r--r--tools/lib/lockdep/tests/ABCDBDDA.c1
-rw-r--r--tools/lib/lockdep/tests/WW.c1
-rw-r--r--tools/lib/lockdep/tests/common.h1
-rw-r--r--tools/lib/lockdep/tests/unlock_balance.c1
-rw-r--r--tools/lib/str_error_r.c1
-rw-r--r--tools/lib/string.c1
-rw-r--r--tools/lib/subcmd/Makefile1
-rw-r--r--tools/lib/subcmd/exec-cmd.c1
-rw-r--r--tools/lib/subcmd/exec-cmd.h1
-rw-r--r--tools/lib/subcmd/help.c1
-rw-r--r--tools/lib/subcmd/help.h1
-rw-r--r--tools/lib/subcmd/pager.c1
-rw-r--r--tools/lib/subcmd/pager.h1
-rw-r--r--tools/lib/subcmd/parse-options.c1
-rw-r--r--tools/lib/subcmd/parse-options.h1
-rw-r--r--tools/lib/subcmd/run-command.c1
-rw-r--r--tools/lib/subcmd/run-command.h1
-rw-r--r--tools/lib/subcmd/sigchain.c1
-rw-r--r--tools/lib/subcmd/sigchain.h1
-rw-r--r--tools/lib/subcmd/subcmd-config.c1
-rw-r--r--tools/lib/subcmd/subcmd-config.h1
-rw-r--r--tools/lib/subcmd/subcmd-util.h1
-rw-r--r--tools/lib/symbol/kallsyms.c1
-rw-r--r--tools/lib/symbol/kallsyms.h1
-rw-r--r--tools/lib/traceevent/Makefile1
-rw-r--r--tools/lib/traceevent/plugin_cfg80211.c1
-rw-r--r--tools/lib/traceevent/plugin_scsi.c1
-rw-r--r--tools/lib/traceevent/plugin_xen.c1
-rw-r--r--tools/lib/vsprintf.c1
-rw-r--r--tools/net/Makefile1
-rwxr-xr-xtools/nfsd/inject_fault.sh1
-rw-r--r--tools/objtool/Makefile1
-rw-r--r--tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk1
-rw-r--r--tools/objtool/check.c9
-rw-r--r--tools/pci/pcitest.sh1
-rw-r--r--tools/pcmcia/Makefile1
-rw-r--r--tools/perf/Documentation/perf-record.txt4
-rw-r--r--tools/perf/Makefile1
-rw-r--r--tools/perf/arch/arm/annotate/instructions.c1
-rw-r--r--tools/perf/arch/arm/include/dwarf-regs-table.h1
-rw-r--r--tools/perf/arch/arm/include/perf_regs.h1
-rw-r--r--tools/perf/arch/arm/tests/dwarf-unwind.c1
-rw-r--r--tools/perf/arch/arm/tests/regs_load.S1
-rw-r--r--tools/perf/arch/arm/util/unwind-libdw.c1
-rw-r--r--tools/perf/arch/arm/util/unwind-libunwind.c1
-rw-r--r--tools/perf/arch/arm64/Makefile1
-rw-r--r--tools/perf/arch/arm64/annotate/instructions.c1
-rw-r--r--tools/perf/arch/arm64/include/dwarf-regs-table.h1
-rw-r--r--tools/perf/arch/arm64/include/perf_regs.h1
-rw-r--r--tools/perf/arch/arm64/tests/dwarf-unwind.c1
-rw-r--r--tools/perf/arch/arm64/tests/regs_load.S1
-rw-r--r--tools/perf/arch/arm64/util/unwind-libunwind.c1
-rw-r--r--tools/perf/arch/common.c1
-rw-r--r--tools/perf/arch/common.h1
-rw-r--r--tools/perf/arch/powerpc/Makefile1
-rw-r--r--tools/perf/arch/powerpc/annotate/instructions.c1
-rw-r--r--tools/perf/arch/powerpc/include/arch-tests.h1
-rw-r--r--tools/perf/arch/powerpc/include/dwarf-regs-table.h1
-rw-r--r--tools/perf/arch/powerpc/include/perf_regs.h1
-rw-r--r--tools/perf/arch/powerpc/tests/arch-tests.c1
-rw-r--r--tools/perf/arch/powerpc/tests/dwarf-unwind.c1
-rw-r--r--tools/perf/arch/powerpc/tests/regs_load.S1
-rw-r--r--tools/perf/arch/powerpc/util/book3s_hcalls.h1
-rw-r--r--tools/perf/arch/powerpc/util/book3s_hv_exits.h1
-rw-r--r--tools/perf/arch/powerpc/util/header.c1
-rw-r--r--tools/perf/arch/powerpc/util/kvm-stat.c1
-rw-r--r--tools/perf/arch/powerpc/util/perf_regs.c1
-rw-r--r--tools/perf/arch/powerpc/util/unwind-libdw.c1
-rw-r--r--tools/perf/arch/s390/annotate/instructions.c1
-rw-r--r--tools/perf/arch/s390/include/dwarf-regs-table.h1
-rw-r--r--tools/perf/arch/s390/util/dwarf-regs.c1
-rw-r--r--tools/perf/arch/s390/util/machine.c1
-rw-r--r--tools/perf/arch/sh/include/dwarf-regs-table.h1
-rw-r--r--tools/perf/arch/sparc/include/dwarf-regs-table.h1
-rw-r--r--tools/perf/arch/x86/Makefile1
-rw-r--r--tools/perf/arch/x86/annotate/instructions.c1
-rwxr-xr-xtools/perf/arch/x86/entry/syscalls/syscalltbl.sh1
-rw-r--r--tools/perf/arch/x86/include/arch-tests.h1
-rw-r--r--tools/perf/arch/x86/include/dwarf-regs-table.h1
-rw-r--r--tools/perf/arch/x86/include/perf_regs.h1
-rw-r--r--tools/perf/arch/x86/tests/arch-tests.c1
-rw-r--r--tools/perf/arch/x86/tests/dwarf-unwind.c1
-rw-r--r--tools/perf/arch/x86/tests/insn-x86-dat-32.c1
-rw-r--r--tools/perf/arch/x86/tests/insn-x86-dat-64.c1
-rw-r--r--tools/perf/arch/x86/tests/insn-x86-dat-src.c1
-rw-r--r--tools/perf/arch/x86/tests/insn-x86.c1
-rw-r--r--tools/perf/arch/x86/tests/intel-cqm.c1
-rw-r--r--tools/perf/arch/x86/tests/perf-time-to-tsc.c1
-rw-r--r--tools/perf/arch/x86/tests/rdpmc.c1
-rw-r--r--tools/perf/arch/x86/tests/regs_load.S1
-rw-r--r--tools/perf/arch/x86/util/group.c1
-rw-r--r--tools/perf/arch/x86/util/header.c1
-rw-r--r--tools/perf/arch/x86/util/kvm-stat.c1
-rw-r--r--tools/perf/arch/x86/util/perf_regs.c1
-rw-r--r--tools/perf/arch/x86/util/pmu.c1
-rw-r--r--tools/perf/arch/x86/util/tsc.c1
-rw-r--r--tools/perf/arch/x86/util/unwind-libdw.c1
-rw-r--r--tools/perf/arch/x86/util/unwind-libunwind.c1
-rw-r--r--tools/perf/arch/xtensa/include/dwarf-regs-table.h1
-rw-r--r--tools/perf/bench/bench.h1
-rw-r--r--tools/perf/bench/futex-hash.c1
-rw-r--r--tools/perf/bench/futex-lock-pi.c1
-rw-r--r--tools/perf/bench/futex-requeue.c1
-rw-r--r--tools/perf/bench/futex-wake-parallel.c1
-rw-r--r--tools/perf/bench/futex-wake.c1
-rw-r--r--tools/perf/bench/futex.h1
-rw-r--r--tools/perf/bench/mem-functions.c1
-rw-r--r--tools/perf/bench/mem-memcpy-arch.h1
-rw-r--r--tools/perf/bench/mem-memcpy-x86-64-asm-def.h1
-rw-r--r--tools/perf/bench/mem-memcpy-x86-64-asm.S1
-rw-r--r--tools/perf/bench/mem-memset-arch.h1
-rw-r--r--tools/perf/bench/mem-memset-x86-64-asm-def.h1
-rw-r--r--tools/perf/bench/mem-memset-x86-64-asm.S1
-rw-r--r--tools/perf/bench/numa.c1
-rw-r--r--tools/perf/bench/sched-messaging.c1
-rw-r--r--tools/perf/bench/sched-pipe.c1
-rw-r--r--tools/perf/builtin-annotate.c1
-rw-r--r--tools/perf/builtin-bench.c1
-rw-r--r--tools/perf/builtin-buildid-cache.c1
-rw-r--r--tools/perf/builtin-buildid-list.c1
-rw-r--r--tools/perf/builtin-c2c.c1
-rw-r--r--tools/perf/builtin-config.c1
-rw-r--r--tools/perf/builtin-data.c1
-rw-r--r--tools/perf/builtin-diff.c1
-rw-r--r--tools/perf/builtin-evlist.c1
-rw-r--r--tools/perf/builtin-help.c1
-rw-r--r--tools/perf/builtin-inject.c1
-rw-r--r--tools/perf/builtin-kmem.c1
-rw-r--r--tools/perf/builtin-kvm.c1
-rw-r--r--tools/perf/builtin-list.c1
-rw-r--r--tools/perf/builtin-lock.c1
-rw-r--r--tools/perf/builtin-mem.c1
-rw-r--r--tools/perf/builtin-record.c1
-rw-r--r--tools/perf/builtin-report.c1
-rw-r--r--tools/perf/builtin-sched.c1
-rw-r--r--tools/perf/builtin-script.c1
-rw-r--r--tools/perf/builtin-version.c1
-rw-r--r--tools/perf/builtin.h1
-rwxr-xr-xtools/perf/check-headers.sh1
-rw-r--r--tools/perf/jvmti/jvmti_agent.h1
-rw-r--r--tools/perf/jvmti/libjvmti.c1
-rw-r--r--tools/perf/perf-archive.sh1
-rw-r--r--tools/perf/perf-completion.sh1
-rw-r--r--tools/perf/perf-read-vdso.c1
-rw-r--r--tools/perf/perf-sys.h1
-rw-r--r--tools/perf/perf.c1
-rw-r--r--tools/perf/perf.h1
-rw-r--r--tools/perf/pmu-events/jevents.h1
-rw-r--r--tools/perf/pmu-events/jsmn.h1
-rw-r--r--tools/perf/pmu-events/json.h1
-rw-r--r--tools/perf/pmu-events/pmu-events.h1
-rwxr-xr-xtools/perf/python/tracepoint.py1
-rw-r--r--tools/perf/scripts/perl/Perf-Trace-Util/Makefile.PL1
-rwxr-xr-xtools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py1
-rw-r--r--tools/perf/scripts/python/event_analyzing_sample.py1
-rwxr-xr-xtools/perf/scripts/python/net_dropmonitor.py1
-rw-r--r--tools/perf/scripts/python/netdev-times.py1
-rwxr-xr-xtools/perf/scripts/python/stackcollapse.py1
-rw-r--r--tools/perf/scripts/python/stat-cpi.py1
-rw-r--r--tools/perf/tests/attr.c1
-rw-r--r--tools/perf/tests/attr.py1
-rw-r--r--tools/perf/tests/backward-ring-buffer.c1
-rw-r--r--tools/perf/tests/bitmap.c1
-rw-r--r--tools/perf/tests/bp_signal.c1
-rw-r--r--tools/perf/tests/bp_signal_overflow.c1
-rw-r--r--tools/perf/tests/builtin-test.c1
-rw-r--r--tools/perf/tests/clang.c1
-rw-r--r--tools/perf/tests/code-reading.c1
-rw-r--r--tools/perf/tests/cpumap.c1
-rw-r--r--tools/perf/tests/dso-data.c1
-rw-r--r--tools/perf/tests/dwarf-unwind.c1
-rw-r--r--tools/perf/tests/event-times.c1
-rw-r--r--tools/perf/tests/event_update.c1
-rw-r--r--tools/perf/tests/evsel-roundtrip-name.c1
-rw-r--r--tools/perf/tests/evsel-tp-sched.c1
-rw-r--r--tools/perf/tests/expr.c1
-rw-r--r--tools/perf/tests/fdarray.c1
-rw-r--r--tools/perf/tests/hists_common.c1
-rw-r--r--tools/perf/tests/hists_common.h1
-rw-r--r--tools/perf/tests/hists_cumulate.c1
-rw-r--r--tools/perf/tests/hists_filter.c1
-rw-r--r--tools/perf/tests/hists_link.c1
-rw-r--r--tools/perf/tests/hists_output.c1
-rw-r--r--tools/perf/tests/is_printable_array.c1
-rw-r--r--tools/perf/tests/keep-tracking.c1
-rw-r--r--tools/perf/tests/kmod-path.c1
-rw-r--r--tools/perf/tests/llvm.c1
-rw-r--r--tools/perf/tests/llvm.h1
-rw-r--r--tools/perf/tests/mmap-basic.c1
-rw-r--r--tools/perf/tests/mmap-thread-lookup.c1
-rw-r--r--tools/perf/tests/openat-syscall-all-cpus.c1
-rw-r--r--tools/perf/tests/openat-syscall-tp-fields.c1
-rw-r--r--tools/perf/tests/openat-syscall.c1
-rw-r--r--tools/perf/tests/parse-events.c1
-rw-r--r--tools/perf/tests/parse-no-sample-id-all.c1
-rw-r--r--tools/perf/tests/perf-hooks.c1
-rw-r--r--tools/perf/tests/perf-record.c1
-rwxr-xr-xtools/perf/tests/perf-targz-src-pkg1
-rw-r--r--tools/perf/tests/pmu.c1
-rw-r--r--tools/perf/tests/python-use.c1
-rw-r--r--tools/perf/tests/sample-parsing.c1
-rw-r--r--tools/perf/tests/sdt.c1
-rwxr-xr-xtools/perf/tests/shell/trace+probe_libc_inet_pton.sh9
-rw-r--r--tools/perf/tests/stat.c1
-rw-r--r--tools/perf/tests/sw-clock.c1
-rw-r--r--tools/perf/tests/switch-tracking.c1
-rw-r--r--tools/perf/tests/task-exit.c1
-rw-r--r--tools/perf/tests/tests.h1
-rw-r--r--tools/perf/tests/thread-map.c1
-rw-r--r--tools/perf/tests/thread-mg-share.c1
-rw-r--r--tools/perf/tests/topology.c1
-rw-r--r--tools/perf/tests/unit_number__scnprintf.c1
-rw-r--r--tools/perf/tests/vmlinux-kallsyms.c1
-rw-r--r--tools/perf/trace/beauty/beauty.h1
-rw-r--r--tools/perf/trace/beauty/eventfd.c1
-rw-r--r--tools/perf/trace/beauty/flock.c1
-rw-r--r--tools/perf/trace/beauty/futex_op.c1
-rw-r--r--tools/perf/trace/beauty/mmap.c1
-rw-r--r--tools/perf/trace/beauty/mode_t.c1
-rw-r--r--tools/perf/trace/beauty/msg_flags.c1
-rw-r--r--tools/perf/trace/beauty/open_flags.c1
-rw-r--r--tools/perf/trace/beauty/perf_event_open.c1
-rw-r--r--tools/perf/trace/beauty/pid.c1
-rw-r--r--tools/perf/trace/beauty/sched_policy.c1
-rw-r--r--tools/perf/trace/beauty/seccomp.c1
-rw-r--r--tools/perf/trace/beauty/signum.c1
-rw-r--r--tools/perf/trace/beauty/socket_type.c1
-rw-r--r--tools/perf/trace/beauty/waitid_options.c1
-rw-r--r--tools/perf/ui/browser.c1
-rw-r--r--tools/perf/ui/browser.h1
-rw-r--r--tools/perf/ui/browsers/annotate.c1
-rw-r--r--tools/perf/ui/browsers/header.c1
-rw-r--r--tools/perf/ui/browsers/hists.c1
-rw-r--r--tools/perf/ui/browsers/hists.h1
-rw-r--r--tools/perf/ui/browsers/map.c1
-rw-r--r--tools/perf/ui/browsers/map.h1
-rw-r--r--tools/perf/ui/browsers/scripts.c1
-rw-r--r--tools/perf/ui/gtk/annotate.c1
-rw-r--r--tools/perf/ui/gtk/browser.c1
-rw-r--r--tools/perf/ui/gtk/gtk.h1
-rw-r--r--tools/perf/ui/gtk/helpline.c1
-rw-r--r--tools/perf/ui/gtk/hists.c1
-rw-r--r--tools/perf/ui/gtk/progress.c1
-rw-r--r--tools/perf/ui/gtk/setup.c1
-rw-r--r--tools/perf/ui/gtk/util.c1
-rw-r--r--tools/perf/ui/helpline.c1
-rw-r--r--tools/perf/ui/helpline.h1
-rw-r--r--tools/perf/ui/hist.c10
-rw-r--r--tools/perf/ui/keysyms.h1
-rw-r--r--tools/perf/ui/libslang.h1
-rw-r--r--tools/perf/ui/progress.c1
-rw-r--r--tools/perf/ui/progress.h1
-rw-r--r--tools/perf/ui/setup.c1
-rw-r--r--tools/perf/ui/stdio/hist.c1
-rw-r--r--tools/perf/ui/tui/helpline.c1
-rw-r--r--tools/perf/ui/tui/progress.c1
-rw-r--r--tools/perf/ui/tui/setup.c1
-rw-r--r--tools/perf/ui/tui/tui.h1
-rw-r--r--tools/perf/ui/tui/util.c1
-rw-r--r--tools/perf/ui/ui.h1
-rw-r--r--tools/perf/ui/util.c1
-rw-r--r--tools/perf/ui/util.h1
-rwxr-xr-xtools/perf/util/PERF-VERSION-GEN1
-rw-r--r--tools/perf/util/annotate.c12
-rw-r--r--tools/perf/util/annotate.h1
-rw-r--r--tools/perf/util/block-range.c1
-rw-r--r--tools/perf/util/block-range.h1
-rw-r--r--tools/perf/util/bpf-loader.c1
-rw-r--r--tools/perf/util/bpf-loader.h1
-rw-r--r--tools/perf/util/bpf-prologue.c1
-rw-r--r--tools/perf/util/bpf-prologue.h1
-rw-r--r--tools/perf/util/build-id.c1
-rw-r--r--tools/perf/util/build-id.h1
-rw-r--r--tools/perf/util/c++/clang-c.h1
-rw-r--r--tools/perf/util/c++/clang-test.cpp1
-rw-r--r--tools/perf/util/c++/clang.cpp1
-rw-r--r--tools/perf/util/c++/clang.h1
-rw-r--r--tools/perf/util/cache.h1
-rw-r--r--tools/perf/util/callchain.c1
-rw-r--r--tools/perf/util/callchain.h1
-rw-r--r--tools/perf/util/cgroup.c1
-rw-r--r--tools/perf/util/cgroup.h1
-rw-r--r--tools/perf/util/cloexec.c1
-rw-r--r--tools/perf/util/cloexec.h1
-rw-r--r--tools/perf/util/color.c1
-rw-r--r--tools/perf/util/color.h1
-rw-r--r--tools/perf/util/comm.c1
-rw-r--r--tools/perf/util/comm.h1
-rw-r--r--tools/perf/util/compress.h1
-rw-r--r--tools/perf/util/config.c1
-rw-r--r--tools/perf/util/config.h1
-rw-r--r--tools/perf/util/counts.c1
-rw-r--r--tools/perf/util/counts.h1
-rw-r--r--tools/perf/util/cpumap.c1
-rw-r--r--tools/perf/util/cpumap.h1
-rw-r--r--tools/perf/util/ctype.c1
-rw-r--r--tools/perf/util/data-convert-bt.h1
-rw-r--r--tools/perf/util/data-convert.h1
-rw-r--r--tools/perf/util/data.c1
-rw-r--r--tools/perf/util/data.h1
-rw-r--r--tools/perf/util/debug.c1
-rw-r--r--tools/perf/util/debug.h1
-rw-r--r--tools/perf/util/demangle-java.c1
-rw-r--r--tools/perf/util/demangle-java.h1
-rw-r--r--tools/perf/util/demangle-rust.c1
-rw-r--r--tools/perf/util/demangle-rust.h1
-rw-r--r--tools/perf/util/dso.c1
-rw-r--r--tools/perf/util/dso.h1
-rw-r--r--tools/perf/util/dump-insn.c1
-rw-r--r--tools/perf/util/dump-insn.h1
-rw-r--r--tools/perf/util/dwarf-regs.c1
-rw-r--r--tools/perf/util/env.c1
-rw-r--r--tools/perf/util/env.h1
-rw-r--r--tools/perf/util/event.c1
-rw-r--r--tools/perf/util/event.h1
-rw-r--r--tools/perf/util/evlist.h1
-rw-r--r--tools/perf/util/evsel.h1
-rw-r--r--tools/perf/util/evsel_fprintf.c1
-rw-r--r--tools/perf/util/expr.h1
-rw-r--r--tools/perf/util/find-vdso-map.c1
-rw-r--r--tools/perf/util/genelf.h1
-rwxr-xr-xtools/perf/util/generate-cmdlist.sh1
-rw-r--r--tools/perf/util/group.h1
-rw-r--r--tools/perf/util/header.c1
-rw-r--r--tools/perf/util/header.h1
-rw-r--r--tools/perf/util/help-unknown-cmd.c1
-rw-r--r--tools/perf/util/hist.c1
-rw-r--r--tools/perf/util/hist.h1
-rw-r--r--tools/perf/util/include/asm/asm-offsets.h1
-rw-r--r--tools/perf/util/include/asm/cpufeature.h1
-rw-r--r--tools/perf/util/include/asm/dwarf2.h1
-rw-r--r--tools/perf/util/include/asm/uaccess.h1
-rw-r--r--tools/perf/util/include/dwarf-regs.h1
-rw-r--r--tools/perf/util/include/linux/linkage.h1
-rw-r--r--tools/perf/util/intel-pt-decoder/gen-insn-attr-x86.awk1
-rw-r--r--tools/perf/util/intlist.h1
-rw-r--r--tools/perf/util/jit.h1
-rw-r--r--tools/perf/util/jitdump.c1
-rw-r--r--tools/perf/util/kvm-stat.h1
-rw-r--r--tools/perf/util/levenshtein.c1
-rw-r--r--tools/perf/util/levenshtein.h1
-rw-r--r--tools/perf/util/libunwind/arm64.c1
-rw-r--r--tools/perf/util/libunwind/x86_32.c1
-rw-r--r--tools/perf/util/llvm-utils.c1
-rw-r--r--tools/perf/util/llvm-utils.h1
-rw-r--r--tools/perf/util/lzma.c1
-rw-r--r--tools/perf/util/machine.c1
-rw-r--r--tools/perf/util/machine.h1
-rw-r--r--tools/perf/util/map.c1
-rw-r--r--tools/perf/util/map.h1
-rw-r--r--tools/perf/util/mem-events.c1
-rw-r--r--tools/perf/util/mem-events.h1
-rw-r--r--tools/perf/util/memswap.c1
-rw-r--r--tools/perf/util/memswap.h1
-rw-r--r--tools/perf/util/ordered-events.c1
-rw-r--r--tools/perf/util/ordered-events.h1
-rw-r--r--tools/perf/util/parse-branch-options.c1
-rw-r--r--tools/perf/util/parse-branch-options.h1
-rw-r--r--tools/perf/util/parse-events.c1
-rw-r--r--tools/perf/util/parse-events.h1
-rw-r--r--tools/perf/util/parse-events.l25
-rw-r--r--tools/perf/util/parse-regs-options.c1
-rw-r--r--tools/perf/util/parse-regs-options.h1
-rw-r--r--tools/perf/util/path.c1
-rw-r--r--tools/perf/util/path.h1
-rw-r--r--tools/perf/util/perf-hooks.c1
-rw-r--r--tools/perf/util/perf-hooks.h1
-rw-r--r--tools/perf/util/perf_regs.c1
-rw-r--r--tools/perf/util/perf_regs.h1
-rw-r--r--tools/perf/util/pmu.c1
-rw-r--r--tools/perf/util/pmu.h1
-rw-r--r--tools/perf/util/print_binary.c1
-rw-r--r--tools/perf/util/print_binary.h1
-rw-r--r--tools/perf/util/probe-event.h1
-rw-r--r--tools/perf/util/probe-file.h1
-rw-r--r--tools/perf/util/probe-finder.h1
-rw-r--r--tools/perf/util/pstack.c1
-rw-r--r--tools/perf/util/pstack.h1
-rw-r--r--tools/perf/util/python.c1
-rw-r--r--tools/perf/util/quote.c1
-rw-r--r--tools/perf/util/quote.h1
-rw-r--r--tools/perf/util/rb_resort.h1
-rw-r--r--tools/perf/util/rblist.h1
-rw-r--r--tools/perf/util/record.c1
-rw-r--r--tools/perf/util/sane_ctype.h1
-rw-r--r--tools/perf/util/session.c3
-rw-r--r--tools/perf/util/session.h1
-rw-r--r--tools/perf/util/sort.c1
-rw-r--r--tools/perf/util/sort.h1
-rw-r--r--tools/perf/util/srcline.c1
-rw-r--r--tools/perf/util/srcline.h1
-rw-r--r--tools/perf/util/stat-shadow.c1
-rw-r--r--tools/perf/util/stat.c1
-rw-r--r--tools/perf/util/stat.h1
-rw-r--r--tools/perf/util/strbuf.c1
-rw-r--r--tools/perf/util/strbuf.h1
-rw-r--r--tools/perf/util/strfilter.c1
-rw-r--r--tools/perf/util/strfilter.h1
-rw-r--r--tools/perf/util/string.c1
-rw-r--r--tools/perf/util/string2.h1
-rw-r--r--tools/perf/util/strlist.h1
-rw-r--r--tools/perf/util/svghelper.h1
-rw-r--r--tools/perf/util/symbol-elf.c1
-rw-r--r--tools/perf/util/symbol-minimal.c1
-rw-r--r--tools/perf/util/symbol.c1
-rw-r--r--tools/perf/util/symbol.h1
-rw-r--r--tools/perf/util/symbol_fprintf.c1
-rw-r--r--tools/perf/util/syscalltbl.h1
-rw-r--r--tools/perf/util/target.h1
-rw-r--r--tools/perf/util/term.c1
-rw-r--r--tools/perf/util/term.h1
-rw-r--r--tools/perf/util/thread.c1
-rw-r--r--tools/perf/util/thread.h1
-rw-r--r--tools/perf/util/thread_map.c1
-rw-r--r--tools/perf/util/thread_map.h1
-rw-r--r--tools/perf/util/time-utils.c1
-rw-r--r--tools/perf/util/time-utils.h1
-rw-r--r--tools/perf/util/tool.h1
-rw-r--r--tools/perf/util/top.h1
-rw-r--r--tools/perf/util/trace-event.c1
-rw-r--r--tools/perf/util/trace-event.h1
-rw-r--r--tools/perf/util/trigger.h1
-rw-r--r--tools/perf/util/tsc.c1
-rw-r--r--tools/perf/util/tsc.h1
-rw-r--r--tools/perf/util/units.c1
-rw-r--r--tools/perf/util/units.h1
-rw-r--r--tools/perf/util/unwind-libdw.c1
-rw-r--r--tools/perf/util/unwind-libdw.h1
-rw-r--r--tools/perf/util/unwind-libunwind-local.c1
-rw-r--r--tools/perf/util/unwind-libunwind.c1
-rw-r--r--tools/perf/util/unwind.h1
-rw-r--r--tools/perf/util/usage.c1
-rw-r--r--tools/perf/util/util-cxx.h1
-rw-r--r--tools/perf/util/util.c1
-rw-r--r--tools/perf/util/util.h1
-rw-r--r--tools/perf/util/values.c1
-rw-r--r--tools/perf/util/values.h1
-rw-r--r--tools/perf/util/vdso.c1
-rw-r--r--tools/perf/util/vdso.h1
-rw-r--r--tools/perf/util/xyarray.c1
-rw-r--r--tools/perf/util/xyarray.h5
-rw-r--r--tools/perf/util/zlib.c1
-rw-r--r--tools/power/cpupower/Makefile2
-rw-r--r--tools/power/cpupower/bench/Makefile1
-rw-r--r--tools/power/cpupower/debug/i386/Makefile1
-rw-r--r--tools/power/cpupower/debug/kernel/Makefile1
-rw-r--r--tools/power/cpupower/debug/x86_64/Makefile1
-rw-r--r--tools/power/cpupower/lib/cpuidle.h1
-rw-r--r--tools/power/cpupower/lib/cpupower.h1
-rw-r--r--tools/power/cpupower/lib/cpupower_intern.h1
-rw-r--r--tools/power/cpupower/utils/builtin.h1
-rw-r--r--tools/power/cpupower/utils/cpuidle-set.c1
-rw-r--r--tools/power/cpupower/utils/helpers/amd.c1
-rw-r--r--tools/power/cpupower/utils/helpers/bitmask.c1
-rw-r--r--tools/power/cpupower/utils/helpers/bitmask.h1
-rw-r--r--tools/power/cpupower/utils/helpers/cpuid.c1
-rw-r--r--tools/power/cpupower/utils/helpers/misc.c1
-rw-r--r--tools/power/cpupower/utils/helpers/msr.c1
-rw-r--r--tools/power/cpupower/utils/helpers/pci.c1
-rw-r--r--tools/power/cpupower/utils/helpers/sysfs.h1
-rwxr-xr-xtools/power/cpupower/utils/version-gen.sh1
-rw-r--r--tools/power/pm-graph/Makefile1
-rw-r--r--tools/power/x86/turbostat/Makefile1
-rw-r--r--tools/power/x86/turbostat/turbostat.c10
-rw-r--r--tools/power/x86/x86_energy_perf_policy/Makefile1
-rw-r--r--tools/scripts/Makefile.arch1
-rw-r--r--tools/scripts/Makefile.include7
-rw-r--r--tools/spi/spidev_fdx.c1
-rw-r--r--tools/testing/fault-injection/failcmd.sh1
-rwxr-xr-xtools/testing/ktest/compare-ktest-sample.pl1
-rw-r--r--tools/testing/nvdimm/Kbuild1
-rw-r--r--tools/testing/nvdimm/Makefile1
-rw-r--r--tools/testing/nvdimm/config_check.c1
-rw-r--r--tools/testing/nvdimm/test/Kbuild1
-rw-r--r--tools/testing/radix-tree/Makefile1
-rw-r--r--tools/testing/radix-tree/linux.c1
-rw-r--r--tools/testing/radix-tree/linux/gfp.h1
-rw-r--r--tools/testing/radix-tree/linux/kernel.h1
-rw-r--r--tools/testing/radix-tree/linux/percpu.h1
-rw-r--r--tools/testing/radix-tree/linux/preempt.h1
-rw-r--r--tools/testing/radix-tree/linux/radix-tree.h1
-rw-r--r--tools/testing/radix-tree/linux/rcupdate.h1
-rw-r--r--tools/testing/radix-tree/linux/slab.h1
-rw-r--r--tools/testing/radix-tree/main.c1
-rw-r--r--tools/testing/radix-tree/regression.h1
-rw-r--r--tools/testing/radix-tree/regression1.c1
-rw-r--r--tools/testing/radix-tree/regression2.c1
-rw-r--r--tools/testing/radix-tree/regression3.c1
-rw-r--r--tools/testing/radix-tree/tag_check.c1
-rw-r--r--tools/testing/radix-tree/test.c1
-rw-r--r--tools/testing/radix-tree/test.h1
-rw-r--r--tools/testing/selftests/Makefile1
-rw-r--r--tools/testing/selftests/bpf/Makefile1
-rw-r--r--tools/testing/selftests/bpf/bpf_endian.h1
-rw-r--r--tools/testing/selftests/bpf/bpf_helpers.h3
-rw-r--r--tools/testing/selftests/bpf/bpf_util.h1
-rw-r--r--tools/testing/selftests/bpf/include/uapi/linux/types.h1
-rw-r--r--tools/testing/selftests/bpf/sockmap_verdict_prog.c4
-rwxr-xr-xtools/testing/selftests/bpf/test_kmod.sh1
-rw-r--r--tools/testing/selftests/bpf/test_lpm_map.c1
-rw-r--r--tools/testing/selftests/bpf/test_maps.c12
-rw-r--r--tools/testing/selftests/bpf/test_tag.c1
-rw-r--r--tools/testing/selftests/bpf/test_verifier.c510
-rw-r--r--tools/testing/selftests/breakpoints/Makefile1
-rw-r--r--tools/testing/selftests/capabilities/Makefile1
-rw-r--r--tools/testing/selftests/capabilities/test_execve.c1
-rw-r--r--tools/testing/selftests/capabilities/validate_cap.c1
-rw-r--r--tools/testing/selftests/cpu-hotplug/Makefile1
-rwxr-xr-xtools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh1
-rw-r--r--tools/testing/selftests/cpufreq/Makefile1
-rwxr-xr-xtools/testing/selftests/cpufreq/cpu.sh1
-rwxr-xr-xtools/testing/selftests/cpufreq/cpufreq.sh1
-rwxr-xr-xtools/testing/selftests/cpufreq/governor.sh1
-rwxr-xr-xtools/testing/selftests/cpufreq/main.sh1
-rwxr-xr-xtools/testing/selftests/cpufreq/module.sh1
-rwxr-xr-xtools/testing/selftests/cpufreq/special-tests.sh1
-rwxr-xr-xtools/testing/selftests/drivers/gpu/drm_mm.sh1
-rwxr-xr-xtools/testing/selftests/drivers/gpu/i915.sh1
-rw-r--r--tools/testing/selftests/efivarfs/create-read.c1
-rwxr-xr-xtools/testing/selftests/efivarfs/efivarfs.sh1
-rw-r--r--tools/testing/selftests/efivarfs/open-unlink.c1
-rw-r--r--tools/testing/selftests/exec/Makefile1
-rw-r--r--tools/testing/selftests/filesystems/Makefile1
-rw-r--r--tools/testing/selftests/filesystems/dnotify_test.c1
-rwxr-xr-xtools/testing/selftests/firmware/fw_fallback.sh1
-rwxr-xr-xtools/testing/selftests/firmware/fw_filesystem.sh1
-rw-r--r--tools/testing/selftests/ftrace/Makefile1
-rw-r--r--tools/testing/selftests/ftrace/test.d/00basic/basic2.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/00basic/basic3.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/event/event-enable.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/event/event-pid.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/ftrace/func-filter-glob.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/instances/instance-event.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/instances/instance.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/kprobe/add_and_remove.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_type.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/kprobe/kprobe_ftrace.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_args.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_maxactive.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/trigger/trigger-eventonoff.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/trigger/trigger-filter.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/trigger/trigger-snapshot.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/trigger/trigger-stacktrace.tc1
-rw-r--r--tools/testing/selftests/ftrace/test.d/trigger/trigger-traceonoff.tc1
-rw-r--r--tools/testing/selftests/futex/Makefile1
-rw-r--r--tools/testing/selftests/futex/functional/Makefile1
-rw-r--r--tools/testing/selftests/gpio/Makefile1
-rwxr-xr-xtools/testing/selftests/gpio/gpio-mockup-sysfs.sh1
-rwxr-xr-xtools/testing/selftests/gpio/gpio-mockup.sh1
-rw-r--r--tools/testing/selftests/ia64/Makefile1
-rw-r--r--tools/testing/selftests/intel_pstate/Makefile1
-rw-r--r--tools/testing/selftests/intel_pstate/aperf.c1
-rw-r--r--tools/testing/selftests/intel_pstate/msr.c1
-rwxr-xr-xtools/testing/selftests/intel_pstate/run.sh1
-rw-r--r--tools/testing/selftests/ipc/Makefile1
-rw-r--r--tools/testing/selftests/ipc/msgque.c1
-rw-r--r--tools/testing/selftests/kcmp/kcmp_test.c1
-rw-r--r--tools/testing/selftests/lib.mk6
-rwxr-xr-xtools/testing/selftests/lib/bitmap.sh1
-rwxr-xr-xtools/testing/selftests/lib/prime_numbers.sh1
-rwxr-xr-xtools/testing/selftests/lib/printf.sh1
-rw-r--r--tools/testing/selftests/locking/ww_mutex.sh1
-rw-r--r--tools/testing/selftests/media_tests/Makefile1
-rwxr-xr-xtools/testing/selftests/media_tests/bind_unbind_sample.sh1
-rwxr-xr-xtools/testing/selftests/media_tests/open_loop_test.sh1
-rw-r--r--tools/testing/selftests/membarrier/membarrier_test.c1
-rw-r--r--tools/testing/selftests/memfd/Makefile1
-rw-r--r--tools/testing/selftests/memfd/fuse_mnt.c1
-rw-r--r--tools/testing/selftests/memfd/fuse_test.c1
-rw-r--r--tools/testing/selftests/memfd/memfd_test.c1
-rwxr-xr-xtools/testing/selftests/memfd/run_fuse_test.sh1
-rw-r--r--tools/testing/selftests/memory-hotplug/Makefile1
-rwxr-xr-xtools/testing/selftests/memory-hotplug/mem-on-off-test.sh1
-rw-r--r--tools/testing/selftests/mount/Makefile1
-rw-r--r--tools/testing/selftests/mount/unprivileged-remount-test.c1
-rw-r--r--tools/testing/selftests/mqueue/Makefile1
-rw-r--r--tools/testing/selftests/net/Makefile1
-rwxr-xr-xtools/testing/selftests/net/netdevice.sh1
-rw-r--r--tools/testing/selftests/net/reuseport_bpf_cpu.c1
-rw-r--r--tools/testing/selftests/net/reuseport_bpf_numa.c1
-rw-r--r--tools/testing/selftests/net/reuseport_dualstack.c1
-rwxr-xr-xtools/testing/selftests/net/run_afpackettests1
-rwxr-xr-xtools/testing/selftests/net/run_netsocktests1
-rw-r--r--tools/testing/selftests/net/socket.c1
-rwxr-xr-xtools/testing/selftests/net/test_bpf.sh1
-rw-r--r--tools/testing/selftests/networking/timestamping/Makefile1
-rw-r--r--tools/testing/selftests/networking/timestamping/hwtstamp_config.c1
-rw-r--r--tools/testing/selftests/nsfs/owner.c1
-rw-r--r--tools/testing/selftests/nsfs/pidns.c1
-rw-r--r--tools/testing/selftests/powerpc/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/benchmarks/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/cache_shape/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/copyloops/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/copyloops/asm/export.h1
-rw-r--r--tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h1
-rw-r--r--tools/testing/selftests/powerpc/copyloops/validate.c1
-rw-r--r--tools/testing/selftests/powerpc/dscr/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/include/basic_asm.h1
-rw-r--r--tools/testing/selftests/powerpc/include/instructions.h1
-rw-r--r--tools/testing/selftests/powerpc/math/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/mm/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/mm/hugetlb_vs_thp_test.c1
-rw-r--r--tools/testing/selftests/powerpc/pmu/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/ptrace/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/signal/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/stringloops/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h1
-rw-r--r--tools/testing/selftests/powerpc/stringloops/memcmp.c1
-rw-r--r--tools/testing/selftests/powerpc/switch_endian/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/switch_endian/check.S1
-rw-r--r--tools/testing/selftests/powerpc/switch_endian/common.h1
-rw-r--r--tools/testing/selftests/powerpc/switch_endian/switch_endian_test.S1
-rw-r--r--tools/testing/selftests/powerpc/syscalls/ipc.h1
-rw-r--r--tools/testing/selftests/powerpc/tm/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/tm/tm-resched-dscr.c1
-rw-r--r--tools/testing/selftests/powerpc/tm/tm-syscall-asm.S1
-rw-r--r--tools/testing/selftests/powerpc/vphn/test-vphn.c1
-rw-r--r--tools/testing/selftests/prctl/Makefile1
-rw-r--r--tools/testing/selftests/prctl/disable-tsc-ctxt-sw-stress-test.c1
-rw-r--r--tools/testing/selftests/prctl/disable-tsc-on-off-stress-test.c1
-rw-r--r--tools/testing/selftests/prctl/disable-tsc-test.c1
-rw-r--r--tools/testing/selftests/pstore/Makefile1
-rw-r--r--tools/testing/selftests/ptp/Makefile1
-rw-r--r--tools/testing/selftests/ptrace/peeksiginfo.c1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/Makefile1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/include/linux/types.h1
-rwxr-xr-xtools/testing/selftests/rcutorture/formal/srcu-cbmc/modify_srcu.awk1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/assume.h1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/barriers.h1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/bug_on.h1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/combined_source.c1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/config.h1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/include_srcu.c1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/int_typedefs.h1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/locks.h1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/misc.c1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/percpu.h1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/preempt.c1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/preempt.h1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/simple_sync_srcu.c1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/workqueues.h1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/store_buffering/Makefile1
-rw-r--r--tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/store_buffering/test.c1
-rwxr-xr-xtools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/test_script.sh1
-rw-r--r--tools/testing/selftests/seccomp/Makefile1
-rw-r--r--tools/testing/selftests/sigaltstack/sas.c1
-rw-r--r--tools/testing/selftests/splice/Makefile1
-rw-r--r--tools/testing/selftests/splice/default_file_splice_read.c1
-rwxr-xr-xtools/testing/selftests/splice/default_file_splice_read.sh1
-rwxr-xr-xtools/testing/selftests/static_keys/test_static_keys.sh1
-rw-r--r--tools/testing/selftests/sync/Makefile1
-rw-r--r--tools/testing/selftests/tc-testing/tc-tests/filters/tests.json23
-rwxr-xr-xtools/testing/selftests/tc-testing/tdc.py23
-rwxr-xr-xtools/testing/selftests/tc-testing/tdc_batch.py62
-rw-r--r--tools/testing/selftests/tc-testing/tdc_config.py3
-rw-r--r--tools/testing/selftests/tc-testing/tdc_helper.py1
-rw-r--r--tools/testing/selftests/timers/Makefile1
-rwxr-xr-xtools/testing/selftests/user/test_user_copy.sh1
-rw-r--r--tools/testing/selftests/vDSO/Makefile1
-rw-r--r--tools/testing/selftests/vm/Makefile1
-rw-r--r--tools/testing/selftests/vm/compaction_test.c1
-rw-r--r--tools/testing/selftests/vm/hugepage-mmap.c1
-rw-r--r--tools/testing/selftests/vm/hugepage-shm.c1
-rw-r--r--tools/testing/selftests/vm/map_hugetlb.c1
-rw-r--r--tools/testing/selftests/vm/mlock-random-test.c1
-rw-r--r--tools/testing/selftests/vm/mlock2-tests.c1
-rw-r--r--tools/testing/selftests/vm/mlock2.h1
-rw-r--r--tools/testing/selftests/vm/on-fault-limit.c1
-rwxr-xr-xtools/testing/selftests/vm/run_vmtests1
-rw-r--r--tools/testing/selftests/vm/thuge-gen.c1
-rw-r--r--tools/testing/selftests/watchdog/Makefile1
-rw-r--r--tools/testing/selftests/watchdog/watchdog-test.c1
-rw-r--r--tools/testing/selftests/x86/Makefile1
-rw-r--r--tools/testing/selftests/x86/ioperm.c1
-rw-r--r--tools/testing/selftests/x86/iopl.c1
-rw-r--r--tools/testing/selftests/x86/ldt_gdt.c1
-rw-r--r--tools/testing/selftests/x86/mpx-debug.h1
-rw-r--r--tools/testing/selftests/x86/mpx-dig.c1
-rw-r--r--tools/testing/selftests/x86/mpx-hw.h1
-rw-r--r--tools/testing/selftests/x86/mpx-mm.h1
-rw-r--r--tools/testing/selftests/x86/pkey-helpers.h1
-rw-r--r--tools/testing/selftests/x86/protection_keys.c1
-rw-r--r--tools/testing/selftests/x86/ptrace_syscall.c1
-rw-r--r--tools/testing/selftests/x86/raw_syscall_helper_32.S1
-rw-r--r--tools/testing/selftests/x86/test_FCMOV.c1
-rw-r--r--tools/testing/selftests/x86/test_FCOMI.c1
-rw-r--r--tools/testing/selftests/x86/test_FISTTP.c1
-rw-r--r--tools/testing/selftests/x86/test_vdso.c1
-rw-r--r--tools/testing/selftests/zram/Makefile1
-rwxr-xr-xtools/testing/selftests/zram/zram.sh1
-rw-r--r--tools/thermal/tmon/Makefile1
-rw-r--r--tools/thermal/tmon/tmon.81
-rw-r--r--tools/usb/Makefile1
-rw-r--r--tools/usb/ffs-aio-example/multibuff/host_app/Makefile1
-rw-r--r--tools/usb/hcd-tests.sh1
-rw-r--r--tools/usb/usbip/Makefile.am1
-rwxr-xr-xtools/usb/usbip/cleanup.sh1
-rw-r--r--tools/usb/usbip/libsrc/Makefile.am1
-rw-r--r--tools/usb/usbip/libsrc/list.h1
-rw-r--r--tools/usb/usbip/libsrc/sysfs_utils.c1
-rw-r--r--tools/usb/usbip/libsrc/sysfs_utils.h1
-rw-r--r--tools/usb/usbip/libsrc/usbip_common.c1
-rw-r--r--tools/usb/usbip/libsrc/usbip_common.h1
-rw-r--r--tools/usb/usbip/libsrc/vhci_driver.c1
-rw-r--r--tools/usb/usbip/libsrc/vhci_driver.h1
-rw-r--r--tools/usb/usbip/src/Makefile.am1
-rw-r--r--tools/usb/usbip/src/usbip_network.h1
-rw-r--r--tools/virtio/Makefile1
-rw-r--r--tools/virtio/asm/barrier.h1
-rw-r--r--tools/virtio/linux/bug.h1
-rw-r--r--tools/virtio/linux/compiler.h1
-rw-r--r--tools/virtio/linux/dma-mapping.h1
-rw-r--r--tools/virtio/linux/err.h1
-rw-r--r--tools/virtio/linux/kernel.h1
-rw-r--r--tools/virtio/linux/module.h1
-rw-r--r--tools/virtio/linux/scatterlist.h1
-rw-r--r--tools/virtio/linux/slab.h1
-rw-r--r--tools/virtio/linux/uaccess.h1
-rw-r--r--tools/virtio/linux/virtio.h1
-rw-r--r--tools/virtio/linux/virtio_byteorder.h1
-rw-r--r--tools/virtio/linux/virtio_config.h1
-rw-r--r--tools/virtio/ringtest/Makefile1
-rw-r--r--tools/virtio/ringtest/noring.c1
-rw-r--r--tools/virtio/ringtest/ptr_ring.c1
-rwxr-xr-xtools/virtio/ringtest/run-on-all.sh1
-rw-r--r--tools/virtio/uapi/linux/virtio_ring.h1
-rw-r--r--tools/virtio/virtio-trace/Makefile1
-rw-r--r--tools/virtio/virtio-trace/trace-agent.h1
-rw-r--r--tools/virtio/virtio_test.c1
-rw-r--r--tools/virtio/vringh_test.c1
-rw-r--r--tools/vm/Makefile1
-rw-r--r--tools/vm/page_owner_sort.c1
-rw-r--r--tools/vm/slabinfo.c1
1000 files changed, 1694 insertions, 46 deletions
diff --git a/tools/Makefile b/tools/Makefile
index 9dfede37c8ff..c4f41ef9a7a7 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# Some of the tools (perf) use same make variables 2# Some of the tools (perf) use same make variables
2# as in kernel build. 3# as in kernel build.
3export srctree= 4export srctree=
diff --git a/tools/accounting/Makefile b/tools/accounting/Makefile
index 647c94a219bf..03687f19cbb1 100644
--- a/tools/accounting/Makefile
+++ b/tools/accounting/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1CC := $(CROSS_COMPILE)gcc 2CC := $(CROSS_COMPILE)gcc
2CFLAGS := -I../../usr/include 3CFLAGS := -I../../usr/include
3 4
diff --git a/tools/accounting/getdelays.c b/tools/accounting/getdelays.c
index b5ca536e56a8..9f420d98b5fb 100644
--- a/tools/accounting/getdelays.c
+++ b/tools/accounting/getdelays.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* getdelays.c 2/* getdelays.c
2 * 3 *
3 * Utility to get per-pid and per-tgid delay accounting statistics 4 * Utility to get per-pid and per-tgid delay accounting statistics
diff --git a/tools/arch/alpha/include/asm/barrier.h b/tools/arch/alpha/include/asm/barrier.h
index 95df19c95482..da8d6457ed4f 100644
--- a/tools/arch/alpha/include/asm/barrier.h
+++ b/tools/arch/alpha/include/asm/barrier.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __TOOLS_LINUX_ASM_ALPHA_BARRIER_H 2#ifndef __TOOLS_LINUX_ASM_ALPHA_BARRIER_H
2#define __TOOLS_LINUX_ASM_ALPHA_BARRIER_H 3#define __TOOLS_LINUX_ASM_ALPHA_BARRIER_H
3 4
diff --git a/tools/arch/alpha/include/uapi/asm/bitsperlong.h b/tools/arch/alpha/include/uapi/asm/bitsperlong.h
index ad57f7868203..6c5bf7d03f4e 100644
--- a/tools/arch/alpha/include/uapi/asm/bitsperlong.h
+++ b/tools/arch/alpha/include/uapi/asm/bitsperlong.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef __ASM_ALPHA_BITSPERLONG_H 2#ifndef __ASM_ALPHA_BITSPERLONG_H
2#define __ASM_ALPHA_BITSPERLONG_H 3#define __ASM_ALPHA_BITSPERLONG_H
3 4
diff --git a/tools/arch/alpha/include/uapi/asm/mman.h b/tools/arch/alpha/include/uapi/asm/mman.h
index e38b64c82b97..c317d3e6867a 100644
--- a/tools/arch/alpha/include/uapi/asm/mman.h
+++ b/tools/arch/alpha/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_ALPHA_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_ALPHA_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_ALPHA_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_ALPHA_UAPI_ASM_MMAN_FIX_H
3#define MADV_DODUMP 17 4#define MADV_DODUMP 17
diff --git a/tools/arch/arc/include/uapi/asm/mman.h b/tools/arch/arc/include/uapi/asm/mman.h
index aa3acd2aa9af..81f0f9bf0c25 100644
--- a/tools/arch/arc/include/uapi/asm/mman.h
+++ b/tools/arch/arc/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_ARC_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_ARC_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_ARC_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_ARC_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h> 4#include <uapi/asm-generic/mman.h>
diff --git a/tools/arch/arm/include/uapi/asm/kvm.h b/tools/arch/arm/include/uapi/asm/kvm.h
index 5db2d4c6a55f..1f57bbe82b6f 100644
--- a/tools/arch/arm/include/uapi/asm/kvm.h
+++ b/tools/arch/arm/include/uapi/asm/kvm.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1/* 2/*
2 * Copyright (C) 2012 - Virtual Open Systems and Columbia University 3 * Copyright (C) 2012 - Virtual Open Systems and Columbia University
3 * Author: Christoffer Dall <c.dall@virtualopensystems.com> 4 * Author: Christoffer Dall <c.dall@virtualopensystems.com>
diff --git a/tools/arch/arm/include/uapi/asm/mman.h b/tools/arch/arm/include/uapi/asm/mman.h
index 478f699f56fd..a6d46321e330 100644
--- a/tools/arch/arm/include/uapi/asm/mman.h
+++ b/tools/arch/arm/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_ARM_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_ARM_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_ARM_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_ARM_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h> 4#include <uapi/asm-generic/mman.h>
diff --git a/tools/arch/arm/include/uapi/asm/perf_regs.h b/tools/arch/arm/include/uapi/asm/perf_regs.h
index ce59448458b2..a3c046174e6b 100644
--- a/tools/arch/arm/include/uapi/asm/perf_regs.h
+++ b/tools/arch/arm/include/uapi/asm/perf_regs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _ASM_ARM_PERF_REGS_H 2#ifndef _ASM_ARM_PERF_REGS_H
2#define _ASM_ARM_PERF_REGS_H 3#define _ASM_ARM_PERF_REGS_H
3 4
diff --git a/tools/arch/arm64/include/asm/barrier.h b/tools/arch/arm64/include/asm/barrier.h
index a0483c8e0142..40bde6b23501 100644
--- a/tools/arch/arm64/include/asm/barrier.h
+++ b/tools/arch/arm64/include/asm/barrier.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LINUX_ASM_AARCH64_BARRIER_H 2#ifndef _TOOLS_LINUX_ASM_AARCH64_BARRIER_H
2#define _TOOLS_LINUX_ASM_AARCH64_BARRIER_H 3#define _TOOLS_LINUX_ASM_AARCH64_BARRIER_H
3 4
diff --git a/tools/arch/arm64/include/uapi/asm/bitsperlong.h b/tools/arch/arm64/include/uapi/asm/bitsperlong.h
index fce9c2924fa3..485d60bee26c 100644
--- a/tools/arch/arm64/include/uapi/asm/bitsperlong.h
+++ b/tools/arch/arm64/include/uapi/asm/bitsperlong.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1/* 2/*
2 * Copyright (C) 2012 ARM Ltd. 3 * Copyright (C) 2012 ARM Ltd.
3 * 4 *
diff --git a/tools/arch/arm64/include/uapi/asm/kvm.h b/tools/arch/arm64/include/uapi/asm/kvm.h
index 9f3ca24bbcc6..51149ec75fe4 100644
--- a/tools/arch/arm64/include/uapi/asm/kvm.h
+++ b/tools/arch/arm64/include/uapi/asm/kvm.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1/* 2/*
2 * Copyright (C) 2012,2013 - ARM Ltd 3 * Copyright (C) 2012,2013 - ARM Ltd
3 * Author: Marc Zyngier <marc.zyngier@arm.com> 4 * Author: Marc Zyngier <marc.zyngier@arm.com>
diff --git a/tools/arch/arm64/include/uapi/asm/mman.h b/tools/arch/arm64/include/uapi/asm/mman.h
index 70fd3113710a..2ee288e447ec 100644
--- a/tools/arch/arm64/include/uapi/asm/mman.h
+++ b/tools/arch/arm64/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_ARM64_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_ARM64_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_ARM64_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_ARM64_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h> 4#include <uapi/asm-generic/mman.h>
diff --git a/tools/arch/arm64/include/uapi/asm/perf_regs.h b/tools/arch/arm64/include/uapi/asm/perf_regs.h
index 172b8317ee49..d54daafa89e3 100644
--- a/tools/arch/arm64/include/uapi/asm/perf_regs.h
+++ b/tools/arch/arm64/include/uapi/asm/perf_regs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _ASM_ARM64_PERF_REGS_H 2#ifndef _ASM_ARM64_PERF_REGS_H
2#define _ASM_ARM64_PERF_REGS_H 3#define _ASM_ARM64_PERF_REGS_H
3 4
diff --git a/tools/arch/frv/include/uapi/asm/bitsperlong.h b/tools/arch/frv/include/uapi/asm/bitsperlong.h
index 6dc0bb0c13b2..76da34b10f59 100644
--- a/tools/arch/frv/include/uapi/asm/bitsperlong.h
+++ b/tools/arch/frv/include/uapi/asm/bitsperlong.h
@@ -1 +1,2 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#include <asm-generic/bitsperlong.h> 2#include <asm-generic/bitsperlong.h>
diff --git a/tools/arch/frv/include/uapi/asm/mman.h b/tools/arch/frv/include/uapi/asm/mman.h
index 5be78ac12464..5bc900b0bc78 100644
--- a/tools/arch/frv/include/uapi/asm/mman.h
+++ b/tools/arch/frv/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_FRV_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_FRV_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_FRV_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_FRV_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h> 4#include <uapi/asm-generic/mman.h>
diff --git a/tools/arch/h8300/include/asm/bitsperlong.h b/tools/arch/h8300/include/asm/bitsperlong.h
index e140e46729ac..fa1508337ffc 100644
--- a/tools/arch/h8300/include/asm/bitsperlong.h
+++ b/tools/arch/h8300/include/asm/bitsperlong.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __ASM_H8300_BITS_PER_LONG 2#ifndef __ASM_H8300_BITS_PER_LONG
2#define __ASM_H8300_BITS_PER_LONG 3#define __ASM_H8300_BITS_PER_LONG
3 4
diff --git a/tools/arch/h8300/include/uapi/asm/mman.h b/tools/arch/h8300/include/uapi/asm/mman.h
index 9d9ac54d3c5a..be7bbe0528d1 100644
--- a/tools/arch/h8300/include/uapi/asm/mman.h
+++ b/tools/arch/h8300/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_H8300_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_H8300_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_H8300_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_H8300_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h> 4#include <uapi/asm-generic/mman.h>
diff --git a/tools/arch/hexagon/include/uapi/asm/bitsperlong.h b/tools/arch/hexagon/include/uapi/asm/bitsperlong.h
index 4a658151383d..5adca0d26913 100644
--- a/tools/arch/hexagon/include/uapi/asm/bitsperlong.h
+++ b/tools/arch/hexagon/include/uapi/asm/bitsperlong.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1/* 2/*
2 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. 3 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3 * 4 *
diff --git a/tools/arch/hexagon/include/uapi/asm/mman.h b/tools/arch/hexagon/include/uapi/asm/mman.h
index 102f3fae6085..cd59ba932b3a 100644
--- a/tools/arch/hexagon/include/uapi/asm/mman.h
+++ b/tools/arch/hexagon/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_HEXAGON_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_HEXAGON_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_HEXAGON_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_HEXAGON_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h> 4#include <uapi/asm-generic/mman.h>
diff --git a/tools/arch/ia64/include/asm/barrier.h b/tools/arch/ia64/include/asm/barrier.h
index e4422b4b634e..d808ee0e77b5 100644
--- a/tools/arch/ia64/include/asm/barrier.h
+++ b/tools/arch/ia64/include/asm/barrier.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * Copied from the kernel sources to tools/: 3 * Copied from the kernel sources to tools/:
3 * 4 *
diff --git a/tools/arch/ia64/include/uapi/asm/bitsperlong.h b/tools/arch/ia64/include/uapi/asm/bitsperlong.h
index ec4db3c970b7..1146d55563db 100644
--- a/tools/arch/ia64/include/uapi/asm/bitsperlong.h
+++ b/tools/arch/ia64/include/uapi/asm/bitsperlong.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef __ASM_IA64_BITSPERLONG_H 2#ifndef __ASM_IA64_BITSPERLONG_H
2#define __ASM_IA64_BITSPERLONG_H 3#define __ASM_IA64_BITSPERLONG_H
3 4
diff --git a/tools/arch/ia64/include/uapi/asm/mman.h b/tools/arch/ia64/include/uapi/asm/mman.h
index 1d6e5ac6442d..2a19bb1db4ab 100644
--- a/tools/arch/ia64/include/uapi/asm/mman.h
+++ b/tools/arch/ia64/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_IA64_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_IA64_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_IA64_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_IA64_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h> 4#include <uapi/asm-generic/mman.h>
diff --git a/tools/arch/m32r/include/uapi/asm/bitsperlong.h b/tools/arch/m32r/include/uapi/asm/bitsperlong.h
index 6dc0bb0c13b2..76da34b10f59 100644
--- a/tools/arch/m32r/include/uapi/asm/bitsperlong.h
+++ b/tools/arch/m32r/include/uapi/asm/bitsperlong.h
@@ -1 +1,2 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#include <asm-generic/bitsperlong.h> 2#include <asm-generic/bitsperlong.h>
diff --git a/tools/arch/m32r/include/uapi/asm/mman.h b/tools/arch/m32r/include/uapi/asm/mman.h
index 1c29635bb73b..d19b82c9c290 100644
--- a/tools/arch/m32r/include/uapi/asm/mman.h
+++ b/tools/arch/m32r/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_M32R_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_M32R_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_M32R_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_M32R_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h> 4#include <uapi/asm-generic/mman.h>
diff --git a/tools/arch/microblaze/include/uapi/asm/bitsperlong.h b/tools/arch/microblaze/include/uapi/asm/bitsperlong.h
index 6dc0bb0c13b2..76da34b10f59 100644
--- a/tools/arch/microblaze/include/uapi/asm/bitsperlong.h
+++ b/tools/arch/microblaze/include/uapi/asm/bitsperlong.h
@@ -1 +1,2 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#include <asm-generic/bitsperlong.h> 2#include <asm-generic/bitsperlong.h>
diff --git a/tools/arch/microblaze/include/uapi/asm/mman.h b/tools/arch/microblaze/include/uapi/asm/mman.h
index 005cd50b50e1..f3f2103fd02c 100644
--- a/tools/arch/microblaze/include/uapi/asm/mman.h
+++ b/tools/arch/microblaze/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_MICROBLAZE_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_MICROBLAZE_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_MICROBLAZE_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_MICROBLAZE_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h> 4#include <uapi/asm-generic/mman.h>
diff --git a/tools/arch/mips/include/asm/barrier.h b/tools/arch/mips/include/asm/barrier.h
index 80f96f7556e3..0d1191523cd0 100644
--- a/tools/arch/mips/include/asm/barrier.h
+++ b/tools/arch/mips/include/asm/barrier.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LINUX_ASM_MIPS_BARRIER_H 2#ifndef _TOOLS_LINUX_ASM_MIPS_BARRIER_H
2#define _TOOLS_LINUX_ASM_MIPS_BARRIER_H 3#define _TOOLS_LINUX_ASM_MIPS_BARRIER_H
3/* 4/*
diff --git a/tools/arch/mips/include/uapi/asm/bitsperlong.h b/tools/arch/mips/include/uapi/asm/bitsperlong.h
index 3e4c10a8e787..7268380d8d28 100644
--- a/tools/arch/mips/include/uapi/asm/bitsperlong.h
+++ b/tools/arch/mips/include/uapi/asm/bitsperlong.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef __ASM_MIPS_BITSPERLONG_H 2#ifndef __ASM_MIPS_BITSPERLONG_H
2#define __ASM_MIPS_BITSPERLONG_H 3#define __ASM_MIPS_BITSPERLONG_H
3 4
diff --git a/tools/arch/mips/include/uapi/asm/kvm.h b/tools/arch/mips/include/uapi/asm/kvm.h
index 6985eb59b085..d2714cc1cd93 100644
--- a/tools/arch/mips/include/uapi/asm/kvm.h
+++ b/tools/arch/mips/include/uapi/asm/kvm.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1/* 2/*
2 * This file is subject to the terms and conditions of the GNU General Public 3 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive 4 * License. See the file "COPYING" in the main directory of this archive
diff --git a/tools/arch/mips/include/uapi/asm/mman.h b/tools/arch/mips/include/uapi/asm/mman.h
index c02052965d50..de2206883abc 100644
--- a/tools/arch/mips/include/uapi/asm/mman.h
+++ b/tools/arch/mips/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_MIPS_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_MIPS_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_MIPS_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_MIPS_UAPI_ASM_MMAN_FIX_H
3#define MADV_DODUMP 17 4#define MADV_DODUMP 17
diff --git a/tools/arch/mn10300/include/uapi/asm/mman.h b/tools/arch/mn10300/include/uapi/asm/mman.h
index c1ea36d83acc..b9360639974f 100644
--- a/tools/arch/mn10300/include/uapi/asm/mman.h
+++ b/tools/arch/mn10300/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_MN10300_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_MN10300_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_MN10300_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_MN10300_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h> 4#include <uapi/asm-generic/mman.h>
diff --git a/tools/arch/parisc/include/uapi/asm/bitsperlong.h b/tools/arch/parisc/include/uapi/asm/bitsperlong.h
index e0a23c7bdd43..23ac7562927a 100644
--- a/tools/arch/parisc/include/uapi/asm/bitsperlong.h
+++ b/tools/arch/parisc/include/uapi/asm/bitsperlong.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef __ASM_PARISC_BITSPERLONG_H 2#ifndef __ASM_PARISC_BITSPERLONG_H
2#define __ASM_PARISC_BITSPERLONG_H 3#define __ASM_PARISC_BITSPERLONG_H
3 4
diff --git a/tools/arch/parisc/include/uapi/asm/mman.h b/tools/arch/parisc/include/uapi/asm/mman.h
index 286c0bd74573..1bd78758bde9 100644
--- a/tools/arch/parisc/include/uapi/asm/mman.h
+++ b/tools/arch/parisc/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_PARISC_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_PARISC_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_PARISC_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_PARISC_UAPI_ASM_MMAN_FIX_H
3#define MADV_DODUMP 70 4#define MADV_DODUMP 70
diff --git a/tools/arch/powerpc/include/asm/barrier.h b/tools/arch/powerpc/include/asm/barrier.h
index b23aee8e6d90..a634da05bc97 100644
--- a/tools/arch/powerpc/include/asm/barrier.h
+++ b/tools/arch/powerpc/include/asm/barrier.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * Copied from the kernel sources: 3 * Copied from the kernel sources:
3 * 4 *
diff --git a/tools/arch/powerpc/include/uapi/asm/bitsperlong.h b/tools/arch/powerpc/include/uapi/asm/bitsperlong.h
index 5f1659032c40..46ece3ecff31 100644
--- a/tools/arch/powerpc/include/uapi/asm/bitsperlong.h
+++ b/tools/arch/powerpc/include/uapi/asm/bitsperlong.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef __ASM_POWERPC_BITSPERLONG_H 2#ifndef __ASM_POWERPC_BITSPERLONG_H
2#define __ASM_POWERPC_BITSPERLONG_H 3#define __ASM_POWERPC_BITSPERLONG_H
3 4
diff --git a/tools/arch/powerpc/include/uapi/asm/kvm.h b/tools/arch/powerpc/include/uapi/asm/kvm.h
index 8cf8f0c96906..61d6049f4c1e 100644
--- a/tools/arch/powerpc/include/uapi/asm/kvm.h
+++ b/tools/arch/powerpc/include/uapi/asm/kvm.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1/* 2/*
2 * This program is free software; you can redistribute it and/or modify 3 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License, version 2, as 4 * it under the terms of the GNU General Public License, version 2, as
diff --git a/tools/arch/powerpc/include/uapi/asm/mman.h b/tools/arch/powerpc/include/uapi/asm/mman.h
index 761db43172fe..f33105bc5ca6 100644
--- a/tools/arch/powerpc/include/uapi/asm/mman.h
+++ b/tools/arch/powerpc/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_POWERPC_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_POWERPC_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_POWERPC_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_POWERPC_UAPI_ASM_MMAN_FIX_H
3#define MAP_DENYWRITE 0x0800 4#define MAP_DENYWRITE 0x0800
diff --git a/tools/arch/powerpc/include/uapi/asm/perf_regs.h b/tools/arch/powerpc/include/uapi/asm/perf_regs.h
index 6a93209748a1..9e52c86ccbd3 100644
--- a/tools/arch/powerpc/include/uapi/asm/perf_regs.h
+++ b/tools/arch/powerpc/include/uapi/asm/perf_regs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _UAPI_ASM_POWERPC_PERF_REGS_H 2#ifndef _UAPI_ASM_POWERPC_PERF_REGS_H
2#define _UAPI_ASM_POWERPC_PERF_REGS_H 3#define _UAPI_ASM_POWERPC_PERF_REGS_H
3 4
diff --git a/tools/arch/s390/include/asm/barrier.h b/tools/arch/s390/include/asm/barrier.h
index f85141266b92..5030c99f47d2 100644
--- a/tools/arch/s390/include/asm/barrier.h
+++ b/tools/arch/s390/include/asm/barrier.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * Copied from the kernel sources: 3 * Copied from the kernel sources:
3 * 4 *
diff --git a/tools/arch/s390/include/uapi/asm/bitsperlong.h b/tools/arch/s390/include/uapi/asm/bitsperlong.h
index e351ea2ad43e..d2bb620119bf 100644
--- a/tools/arch/s390/include/uapi/asm/bitsperlong.h
+++ b/tools/arch/s390/include/uapi/asm/bitsperlong.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef __ASM_S390_BITSPERLONG_H 2#ifndef __ASM_S390_BITSPERLONG_H
2#define __ASM_S390_BITSPERLONG_H 3#define __ASM_S390_BITSPERLONG_H
3 4
diff --git a/tools/arch/s390/include/uapi/asm/kvm.h b/tools/arch/s390/include/uapi/asm/kvm.h
index cd7359e23d86..9ad172dcd912 100644
--- a/tools/arch/s390/include/uapi/asm/kvm.h
+++ b/tools/arch/s390/include/uapi/asm/kvm.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef __LINUX_KVM_S390_H 2#ifndef __LINUX_KVM_S390_H
2#define __LINUX_KVM_S390_H 3#define __LINUX_KVM_S390_H
3/* 4/*
diff --git a/tools/arch/s390/include/uapi/asm/kvm_perf.h b/tools/arch/s390/include/uapi/asm/kvm_perf.h
index 397282727e21..c36c97ffdc6f 100644
--- a/tools/arch/s390/include/uapi/asm/kvm_perf.h
+++ b/tools/arch/s390/include/uapi/asm/kvm_perf.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1/* 2/*
2 * Definitions for perf-kvm on s390 3 * Definitions for perf-kvm on s390
3 * 4 *
diff --git a/tools/arch/s390/include/uapi/asm/mman.h b/tools/arch/s390/include/uapi/asm/mman.h
index b03dea9e1f56..4ec32e4251a4 100644
--- a/tools/arch/s390/include/uapi/asm/mman.h
+++ b/tools/arch/s390/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_S390_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_S390_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_S390_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_S390_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h> 4#include <uapi/asm-generic/mman.h>
diff --git a/tools/arch/s390/include/uapi/asm/sie.h b/tools/arch/s390/include/uapi/asm/sie.h
index 3ac634368939..6ca1e68d7103 100644
--- a/tools/arch/s390/include/uapi/asm/sie.h
+++ b/tools/arch/s390/include/uapi/asm/sie.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _UAPI_ASM_S390_SIE_H 2#ifndef _UAPI_ASM_S390_SIE_H
2#define _UAPI_ASM_S390_SIE_H 3#define _UAPI_ASM_S390_SIE_H
3 4
diff --git a/tools/arch/score/include/uapi/asm/bitsperlong.h b/tools/arch/score/include/uapi/asm/bitsperlong.h
index 86ff337aa459..df48f2717da2 100644
--- a/tools/arch/score/include/uapi/asm/bitsperlong.h
+++ b/tools/arch/score/include/uapi/asm/bitsperlong.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _ASM_SCORE_BITSPERLONG_H 2#ifndef _ASM_SCORE_BITSPERLONG_H
2#define _ASM_SCORE_BITSPERLONG_H 3#define _ASM_SCORE_BITSPERLONG_H
3 4
diff --git a/tools/arch/score/include/uapi/asm/mman.h b/tools/arch/score/include/uapi/asm/mman.h
index 2f8fb89944fd..b4bd195a8586 100644
--- a/tools/arch/score/include/uapi/asm/mman.h
+++ b/tools/arch/score/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_SCORE_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_SCORE_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_SCORE_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_SCORE_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h> 4#include <uapi/asm-generic/mman.h>
diff --git a/tools/arch/sh/include/asm/barrier.h b/tools/arch/sh/include/asm/barrier.h
index c18fd7599b97..bde5221af282 100644
--- a/tools/arch/sh/include/asm/barrier.h
+++ b/tools/arch/sh/include/asm/barrier.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * Copied from the kernel sources: 3 * Copied from the kernel sources:
3 * 4 *
diff --git a/tools/arch/sh/include/uapi/asm/mman.h b/tools/arch/sh/include/uapi/asm/mman.h
index 26504f6f060e..88c0e2930c47 100644
--- a/tools/arch/sh/include/uapi/asm/mman.h
+++ b/tools/arch/sh/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_SH_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_SH_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_SH_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_SH_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h> 4#include <uapi/asm-generic/mman.h>
diff --git a/tools/arch/sparc/include/asm/barrier.h b/tools/arch/sparc/include/asm/barrier.h
index 8c017b3b1391..95d1618465a6 100644
--- a/tools/arch/sparc/include/asm/barrier.h
+++ b/tools/arch/sparc/include/asm/barrier.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef ___TOOLS_LINUX_ASM_SPARC_BARRIER_H 2#ifndef ___TOOLS_LINUX_ASM_SPARC_BARRIER_H
2#define ___TOOLS_LINUX_ASM_SPARC_BARRIER_H 3#define ___TOOLS_LINUX_ASM_SPARC_BARRIER_H
3#if defined(__sparc__) && defined(__arch64__) 4#if defined(__sparc__) && defined(__arch64__)
diff --git a/tools/arch/sparc/include/asm/barrier_32.h b/tools/arch/sparc/include/asm/barrier_32.h
index c5eadd0a7233..cc19ed1dde0b 100644
--- a/tools/arch/sparc/include/asm/barrier_32.h
+++ b/tools/arch/sparc/include/asm/barrier_32.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __TOOLS_PERF_SPARC_BARRIER_H 2#ifndef __TOOLS_PERF_SPARC_BARRIER_H
2#define __TOOLS_PERF_SPARC_BARRIER_H 3#define __TOOLS_PERF_SPARC_BARRIER_H
3 4
diff --git a/tools/arch/sparc/include/asm/barrier_64.h b/tools/arch/sparc/include/asm/barrier_64.h
index 9a7d7322c3f7..ba61344287d5 100644
--- a/tools/arch/sparc/include/asm/barrier_64.h
+++ b/tools/arch/sparc/include/asm/barrier_64.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __TOOLS_LINUX_SPARC64_BARRIER_H 2#ifndef __TOOLS_LINUX_SPARC64_BARRIER_H
2#define __TOOLS_LINUX_SPARC64_BARRIER_H 3#define __TOOLS_LINUX_SPARC64_BARRIER_H
3 4
diff --git a/tools/arch/sparc/include/uapi/asm/bitsperlong.h b/tools/arch/sparc/include/uapi/asm/bitsperlong.h
index b62dd907d7c3..3b4e61740b75 100644
--- a/tools/arch/sparc/include/uapi/asm/bitsperlong.h
+++ b/tools/arch/sparc/include/uapi/asm/bitsperlong.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef __ASM_ALPHA_BITSPERLONG_H 2#ifndef __ASM_ALPHA_BITSPERLONG_H
2#define __ASM_ALPHA_BITSPERLONG_H 3#define __ASM_ALPHA_BITSPERLONG_H
3 4
diff --git a/tools/arch/sparc/include/uapi/asm/mman.h b/tools/arch/sparc/include/uapi/asm/mman.h
index 8640525de991..38920eed8cbf 100644
--- a/tools/arch/sparc/include/uapi/asm/mman.h
+++ b/tools/arch/sparc/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_SPARC_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_SPARC_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_SPARC_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_SPARC_UAPI_ASM_MMAN_FIX_H
3#define MAP_DENYWRITE 0x0800 4#define MAP_DENYWRITE 0x0800
diff --git a/tools/arch/tile/include/asm/barrier.h b/tools/arch/tile/include/asm/barrier.h
index 7d3692c3d4ac..7ad02a591b43 100644
--- a/tools/arch/tile/include/asm/barrier.h
+++ b/tools/arch/tile/include/asm/barrier.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LINUX_ASM_TILE_BARRIER_H 2#ifndef _TOOLS_LINUX_ASM_TILE_BARRIER_H
2#define _TOOLS_LINUX_ASM_TILE_BARRIER_H 3#define _TOOLS_LINUX_ASM_TILE_BARRIER_H
3/* 4/*
diff --git a/tools/arch/tile/include/uapi/asm/bitsperlong.h b/tools/arch/tile/include/uapi/asm/bitsperlong.h
index 58c771f2af2f..57cca78c0fbb 100644
--- a/tools/arch/tile/include/uapi/asm/bitsperlong.h
+++ b/tools/arch/tile/include/uapi/asm/bitsperlong.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1/* 2/*
2 * Copyright 2010 Tilera Corporation. All Rights Reserved. 3 * Copyright 2010 Tilera Corporation. All Rights Reserved.
3 * 4 *
diff --git a/tools/arch/tile/include/uapi/asm/mman.h b/tools/arch/tile/include/uapi/asm/mman.h
index 7116c4b928b3..65ec92925c6c 100644
--- a/tools/arch/tile/include/uapi/asm/mman.h
+++ b/tools/arch/tile/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_TILE_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_TILE_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_TILE_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_TILE_UAPI_ASM_MMAN_FIX_H
3#define MAP_DENYWRITE 0x0800 4#define MAP_DENYWRITE 0x0800
diff --git a/tools/arch/x86/include/asm/atomic.h b/tools/arch/x86/include/asm/atomic.h
index 328eeceec709..7d8c3261a50d 100644
--- a/tools/arch/x86/include/asm/atomic.h
+++ b/tools/arch/x86/include/asm/atomic.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LINUX_ASM_X86_ATOMIC_H 2#ifndef _TOOLS_LINUX_ASM_X86_ATOMIC_H
2#define _TOOLS_LINUX_ASM_X86_ATOMIC_H 3#define _TOOLS_LINUX_ASM_X86_ATOMIC_H
3 4
diff --git a/tools/arch/x86/include/asm/barrier.h b/tools/arch/x86/include/asm/barrier.h
index f366d8e550e4..8774dee27471 100644
--- a/tools/arch/x86/include/asm/barrier.h
+++ b/tools/arch/x86/include/asm/barrier.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LINUX_ASM_X86_BARRIER_H 2#ifndef _TOOLS_LINUX_ASM_X86_BARRIER_H
2#define _TOOLS_LINUX_ASM_X86_BARRIER_H 3#define _TOOLS_LINUX_ASM_X86_BARRIER_H
3 4
diff --git a/tools/arch/x86/include/asm/cmpxchg.h b/tools/arch/x86/include/asm/cmpxchg.h
index f5253260f3cc..0ed9ca2766ad 100644
--- a/tools/arch/x86/include/asm/cmpxchg.h
+++ b/tools/arch/x86/include/asm/cmpxchg.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef TOOLS_ASM_X86_CMPXCHG_H 2#ifndef TOOLS_ASM_X86_CMPXCHG_H
2#define TOOLS_ASM_X86_CMPXCHG_H 3#define TOOLS_ASM_X86_CMPXCHG_H
3 4
diff --git a/tools/arch/x86/include/asm/cpufeatures.h b/tools/arch/x86/include/asm/cpufeatures.h
index 2519c6c801c9..793690fbda36 100644
--- a/tools/arch/x86/include/asm/cpufeatures.h
+++ b/tools/arch/x86/include/asm/cpufeatures.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _ASM_X86_CPUFEATURES_H 2#ifndef _ASM_X86_CPUFEATURES_H
2#define _ASM_X86_CPUFEATURES_H 3#define _ASM_X86_CPUFEATURES_H
3 4
diff --git a/tools/arch/x86/include/asm/rmwcc.h b/tools/arch/x86/include/asm/rmwcc.h
index a6669bc06939..dc90c0c2fae3 100644
--- a/tools/arch/x86/include/asm/rmwcc.h
+++ b/tools/arch/x86/include/asm/rmwcc.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LINUX_ASM_X86_RMWcc 2#ifndef _TOOLS_LINUX_ASM_X86_RMWcc
2#define _TOOLS_LINUX_ASM_X86_RMWcc 3#define _TOOLS_LINUX_ASM_X86_RMWcc
3 4
diff --git a/tools/arch/x86/include/asm/unistd_32.h b/tools/arch/x86/include/asm/unistd_32.h
index 0e4312ffc945..60a89dba01b6 100644
--- a/tools/arch/x86/include/asm/unistd_32.h
+++ b/tools/arch/x86/include/asm/unistd_32.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __NR_perf_event_open 2#ifndef __NR_perf_event_open
2# define __NR_perf_event_open 336 3# define __NR_perf_event_open 336
3#endif 4#endif
diff --git a/tools/arch/x86/include/asm/unistd_64.h b/tools/arch/x86/include/asm/unistd_64.h
index dd56bb36132a..cb52a3a8b8fc 100644
--- a/tools/arch/x86/include/asm/unistd_64.h
+++ b/tools/arch/x86/include/asm/unistd_64.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __NR_perf_event_open 2#ifndef __NR_perf_event_open
2# define __NR_perf_event_open 298 3# define __NR_perf_event_open 298
3#endif 4#endif
diff --git a/tools/arch/x86/include/uapi/asm/bitsperlong.h b/tools/arch/x86/include/uapi/asm/bitsperlong.h
index 6e23c543cd80..f8a92e0009d6 100644
--- a/tools/arch/x86/include/uapi/asm/bitsperlong.h
+++ b/tools/arch/x86/include/uapi/asm/bitsperlong.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef __ASM_X86_BITSPERLONG_H 2#ifndef __ASM_X86_BITSPERLONG_H
2#define __ASM_X86_BITSPERLONG_H 3#define __ASM_X86_BITSPERLONG_H
3 4
diff --git a/tools/arch/x86/include/uapi/asm/kvm.h b/tools/arch/x86/include/uapi/asm/kvm.h
index c2824d02ba37..f3a960488eae 100644
--- a/tools/arch/x86/include/uapi/asm/kvm.h
+++ b/tools/arch/x86/include/uapi/asm/kvm.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _ASM_X86_KVM_H 2#ifndef _ASM_X86_KVM_H
2#define _ASM_X86_KVM_H 3#define _ASM_X86_KVM_H
3 4
diff --git a/tools/arch/x86/include/uapi/asm/kvm_perf.h b/tools/arch/x86/include/uapi/asm/kvm_perf.h
index 3bb964f88aa1..125cf5cdf6c5 100644
--- a/tools/arch/x86/include/uapi/asm/kvm_perf.h
+++ b/tools/arch/x86/include/uapi/asm/kvm_perf.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _ASM_X86_KVM_PERF_H 2#ifndef _ASM_X86_KVM_PERF_H
2#define _ASM_X86_KVM_PERF_H 3#define _ASM_X86_KVM_PERF_H
3 4
diff --git a/tools/arch/x86/include/uapi/asm/mman.h b/tools/arch/x86/include/uapi/asm/mman.h
index b73c1af8b1dd..8449778de2ed 100644
--- a/tools/arch/x86/include/uapi/asm/mman.h
+++ b/tools/arch/x86/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_X86_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_X86_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_X86_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_X86_UAPI_ASM_MMAN_FIX_H
3#define MAP_32BIT 0x40 4#define MAP_32BIT 0x40
diff --git a/tools/arch/x86/include/uapi/asm/perf_regs.h b/tools/arch/x86/include/uapi/asm/perf_regs.h
index 3f2207bfd17b..f3329cabce5c 100644
--- a/tools/arch/x86/include/uapi/asm/perf_regs.h
+++ b/tools/arch/x86/include/uapi/asm/perf_regs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _ASM_X86_PERF_REGS_H 2#ifndef _ASM_X86_PERF_REGS_H
2#define _ASM_X86_PERF_REGS_H 3#define _ASM_X86_PERF_REGS_H
3 4
diff --git a/tools/arch/x86/include/uapi/asm/svm.h b/tools/arch/x86/include/uapi/asm/svm.h
index 3725e145aa58..a9731f8a480f 100644
--- a/tools/arch/x86/include/uapi/asm/svm.h
+++ b/tools/arch/x86/include/uapi/asm/svm.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _UAPI__SVM_H 2#ifndef _UAPI__SVM_H
2#define _UAPI__SVM_H 3#define _UAPI__SVM_H
3 4
diff --git a/tools/arch/x86/include/uapi/asm/unistd.h b/tools/arch/x86/include/uapi/asm/unistd.h
index a26df0d75cd0..30d7d04d72d6 100644
--- a/tools/arch/x86/include/uapi/asm/unistd.h
+++ b/tools/arch/x86/include/uapi/asm/unistd.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _UAPI_ASM_X86_UNISTD_H 2#ifndef _UAPI_ASM_X86_UNISTD_H
2#define _UAPI_ASM_X86_UNISTD_H 3#define _UAPI_ASM_X86_UNISTD_H
3 4
diff --git a/tools/arch/x86/include/uapi/asm/vmx.h b/tools/arch/x86/include/uapi/asm/vmx.h
index 690a2dcf4078..f0b0c90dd398 100644
--- a/tools/arch/x86/include/uapi/asm/vmx.h
+++ b/tools/arch/x86/include/uapi/asm/vmx.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1/* 2/*
2 * vmx.h: VMX Architecture related definitions 3 * vmx.h: VMX Architecture related definitions
3 * Copyright (c) 2004, Intel Corporation. 4 * Copyright (c) 2004, Intel Corporation.
diff --git a/tools/arch/x86/lib/memcpy_64.S b/tools/arch/x86/lib/memcpy_64.S
index 98dcc112b363..9a53a06e5a3e 100644
--- a/tools/arch/x86/lib/memcpy_64.S
+++ b/tools/arch/x86/lib/memcpy_64.S
@@ -4,6 +4,7 @@
4#include <asm/errno.h> 4#include <asm/errno.h>
5#include <asm/cpufeatures.h> 5#include <asm/cpufeatures.h>
6#include <asm/alternative-asm.h> 6#include <asm/alternative-asm.h>
7#include <asm/export.h>
7 8
8/* 9/*
9 * We build a jump to memcpy_orig by default which gets NOPped out on 10 * We build a jump to memcpy_orig by default which gets NOPped out on
@@ -40,6 +41,8 @@ ENTRY(memcpy)
40 ret 41 ret
41ENDPROC(memcpy) 42ENDPROC(memcpy)
42ENDPROC(__memcpy) 43ENDPROC(__memcpy)
44EXPORT_SYMBOL(memcpy)
45EXPORT_SYMBOL(__memcpy)
43 46
44/* 47/*
45 * memcpy_erms() - enhanced fast string memcpy. This is faster and 48 * memcpy_erms() - enhanced fast string memcpy. This is faster and
@@ -274,6 +277,7 @@ ENTRY(memcpy_mcsafe_unrolled)
274 xorq %rax, %rax 277 xorq %rax, %rax
275 ret 278 ret
276ENDPROC(memcpy_mcsafe_unrolled) 279ENDPROC(memcpy_mcsafe_unrolled)
280EXPORT_SYMBOL_GPL(memcpy_mcsafe_unrolled)
277 281
278 .section .fixup, "ax" 282 .section .fixup, "ax"
279 /* Return -EFAULT for any failure */ 283 /* Return -EFAULT for any failure */
diff --git a/tools/arch/x86/lib/memset_64.S b/tools/arch/x86/lib/memset_64.S
index e1229ecd2a82..f8f3dc0a6690 100644
--- a/tools/arch/x86/lib/memset_64.S
+++ b/tools/arch/x86/lib/memset_64.S
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* Copyright 2002 Andi Kleen, SuSE Labs */ 2/* Copyright 2002 Andi Kleen, SuSE Labs */
2 3
3#include <linux/linkage.h> 4#include <linux/linkage.h>
diff --git a/tools/arch/xtensa/include/uapi/asm/mman.h b/tools/arch/xtensa/include/uapi/asm/mman.h
index 4453195c450c..34dde6f44dae 100644
--- a/tools/arch/xtensa/include/uapi/asm/mman.h
+++ b/tools/arch/xtensa/include/uapi/asm/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef TOOLS_ARCH_XTENSA_UAPI_ASM_MMAN_FIX_H 2#ifndef TOOLS_ARCH_XTENSA_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_XTENSA_UAPI_ASM_MMAN_FIX_H 3#define TOOLS_ARCH_XTENSA_UAPI_ASM_MMAN_FIX_H
3#define MADV_DODUMP 17 4#define MADV_DODUMP 17
diff --git a/tools/build/Makefile b/tools/build/Makefile
index 477f00eda591..5eb4b5ad79cb 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1ifeq ($(srctree),) 2ifeq ($(srctree),)
2srctree := $(patsubst %/,%,$(dir $(CURDIR))) 3srctree := $(patsubst %/,%,$(dir $(CURDIR)))
3srctree := $(patsubst %/,%,$(dir $(srctree))) 4srctree := $(patsubst %/,%,$(dir $(srctree)))
diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
index c46b20e4ad87..cd72016c3cfa 100644
--- a/tools/build/Makefile.build
+++ b/tools/build/Makefile.build
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1### 2###
2# Main build makefile. 3# Main build makefile.
3# 4#
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index ee2546ddf028..96982640fbf8 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1FILES= \ 2FILES= \
2 test-all.bin \ 3 test-all.bin \
3 test-backtrace.bin \ 4 test-backtrace.bin \
diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c
index b5cfc6445771..4112702e4aed 100644
--- a/tools/build/feature/test-all.c
+++ b/tools/build/feature/test-all.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * test-all.c: Try to build all the main testcases at once. 3 * test-all.c: Try to build all the main testcases at once.
3 * 4 *
diff --git a/tools/build/feature/test-backtrace.c b/tools/build/feature/test-backtrace.c
index 7124aa1dc8fb..e9ddd27c69c3 100644
--- a/tools/build/feature/test-backtrace.c
+++ b/tools/build/feature/test-backtrace.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <execinfo.h> 2#include <execinfo.h>
2#include <stdio.h> 3#include <stdio.h>
3 4
diff --git a/tools/build/feature/test-bionic.c b/tools/build/feature/test-bionic.c
index eac24e9513eb..4bcc9776504c 100644
--- a/tools/build/feature/test-bionic.c
+++ b/tools/build/feature/test-bionic.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <android/api-level.h> 2#include <android/api-level.h>
2 3
3int main(void) 4int main(void)
diff --git a/tools/build/feature/test-bpf.c b/tools/build/feature/test-bpf.c
index da2172ff9662..82070eadfc07 100644
--- a/tools/build/feature/test-bpf.c
+++ b/tools/build/feature/test-bpf.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <asm/unistd.h> 2#include <asm/unistd.h>
2#include <linux/bpf.h> 3#include <linux/bpf.h>
3#include <unistd.h> 4#include <unistd.h>
diff --git a/tools/build/feature/test-clang.cpp b/tools/build/feature/test-clang.cpp
index e23c1b1f1b91..a2b3f092d2f0 100644
--- a/tools/build/feature/test-clang.cpp
+++ b/tools/build/feature/test-clang.cpp
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "clang/Basic/VirtualFileSystem.h" 2#include "clang/Basic/VirtualFileSystem.h"
2#include "clang/Driver/Driver.h" 3#include "clang/Driver/Driver.h"
3#include "clang/Frontend/TextDiagnosticPrinter.h" 4#include "clang/Frontend/TextDiagnosticPrinter.h"
diff --git a/tools/build/feature/test-compile.c b/tools/build/feature/test-compile.c
index c54e6551ae4c..9821b8271dee 100644
--- a/tools/build/feature/test-compile.c
+++ b/tools/build/feature/test-compile.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2int main(void) 3int main(void)
3{ 4{
diff --git a/tools/build/feature/test-cplus-demangle.c b/tools/build/feature/test-cplus-demangle.c
index 610c686e0009..2ba56474ab71 100644
--- a/tools/build/feature/test-cplus-demangle.c
+++ b/tools/build/feature/test-cplus-demangle.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1extern int printf(const char *format, ...); 2extern int printf(const char *format, ...);
2extern char *cplus_demangle(const char *, int); 3extern char *cplus_demangle(const char *, int);
3 4
diff --git a/tools/build/feature/test-cxx.cpp b/tools/build/feature/test-cxx.cpp
index b1dee9a31d6c..396aaedd2418 100644
--- a/tools/build/feature/test-cxx.cpp
+++ b/tools/build/feature/test-cxx.cpp
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <iostream> 2#include <iostream>
2#include <memory> 3#include <memory>
3 4
diff --git a/tools/build/feature/test-dwarf.c b/tools/build/feature/test-dwarf.c
index 3fc1801ce4a9..8d474bd7371b 100644
--- a/tools/build/feature/test-dwarf.c
+++ b/tools/build/feature/test-dwarf.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <dwarf.h> 2#include <dwarf.h>
2#include <elfutils/libdw.h> 3#include <elfutils/libdw.h>
3#include <elfutils/version.h> 4#include <elfutils/version.h>
diff --git a/tools/build/feature/test-dwarf_getlocations.c b/tools/build/feature/test-dwarf_getlocations.c
index 70162699dd43..78fb4a1fa68c 100644
--- a/tools/build/feature/test-dwarf_getlocations.c
+++ b/tools/build/feature/test-dwarf_getlocations.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdlib.h> 2#include <stdlib.h>
2#include <elfutils/libdw.h> 3#include <elfutils/libdw.h>
3 4
diff --git a/tools/build/feature/test-get_cpuid.c b/tools/build/feature/test-get_cpuid.c
index d7a2c407130d..bb4f065f28a6 100644
--- a/tools/build/feature/test-get_cpuid.c
+++ b/tools/build/feature/test-get_cpuid.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <cpuid.h> 2#include <cpuid.h>
2 3
3int main(void) 4int main(void)
diff --git a/tools/build/feature/test-glibc.c b/tools/build/feature/test-glibc.c
index 9367f7586676..9ab8e90e7b88 100644
--- a/tools/build/feature/test-glibc.c
+++ b/tools/build/feature/test-glibc.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdlib.h> 2#include <stdlib.h>
2 3
3#if !defined(__UCLIBC__) 4#if !defined(__UCLIBC__)
diff --git a/tools/build/feature/test-gtk2-infobar.c b/tools/build/feature/test-gtk2-infobar.c
index 397b4646d066..b1b716dd5733 100644
--- a/tools/build/feature/test-gtk2-infobar.c
+++ b/tools/build/feature/test-gtk2-infobar.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#pragma GCC diagnostic ignored "-Wstrict-prototypes" 2#pragma GCC diagnostic ignored "-Wstrict-prototypes"
2#include <gtk/gtk.h> 3#include <gtk/gtk.h>
3#pragma GCC diagnostic error "-Wstrict-prototypes" 4#pragma GCC diagnostic error "-Wstrict-prototypes"
diff --git a/tools/build/feature/test-gtk2.c b/tools/build/feature/test-gtk2.c
index 6bd80e509439..2aaf4bfc2055 100644
--- a/tools/build/feature/test-gtk2.c
+++ b/tools/build/feature/test-gtk2.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#pragma GCC diagnostic ignored "-Wstrict-prototypes" 2#pragma GCC diagnostic ignored "-Wstrict-prototypes"
2#include <gtk/gtk.h> 3#include <gtk/gtk.h>
3#pragma GCC diagnostic error "-Wstrict-prototypes" 4#pragma GCC diagnostic error "-Wstrict-prototypes"
diff --git a/tools/build/feature/test-jvmti.c b/tools/build/feature/test-jvmti.c
index 1c665f09b9d6..5cf31192f204 100644
--- a/tools/build/feature/test-jvmti.c
+++ b/tools/build/feature/test-jvmti.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <jvmti.h> 2#include <jvmti.h>
2#include <jvmticmlr.h> 3#include <jvmticmlr.h>
3 4
diff --git a/tools/build/feature/test-libaudit.c b/tools/build/feature/test-libaudit.c
index afc019f08641..f5b0863fa1ec 100644
--- a/tools/build/feature/test-libaudit.c
+++ b/tools/build/feature/test-libaudit.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <libaudit.h> 2#include <libaudit.h>
2 3
3extern int printf(const char *format, ...); 4extern int printf(const char *format, ...);
diff --git a/tools/build/feature/test-libbabeltrace.c b/tools/build/feature/test-libbabeltrace.c
index 9cf802a04885..10bb69d55694 100644
--- a/tools/build/feature/test-libbabeltrace.c
+++ b/tools/build/feature/test-libbabeltrace.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1 2
2#include <babeltrace/ctf-writer/writer.h> 3#include <babeltrace/ctf-writer/writer.h>
3#include <babeltrace/ctf-ir/stream-class.h> 4#include <babeltrace/ctf-ir/stream-class.h>
diff --git a/tools/build/feature/test-libbfd.c b/tools/build/feature/test-libbfd.c
index 24059907e990..afa46b0465cd 100644
--- a/tools/build/feature/test-libbfd.c
+++ b/tools/build/feature/test-libbfd.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <bfd.h> 2#include <bfd.h>
2 3
3extern int printf(const char *format, ...); 4extern int printf(const char *format, ...);
diff --git a/tools/build/feature/test-libcrypto.c b/tools/build/feature/test-libcrypto.c
index bd79dc7f28d3..a98174e0569c 100644
--- a/tools/build/feature/test-libcrypto.c
+++ b/tools/build/feature/test-libcrypto.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <openssl/sha.h> 2#include <openssl/sha.h>
2#include <openssl/md5.h> 3#include <openssl/md5.h>
3 4
diff --git a/tools/build/feature/test-libdw-dwarf-unwind.c b/tools/build/feature/test-libdw-dwarf-unwind.c
index f676a3ff442a..ed03d9505609 100644
--- a/tools/build/feature/test-libdw-dwarf-unwind.c
+++ b/tools/build/feature/test-libdw-dwarf-unwind.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1 2
2#include <elfutils/libdwfl.h> 3#include <elfutils/libdwfl.h>
3 4
diff --git a/tools/build/feature/test-libelf-gelf_getnote.c b/tools/build/feature/test-libelf-gelf_getnote.c
index d78cf4d5271f..075d062fe841 100644
--- a/tools/build/feature/test-libelf-gelf_getnote.c
+++ b/tools/build/feature/test-libelf-gelf_getnote.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdlib.h> 2#include <stdlib.h>
2#include <gelf.h> 3#include <gelf.h>
3 4
diff --git a/tools/build/feature/test-libelf-getphdrnum.c b/tools/build/feature/test-libelf-getphdrnum.c
index d710459306c3..96a7f8d30a59 100644
--- a/tools/build/feature/test-libelf-getphdrnum.c
+++ b/tools/build/feature/test-libelf-getphdrnum.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <libelf.h> 2#include <libelf.h>
2 3
3int main(void) 4int main(void)
diff --git a/tools/build/feature/test-libelf-getshdrstrndx.c b/tools/build/feature/test-libelf-getshdrstrndx.c
index f0c3b47cce28..ae9f2fff5af0 100644
--- a/tools/build/feature/test-libelf-getshdrstrndx.c
+++ b/tools/build/feature/test-libelf-getshdrstrndx.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <libelf.h> 2#include <libelf.h>
2 3
3int main(void) 4int main(void)
diff --git a/tools/build/feature/test-libelf-mmap.c b/tools/build/feature/test-libelf-mmap.c
index 564427d7ef18..2c3ef81affe2 100644
--- a/tools/build/feature/test-libelf-mmap.c
+++ b/tools/build/feature/test-libelf-mmap.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <libelf.h> 2#include <libelf.h>
2 3
3int main(void) 4int main(void)
diff --git a/tools/build/feature/test-libelf.c b/tools/build/feature/test-libelf.c
index 08db322d8957..905044127d56 100644
--- a/tools/build/feature/test-libelf.c
+++ b/tools/build/feature/test-libelf.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <libelf.h> 2#include <libelf.h>
2 3
3int main(void) 4int main(void)
diff --git a/tools/build/feature/test-libnuma.c b/tools/build/feature/test-libnuma.c
index 4763d9cd587d..b3aa59f8b3cb 100644
--- a/tools/build/feature/test-libnuma.c
+++ b/tools/build/feature/test-libnuma.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <numa.h> 2#include <numa.h>
2#include <numaif.h> 3#include <numaif.h>
3 4
diff --git a/tools/build/feature/test-libperl.c b/tools/build/feature/test-libperl.c
index 8871f6a0fdb4..0415f437eb31 100644
--- a/tools/build/feature/test-libperl.c
+++ b/tools/build/feature/test-libperl.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <EXTERN.h> 2#include <EXTERN.h>
2#include <perl.h> 3#include <perl.h>
3 4
diff --git a/tools/build/feature/test-libpython-version.c b/tools/build/feature/test-libpython-version.c
index facea122d812..47714b942d4d 100644
--- a/tools/build/feature/test-libpython-version.c
+++ b/tools/build/feature/test-libpython-version.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <Python.h> 2#include <Python.h>
2 3
3#if PY_VERSION_HEX >= 0x03000000 4#if PY_VERSION_HEX >= 0x03000000
diff --git a/tools/build/feature/test-libpython.c b/tools/build/feature/test-libpython.c
index b24b28ad6324..0c1641b0d9a7 100644
--- a/tools/build/feature/test-libpython.c
+++ b/tools/build/feature/test-libpython.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <Python.h> 2#include <Python.h>
2 3
3int main(void) 4int main(void)
diff --git a/tools/build/feature/test-libslang.c b/tools/build/feature/test-libslang.c
index 22ff22ed94d1..9cbff8d1df53 100644
--- a/tools/build/feature/test-libslang.c
+++ b/tools/build/feature/test-libslang.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <slang.h> 2#include <slang.h>
2 3
3int main(void) 4int main(void)
diff --git a/tools/build/feature/test-libunwind-aarch64.c b/tools/build/feature/test-libunwind-aarch64.c
index fc03fb64e8c1..323803f49212 100644
--- a/tools/build/feature/test-libunwind-aarch64.c
+++ b/tools/build/feature/test-libunwind-aarch64.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <libunwind-aarch64.h> 2#include <libunwind-aarch64.h>
2#include <stdlib.h> 3#include <stdlib.h>
3 4
diff --git a/tools/build/feature/test-libunwind-arm.c b/tools/build/feature/test-libunwind-arm.c
index 632d95ec641f..cb378b7d6866 100644
--- a/tools/build/feature/test-libunwind-arm.c
+++ b/tools/build/feature/test-libunwind-arm.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <libunwind-arm.h> 2#include <libunwind-arm.h>
2#include <stdlib.h> 3#include <stdlib.h>
3 4
diff --git a/tools/build/feature/test-libunwind-debug-frame-aarch64.c b/tools/build/feature/test-libunwind-debug-frame-aarch64.c
index 22844673fc26..36d6646c185e 100644
--- a/tools/build/feature/test-libunwind-debug-frame-aarch64.c
+++ b/tools/build/feature/test-libunwind-debug-frame-aarch64.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <libunwind-aarch64.h> 2#include <libunwind-aarch64.h>
2#include <stdlib.h> 3#include <stdlib.h>
3 4
diff --git a/tools/build/feature/test-libunwind-debug-frame-arm.c b/tools/build/feature/test-libunwind-debug-frame-arm.c
index f98859684fee..8696e48e1268 100644
--- a/tools/build/feature/test-libunwind-debug-frame-arm.c
+++ b/tools/build/feature/test-libunwind-debug-frame-arm.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <libunwind-arm.h> 2#include <libunwind-arm.h>
2#include <stdlib.h> 3#include <stdlib.h>
3 4
diff --git a/tools/build/feature/test-libunwind-debug-frame.c b/tools/build/feature/test-libunwind-debug-frame.c
index 0ef8087a104a..efb55cdd8d01 100644
--- a/tools/build/feature/test-libunwind-debug-frame.c
+++ b/tools/build/feature/test-libunwind-debug-frame.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <libunwind.h> 2#include <libunwind.h>
2#include <stdlib.h> 3#include <stdlib.h>
3 4
diff --git a/tools/build/feature/test-libunwind-x86.c b/tools/build/feature/test-libunwind-x86.c
index 3561edce305e..e5e0f6c89637 100644
--- a/tools/build/feature/test-libunwind-x86.c
+++ b/tools/build/feature/test-libunwind-x86.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <libunwind-x86.h> 2#include <libunwind-x86.h>
2#include <stdlib.h> 3#include <stdlib.h>
3 4
diff --git a/tools/build/feature/test-libunwind-x86_64.c b/tools/build/feature/test-libunwind-x86_64.c
index 5add2517b2a1..62ae4db597dc 100644
--- a/tools/build/feature/test-libunwind-x86_64.c
+++ b/tools/build/feature/test-libunwind-x86_64.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <libunwind-x86_64.h> 2#include <libunwind-x86_64.h>
2#include <stdlib.h> 3#include <stdlib.h>
3 4
diff --git a/tools/build/feature/test-libunwind.c b/tools/build/feature/test-libunwind.c
index 43b9369bcab7..53fd26614ff0 100644
--- a/tools/build/feature/test-libunwind.c
+++ b/tools/build/feature/test-libunwind.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <libunwind.h> 2#include <libunwind.h>
2#include <stdlib.h> 3#include <stdlib.h>
3 4
diff --git a/tools/build/feature/test-llvm-version.cpp b/tools/build/feature/test-llvm-version.cpp
index 896d31724568..8a091625446a 100644
--- a/tools/build/feature/test-llvm-version.cpp
+++ b/tools/build/feature/test-llvm-version.cpp
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <cstdio> 2#include <cstdio>
2#include "llvm/Config/llvm-config.h" 3#include "llvm/Config/llvm-config.h"
3 4
diff --git a/tools/build/feature/test-llvm.cpp b/tools/build/feature/test-llvm.cpp
index 455a332dc8a8..88a3d1bdd9f6 100644
--- a/tools/build/feature/test-llvm.cpp
+++ b/tools/build/feature/test-llvm.cpp
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "llvm/Support/ManagedStatic.h" 2#include "llvm/Support/ManagedStatic.h"
2#include "llvm/Support/raw_ostream.h" 3#include "llvm/Support/raw_ostream.h"
3#define NUM_VERSION (((LLVM_VERSION_MAJOR) << 16) + (LLVM_VERSION_MINOR << 8) + LLVM_VERSION_PATCH) 4#define NUM_VERSION (((LLVM_VERSION_MAJOR) << 16) + (LLVM_VERSION_MINOR << 8) + LLVM_VERSION_PATCH)
diff --git a/tools/build/feature/test-lzma.c b/tools/build/feature/test-lzma.c
index 95adc8ced3dd..78682bb01d57 100644
--- a/tools/build/feature/test-lzma.c
+++ b/tools/build/feature/test-lzma.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <lzma.h> 2#include <lzma.h>
2 3
3int main(void) 4int main(void)
diff --git a/tools/build/feature/test-numa_num_possible_cpus.c b/tools/build/feature/test-numa_num_possible_cpus.c
index 2606e94b0659..573d07b9c570 100644
--- a/tools/build/feature/test-numa_num_possible_cpus.c
+++ b/tools/build/feature/test-numa_num_possible_cpus.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <numa.h> 2#include <numa.h>
2 3
3int main(void) 4int main(void)
diff --git a/tools/build/feature/test-pthread-attr-setaffinity-np.c b/tools/build/feature/test-pthread-attr-setaffinity-np.c
index fdada5e8d454..38c71131c452 100644
--- a/tools/build/feature/test-pthread-attr-setaffinity-np.c
+++ b/tools/build/feature/test-pthread-attr-setaffinity-np.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdint.h> 2#include <stdint.h>
2#include <pthread.h> 3#include <pthread.h>
3#include <sched.h> 4#include <sched.h>
diff --git a/tools/build/feature/test-sched_getcpu.c b/tools/build/feature/test-sched_getcpu.c
index 9c6b4cbffb1c..e448deb4124c 100644
--- a/tools/build/feature/test-sched_getcpu.c
+++ b/tools/build/feature/test-sched_getcpu.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#ifndef _GNU_SOURCE 2#ifndef _GNU_SOURCE
2#define _GNU_SOURCE 3#define _GNU_SOURCE
3#endif 4#endif
diff --git a/tools/build/feature/test-sdt.c b/tools/build/feature/test-sdt.c
index e4531a6e80ea..22737b0dadc8 100644
--- a/tools/build/feature/test-sdt.c
+++ b/tools/build/feature/test-sdt.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sys/sdt.h> 2#include <sys/sdt.h>
2 3
3int main(void) 4int main(void)
diff --git a/tools/build/feature/test-stackprotector-all.c b/tools/build/feature/test-stackprotector-all.c
index c9f398d87868..c8a57194f9f2 100644
--- a/tools/build/feature/test-stackprotector-all.c
+++ b/tools/build/feature/test-stackprotector-all.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2 3
3int main(void) 4int main(void)
diff --git a/tools/build/feature/test-sync-compare-and-swap.c b/tools/build/feature/test-sync-compare-and-swap.c
index c34d4ca4af56..1e38d1930a97 100644
--- a/tools/build/feature/test-sync-compare-and-swap.c
+++ b/tools/build/feature/test-sync-compare-and-swap.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdint.h> 2#include <stdint.h>
2 3
3volatile uint64_t x; 4volatile uint64_t x;
diff --git a/tools/build/feature/test-timerfd.c b/tools/build/feature/test-timerfd.c
index 8c5c083b4d3c..9c72c697a9df 100644
--- a/tools/build/feature/test-timerfd.c
+++ b/tools/build/feature/test-timerfd.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * test for timerfd functions used by perf-kvm-stat-live 3 * test for timerfd functions used by perf-kvm-stat-live
3 */ 4 */
diff --git a/tools/build/feature/test-zlib.c b/tools/build/feature/test-zlib.c
index e111fff6240e..da6c35794b93 100644
--- a/tools/build/feature/test-zlib.c
+++ b/tools/build/feature/test-zlib.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <zlib.h> 2#include <zlib.h>
2 3
3int main(void) 4int main(void)
diff --git a/tools/build/fixdep.c b/tools/build/fixdep.c
index 734d1547cbae..2501fea7aa3e 100644
--- a/tools/build/fixdep.c
+++ b/tools/build/fixdep.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * "Optimize" a list of dependencies as spit out by gcc -MD 3 * "Optimize" a list of dependencies as spit out by gcc -MD
3 * for the build framework. 4 * for the build framework.
diff --git a/tools/build/tests/ex/Makefile b/tools/build/tests/ex/Makefile
index 027d6c8a58a7..fee032e06a85 100644
--- a/tools/build/tests/ex/Makefile
+++ b/tools/build/tests/ex/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1export srctree := $(abspath ../../../..) 2export srctree := $(abspath ../../../..)
2export CC := gcc 3export CC := gcc
3export LD := ld 4export LD := ld
diff --git a/tools/build/tests/ex/a.c b/tools/build/tests/ex/a.c
index 851762798c83..66017a9f40b6 100644
--- a/tools/build/tests/ex/a.c
+++ b/tools/build/tests/ex/a.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1 2
2int a(void) 3int a(void)
3{ 4{
diff --git a/tools/build/tests/ex/arch/e.c b/tools/build/tests/ex/arch/e.c
index beaa4a1d7ba8..f6ef585b570c 100644
--- a/tools/build/tests/ex/arch/e.c
+++ b/tools/build/tests/ex/arch/e.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1 2
2int e(void) 3int e(void)
3{ 4{
diff --git a/tools/build/tests/ex/arch/f.c b/tools/build/tests/ex/arch/f.c
index 7c3e9e9da5b7..bffd9c67e9af 100644
--- a/tools/build/tests/ex/arch/f.c
+++ b/tools/build/tests/ex/arch/f.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1 2
2int f(void) 3int f(void)
3{ 4{
diff --git a/tools/build/tests/ex/b.c b/tools/build/tests/ex/b.c
index c24ff9ca9a97..2b29fb4d3c20 100644
--- a/tools/build/tests/ex/b.c
+++ b/tools/build/tests/ex/b.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1 2
2int b(void) 3int b(void)
3{ 4{
diff --git a/tools/build/tests/ex/c.c b/tools/build/tests/ex/c.c
index e216d0217499..a63b20ab83d5 100644
--- a/tools/build/tests/ex/c.c
+++ b/tools/build/tests/ex/c.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1 2
2int c(void) 3int c(void)
3{ 4{
diff --git a/tools/build/tests/ex/d.c b/tools/build/tests/ex/d.c
index 80dc0f06151b..e114e8dca0b6 100644
--- a/tools/build/tests/ex/d.c
+++ b/tools/build/tests/ex/d.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1 2
2int d(void) 3int d(void)
3{ 4{
diff --git a/tools/build/tests/ex/ex.c b/tools/build/tests/ex/ex.c
index 57de6074d252..3c02756ef912 100644
--- a/tools/build/tests/ex/ex.c
+++ b/tools/build/tests/ex/ex.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1 2
2int a(void); 3int a(void);
3int b(void); 4int b(void);
diff --git a/tools/build/tests/ex/inc.c b/tools/build/tests/ex/inc.c
index c20f1e9033a3..3636ab5bf339 100644
--- a/tools/build/tests/ex/inc.c
+++ b/tools/build/tests/ex/inc.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#ifdef INCLUDE 2#ifdef INCLUDE
2#include "krava.h" 3#include "krava.h"
3#endif 4#endif
diff --git a/tools/build/tests/run.sh b/tools/build/tests/run.sh
index 44d2a0fade67..2c54e4d43546 100755
--- a/tools/build/tests/run.sh
+++ b/tools/build/tests/run.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2 3
3function test_ex { 4function test_ex {
4 make -C ex V=1 clean > ex.out 2>&1 5 make -C ex V=1 clean > ex.out 2>&1
diff --git a/tools/cgroup/Makefile b/tools/cgroup/Makefile
index b4286196b763..860fa151640a 100644
--- a/tools/cgroup/Makefile
+++ b/tools/cgroup/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# Makefile for cgroup tools 2# Makefile for cgroup tools
2 3
3CC = $(CROSS_COMPILE)gcc 4CC = $(CROSS_COMPILE)gcc
diff --git a/tools/cgroup/cgroup_event_listener.c b/tools/cgroup/cgroup_event_listener.c
index 4eb5507205c9..3d70dc831a76 100644
--- a/tools/cgroup/cgroup_event_listener.c
+++ b/tools/cgroup/cgroup_event_listener.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * cgroup_event_listener.c - Simple listener of cgroup events 3 * cgroup_event_listener.c - Simple listener of cgroup events
3 * 4 *
diff --git a/tools/firewire/Makefile b/tools/firewire/Makefile
index 81767adaae7d..67b6e9fca83c 100644
--- a/tools/firewire/Makefile
+++ b/tools/firewire/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1prefix = /usr 2prefix = /usr
2nosy-dump-version = 0.4 3nosy-dump-version = 0.4
3 4
diff --git a/tools/firewire/decode-fcp.c b/tools/firewire/decode-fcp.c
index e41223b6a4c8..b67ebc88434d 100644
--- a/tools/firewire/decode-fcp.c
+++ b/tools/firewire/decode-fcp.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/firewire-constants.h> 2#include <linux/firewire-constants.h>
2#include <stdio.h> 3#include <stdio.h>
3#include <stdlib.h> 4#include <stdlib.h>
diff --git a/tools/firewire/list.h b/tools/firewire/list.h
index 41f4bdadf634..6278d08e99e3 100644
--- a/tools/firewire/list.h
+++ b/tools/firewire/list.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1struct list { 2struct list {
2 struct list *next, *prev; 3 struct list *next, *prev;
3}; 4};
diff --git a/tools/firewire/nosy-dump.h b/tools/firewire/nosy-dump.h
index 3a4b5b33ba5d..69e5e594f284 100644
--- a/tools/firewire/nosy-dump.h
+++ b/tools/firewire/nosy-dump.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __nosy_dump_h__ 2#ifndef __nosy_dump_h__
2#define __nosy_dump_h__ 3#define __nosy_dump_h__
3 4
diff --git a/tools/gpio/Makefile b/tools/gpio/Makefile
index b4401536cfa9..805a2c0cf4cd 100644
--- a/tools/gpio/Makefile
+++ b/tools/gpio/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1include ../scripts/Makefile.include 2include ../scripts/Makefile.include
2 3
3bindir ?= /usr/bin 4bindir ?= /usr/bin
diff --git a/tools/hv/Makefile b/tools/hv/Makefile
index 0d1e61b81844..31503819454d 100644
--- a/tools/hv/Makefile
+++ b/tools/hv/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# Makefile for Hyper-V tools 2# Makefile for Hyper-V tools
2 3
3CC = $(CROSS_COMPILE)gcc 4CC = $(CROSS_COMPILE)gcc
diff --git a/tools/hv/hv_get_dhcp_info.sh b/tools/hv/hv_get_dhcp_info.sh
index ccd3e9532764..c38686c44656 100755
--- a/tools/hv/hv_get_dhcp_info.sh
+++ b/tools/hv/hv_get_dhcp_info.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2 3
3# This example script retrieves the DHCP state of a given interface. 4# This example script retrieves the DHCP state of a given interface.
4# In the interest of keeping the KVP daemon code free of distro specific 5# In the interest of keeping the KVP daemon code free of distro specific
diff --git a/tools/hv/hv_set_ifconfig.sh b/tools/hv/hv_set_ifconfig.sh
index 735aafd64a3f..7ed9f85ef908 100755
--- a/tools/hv/hv_set_ifconfig.sh
+++ b/tools/hv/hv_set_ifconfig.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2 3
3# This example script activates an interface based on the specified 4# This example script activates an interface based on the specified
4# configuration. 5# configuration.
diff --git a/tools/hv/lsvmbus b/tools/hv/lsvmbus
index e8fecd61871f..353e56768df8 100644
--- a/tools/hv/lsvmbus
+++ b/tools/hv/lsvmbus
@@ -1,4 +1,5 @@
1#!/usr/bin/env python 1#!/usr/bin/env python
2# SPDX-License-Identifier: GPL-2.0
2 3
3import os 4import os
4from optparse import OptionParser 5from optparse import OptionParser
diff --git a/tools/iio/Makefile b/tools/iio/Makefile
index d4d956020adf..a08e7a47d6a3 100644
--- a/tools/iio/Makefile
+++ b/tools/iio/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1include ../scripts/Makefile.include 2include ../scripts/Makefile.include
2 3
3bindir ?= /usr/bin 4bindir ?= /usr/bin
diff --git a/tools/include/asm-generic/atomic-gcc.h b/tools/include/asm-generic/atomic-gcc.h
index 5e9738f97bf3..40b231fb95bd 100644
--- a/tools/include/asm-generic/atomic-gcc.h
+++ b/tools/include/asm-generic/atomic-gcc.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __TOOLS_ASM_GENERIC_ATOMIC_H 2#ifndef __TOOLS_ASM_GENERIC_ATOMIC_H
2#define __TOOLS_ASM_GENERIC_ATOMIC_H 3#define __TOOLS_ASM_GENERIC_ATOMIC_H
3 4
diff --git a/tools/include/asm-generic/bitops.h b/tools/include/asm-generic/bitops.h
index 0304600121da..9bce3b56b5e7 100644
--- a/tools/include/asm-generic/bitops.h
+++ b/tools/include/asm-generic/bitops.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __TOOLS_ASM_GENERIC_BITOPS_H 2#ifndef __TOOLS_ASM_GENERIC_BITOPS_H
2#define __TOOLS_ASM_GENERIC_BITOPS_H 3#define __TOOLS_ASM_GENERIC_BITOPS_H
3 4
diff --git a/tools/include/asm-generic/bitops/__ffs.h b/tools/include/asm-generic/bitops/__ffs.h
index b3accfdf24b9..9d1310519497 100644
--- a/tools/include/asm-generic/bitops/__ffs.h
+++ b/tools/include/asm-generic/bitops/__ffs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS___FFS_H_ 2#ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS___FFS_H_
2#define _TOOLS_LINUX_ASM_GENERIC_BITOPS___FFS_H_ 3#define _TOOLS_LINUX_ASM_GENERIC_BITOPS___FFS_H_
3 4
diff --git a/tools/include/asm-generic/bitops/__fls.h b/tools/include/asm-generic/bitops/__fls.h
index a60a7ccb6782..03f721a8a2b1 100644
--- a/tools/include/asm-generic/bitops/__fls.h
+++ b/tools/include/asm-generic/bitops/__fls.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _ASM_GENERIC_BITOPS___FLS_H_ 2#ifndef _ASM_GENERIC_BITOPS___FLS_H_
2#define _ASM_GENERIC_BITOPS___FLS_H_ 3#define _ASM_GENERIC_BITOPS___FLS_H_
3 4
diff --git a/tools/include/asm-generic/bitops/arch_hweight.h b/tools/include/asm-generic/bitops/arch_hweight.h
index 6a211f40665c..c2705e1d220d 100644
--- a/tools/include/asm-generic/bitops/arch_hweight.h
+++ b/tools/include/asm-generic/bitops/arch_hweight.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_ 2#ifndef _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
2#define _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_ 3#define _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
3 4
diff --git a/tools/include/asm-generic/bitops/atomic.h b/tools/include/asm-generic/bitops/atomic.h
index 68b8c1516c5a..21c41ccd1266 100644
--- a/tools/include/asm-generic/bitops/atomic.h
+++ b/tools/include/asm-generic/bitops/atomic.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_ 2#ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_
2#define _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_ 3#define _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_
3 4
diff --git a/tools/include/asm-generic/bitops/const_hweight.h b/tools/include/asm-generic/bitops/const_hweight.h
index 0a7e06623470..149faeeeeaf2 100644
--- a/tools/include/asm-generic/bitops/const_hweight.h
+++ b/tools/include/asm-generic/bitops/const_hweight.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _ASM_GENERIC_BITOPS_CONST_HWEIGHT_H_ 2#ifndef _ASM_GENERIC_BITOPS_CONST_HWEIGHT_H_
2#define _ASM_GENERIC_BITOPS_CONST_HWEIGHT_H_ 3#define _ASM_GENERIC_BITOPS_CONST_HWEIGHT_H_
3 4
diff --git a/tools/include/asm-generic/bitops/find.h b/tools/include/asm-generic/bitops/find.h
index 5538ecdc964a..9311fadaaab2 100644
--- a/tools/include/asm-generic/bitops/find.h
+++ b/tools/include/asm-generic/bitops/find.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS_FIND_H_ 2#ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS_FIND_H_
2#define _TOOLS_LINUX_ASM_GENERIC_BITOPS_FIND_H_ 3#define _TOOLS_LINUX_ASM_GENERIC_BITOPS_FIND_H_
3 4
diff --git a/tools/include/asm-generic/bitops/fls.h b/tools/include/asm-generic/bitops/fls.h
index 0576d1f42f43..753aecaab641 100644
--- a/tools/include/asm-generic/bitops/fls.h
+++ b/tools/include/asm-generic/bitops/fls.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _ASM_GENERIC_BITOPS_FLS_H_ 2#ifndef _ASM_GENERIC_BITOPS_FLS_H_
2#define _ASM_GENERIC_BITOPS_FLS_H_ 3#define _ASM_GENERIC_BITOPS_FLS_H_
3 4
diff --git a/tools/include/asm-generic/bitops/fls64.h b/tools/include/asm-generic/bitops/fls64.h
index b097cf8444e3..866f2b2304ff 100644
--- a/tools/include/asm-generic/bitops/fls64.h
+++ b/tools/include/asm-generic/bitops/fls64.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _ASM_GENERIC_BITOPS_FLS64_H_ 2#ifndef _ASM_GENERIC_BITOPS_FLS64_H_
2#define _ASM_GENERIC_BITOPS_FLS64_H_ 3#define _ASM_GENERIC_BITOPS_FLS64_H_
3 4
diff --git a/tools/include/asm-generic/bitops/hweight.h b/tools/include/asm-generic/bitops/hweight.h
index 290120c01a8e..3e681982bcd1 100644
--- a/tools/include/asm-generic/bitops/hweight.h
+++ b/tools/include/asm-generic/bitops/hweight.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS_HWEIGHT_H_ 2#ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS_HWEIGHT_H_
2#define _TOOLS_LINUX_ASM_GENERIC_BITOPS_HWEIGHT_H_ 3#define _TOOLS_LINUX_ASM_GENERIC_BITOPS_HWEIGHT_H_
3 4
diff --git a/tools/include/asm-generic/bitsperlong.h b/tools/include/asm-generic/bitsperlong.h
index 45eca517efb3..8f2283052333 100644
--- a/tools/include/asm-generic/bitsperlong.h
+++ b/tools/include/asm-generic/bitsperlong.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __ASM_GENERIC_BITS_PER_LONG 2#ifndef __ASM_GENERIC_BITS_PER_LONG
2#define __ASM_GENERIC_BITS_PER_LONG 3#define __ASM_GENERIC_BITS_PER_LONG
3 4
diff --git a/tools/include/asm/alternative-asm.h b/tools/include/asm/alternative-asm.h
index 2a4d1bfa2988..b54bd860dff6 100644
--- a/tools/include/asm/alternative-asm.h
+++ b/tools/include/asm/alternative-asm.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_ASM_ALTERNATIVE_ASM_H 2#ifndef _TOOLS_ASM_ALTERNATIVE_ASM_H
2#define _TOOLS_ASM_ALTERNATIVE_ASM_H 3#define _TOOLS_ASM_ALTERNATIVE_ASM_H
3 4
diff --git a/tools/include/asm/atomic.h b/tools/include/asm/atomic.h
index 70794f538a86..8c9bfffd4191 100644
--- a/tools/include/asm/atomic.h
+++ b/tools/include/asm/atomic.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __TOOLS_LINUX_ASM_ATOMIC_H 2#ifndef __TOOLS_LINUX_ASM_ATOMIC_H
2#define __TOOLS_LINUX_ASM_ATOMIC_H 3#define __TOOLS_LINUX_ASM_ATOMIC_H
3 4
diff --git a/tools/include/asm/barrier.h b/tools/include/asm/barrier.h
index ac66ac594685..391d942536e5 100644
--- a/tools/include/asm/barrier.h
+++ b/tools/include/asm/barrier.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#if defined(__i386__) || defined(__x86_64__) 2#if defined(__i386__) || defined(__x86_64__)
2#include "../../arch/x86/include/asm/barrier.h" 3#include "../../arch/x86/include/asm/barrier.h"
3#elif defined(__arm__) 4#elif defined(__arm__)
diff --git a/tools/include/asm/bug.h b/tools/include/asm/bug.h
index 4790f047a89c..bbd75ac8b202 100644
--- a/tools/include/asm/bug.h
+++ b/tools/include/asm/bug.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_ASM_BUG_H 2#ifndef _TOOLS_ASM_BUG_H
2#define _TOOLS_ASM_BUG_H 3#define _TOOLS_ASM_BUG_H
3 4
diff --git a/tools/include/asm/export.h b/tools/include/asm/export.h
new file mode 100644
index 000000000000..2cb1a0d83035
--- /dev/null
+++ b/tools/include/asm/export.h
@@ -0,0 +1,7 @@
1#ifndef _TOOLS_ASM_EXPORT_H
2#define _TOOLS_ASM_EXPORT_H
3
4#define EXPORT_SYMBOL(x)
5#define EXPORT_SYMBOL_GPL(x)
6
7#endif /* _TOOLS_ASM_EXPORT_H */
diff --git a/tools/include/linux/atomic.h b/tools/include/linux/atomic.h
index 9f21fc2b092b..00a6c4ca562b 100644
--- a/tools/include/linux/atomic.h
+++ b/tools/include/linux/atomic.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __TOOLS_LINUX_ATOMIC_H 2#ifndef __TOOLS_LINUX_ATOMIC_H
2#define __TOOLS_LINUX_ATOMIC_H 3#define __TOOLS_LINUX_ATOMIC_H
3 4
diff --git a/tools/include/linux/bitmap.h b/tools/include/linux/bitmap.h
index e8b9f518e36b..ca160270fdfa 100644
--- a/tools/include/linux/bitmap.h
+++ b/tools/include/linux/bitmap.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_BITOPS_H 2#ifndef _PERF_BITOPS_H
2#define _PERF_BITOPS_H 3#define _PERF_BITOPS_H
3 4
diff --git a/tools/include/linux/bitops.h b/tools/include/linux/bitops.h
index 969db1981868..acc704bd3998 100644
--- a/tools/include/linux/bitops.h
+++ b/tools/include/linux/bitops.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LINUX_BITOPS_H_ 2#ifndef _TOOLS_LINUX_BITOPS_H_
2#define _TOOLS_LINUX_BITOPS_H_ 3#define _TOOLS_LINUX_BITOPS_H_
3 4
diff --git a/tools/include/linux/bug.h b/tools/include/linux/bug.h
index 8e4a4f49135d..85f80258a15f 100644
--- a/tools/include/linux/bug.h
+++ b/tools/include/linux/bug.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_PERF_LINUX_BUG_H 2#ifndef _TOOLS_PERF_LINUX_BUG_H
2#define _TOOLS_PERF_LINUX_BUG_H 3#define _TOOLS_PERF_LINUX_BUG_H
3 4
diff --git a/tools/include/linux/compiler-gcc.h b/tools/include/linux/compiler-gcc.h
index 3723b9f8f964..a3a4427441bf 100644
--- a/tools/include/linux/compiler-gcc.h
+++ b/tools/include/linux/compiler-gcc.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LINUX_COMPILER_H_ 2#ifndef _TOOLS_LINUX_COMPILER_H_
2#error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead." 3#error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
3#endif 4#endif
diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h
index d7a5604c38d7..07fd03c74a77 100644
--- a/tools/include/linux/compiler.h
+++ b/tools/include/linux/compiler.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LINUX_COMPILER_H_ 2#ifndef _TOOLS_LINUX_COMPILER_H_
2#define _TOOLS_LINUX_COMPILER_H_ 3#define _TOOLS_LINUX_COMPILER_H_
3 4
diff --git a/tools/include/linux/debug_locks.h b/tools/include/linux/debug_locks.h
index 61cc7f501168..72d595ce764a 100644
--- a/tools/include/linux/debug_locks.h
+++ b/tools/include/linux/debug_locks.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LIBLOCKDEP_DEBUG_LOCKS_H_ 2#ifndef _LIBLOCKDEP_DEBUG_LOCKS_H_
2#define _LIBLOCKDEP_DEBUG_LOCKS_H_ 3#define _LIBLOCKDEP_DEBUG_LOCKS_H_
3 4
diff --git a/tools/include/linux/err.h b/tools/include/linux/err.h
index abf0478a8fb2..7a8b61ad44cb 100644
--- a/tools/include/linux/err.h
+++ b/tools/include/linux/err.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __TOOLS_LINUX_ERR_H 2#ifndef __TOOLS_LINUX_ERR_H
2#define __TOOLS_LINUX_ERR_H 3#define __TOOLS_LINUX_ERR_H
3 4
diff --git a/tools/include/linux/filter.h b/tools/include/linux/filter.h
index 4ce25d43e8e3..c5e512da8d8a 100644
--- a/tools/include/linux/filter.h
+++ b/tools/include/linux/filter.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * Linux Socket Filter Data Structures 3 * Linux Socket Filter Data Structures
3 */ 4 */
diff --git a/tools/include/linux/hardirq.h b/tools/include/linux/hardirq.h
index c8f3f8f58729..b25580b6a9be 100644
--- a/tools/include/linux/hardirq.h
+++ b/tools/include/linux/hardirq.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LIBLOCKDEP_LINUX_HARDIRQ_H_ 2#ifndef _LIBLOCKDEP_LINUX_HARDIRQ_H_
2#define _LIBLOCKDEP_LINUX_HARDIRQ_H_ 3#define _LIBLOCKDEP_LINUX_HARDIRQ_H_
3 4
diff --git a/tools/include/linux/hashtable.h b/tools/include/linux/hashtable.h
index 251eabf2a05e..434dd5ac6d71 100644
--- a/tools/include/linux/hashtable.h
+++ b/tools/include/linux/hashtable.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * Statically sized hash table implementation 3 * Statically sized hash table implementation
3 * (C) 2012 Sasha Levin <levinsasha928@gmail.com> 4 * (C) 2012 Sasha Levin <levinsasha928@gmail.com>
diff --git a/tools/include/linux/irqflags.h b/tools/include/linux/irqflags.h
index df77669cfe1c..e734da3e5b33 100644
--- a/tools/include/linux/irqflags.h
+++ b/tools/include/linux/irqflags.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LIBLOCKDEP_LINUX_TRACE_IRQFLAGS_H_ 2#ifndef _LIBLOCKDEP_LINUX_TRACE_IRQFLAGS_H_
2#define _LIBLOCKDEP_LINUX_TRACE_IRQFLAGS_H_ 3#define _LIBLOCKDEP_LINUX_TRACE_IRQFLAGS_H_
3 4
diff --git a/tools/include/linux/kallsyms.h b/tools/include/linux/kallsyms.h
index 582cc1e5f3a4..89ca6fe257cc 100644
--- a/tools/include/linux/kallsyms.h
+++ b/tools/include/linux/kallsyms.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LIBLOCKDEP_LINUX_KALLSYMS_H_ 2#ifndef _LIBLOCKDEP_LINUX_KALLSYMS_H_
2#define _LIBLOCKDEP_LINUX_KALLSYMS_H_ 3#define _LIBLOCKDEP_LINUX_KALLSYMS_H_
3 4
diff --git a/tools/include/linux/kern_levels.h b/tools/include/linux/kern_levels.h
index 3b9bade28698..778ecb984480 100644
--- a/tools/include/linux/kern_levels.h
+++ b/tools/include/linux/kern_levels.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __KERN_LEVELS_H__ 2#ifndef __KERN_LEVELS_H__
2#define __KERN_LEVELS_H__ 3#define __KERN_LEVELS_H__
3 4
diff --git a/tools/include/linux/kernel.h b/tools/include/linux/kernel.h
index 77d2e94ca5df..0ad884452c5c 100644
--- a/tools/include/linux/kernel.h
+++ b/tools/include/linux/kernel.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __TOOLS_LINUX_KERNEL_H 2#ifndef __TOOLS_LINUX_KERNEL_H
2#define __TOOLS_LINUX_KERNEL_H 3#define __TOOLS_LINUX_KERNEL_H
3 4
diff --git a/tools/include/linux/kmemcheck.h b/tools/include/linux/kmemcheck.h
index 94d598bc6abe..2bccd2c7b897 100644
--- a/tools/include/linux/kmemcheck.h
+++ b/tools/include/linux/kmemcheck.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LIBLOCKDEP_LINUX_KMEMCHECK_H_ 2#ifndef _LIBLOCKDEP_LINUX_KMEMCHECK_H_
2#define _LIBLOCKDEP_LINUX_KMEMCHECK_H_ 3#define _LIBLOCKDEP_LINUX_KMEMCHECK_H_
3 4
diff --git a/tools/include/linux/list.h b/tools/include/linux/list.h
index 1da423820ad4..b2fc48d5478c 100644
--- a/tools/include/linux/list.h
+++ b/tools/include/linux/list.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __TOOLS_LINUX_LIST_H 2#ifndef __TOOLS_LINUX_LIST_H
2#define __TOOLS_LINUX_LIST_H 3#define __TOOLS_LINUX_LIST_H
3 4
diff --git a/tools/include/linux/lockdep.h b/tools/include/linux/lockdep.h
index 8da3e8effafa..940c1b075659 100644
--- a/tools/include/linux/lockdep.h
+++ b/tools/include/linux/lockdep.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LIBLOCKDEP_LOCKDEP_H_ 2#ifndef _LIBLOCKDEP_LOCKDEP_H_
2#define _LIBLOCKDEP_LOCKDEP_H_ 3#define _LIBLOCKDEP_LOCKDEP_H_
3 4
diff --git a/tools/include/linux/module.h b/tools/include/linux/module.h
index 07055db296f3..2c999abf68e7 100644
--- a/tools/include/linux/module.h
+++ b/tools/include/linux/module.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LIBLOCKDEP_LINUX_MODULE_H_ 2#ifndef _LIBLOCKDEP_LINUX_MODULE_H_
2#define _LIBLOCKDEP_LINUX_MODULE_H_ 3#define _LIBLOCKDEP_LINUX_MODULE_H_
3 4
diff --git a/tools/include/linux/poison.h b/tools/include/linux/poison.h
index 51334edec506..4bf6777a8a03 100644
--- a/tools/include/linux/poison.h
+++ b/tools/include/linux/poison.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LINUX_POISON_H 2#ifndef _LINUX_POISON_H
2#define _LINUX_POISON_H 3#define _LINUX_POISON_H
3 4
diff --git a/tools/include/linux/rcu.h b/tools/include/linux/rcu.h
index 5080649dad04..7d02527e5bce 100644
--- a/tools/include/linux/rcu.h
+++ b/tools/include/linux/rcu.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LIBLOCKDEP_RCU_H_ 2#ifndef _LIBLOCKDEP_RCU_H_
2#define _LIBLOCKDEP_RCU_H_ 3#define _LIBLOCKDEP_RCU_H_
3 4
diff --git a/tools/include/linux/refcount.h b/tools/include/linux/refcount.h
index a0177c1f55b1..36cb29bc57c2 100644
--- a/tools/include/linux/refcount.h
+++ b/tools/include/linux/refcount.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LINUX_REFCOUNT_H 2#ifndef _TOOLS_LINUX_REFCOUNT_H
2#define _TOOLS_LINUX_REFCOUNT_H 3#define _TOOLS_LINUX_REFCOUNT_H
3 4
diff --git a/tools/include/linux/spinlock.h b/tools/include/linux/spinlock.h
index 417cda4f793f..4ed569fcb139 100644
--- a/tools/include/linux/spinlock.h
+++ b/tools/include/linux/spinlock.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __LINUX_SPINLOCK_H_ 2#ifndef __LINUX_SPINLOCK_H_
2#define __LINUX_SPINLOCK_H_ 3#define __LINUX_SPINLOCK_H_
3 4
diff --git a/tools/include/linux/stacktrace.h b/tools/include/linux/stacktrace.h
index 39aecc6b19d1..ae343ac35bfa 100644
--- a/tools/include/linux/stacktrace.h
+++ b/tools/include/linux/stacktrace.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LIBLOCKDEP_LINUX_STACKTRACE_H_ 2#ifndef _LIBLOCKDEP_LINUX_STACKTRACE_H_
2#define _LIBLOCKDEP_LINUX_STACKTRACE_H_ 3#define _LIBLOCKDEP_LINUX_STACKTRACE_H_
3 4
diff --git a/tools/include/linux/string.h b/tools/include/linux/string.h
index a30fad536f52..6c3e2cc274c5 100644
--- a/tools/include/linux/string.h
+++ b/tools/include/linux/string.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LINUX_STRING_H_ 2#ifndef _TOOLS_LINUX_STRING_H_
2#define _TOOLS_LINUX_STRING_H_ 3#define _TOOLS_LINUX_STRING_H_
3 4
diff --git a/tools/include/linux/stringify.h b/tools/include/linux/stringify.h
index 841cec8ed525..60e2c187da2c 100644
--- a/tools/include/linux/stringify.h
+++ b/tools/include/linux/stringify.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __LINUX_STRINGIFY_H 2#ifndef __LINUX_STRINGIFY_H
2#define __LINUX_STRINGIFY_H 3#define __LINUX_STRINGIFY_H
3 4
diff --git a/tools/include/linux/time64.h b/tools/include/linux/time64.h
index df9265483d65..55fa644b95fd 100644
--- a/tools/include/linux/time64.h
+++ b/tools/include/linux/time64.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LINUX_TIME64_H 2#ifndef _TOOLS_LINUX_TIME64_H
2#define _TOOLS_LINUX_TIME64_H 3#define _TOOLS_LINUX_TIME64_H
3 4
diff --git a/tools/include/linux/types.h b/tools/include/linux/types.h
index 77a28a26a670..154eb4e3ca7c 100644
--- a/tools/include/linux/types.h
+++ b/tools/include/linux/types.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LINUX_TYPES_H_ 2#ifndef _TOOLS_LINUX_TYPES_H_
2#define _TOOLS_LINUX_TYPES_H_ 3#define _TOOLS_LINUX_TYPES_H_
3 4
diff --git a/tools/include/linux/unaligned/packed_struct.h b/tools/include/linux/unaligned/packed_struct.h
index c0d817de4df2..dbd93c7df2e1 100644
--- a/tools/include/linux/unaligned/packed_struct.h
+++ b/tools/include/linux/unaligned/packed_struct.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LINUX_UNALIGNED_PACKED_STRUCT_H 2#ifndef _LINUX_UNALIGNED_PACKED_STRUCT_H
2#define _LINUX_UNALIGNED_PACKED_STRUCT_H 3#define _LINUX_UNALIGNED_PACKED_STRUCT_H
3 4
diff --git a/tools/include/tools/be_byteshift.h b/tools/include/tools/be_byteshift.h
index 84c17d836578..f7d1d1698938 100644
--- a/tools/include/tools/be_byteshift.h
+++ b/tools/include/tools/be_byteshift.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_BE_BYTESHIFT_H 2#ifndef _TOOLS_BE_BYTESHIFT_H
2#define _TOOLS_BE_BYTESHIFT_H 3#define _TOOLS_BE_BYTESHIFT_H
3 4
diff --git a/tools/include/tools/endian.h b/tools/include/tools/endian.h
index 8001194008da..c67888fd427e 100644
--- a/tools/include/tools/endian.h
+++ b/tools/include/tools/endian.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_ENDIAN_H 2#ifndef _TOOLS_ENDIAN_H
2#define _TOOLS_ENDIAN_H 3#define _TOOLS_ENDIAN_H
3 4
diff --git a/tools/include/tools/le_byteshift.h b/tools/include/tools/le_byteshift.h
index 8fe9f2488ec7..dc8565f39717 100644
--- a/tools/include/tools/le_byteshift.h
+++ b/tools/include/tools/le_byteshift.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TOOLS_LE_BYTESHIFT_H 2#ifndef _TOOLS_LE_BYTESHIFT_H
2#define _TOOLS_LE_BYTESHIFT_H 3#define _TOOLS_LE_BYTESHIFT_H
3 4
diff --git a/tools/include/uapi/asm-generic/ioctls.h b/tools/include/uapi/asm-generic/ioctls.h
index 14baf9f23a14..040651735662 100644
--- a/tools/include/uapi/asm-generic/ioctls.h
+++ b/tools/include/uapi/asm-generic/ioctls.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef __ASM_GENERIC_IOCTLS_H 2#ifndef __ASM_GENERIC_IOCTLS_H
2#define __ASM_GENERIC_IOCTLS_H 3#define __ASM_GENERIC_IOCTLS_H
3 4
diff --git a/tools/include/uapi/asm-generic/mman-common.h b/tools/include/uapi/asm-generic/mman-common.h
index 203268f9231e..6d319c46fd90 100644
--- a/tools/include/uapi/asm-generic/mman-common.h
+++ b/tools/include/uapi/asm-generic/mman-common.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef __ASM_GENERIC_MMAN_COMMON_H 2#ifndef __ASM_GENERIC_MMAN_COMMON_H
2#define __ASM_GENERIC_MMAN_COMMON_H 3#define __ASM_GENERIC_MMAN_COMMON_H
3 4
diff --git a/tools/include/uapi/asm-generic/mman.h b/tools/include/uapi/asm-generic/mman.h
index 10fa7857777f..2dffcbf705b3 100644
--- a/tools/include/uapi/asm-generic/mman.h
+++ b/tools/include/uapi/asm-generic/mman.h
@@ -1,7 +1,8 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef __ASM_GENERIC_MMAN_H 2#ifndef __ASM_GENERIC_MMAN_H
2#define __ASM_GENERIC_MMAN_H 3#define __ASM_GENERIC_MMAN_H
3 4
4#include <uapi/asm-generic/mman-common.h> 5#include <asm-generic/mman-common.h>
5 6
6#define MAP_GROWSDOWN 0x0100 /* stack-like segment */ 7#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
7#define MAP_DENYWRITE 0x0800 /* ETXTBSY */ 8#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index f90860d1f897..30f2ce76b517 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com 2/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
2 * 3 *
3 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
@@ -575,7 +576,7 @@ union bpf_attr {
575 * @map: pointer to sockmap 576 * @map: pointer to sockmap
576 * @key: key to lookup sock in map 577 * @key: key to lookup sock in map
577 * @flags: reserved for future use 578 * @flags: reserved for future use
578 * Return: SK_REDIRECT 579 * Return: SK_PASS
579 * 580 *
580 * int bpf_sock_map_update(skops, map, key, flags) 581 * int bpf_sock_map_update(skops, map, key, flags)
581 * @skops: pointer to bpf_sock_ops 582 * @skops: pointer to bpf_sock_ops
@@ -786,9 +787,8 @@ struct xdp_md {
786}; 787};
787 788
788enum sk_action { 789enum sk_action {
789 SK_ABORTED = 0, 790 SK_DROP = 0,
790 SK_DROP, 791 SK_PASS,
791 SK_REDIRECT,
792}; 792};
793 793
794#define BPF_TAG_SIZE 8 794#define BPF_TAG_SIZE 8
diff --git a/tools/include/uapi/linux/bpf_common.h b/tools/include/uapi/linux/bpf_common.h
index a5c220e0828f..18be90725ab0 100644
--- a/tools/include/uapi/linux/bpf_common.h
+++ b/tools/include/uapi/linux/bpf_common.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _UAPI__LINUX_BPF_COMMON_H__ 2#ifndef _UAPI__LINUX_BPF_COMMON_H__
2#define _UAPI__LINUX_BPF_COMMON_H__ 3#define _UAPI__LINUX_BPF_COMMON_H__
3 4
diff --git a/tools/include/uapi/linux/fcntl.h b/tools/include/uapi/linux/fcntl.h
index ec69d55bcec7..6448cdd9a350 100644
--- a/tools/include/uapi/linux/fcntl.h
+++ b/tools/include/uapi/linux/fcntl.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _UAPI_LINUX_FCNTL_H 2#ifndef _UAPI_LINUX_FCNTL_H
2#define _UAPI_LINUX_FCNTL_H 3#define _UAPI_LINUX_FCNTL_H
3 4
diff --git a/tools/include/uapi/linux/hw_breakpoint.h b/tools/include/uapi/linux/hw_breakpoint.h
index 2b65efd19a46..965e4d8606d8 100644
--- a/tools/include/uapi/linux/hw_breakpoint.h
+++ b/tools/include/uapi/linux/hw_breakpoint.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _UAPI_LINUX_HW_BREAKPOINT_H 2#ifndef _UAPI_LINUX_HW_BREAKPOINT_H
2#define _UAPI_LINUX_HW_BREAKPOINT_H 3#define _UAPI_LINUX_HW_BREAKPOINT_H
3 4
diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h
index 838887587411..7e99999d6236 100644
--- a/tools/include/uapi/linux/kvm.h
+++ b/tools/include/uapi/linux/kvm.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef __LINUX_KVM_H 2#ifndef __LINUX_KVM_H
2#define __LINUX_KVM_H 3#define __LINUX_KVM_H
3 4
diff --git a/tools/include/uapi/linux/mman.h b/tools/include/uapi/linux/mman.h
index a937480d7cd3..bfd5938fede6 100644
--- a/tools/include/uapi/linux/mman.h
+++ b/tools/include/uapi/linux/mman.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _UAPI_LINUX_MMAN_H 2#ifndef _UAPI_LINUX_MMAN_H
2#define _UAPI_LINUX_MMAN_H 3#define _UAPI_LINUX_MMAN_H
3 4
diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h
index 140ae638cfd6..362493a2f950 100644
--- a/tools/include/uapi/linux/perf_event.h
+++ b/tools/include/uapi/linux/perf_event.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1/* 2/*
2 * Performance events: 3 * Performance events:
3 * 4 *
diff --git a/tools/include/uapi/linux/sched.h b/tools/include/uapi/linux/sched.h
index e2a6c7b3510b..30a9e51bbb1e 100644
--- a/tools/include/uapi/linux/sched.h
+++ b/tools/include/uapi/linux/sched.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _UAPI_LINUX_SCHED_H 2#ifndef _UAPI_LINUX_SCHED_H
2#define _UAPI_LINUX_SCHED_H 3#define _UAPI_LINUX_SCHED_H
3 4
diff --git a/tools/include/uapi/linux/stat.h b/tools/include/uapi/linux/stat.h
index 17b10304c393..7b35e98d3c58 100644
--- a/tools/include/uapi/linux/stat.h
+++ b/tools/include/uapi/linux/stat.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _UAPI_LINUX_STAT_H 2#ifndef _UAPI_LINUX_STAT_H
2#define _UAPI_LINUX_STAT_H 3#define _UAPI_LINUX_STAT_H
3 4
diff --git a/tools/include/uapi/linux/vhost.h b/tools/include/uapi/linux/vhost.h
index 60180c0b5dc6..c51f8e5cc608 100644
--- a/tools/include/uapi/linux/vhost.h
+++ b/tools/include/uapi/linux/vhost.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _LINUX_VHOST_H 2#ifndef _LINUX_VHOST_H
2#define _LINUX_VHOST_H 3#define _LINUX_VHOST_H
3/* Userspace interface for in-kernel virtio accelerators. */ 4/* Userspace interface for in-kernel virtio accelerators. */
diff --git a/tools/include/uapi/sound/asound.h b/tools/include/uapi/sound/asound.h
index 87bf30b182df..c227ccba60ae 100644
--- a/tools/include/uapi/sound/asound.h
+++ b/tools/include/uapi/sound/asound.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
1/* 2/*
2 * Advanced Linux Sound Architecture - ALSA - Driver 3 * Advanced Linux Sound Architecture - ALSA - Driver
3 * Copyright (c) 1994-2003 by Jaroslav Kysela <perex@perex.cz>, 4 * Copyright (c) 1994-2003 by Jaroslav Kysela <perex@perex.cz>,
diff --git a/tools/kvm/kvm_stat/Makefile b/tools/kvm/kvm_stat/Makefile
index 5b1cba57e3b3..c3e36c60d477 100644
--- a/tools/kvm/kvm_stat/Makefile
+++ b/tools/kvm/kvm_stat/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1include ../../scripts/Makefile.include 2include ../../scripts/Makefile.include
2include ../../scripts/utilities.mak 3include ../../scripts/utilities.mak
3BINDIR=usr/bin 4BINDIR=usr/bin
diff --git a/tools/laptop/dslm/Makefile b/tools/laptop/dslm/Makefile
index ff613b31730b..90f512c4e2bb 100644
--- a/tools/laptop/dslm/Makefile
+++ b/tools/laptop/dslm/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1CC := $(CROSS_COMPILE)gcc 2CC := $(CROSS_COMPILE)gcc
2CFLAGS := -I../../usr/include 3CFLAGS := -I../../usr/include
3 4
diff --git a/tools/laptop/freefall/Makefile b/tools/laptop/freefall/Makefile
index 48c6c9328419..5f758c489a20 100644
--- a/tools/laptop/freefall/Makefile
+++ b/tools/laptop/freefall/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1PREFIX ?= /usr 2PREFIX ?= /usr
2SBINDIR ?= sbin 3SBINDIR ?= sbin
3INSTALL ?= install 4INSTALL ?= install
diff --git a/tools/leds/Makefile b/tools/leds/Makefile
index 078b666fd78b..c379af003807 100644
--- a/tools/leds/Makefile
+++ b/tools/leds/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# Makefile for LEDs tools 2# Makefile for LEDs tools
2 3
3CC = $(CROSS_COMPILE)gcc 4CC = $(CROSS_COMPILE)gcc
diff --git a/tools/leds/led_hw_brightness_mon.c b/tools/leds/led_hw_brightness_mon.c
index 64642ccfe442..eb65ae988839 100644
--- a/tools/leds/led_hw_brightness_mon.c
+++ b/tools/leds/led_hw_brightness_mon.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * led_hw_brightness_mon.c 3 * led_hw_brightness_mon.c
3 * 4 *
diff --git a/tools/leds/uledmon.c b/tools/leds/uledmon.c
index 25cbc7acf50a..c15a39c1f271 100644
--- a/tools/leds/uledmon.c
+++ b/tools/leds/uledmon.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * uledmon.c 3 * uledmon.c
3 * 4 *
diff --git a/tools/lib/api/Makefile b/tools/lib/api/Makefile
index 1e83e3c07448..a13e9c7f1fc5 100644
--- a/tools/lib/api/Makefile
+++ b/tools/lib/api/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1include ../../scripts/Makefile.include 2include ../../scripts/Makefile.include
2include ../../scripts/utilities.mak # QUIET_CLEAN 3include ../../scripts/utilities.mak # QUIET_CLEAN
3 4
diff --git a/tools/lib/api/cpu.c b/tools/lib/api/cpu.c
index 8c6489356e3a..4af6d4b7aa07 100644
--- a/tools/lib/api/cpu.c
+++ b/tools/lib/api/cpu.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2 3
3#include "cpu.h" 4#include "cpu.h"
diff --git a/tools/lib/api/cpu.h b/tools/lib/api/cpu.h
index 81e9d3955961..90a102fb20de 100644
--- a/tools/lib/api/cpu.h
+++ b/tools/lib/api/cpu.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __API_CPU__ 2#ifndef __API_CPU__
2#define __API_CPU__ 3#define __API_CPU__
3 4
diff --git a/tools/lib/api/debug-internal.h b/tools/lib/api/debug-internal.h
index 188f7880eafe..80c783497d25 100644
--- a/tools/lib/api/debug-internal.h
+++ b/tools/lib/api/debug-internal.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __API_DEBUG_INTERNAL_H__ 2#ifndef __API_DEBUG_INTERNAL_H__
2#define __API_DEBUG_INTERNAL_H__ 3#define __API_DEBUG_INTERNAL_H__
3 4
diff --git a/tools/lib/api/debug.c b/tools/lib/api/debug.c
index 5fa5cf500a1f..69b1ba3d1ee3 100644
--- a/tools/lib/api/debug.c
+++ b/tools/lib/api/debug.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <stdarg.h> 3#include <stdarg.h>
3#include "debug.h" 4#include "debug.h"
diff --git a/tools/lib/api/debug.h b/tools/lib/api/debug.h
index a0872f68fc56..3684dd6e0c02 100644
--- a/tools/lib/api/debug.h
+++ b/tools/lib/api/debug.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __API_DEBUG_H__ 2#ifndef __API_DEBUG_H__
2#define __API_DEBUG_H__ 3#define __API_DEBUG_H__
3 4
diff --git a/tools/lib/api/fd/array.h b/tools/lib/api/fd/array.h
index 71287dddc05f..b39557d1a88f 100644
--- a/tools/lib/api/fd/array.h
+++ b/tools/lib/api/fd/array.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __API_FD_ARRAY__ 2#ifndef __API_FD_ARRAY__
2#define __API_FD_ARRAY__ 3#define __API_FD_ARRAY__
3 4
diff --git a/tools/lib/api/fs/fs.c b/tools/lib/api/fs/fs.c
index a7ecf8f469f4..b24afc0e6e81 100644
--- a/tools/lib/api/fs/fs.c
+++ b/tools/lib/api/fs/fs.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <ctype.h> 2#include <ctype.h>
2#include <errno.h> 3#include <errno.h>
3#include <limits.h> 4#include <limits.h>
diff --git a/tools/lib/api/fs/fs.h b/tools/lib/api/fs/fs.h
index 45605348461e..dda49deefb52 100644
--- a/tools/lib/api/fs/fs.h
+++ b/tools/lib/api/fs/fs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __API_FS__ 2#ifndef __API_FS__
2#define __API_FS__ 3#define __API_FS__
3 4
diff --git a/tools/lib/api/fs/tracing_path.c b/tools/lib/api/fs/tracing_path.c
index 3e606b9c443e..7b7fd0b18551 100644
--- a/tools/lib/api/fs/tracing_path.c
+++ b/tools/lib/api/fs/tracing_path.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#ifndef _GNU_SOURCE 2#ifndef _GNU_SOURCE
2# define _GNU_SOURCE 3# define _GNU_SOURCE
3#endif 4#endif
diff --git a/tools/lib/api/fs/tracing_path.h b/tools/lib/api/fs/tracing_path.h
index 3f233ac70b6f..0066f06cc381 100644
--- a/tools/lib/api/fs/tracing_path.h
+++ b/tools/lib/api/fs/tracing_path.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __API_FS_TRACING_PATH_H 2#ifndef __API_FS_TRACING_PATH_H
2#define __API_FS_TRACING_PATH_H 3#define __API_FS_TRACING_PATH_H
3 4
diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index d2441db34740..4555304dc18e 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# Most of this file is copied from tools/lib/traceevent/Makefile 2# Most of this file is copied from tools/lib/traceevent/Makefile
2 3
3BPF_VERSION = 0 4BPF_VERSION = 0
diff --git a/tools/lib/hweight.c b/tools/lib/hweight.c
index 0b859b884339..a16ebf515417 100644
--- a/tools/lib/hweight.c
+++ b/tools/lib/hweight.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/bitops.h> 2#include <linux/bitops.h>
2#include <asm/types.h> 3#include <asm/types.h>
3 4
diff --git a/tools/lib/lockdep/Makefile b/tools/lib/lockdep/Makefile
index ed9ace59d112..9b0ca3ad1ef3 100644
--- a/tools/lib/lockdep/Makefile
+++ b/tools/lib/lockdep/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# file format version 2# file format version
2FILE_VERSION = 1 3FILE_VERSION = 1
3 4
diff --git a/tools/lib/lockdep/common.c b/tools/lib/lockdep/common.c
index d1c89cc06f5f..5c3b58cce8a9 100644
--- a/tools/lib/lockdep/common.c
+++ b/tools/lib/lockdep/common.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stddef.h> 2#include <stddef.h>
2#include <stdbool.h> 3#include <stdbool.h>
3#include <linux/compiler.h> 4#include <linux/compiler.h>
diff --git a/tools/lib/lockdep/include/liblockdep/common.h b/tools/lib/lockdep/include/liblockdep/common.h
index 6e66277ec437..8862da80995a 100644
--- a/tools/lib/lockdep/include/liblockdep/common.h
+++ b/tools/lib/lockdep/include/liblockdep/common.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LIBLOCKDEP_COMMON_H 2#ifndef _LIBLOCKDEP_COMMON_H
2#define _LIBLOCKDEP_COMMON_H 3#define _LIBLOCKDEP_COMMON_H
3 4
diff --git a/tools/lib/lockdep/include/liblockdep/mutex.h b/tools/lib/lockdep/include/liblockdep/mutex.h
index ee53a42818ca..a80ac39f966e 100644
--- a/tools/lib/lockdep/include/liblockdep/mutex.h
+++ b/tools/lib/lockdep/include/liblockdep/mutex.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LIBLOCKDEP_MUTEX_H 2#ifndef _LIBLOCKDEP_MUTEX_H
2#define _LIBLOCKDEP_MUTEX_H 3#define _LIBLOCKDEP_MUTEX_H
3 4
diff --git a/tools/lib/lockdep/include/liblockdep/rwlock.h b/tools/lib/lockdep/include/liblockdep/rwlock.h
index 4ec03f861551..a96c3bf0fef1 100644
--- a/tools/lib/lockdep/include/liblockdep/rwlock.h
+++ b/tools/lib/lockdep/include/liblockdep/rwlock.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LIBLOCKDEP_RWLOCK_H 2#ifndef _LIBLOCKDEP_RWLOCK_H
2#define _LIBLOCKDEP_RWLOCK_H 3#define _LIBLOCKDEP_RWLOCK_H
3 4
diff --git a/tools/lib/lockdep/lockdep.c b/tools/lib/lockdep/lockdep.c
index ced6d7443cea..6002fcf2f9bc 100644
--- a/tools/lib/lockdep/lockdep.c
+++ b/tools/lib/lockdep/lockdep.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/lockdep.h> 2#include <linux/lockdep.h>
2#include <stdlib.h> 3#include <stdlib.h>
3 4
diff --git a/tools/lib/lockdep/preload.c b/tools/lib/lockdep/preload.c
index 6a2d3c5d4e92..76245d16196d 100644
--- a/tools/lib/lockdep/preload.c
+++ b/tools/lib/lockdep/preload.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#define _GNU_SOURCE 2#define _GNU_SOURCE
2#include <pthread.h> 3#include <pthread.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/lib/lockdep/run_tests.sh b/tools/lib/lockdep/run_tests.sh
index f9b94098fc98..2e570a188f16 100755
--- a/tools/lib/lockdep/run_tests.sh
+++ b/tools/lib/lockdep/run_tests.sh
@@ -1,4 +1,5 @@
1#! /bin/bash 1#! /bin/bash
2# SPDX-License-Identifier: GPL-2.0
2 3
3make &> /dev/null 4make &> /dev/null
4 5
diff --git a/tools/lib/lockdep/tests/AA.c b/tools/lib/lockdep/tests/AA.c
index 18211a5f354f..63c7ce97bda3 100644
--- a/tools/lib/lockdep/tests/AA.c
+++ b/tools/lib/lockdep/tests/AA.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <liblockdep/mutex.h> 2#include <liblockdep/mutex.h>
2 3
3int main(void) 4int main(void)
diff --git a/tools/lib/lockdep/tests/ABA.c b/tools/lib/lockdep/tests/ABA.c
index 0f782ff404ac..efa39b23f05d 100644
--- a/tools/lib/lockdep/tests/ABA.c
+++ b/tools/lib/lockdep/tests/ABA.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <liblockdep/mutex.h> 2#include <liblockdep/mutex.h>
2 3
3void main(void) 4void main(void)
diff --git a/tools/lib/lockdep/tests/ABBA.c b/tools/lib/lockdep/tests/ABBA.c
index 07f0e29d5485..1460afd33d71 100644
--- a/tools/lib/lockdep/tests/ABBA.c
+++ b/tools/lib/lockdep/tests/ABBA.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <liblockdep/mutex.h> 2#include <liblockdep/mutex.h>
2#include "common.h" 3#include "common.h"
3 4
diff --git a/tools/lib/lockdep/tests/ABBA_2threads.c b/tools/lib/lockdep/tests/ABBA_2threads.c
index cd807d736361..39325ef8a2ac 100644
--- a/tools/lib/lockdep/tests/ABBA_2threads.c
+++ b/tools/lib/lockdep/tests/ABBA_2threads.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <pthread.h> 3#include <pthread.h>
3 4
diff --git a/tools/lib/lockdep/tests/ABBCCA.c b/tools/lib/lockdep/tests/ABBCCA.c
index 843db09ac666..a54c1b2af118 100644
--- a/tools/lib/lockdep/tests/ABBCCA.c
+++ b/tools/lib/lockdep/tests/ABBCCA.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <liblockdep/mutex.h> 2#include <liblockdep/mutex.h>
2#include "common.h" 3#include "common.h"
3 4
diff --git a/tools/lib/lockdep/tests/ABBCCDDA.c b/tools/lib/lockdep/tests/ABBCCDDA.c
index 33620e268f85..aa5d194e8869 100644
--- a/tools/lib/lockdep/tests/ABBCCDDA.c
+++ b/tools/lib/lockdep/tests/ABBCCDDA.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <liblockdep/mutex.h> 2#include <liblockdep/mutex.h>
2#include "common.h" 3#include "common.h"
3 4
diff --git a/tools/lib/lockdep/tests/ABCABC.c b/tools/lib/lockdep/tests/ABCABC.c
index 3fee51e3a68a..b54a08e60416 100644
--- a/tools/lib/lockdep/tests/ABCABC.c
+++ b/tools/lib/lockdep/tests/ABCABC.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <liblockdep/mutex.h> 2#include <liblockdep/mutex.h>
2#include "common.h" 3#include "common.h"
3 4
diff --git a/tools/lib/lockdep/tests/ABCDBCDA.c b/tools/lib/lockdep/tests/ABCDBCDA.c
index 427ba562c75b..a56742250d86 100644
--- a/tools/lib/lockdep/tests/ABCDBCDA.c
+++ b/tools/lib/lockdep/tests/ABCDBCDA.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <liblockdep/mutex.h> 2#include <liblockdep/mutex.h>
2#include "common.h" 3#include "common.h"
3 4
diff --git a/tools/lib/lockdep/tests/ABCDBDDA.c b/tools/lib/lockdep/tests/ABCDBDDA.c
index 680c6cf3e919..238a3353f3c3 100644
--- a/tools/lib/lockdep/tests/ABCDBDDA.c
+++ b/tools/lib/lockdep/tests/ABCDBDDA.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <liblockdep/mutex.h> 2#include <liblockdep/mutex.h>
2#include "common.h" 3#include "common.h"
3 4
diff --git a/tools/lib/lockdep/tests/WW.c b/tools/lib/lockdep/tests/WW.c
index d44f77d71029..eee88df7fc41 100644
--- a/tools/lib/lockdep/tests/WW.c
+++ b/tools/lib/lockdep/tests/WW.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <liblockdep/rwlock.h> 2#include <liblockdep/rwlock.h>
2 3
3void main(void) 4void main(void)
diff --git a/tools/lib/lockdep/tests/common.h b/tools/lib/lockdep/tests/common.h
index d89e94d47d86..3026c29ccb5c 100644
--- a/tools/lib/lockdep/tests/common.h
+++ b/tools/lib/lockdep/tests/common.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LIBLOCKDEP_TEST_COMMON_H 2#ifndef _LIBLOCKDEP_TEST_COMMON_H
2#define _LIBLOCKDEP_TEST_COMMON_H 3#define _LIBLOCKDEP_TEST_COMMON_H
3 4
diff --git a/tools/lib/lockdep/tests/unlock_balance.c b/tools/lib/lockdep/tests/unlock_balance.c
index 0bc62de686f7..34cf32f689de 100644
--- a/tools/lib/lockdep/tests/unlock_balance.c
+++ b/tools/lib/lockdep/tests/unlock_balance.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <liblockdep/mutex.h> 2#include <liblockdep/mutex.h>
2 3
3void main(void) 4void main(void)
diff --git a/tools/lib/str_error_r.c b/tools/lib/str_error_r.c
index 503ae072244c..d6d65537b0d9 100644
--- a/tools/lib/str_error_r.c
+++ b/tools/lib/str_error_r.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#undef _GNU_SOURCE 2#undef _GNU_SOURCE
2#include <string.h> 3#include <string.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/lib/string.c b/tools/lib/string.c
index a4246f14ded1..93b3d4b6feac 100644
--- a/tools/lib/string.c
+++ b/tools/lib/string.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * linux/tools/lib/string.c 3 * linux/tools/lib/string.c
3 * 4 *
diff --git a/tools/lib/subcmd/Makefile b/tools/lib/subcmd/Makefile
index 7e9f03c97e4c..95563b8e1ad7 100644
--- a/tools/lib/subcmd/Makefile
+++ b/tools/lib/subcmd/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1include ../../scripts/Makefile.include 2include ../../scripts/Makefile.include
2include ../../scripts/utilities.mak # QUIET_CLEAN 3include ../../scripts/utilities.mak # QUIET_CLEAN
3 4
diff --git a/tools/lib/subcmd/exec-cmd.c b/tools/lib/subcmd/exec-cmd.c
index 1ae833af1a4a..33e94fb83986 100644
--- a/tools/lib/subcmd/exec-cmd.c
+++ b/tools/lib/subcmd/exec-cmd.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/compiler.h> 2#include <linux/compiler.h>
2#include <linux/string.h> 3#include <linux/string.h>
3#include <sys/types.h> 4#include <sys/types.h>
diff --git a/tools/lib/subcmd/exec-cmd.h b/tools/lib/subcmd/exec-cmd.h
index 5d08bda31d90..aba591b8d254 100644
--- a/tools/lib/subcmd/exec-cmd.h
+++ b/tools/lib/subcmd/exec-cmd.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __SUBCMD_EXEC_CMD_H 2#ifndef __SUBCMD_EXEC_CMD_H
2#define __SUBCMD_EXEC_CMD_H 3#define __SUBCMD_EXEC_CMD_H
3 4
diff --git a/tools/lib/subcmd/help.c b/tools/lib/subcmd/help.c
index 0310520f918e..2859f107abc8 100644
--- a/tools/lib/subcmd/help.c
+++ b/tools/lib/subcmd/help.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <stdlib.h> 3#include <stdlib.h>
3#include <string.h> 4#include <string.h>
diff --git a/tools/lib/subcmd/help.h b/tools/lib/subcmd/help.h
index 9bd4223dc722..355c066c8d49 100644
--- a/tools/lib/subcmd/help.h
+++ b/tools/lib/subcmd/help.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __SUBCMD_HELP_H 2#ifndef __SUBCMD_HELP_H
2#define __SUBCMD_HELP_H 3#define __SUBCMD_HELP_H
3 4
diff --git a/tools/lib/subcmd/pager.c b/tools/lib/subcmd/pager.c
index 6518bea926d6..5ba754d17952 100644
--- a/tools/lib/subcmd/pager.c
+++ b/tools/lib/subcmd/pager.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sys/select.h> 2#include <sys/select.h>
2#include <stdlib.h> 3#include <stdlib.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/lib/subcmd/pager.h b/tools/lib/subcmd/pager.h
index 623f5542d05d..f1a53cf29880 100644
--- a/tools/lib/subcmd/pager.h
+++ b/tools/lib/subcmd/pager.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __SUBCMD_PAGER_H 2#ifndef __SUBCMD_PAGER_H
2#define __SUBCMD_PAGER_H 3#define __SUBCMD_PAGER_H
3 4
diff --git a/tools/lib/subcmd/parse-options.c b/tools/lib/subcmd/parse-options.c
index 2bd6fd0c1d40..f6a1babcbac4 100644
--- a/tools/lib/subcmd/parse-options.c
+++ b/tools/lib/subcmd/parse-options.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/compiler.h> 2#include <linux/compiler.h>
2#include <linux/string.h> 3#include <linux/string.h>
3#include <linux/types.h> 4#include <linux/types.h>
diff --git a/tools/lib/subcmd/parse-options.h b/tools/lib/subcmd/parse-options.h
index f054ca1b899d..92fdbe1519f6 100644
--- a/tools/lib/subcmd/parse-options.h
+++ b/tools/lib/subcmd/parse-options.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __SUBCMD_PARSE_OPTIONS_H 2#ifndef __SUBCMD_PARSE_OPTIONS_H
2#define __SUBCMD_PARSE_OPTIONS_H 3#define __SUBCMD_PARSE_OPTIONS_H
3 4
diff --git a/tools/lib/subcmd/run-command.c b/tools/lib/subcmd/run-command.c
index 911f83942723..5cdac2162532 100644
--- a/tools/lib/subcmd/run-command.c
+++ b/tools/lib/subcmd/run-command.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <unistd.h> 2#include <unistd.h>
2#include <sys/types.h> 3#include <sys/types.h>
3#include <sys/stat.h> 4#include <sys/stat.h>
diff --git a/tools/lib/subcmd/run-command.h b/tools/lib/subcmd/run-command.h
index fe2befea1e73..17d969c6add3 100644
--- a/tools/lib/subcmd/run-command.h
+++ b/tools/lib/subcmd/run-command.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __SUBCMD_RUN_COMMAND_H 2#ifndef __SUBCMD_RUN_COMMAND_H
2#define __SUBCMD_RUN_COMMAND_H 3#define __SUBCMD_RUN_COMMAND_H
3 4
diff --git a/tools/lib/subcmd/sigchain.c b/tools/lib/subcmd/sigchain.c
index 3537c348a18e..f0fe3dbef7f7 100644
--- a/tools/lib/subcmd/sigchain.c
+++ b/tools/lib/subcmd/sigchain.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <signal.h> 2#include <signal.h>
2#include "subcmd-util.h" 3#include "subcmd-util.h"
3#include "sigchain.h" 4#include "sigchain.h"
diff --git a/tools/lib/subcmd/sigchain.h b/tools/lib/subcmd/sigchain.h
index 0c919f2874ca..1ec663af43ea 100644
--- a/tools/lib/subcmd/sigchain.h
+++ b/tools/lib/subcmd/sigchain.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __SUBCMD_SIGCHAIN_H 2#ifndef __SUBCMD_SIGCHAIN_H
2#define __SUBCMD_SIGCHAIN_H 3#define __SUBCMD_SIGCHAIN_H
3 4
diff --git a/tools/lib/subcmd/subcmd-config.c b/tools/lib/subcmd/subcmd-config.c
index d017c728bd1b..84a7cf6c7878 100644
--- a/tools/lib/subcmd/subcmd-config.c
+++ b/tools/lib/subcmd/subcmd-config.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "subcmd-config.h" 2#include "subcmd-config.h"
2 3
3#define UNDEFINED "SUBCMD_HAS_NOT_BEEN_INITIALIZED" 4#define UNDEFINED "SUBCMD_HAS_NOT_BEEN_INITIALIZED"
diff --git a/tools/lib/subcmd/subcmd-config.h b/tools/lib/subcmd/subcmd-config.h
index cc8514030b5c..9024dc17d100 100644
--- a/tools/lib/subcmd/subcmd-config.h
+++ b/tools/lib/subcmd/subcmd-config.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_SUBCMD_CONFIG_H 2#ifndef __PERF_SUBCMD_CONFIG_H
2#define __PERF_SUBCMD_CONFIG_H 3#define __PERF_SUBCMD_CONFIG_H
3 4
diff --git a/tools/lib/subcmd/subcmd-util.h b/tools/lib/subcmd/subcmd-util.h
index 8fa5f036eff0..794a375dad36 100644
--- a/tools/lib/subcmd/subcmd-util.h
+++ b/tools/lib/subcmd/subcmd-util.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __SUBCMD_UTIL_H 2#ifndef __SUBCMD_UTIL_H
2#define __SUBCMD_UTIL_H 3#define __SUBCMD_UTIL_H
3 4
diff --git a/tools/lib/symbol/kallsyms.c b/tools/lib/symbol/kallsyms.c
index d270ac00613d..914cb8e3d40b 100644
--- a/tools/lib/symbol/kallsyms.c
+++ b/tools/lib/symbol/kallsyms.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <ctype.h> 2#include <ctype.h>
2#include "symbol/kallsyms.h" 3#include "symbol/kallsyms.h"
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/lib/symbol/kallsyms.h b/tools/lib/symbol/kallsyms.h
index 4071316a766e..bc40101d72c1 100644
--- a/tools/lib/symbol/kallsyms.h
+++ b/tools/lib/symbol/kallsyms.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __TOOLS_KALLSYMS_H_ 2#ifndef __TOOLS_KALLSYMS_H_
2#define __TOOLS_KALLSYMS_H_ 1 3#define __TOOLS_KALLSYMS_H_ 1
3 4
diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index 9b8555ea3459..46cd5f871ad7 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# trace-cmd version 2# trace-cmd version
2EP_VERSION = 1 3EP_VERSION = 1
3EP_PATCHLEVEL = 1 4EP_PATCHLEVEL = 1
diff --git a/tools/lib/traceevent/plugin_cfg80211.c b/tools/lib/traceevent/plugin_cfg80211.c
index ec57d0c1fbc2..8f8586912da7 100644
--- a/tools/lib/traceevent/plugin_cfg80211.c
+++ b/tools/lib/traceevent/plugin_cfg80211.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <string.h> 3#include <string.h>
3#include <inttypes.h> 4#include <inttypes.h>
diff --git a/tools/lib/traceevent/plugin_scsi.c b/tools/lib/traceevent/plugin_scsi.c
index 3727de48c8d5..5e750af2b461 100644
--- a/tools/lib/traceevent/plugin_scsi.c
+++ b/tools/lib/traceevent/plugin_scsi.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <string.h> 3#include <string.h>
3#include <inttypes.h> 4#include <inttypes.h>
diff --git a/tools/lib/traceevent/plugin_xen.c b/tools/lib/traceevent/plugin_xen.c
index 3a413eaada68..690173bfa13e 100644
--- a/tools/lib/traceevent/plugin_xen.c
+++ b/tools/lib/traceevent/plugin_xen.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <stdlib.h> 3#include <stdlib.h>
3#include <string.h> 4#include <string.h>
diff --git a/tools/lib/vsprintf.c b/tools/lib/vsprintf.c
index 45f9a06daa56..e08ee147eab4 100644
--- a/tools/lib/vsprintf.c
+++ b/tools/lib/vsprintf.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sys/types.h> 2#include <sys/types.h>
2#include <linux/kernel.h> 3#include <linux/kernel.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/net/Makefile b/tools/net/Makefile
index ddf888010652..5830670feae1 100644
--- a/tools/net/Makefile
+++ b/tools/net/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1prefix = /usr 2prefix = /usr
2 3
3CC = gcc 4CC = gcc
diff --git a/tools/nfsd/inject_fault.sh b/tools/nfsd/inject_fault.sh
index 06a399ac8b2f..10ceee64a09a 100755
--- a/tools/nfsd/inject_fault.sh
+++ b/tools/nfsd/inject_fault.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2# 3#
3# Copyright (c) 2011 Bryan Schumaker <bjschuma@netapp.com> 4# Copyright (c) 2011 Bryan Schumaker <bjschuma@netapp.com>
4# 5#
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index 6976c73e60c4..424b1965d06f 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1include ../scripts/Makefile.include 2include ../scripts/Makefile.include
2include ../scripts/Makefile.arch 3include ../scripts/Makefile.arch
3 4
diff --git a/tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk b/tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk
index a3d2c62fd805..b02a36b2c14f 100644
--- a/tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk
+++ b/tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk
@@ -1,4 +1,5 @@
1#!/bin/awk -f 1#!/bin/awk -f
2# SPDX-License-Identifier: GPL-2.0
2# gen-insn-attr-x86.awk: Instruction attribute table generator 3# gen-insn-attr-x86.awk: Instruction attribute table generator
3# Written by Masami Hiramatsu <mhiramat@redhat.com> 4# Written by Masami Hiramatsu <mhiramat@redhat.com>
4# 5#
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index a0c518ecf085..c0e26ad1fa7e 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -267,12 +267,13 @@ static int decode_instructions(struct objtool_file *file)
267 &insn->immediate, 267 &insn->immediate,
268 &insn->stack_op); 268 &insn->stack_op);
269 if (ret) 269 if (ret)
270 return ret; 270 goto err;
271 271
272 if (!insn->type || insn->type > INSN_LAST) { 272 if (!insn->type || insn->type > INSN_LAST) {
273 WARN_FUNC("invalid instruction type %d", 273 WARN_FUNC("invalid instruction type %d",
274 insn->sec, insn->offset, insn->type); 274 insn->sec, insn->offset, insn->type);
275 return -1; 275 ret = -1;
276 goto err;
276 } 277 }
277 278
278 hash_add(file->insn_hash, &insn->hash, insn->offset); 279 hash_add(file->insn_hash, &insn->hash, insn->offset);
@@ -296,6 +297,10 @@ static int decode_instructions(struct objtool_file *file)
296 } 297 }
297 298
298 return 0; 299 return 0;
300
301err:
302 free(insn);
303 return ret;
299} 304}
300 305
301/* 306/*
diff --git a/tools/pci/pcitest.sh b/tools/pci/pcitest.sh
index 5442bbea4c22..77e8c85ef744 100644
--- a/tools/pci/pcitest.sh
+++ b/tools/pci/pcitest.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2 3
3echo "BAR tests" 4echo "BAR tests"
4echo 5echo
diff --git a/tools/pcmcia/Makefile b/tools/pcmcia/Makefile
index 81a7498c5cd9..eae24df1dbf5 100644
--- a/tools/pcmcia/Makefile
+++ b/tools/pcmcia/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1CC := $(CROSS_COMPILE)gcc 2CC := $(CROSS_COMPILE)gcc
2CFLAGS := -I../../usr/include 3CFLAGS := -I../../usr/include
3 4
diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index e397453e5a46..63526f4416ea 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -8,8 +8,8 @@ perf-record - Run a command and record its profile into perf.data
8SYNOPSIS 8SYNOPSIS
9-------- 9--------
10[verse] 10[verse]
11'perf record' [-e <EVENT> | --event=EVENT] [-l] [-a] <command> 11'perf record' [-e <EVENT> | --event=EVENT] [-a] <command>
12'perf record' [-e <EVENT> | --event=EVENT] [-l] [-a] -- <command> [<options>] 12'perf record' [-e <EVENT> | --event=EVENT] [-a] -- <command> [<options>]
13 13
14DESCRIPTION 14DESCRIPTION
15----------- 15-----------
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 32a64e619028..225454416ed5 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# 2#
2# This is a simple wrapper Makefile that calls the main Makefile.perf 3# This is a simple wrapper Makefile that calls the main Makefile.perf
3# with a -j option to do parallel builds 4# with a -j option to do parallel builds
diff --git a/tools/perf/arch/arm/annotate/instructions.c b/tools/perf/arch/arm/annotate/instructions.c
index 1ce0872b1726..b39b16395aac 100644
--- a/tools/perf/arch/arm/annotate/instructions.c
+++ b/tools/perf/arch/arm/annotate/instructions.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sys/types.h> 2#include <sys/types.h>
2#include <regex.h> 3#include <regex.h>
3 4
diff --git a/tools/perf/arch/arm/include/dwarf-regs-table.h b/tools/perf/arch/arm/include/dwarf-regs-table.h
index f298d034c37b..5a45046fab72 100644
--- a/tools/perf/arch/arm/include/dwarf-regs-table.h
+++ b/tools/perf/arch/arm/include/dwarf-regs-table.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifdef DEFINE_DWARF_REGSTR_TABLE 2#ifdef DEFINE_DWARF_REGSTR_TABLE
2/* This is included in perf/util/dwarf-regs.c */ 3/* This is included in perf/util/dwarf-regs.c */
3 4
diff --git a/tools/perf/arch/arm/include/perf_regs.h b/tools/perf/arch/arm/include/perf_regs.h
index f619c9c5a4bf..ed20e0253e25 100644
--- a/tools/perf/arch/arm/include/perf_regs.h
+++ b/tools/perf/arch/arm/include/perf_regs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef ARCH_PERF_REGS_H 2#ifndef ARCH_PERF_REGS_H
2#define ARCH_PERF_REGS_H 3#define ARCH_PERF_REGS_H
3 4
diff --git a/tools/perf/arch/arm/tests/dwarf-unwind.c b/tools/perf/arch/arm/tests/dwarf-unwind.c
index 62eff847f91c..8cb347760233 100644
--- a/tools/perf/arch/arm/tests/dwarf-unwind.c
+++ b/tools/perf/arch/arm/tests/dwarf-unwind.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <string.h> 2#include <string.h>
2#include "perf_regs.h" 3#include "perf_regs.h"
3#include "thread.h" 4#include "thread.h"
diff --git a/tools/perf/arch/arm/tests/regs_load.S b/tools/perf/arch/arm/tests/regs_load.S
index e09e983946fe..6e2495cc4517 100644
--- a/tools/perf/arch/arm/tests/regs_load.S
+++ b/tools/perf/arch/arm/tests/regs_load.S
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#include <linux/linkage.h> 2#include <linux/linkage.h>
2 3
3#define R0 0x00 4#define R0 0x00
diff --git a/tools/perf/arch/arm/util/unwind-libdw.c b/tools/perf/arch/arm/util/unwind-libdw.c
index bacfa00fca39..36ba4c69c3c5 100644
--- a/tools/perf/arch/arm/util/unwind-libdw.c
+++ b/tools/perf/arch/arm/util/unwind-libdw.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <elfutils/libdwfl.h> 2#include <elfutils/libdwfl.h>
2#include "../../util/unwind-libdw.h" 3#include "../../util/unwind-libdw.h"
3#include "../../util/perf_regs.h" 4#include "../../util/perf_regs.h"
diff --git a/tools/perf/arch/arm/util/unwind-libunwind.c b/tools/perf/arch/arm/util/unwind-libunwind.c
index 62c397ed3d97..3a550225dfaf 100644
--- a/tools/perf/arch/arm/util/unwind-libunwind.c
+++ b/tools/perf/arch/arm/util/unwind-libunwind.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1 2
2#include <errno.h> 3#include <errno.h>
3#include <libunwind.h> 4#include <libunwind.h>
diff --git a/tools/perf/arch/arm64/Makefile b/tools/perf/arch/arm64/Makefile
index eebe1ec9d2ee..91de4860faad 100644
--- a/tools/perf/arch/arm64/Makefile
+++ b/tools/perf/arch/arm64/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1ifndef NO_DWARF 2ifndef NO_DWARF
2PERF_HAVE_DWARF_REGS := 1 3PERF_HAVE_DWARF_REGS := 1
3endif 4endif
diff --git a/tools/perf/arch/arm64/annotate/instructions.c b/tools/perf/arch/arm64/annotate/instructions.c
index 8f1908756cb6..9a3e0523e2c9 100644
--- a/tools/perf/arch/arm64/annotate/instructions.c
+++ b/tools/perf/arch/arm64/annotate/instructions.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sys/types.h> 2#include <sys/types.h>
2#include <regex.h> 3#include <regex.h>
3 4
diff --git a/tools/perf/arch/arm64/include/dwarf-regs-table.h b/tools/perf/arch/arm64/include/dwarf-regs-table.h
index 36e375f5a211..177b2855f797 100644
--- a/tools/perf/arch/arm64/include/dwarf-regs-table.h
+++ b/tools/perf/arch/arm64/include/dwarf-regs-table.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifdef DEFINE_DWARF_REGSTR_TABLE 2#ifdef DEFINE_DWARF_REGSTR_TABLE
2/* This is included in perf/util/dwarf-regs.c */ 3/* This is included in perf/util/dwarf-regs.c */
3 4
diff --git a/tools/perf/arch/arm64/include/perf_regs.h b/tools/perf/arch/arm64/include/perf_regs.h
index 4e5af27e3fbf..baaa5e64a3fb 100644
--- a/tools/perf/arch/arm64/include/perf_regs.h
+++ b/tools/perf/arch/arm64/include/perf_regs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef ARCH_PERF_REGS_H 2#ifndef ARCH_PERF_REGS_H
2#define ARCH_PERF_REGS_H 3#define ARCH_PERF_REGS_H
3 4
diff --git a/tools/perf/arch/arm64/tests/dwarf-unwind.c b/tools/perf/arch/arm64/tests/dwarf-unwind.c
index cf04a4c91c59..e907f0f4c20c 100644
--- a/tools/perf/arch/arm64/tests/dwarf-unwind.c
+++ b/tools/perf/arch/arm64/tests/dwarf-unwind.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <string.h> 2#include <string.h>
2#include "perf_regs.h" 3#include "perf_regs.h"
3#include "thread.h" 4#include "thread.h"
diff --git a/tools/perf/arch/arm64/tests/regs_load.S b/tools/perf/arch/arm64/tests/regs_load.S
index 025b46e579a6..07042511dca9 100644
--- a/tools/perf/arch/arm64/tests/regs_load.S
+++ b/tools/perf/arch/arm64/tests/regs_load.S
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#include <linux/linkage.h> 2#include <linux/linkage.h>
2 3
3.text 4.text
diff --git a/tools/perf/arch/arm64/util/unwind-libunwind.c b/tools/perf/arch/arm64/util/unwind-libunwind.c
index b415dfdbccca..002520d4036b 100644
--- a/tools/perf/arch/arm64/util/unwind-libunwind.c
+++ b/tools/perf/arch/arm64/util/unwind-libunwind.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2 3
3#ifndef REMOTE_UNWIND_LIBUNWIND 4#ifndef REMOTE_UNWIND_LIBUNWIND
diff --git a/tools/perf/arch/common.c b/tools/perf/arch/common.c
index 6b40e9f01740..8c0cfeb55f8e 100644
--- a/tools/perf/arch/common.c
+++ b/tools/perf/arch/common.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <sys/utsname.h> 3#include <sys/utsname.h>
3#include "common.h" 4#include "common.h"
diff --git a/tools/perf/arch/common.h b/tools/perf/arch/common.h
index 6b01c736b7d9..a1546509ad24 100644
--- a/tools/perf/arch/common.h
+++ b/tools/perf/arch/common.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef ARCH_PERF_COMMON_H 2#ifndef ARCH_PERF_COMMON_H
2#define ARCH_PERF_COMMON_H 3#define ARCH_PERF_COMMON_H
3 4
diff --git a/tools/perf/arch/powerpc/Makefile b/tools/perf/arch/powerpc/Makefile
index cc3930904d68..42dab7c8f508 100644
--- a/tools/perf/arch/powerpc/Makefile
+++ b/tools/perf/arch/powerpc/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1ifndef NO_DWARF 2ifndef NO_DWARF
2PERF_HAVE_DWARF_REGS := 1 3PERF_HAVE_DWARF_REGS := 1
3endif 4endif
diff --git a/tools/perf/arch/powerpc/annotate/instructions.c b/tools/perf/arch/powerpc/annotate/instructions.c
index 3c4004db81b9..b7bc04980fe8 100644
--- a/tools/perf/arch/powerpc/annotate/instructions.c
+++ b/tools/perf/arch/powerpc/annotate/instructions.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1static struct ins_ops *powerpc__associate_instruction_ops(struct arch *arch, const char *name) 2static struct ins_ops *powerpc__associate_instruction_ops(struct arch *arch, const char *name)
2{ 3{
3 int i; 4 int i;
diff --git a/tools/perf/arch/powerpc/include/arch-tests.h b/tools/perf/arch/powerpc/include/arch-tests.h
index 84d8dedef2ed..1c7be75cbc78 100644
--- a/tools/perf/arch/powerpc/include/arch-tests.h
+++ b/tools/perf/arch/powerpc/include/arch-tests.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef ARCH_TESTS_H 2#ifndef ARCH_TESTS_H
2#define ARCH_TESTS_H 3#define ARCH_TESTS_H
3 4
diff --git a/tools/perf/arch/powerpc/include/dwarf-regs-table.h b/tools/perf/arch/powerpc/include/dwarf-regs-table.h
index db4730f5585c..66dc015a733d 100644
--- a/tools/perf/arch/powerpc/include/dwarf-regs-table.h
+++ b/tools/perf/arch/powerpc/include/dwarf-regs-table.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifdef DEFINE_DWARF_REGSTR_TABLE 2#ifdef DEFINE_DWARF_REGSTR_TABLE
2/* This is included in perf/util/dwarf-regs.c */ 3/* This is included in perf/util/dwarf-regs.c */
3 4
diff --git a/tools/perf/arch/powerpc/include/perf_regs.h b/tools/perf/arch/powerpc/include/perf_regs.h
index c12f4e804f66..00e37b106913 100644
--- a/tools/perf/arch/powerpc/include/perf_regs.h
+++ b/tools/perf/arch/powerpc/include/perf_regs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef ARCH_PERF_REGS_H 2#ifndef ARCH_PERF_REGS_H
2#define ARCH_PERF_REGS_H 3#define ARCH_PERF_REGS_H
3 4
diff --git a/tools/perf/arch/powerpc/tests/arch-tests.c b/tools/perf/arch/powerpc/tests/arch-tests.c
index e24f46241f40..8c3fbd4af817 100644
--- a/tools/perf/arch/powerpc/tests/arch-tests.c
+++ b/tools/perf/arch/powerpc/tests/arch-tests.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <string.h> 2#include <string.h>
2#include "tests/tests.h" 3#include "tests/tests.h"
3#include "arch-tests.h" 4#include "arch-tests.h"
diff --git a/tools/perf/arch/powerpc/tests/dwarf-unwind.c b/tools/perf/arch/powerpc/tests/dwarf-unwind.c
index 0bac3137ccbd..30cbbd6d5be0 100644
--- a/tools/perf/arch/powerpc/tests/dwarf-unwind.c
+++ b/tools/perf/arch/powerpc/tests/dwarf-unwind.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <string.h> 2#include <string.h>
2#include "perf_regs.h" 3#include "perf_regs.h"
3#include "thread.h" 4#include "thread.h"
diff --git a/tools/perf/arch/powerpc/tests/regs_load.S b/tools/perf/arch/powerpc/tests/regs_load.S
index d76c9a32f327..36a20b0033f9 100644
--- a/tools/perf/arch/powerpc/tests/regs_load.S
+++ b/tools/perf/arch/powerpc/tests/regs_load.S
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#include <linux/linkage.h> 2#include <linux/linkage.h>
2 3
3/* Offset is based on macros from arch/powerpc/include/uapi/asm/ptrace.h. */ 4/* Offset is based on macros from arch/powerpc/include/uapi/asm/ptrace.h. */
diff --git a/tools/perf/arch/powerpc/util/book3s_hcalls.h b/tools/perf/arch/powerpc/util/book3s_hcalls.h
index 0dd6b7f2d44f..54cfa0530e86 100644
--- a/tools/perf/arch/powerpc/util/book3s_hcalls.h
+++ b/tools/perf/arch/powerpc/util/book3s_hcalls.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef ARCH_PERF_BOOK3S_HV_HCALLS_H 2#ifndef ARCH_PERF_BOOK3S_HV_HCALLS_H
2#define ARCH_PERF_BOOK3S_HV_HCALLS_H 3#define ARCH_PERF_BOOK3S_HV_HCALLS_H
3 4
diff --git a/tools/perf/arch/powerpc/util/book3s_hv_exits.h b/tools/perf/arch/powerpc/util/book3s_hv_exits.h
index e68ba2da8970..853b95d1e139 100644
--- a/tools/perf/arch/powerpc/util/book3s_hv_exits.h
+++ b/tools/perf/arch/powerpc/util/book3s_hv_exits.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef ARCH_PERF_BOOK3S_HV_EXITS_H 2#ifndef ARCH_PERF_BOOK3S_HV_EXITS_H
2#define ARCH_PERF_BOOK3S_HV_EXITS_H 3#define ARCH_PERF_BOOK3S_HV_EXITS_H
3 4
diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c
index 9aaa6f5a9347..7a4cf80c207a 100644
--- a/tools/perf/arch/powerpc/util/header.c
+++ b/tools/perf/arch/powerpc/util/header.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sys/types.h> 2#include <sys/types.h>
2#include <unistd.h> 3#include <unistd.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/perf/arch/powerpc/util/kvm-stat.c b/tools/perf/arch/powerpc/util/kvm-stat.c
index 249723f0e6a9..596ad6aedaac 100644
--- a/tools/perf/arch/powerpc/util/kvm-stat.c
+++ b/tools/perf/arch/powerpc/util/kvm-stat.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include "util/kvm-stat.h" 3#include "util/kvm-stat.h"
3#include "util/parse-events.h" 4#include "util/parse-events.h"
diff --git a/tools/perf/arch/powerpc/util/perf_regs.c b/tools/perf/arch/powerpc/util/perf_regs.c
index f860dc411f69..ec50939b0418 100644
--- a/tools/perf/arch/powerpc/util/perf_regs.c
+++ b/tools/perf/arch/powerpc/util/perf_regs.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <string.h> 3#include <string.h>
3#include <regex.h> 4#include <regex.h>
diff --git a/tools/perf/arch/powerpc/util/unwind-libdw.c b/tools/perf/arch/powerpc/util/unwind-libdw.c
index 3a24b3c43273..7a1f05ef2fc0 100644
--- a/tools/perf/arch/powerpc/util/unwind-libdw.c
+++ b/tools/perf/arch/powerpc/util/unwind-libdw.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <elfutils/libdwfl.h> 2#include <elfutils/libdwfl.h>
2#include "../../util/unwind-libdw.h" 3#include "../../util/unwind-libdw.h"
3#include "../../util/perf_regs.h" 4#include "../../util/perf_regs.h"
diff --git a/tools/perf/arch/s390/annotate/instructions.c b/tools/perf/arch/s390/annotate/instructions.c
index 745b4b1b8b21..c9a81673e8aa 100644
--- a/tools/perf/arch/s390/annotate/instructions.c
+++ b/tools/perf/arch/s390/annotate/instructions.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1static struct ins_ops *s390__associate_ins_ops(struct arch *arch, const char *name) 2static struct ins_ops *s390__associate_ins_ops(struct arch *arch, const char *name)
2{ 3{
3 struct ins_ops *ops = NULL; 4 struct ins_ops *ops = NULL;
diff --git a/tools/perf/arch/s390/include/dwarf-regs-table.h b/tools/perf/arch/s390/include/dwarf-regs-table.h
index 9da74a933bd6..792d4c277225 100644
--- a/tools/perf/arch/s390/include/dwarf-regs-table.h
+++ b/tools/perf/arch/s390/include/dwarf-regs-table.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifdef DEFINE_DWARF_REGSTR_TABLE 2#ifdef DEFINE_DWARF_REGSTR_TABLE
2/* This is included in perf/util/dwarf-regs.c */ 3/* This is included in perf/util/dwarf-regs.c */
3 4
diff --git a/tools/perf/arch/s390/util/dwarf-regs.c b/tools/perf/arch/s390/util/dwarf-regs.c
index 0469df02ee62..0dff5b2ed1e5 100644
--- a/tools/perf/arch/s390/util/dwarf-regs.c
+++ b/tools/perf/arch/s390/util/dwarf-regs.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Mapping of DWARF debug register numbers into register names. 3 * Mapping of DWARF debug register numbers into register names.
3 * 4 *
diff --git a/tools/perf/arch/s390/util/machine.c b/tools/perf/arch/s390/util/machine.c
index b9a95a1a8e69..0b2054007314 100644
--- a/tools/perf/arch/s390/util/machine.c
+++ b/tools/perf/arch/s390/util/machine.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <unistd.h> 2#include <unistd.h>
2#include <stdio.h> 3#include <stdio.h>
3#include <string.h> 4#include <string.h>
diff --git a/tools/perf/arch/sh/include/dwarf-regs-table.h b/tools/perf/arch/sh/include/dwarf-regs-table.h
index 3a2deaf3dab4..900e69619970 100644
--- a/tools/perf/arch/sh/include/dwarf-regs-table.h
+++ b/tools/perf/arch/sh/include/dwarf-regs-table.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifdef DEFINE_DWARF_REGSTR_TABLE 2#ifdef DEFINE_DWARF_REGSTR_TABLE
2/* This is included in perf/util/dwarf-regs.c */ 3/* This is included in perf/util/dwarf-regs.c */
3 4
diff --git a/tools/perf/arch/sparc/include/dwarf-regs-table.h b/tools/perf/arch/sparc/include/dwarf-regs-table.h
index 12c07619002c..35ede84a6b0d 100644
--- a/tools/perf/arch/sparc/include/dwarf-regs-table.h
+++ b/tools/perf/arch/sparc/include/dwarf-regs-table.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifdef DEFINE_DWARF_REGSTR_TABLE 2#ifdef DEFINE_DWARF_REGSTR_TABLE
2/* This is included in perf/util/dwarf-regs.c */ 3/* This is included in perf/util/dwarf-regs.c */
3 4
diff --git a/tools/perf/arch/x86/Makefile b/tools/perf/arch/x86/Makefile
index 9a628a24c5c9..d74eaa7aa927 100644
--- a/tools/perf/arch/x86/Makefile
+++ b/tools/perf/arch/x86/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1ifndef NO_DWARF 2ifndef NO_DWARF
2PERF_HAVE_DWARF_REGS := 1 3PERF_HAVE_DWARF_REGS := 1
3endif 4endif
diff --git a/tools/perf/arch/x86/annotate/instructions.c b/tools/perf/arch/x86/annotate/instructions.c
index d84b72063a30..4adfb4ce2864 100644
--- a/tools/perf/arch/x86/annotate/instructions.c
+++ b/tools/perf/arch/x86/annotate/instructions.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1static struct ins x86__instructions[] = { 2static struct ins x86__instructions[] = {
2 { .name = "add", .ops = &mov_ops, }, 3 { .name = "add", .ops = &mov_ops, },
3 { .name = "addl", .ops = &mov_ops, }, 4 { .name = "addl", .ops = &mov_ops, },
diff --git a/tools/perf/arch/x86/entry/syscalls/syscalltbl.sh b/tools/perf/arch/x86/entry/syscalls/syscalltbl.sh
index 49a18b9ad9cf..029a72c20b19 100755
--- a/tools/perf/arch/x86/entry/syscalls/syscalltbl.sh
+++ b/tools/perf/arch/x86/entry/syscalls/syscalltbl.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2 3
3in="$1" 4in="$1"
4arch="$2" 5arch="$2"
diff --git a/tools/perf/arch/x86/include/arch-tests.h b/tools/perf/arch/x86/include/arch-tests.h
index 4e0b806a7a0f..9834fdc7c59e 100644
--- a/tools/perf/arch/x86/include/arch-tests.h
+++ b/tools/perf/arch/x86/include/arch-tests.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef ARCH_TESTS_H 2#ifndef ARCH_TESTS_H
2#define ARCH_TESTS_H 3#define ARCH_TESTS_H
3 4
diff --git a/tools/perf/arch/x86/include/dwarf-regs-table.h b/tools/perf/arch/x86/include/dwarf-regs-table.h
index 9b5e5cbb4209..b9bd5dc9d4c0 100644
--- a/tools/perf/arch/x86/include/dwarf-regs-table.h
+++ b/tools/perf/arch/x86/include/dwarf-regs-table.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifdef DEFINE_DWARF_REGSTR_TABLE 2#ifdef DEFINE_DWARF_REGSTR_TABLE
2/* This is included in perf/util/dwarf-regs.c */ 3/* This is included in perf/util/dwarf-regs.c */
3 4
diff --git a/tools/perf/arch/x86/include/perf_regs.h b/tools/perf/arch/x86/include/perf_regs.h
index 7df517acfef8..7f6d538f8a89 100644
--- a/tools/perf/arch/x86/include/perf_regs.h
+++ b/tools/perf/arch/x86/include/perf_regs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef ARCH_PERF_REGS_H 2#ifndef ARCH_PERF_REGS_H
2#define ARCH_PERF_REGS_H 3#define ARCH_PERF_REGS_H
3 4
diff --git a/tools/perf/arch/x86/tests/arch-tests.c b/tools/perf/arch/x86/tests/arch-tests.c
index 99d66191e56c..34a078136a47 100644
--- a/tools/perf/arch/x86/tests/arch-tests.c
+++ b/tools/perf/arch/x86/tests/arch-tests.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <string.h> 2#include <string.h>
2#include "tests/tests.h" 3#include "tests/tests.h"
3#include "arch-tests.h" 4#include "arch-tests.h"
diff --git a/tools/perf/arch/x86/tests/dwarf-unwind.c b/tools/perf/arch/x86/tests/dwarf-unwind.c
index 7f209ce827bf..95036c7a59e8 100644
--- a/tools/perf/arch/x86/tests/dwarf-unwind.c
+++ b/tools/perf/arch/x86/tests/dwarf-unwind.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <string.h> 2#include <string.h>
2#include "perf_regs.h" 3#include "perf_regs.h"
3#include "thread.h" 4#include "thread.h"
diff --git a/tools/perf/arch/x86/tests/insn-x86-dat-32.c b/tools/perf/arch/x86/tests/insn-x86-dat-32.c
index 3cbf6fad169f..fab3c6de73fa 100644
--- a/tools/perf/arch/x86/tests/insn-x86-dat-32.c
+++ b/tools/perf/arch/x86/tests/insn-x86-dat-32.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Generated by gen-insn-x86-dat.sh and gen-insn-x86-dat.awk 3 * Generated by gen-insn-x86-dat.sh and gen-insn-x86-dat.awk
3 * from insn-x86-dat-src.c for inclusion by insn-x86.c 4 * from insn-x86-dat-src.c for inclusion by insn-x86.c
diff --git a/tools/perf/arch/x86/tests/insn-x86-dat-64.c b/tools/perf/arch/x86/tests/insn-x86-dat-64.c
index aa512fa944dd..c57f34603b9b 100644
--- a/tools/perf/arch/x86/tests/insn-x86-dat-64.c
+++ b/tools/perf/arch/x86/tests/insn-x86-dat-64.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Generated by gen-insn-x86-dat.sh and gen-insn-x86-dat.awk 3 * Generated by gen-insn-x86-dat.sh and gen-insn-x86-dat.awk
3 * from insn-x86-dat-src.c for inclusion by insn-x86.c 4 * from insn-x86-dat-src.c for inclusion by insn-x86.c
diff --git a/tools/perf/arch/x86/tests/insn-x86-dat-src.c b/tools/perf/arch/x86/tests/insn-x86-dat-src.c
index 6cdb65d25b79..891415b10984 100644
--- a/tools/perf/arch/x86/tests/insn-x86-dat-src.c
+++ b/tools/perf/arch/x86/tests/insn-x86-dat-src.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * This file contains instructions for testing by the test titled: 3 * This file contains instructions for testing by the test titled:
3 * 4 *
diff --git a/tools/perf/arch/x86/tests/insn-x86.c b/tools/perf/arch/x86/tests/insn-x86.c
index b3860586a0c2..a5d24ae5810d 100644
--- a/tools/perf/arch/x86/tests/insn-x86.c
+++ b/tools/perf/arch/x86/tests/insn-x86.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/types.h> 2#include <linux/types.h>
2 3
3#include "debug.h" 4#include "debug.h"
diff --git a/tools/perf/arch/x86/tests/intel-cqm.c b/tools/perf/arch/x86/tests/intel-cqm.c
index 57f86b6e7d6f..90a4a8c58a62 100644
--- a/tools/perf/arch/x86/tests/intel-cqm.c
+++ b/tools/perf/arch/x86/tests/intel-cqm.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "tests/tests.h" 2#include "tests/tests.h"
2#include "perf.h" 3#include "perf.h"
3#include "cloexec.h" 4#include "cloexec.h"
diff --git a/tools/perf/arch/x86/tests/perf-time-to-tsc.c b/tools/perf/arch/x86/tests/perf-time-to-tsc.c
index 5dd7efb192ce..b59678e8c1e2 100644
--- a/tools/perf/arch/x86/tests/perf-time-to-tsc.c
+++ b/tools/perf/arch/x86/tests/perf-time-to-tsc.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <inttypes.h> 3#include <inttypes.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/perf/arch/x86/tests/rdpmc.c b/tools/perf/arch/x86/tests/rdpmc.c
index 17fec30a0b31..7a11f02d6c6c 100644
--- a/tools/perf/arch/x86/tests/rdpmc.c
+++ b/tools/perf/arch/x86/tests/rdpmc.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <unistd.h> 3#include <unistd.h>
3#include <stdlib.h> 4#include <stdlib.h>
diff --git a/tools/perf/arch/x86/tests/regs_load.S b/tools/perf/arch/x86/tests/regs_load.S
index 60875d5c556c..bbe5a0d16e51 100644
--- a/tools/perf/arch/x86/tests/regs_load.S
+++ b/tools/perf/arch/x86/tests/regs_load.S
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#include <linux/linkage.h> 2#include <linux/linkage.h>
2 3
3#define AX 0 4#define AX 0
diff --git a/tools/perf/arch/x86/util/group.c b/tools/perf/arch/x86/util/group.c
index 37f92aa39a5d..e2f8034b8973 100644
--- a/tools/perf/arch/x86/util/group.c
+++ b/tools/perf/arch/x86/util/group.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include "api/fs/fs.h" 3#include "api/fs/fs.h"
3#include "util/group.h" 4#include "util/group.h"
diff --git a/tools/perf/arch/x86/util/header.c b/tools/perf/arch/x86/util/header.c
index a74a48db26f5..33027c5e6f92 100644
--- a/tools/perf/arch/x86/util/header.c
+++ b/tools/perf/arch/x86/util/header.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sys/types.h> 2#include <sys/types.h>
2#include <unistd.h> 3#include <unistd.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/perf/arch/x86/util/kvm-stat.c b/tools/perf/arch/x86/util/kvm-stat.c
index bf817beca0a8..b32409a0e546 100644
--- a/tools/perf/arch/x86/util/kvm-stat.c
+++ b/tools/perf/arch/x86/util/kvm-stat.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include "../../util/kvm-stat.h" 3#include "../../util/kvm-stat.h"
3#include <asm/svm.h> 4#include <asm/svm.h>
diff --git a/tools/perf/arch/x86/util/perf_regs.c b/tools/perf/arch/x86/util/perf_regs.c
index f95edebfb716..4b2caf6d48e7 100644
--- a/tools/perf/arch/x86/util/perf_regs.c
+++ b/tools/perf/arch/x86/util/perf_regs.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <string.h> 3#include <string.h>
3#include <regex.h> 4#include <regex.h>
diff --git a/tools/perf/arch/x86/util/pmu.c b/tools/perf/arch/x86/util/pmu.c
index 79fe07158d00..63a74c32ddc5 100644
--- a/tools/perf/arch/x86/util/pmu.c
+++ b/tools/perf/arch/x86/util/pmu.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <string.h> 2#include <string.h>
2 3
3#include <linux/perf_event.h> 4#include <linux/perf_event.h>
diff --git a/tools/perf/arch/x86/util/tsc.c b/tools/perf/arch/x86/util/tsc.c
index 2e5567c94e09..06bae7023a51 100644
--- a/tools/perf/arch/x86/util/tsc.c
+++ b/tools/perf/arch/x86/util/tsc.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdbool.h> 2#include <stdbool.h>
2#include <errno.h> 3#include <errno.h>
3 4
diff --git a/tools/perf/arch/x86/util/unwind-libdw.c b/tools/perf/arch/x86/util/unwind-libdw.c
index 38dc9bb2a7c9..fda8f4206ee4 100644
--- a/tools/perf/arch/x86/util/unwind-libdw.c
+++ b/tools/perf/arch/x86/util/unwind-libdw.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <elfutils/libdwfl.h> 2#include <elfutils/libdwfl.h>
2#include "../../util/unwind-libdw.h" 3#include "../../util/unwind-libdw.h"
3#include "../../util/perf_regs.h" 4#include "../../util/perf_regs.h"
diff --git a/tools/perf/arch/x86/util/unwind-libunwind.c b/tools/perf/arch/x86/util/unwind-libunwind.c
index 4f16661cbdbb..9c917f80c906 100644
--- a/tools/perf/arch/x86/util/unwind-libunwind.c
+++ b/tools/perf/arch/x86/util/unwind-libunwind.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1 2
2#ifndef REMOTE_UNWIND_LIBUNWIND 3#ifndef REMOTE_UNWIND_LIBUNWIND
3#include <errno.h> 4#include <errno.h>
diff --git a/tools/perf/arch/xtensa/include/dwarf-regs-table.h b/tools/perf/arch/xtensa/include/dwarf-regs-table.h
index aa0444a33fe6..d7c9f1fb4444 100644
--- a/tools/perf/arch/xtensa/include/dwarf-regs-table.h
+++ b/tools/perf/arch/xtensa/include/dwarf-regs-table.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifdef DEFINE_DWARF_REGSTR_TABLE 2#ifdef DEFINE_DWARF_REGSTR_TABLE
2/* This is included in perf/util/dwarf-regs.c */ 3/* This is included in perf/util/dwarf-regs.c */
3 4
diff --git a/tools/perf/bench/bench.h b/tools/perf/bench/bench.h
index 842ab2781cdc..6c9fcd757f31 100644
--- a/tools/perf/bench/bench.h
+++ b/tools/perf/bench/bench.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef BENCH_H 2#ifndef BENCH_H
2#define BENCH_H 3#define BENCH_H
3 4
diff --git a/tools/perf/bench/futex-hash.c b/tools/perf/bench/futex-hash.c
index fe16b310097f..58ae6ed8f38b 100644
--- a/tools/perf/bench/futex-hash.c
+++ b/tools/perf/bench/futex-hash.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Copyright (C) 2013 Davidlohr Bueso <davidlohr@hp.com> 3 * Copyright (C) 2013 Davidlohr Bueso <davidlohr@hp.com>
3 * 4 *
diff --git a/tools/perf/bench/futex-lock-pi.c b/tools/perf/bench/futex-lock-pi.c
index 73a1c44ea63c..08653ae8a8c4 100644
--- a/tools/perf/bench/futex-lock-pi.c
+++ b/tools/perf/bench/futex-lock-pi.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Copyright (C) 2015 Davidlohr Bueso. 3 * Copyright (C) 2015 Davidlohr Bueso.
3 */ 4 */
diff --git a/tools/perf/bench/futex-requeue.c b/tools/perf/bench/futex-requeue.c
index 41786cbea24c..1058c194608a 100644
--- a/tools/perf/bench/futex-requeue.c
+++ b/tools/perf/bench/futex-requeue.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Copyright (C) 2013 Davidlohr Bueso <davidlohr@hp.com> 3 * Copyright (C) 2013 Davidlohr Bueso <davidlohr@hp.com>
3 * 4 *
diff --git a/tools/perf/bench/futex-wake-parallel.c b/tools/perf/bench/futex-wake-parallel.c
index 4ab12c8e016a..b4732dad9f89 100644
--- a/tools/perf/bench/futex-wake-parallel.c
+++ b/tools/perf/bench/futex-wake-parallel.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Copyright (C) 2015 Davidlohr Bueso. 3 * Copyright (C) 2015 Davidlohr Bueso.
3 * 4 *
diff --git a/tools/perf/bench/futex-wake.c b/tools/perf/bench/futex-wake.c
index 2fa49222ef8d..8c5c0b6b5c97 100644
--- a/tools/perf/bench/futex-wake.c
+++ b/tools/perf/bench/futex-wake.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Copyright (C) 2013 Davidlohr Bueso <davidlohr@hp.com> 3 * Copyright (C) 2013 Davidlohr Bueso <davidlohr@hp.com>
3 * 4 *
diff --git a/tools/perf/bench/futex.h b/tools/perf/bench/futex.h
index e44fd3239530..db4853f209c7 100644
--- a/tools/perf/bench/futex.h
+++ b/tools/perf/bench/futex.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * Glibc independent futex library for testing kernel functionality. 3 * Glibc independent futex library for testing kernel functionality.
3 * Shamelessly stolen from Darren Hart <dvhltc@us.ibm.com> 4 * Shamelessly stolen from Darren Hart <dvhltc@us.ibm.com>
diff --git a/tools/perf/bench/mem-functions.c b/tools/perf/bench/mem-functions.c
index fbd732b54047..0251dd348124 100644
--- a/tools/perf/bench/mem-functions.c
+++ b/tools/perf/bench/mem-functions.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * mem-memcpy.c 3 * mem-memcpy.c
3 * 4 *
diff --git a/tools/perf/bench/mem-memcpy-arch.h b/tools/perf/bench/mem-memcpy-arch.h
index 5aad2a9408b0..5bcaec5601a8 100644
--- a/tools/perf/bench/mem-memcpy-arch.h
+++ b/tools/perf/bench/mem-memcpy-arch.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1 2
2#ifdef HAVE_ARCH_X86_64_SUPPORT 3#ifdef HAVE_ARCH_X86_64_SUPPORT
3 4
diff --git a/tools/perf/bench/mem-memcpy-x86-64-asm-def.h b/tools/perf/bench/mem-memcpy-x86-64-asm-def.h
index 8c0c1a2770c8..50ae8bd58296 100644
--- a/tools/perf/bench/mem-memcpy-x86-64-asm-def.h
+++ b/tools/perf/bench/mem-memcpy-x86-64-asm-def.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1 2
2MEMCPY_FN(memcpy_orig, 3MEMCPY_FN(memcpy_orig,
3 "x86-64-unrolled", 4 "x86-64-unrolled",
diff --git a/tools/perf/bench/mem-memcpy-x86-64-asm.S b/tools/perf/bench/mem-memcpy-x86-64-asm.S
index f700369bb0f6..b43f8d2a34ec 100644
--- a/tools/perf/bench/mem-memcpy-x86-64-asm.S
+++ b/tools/perf/bench/mem-memcpy-x86-64-asm.S
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1 2
2/* Various wrappers to make the kernel .S file build in user-space: */ 3/* Various wrappers to make the kernel .S file build in user-space: */
3 4
diff --git a/tools/perf/bench/mem-memset-arch.h b/tools/perf/bench/mem-memset-arch.h
index 0d15786d9ae3..53f45482663f 100644
--- a/tools/perf/bench/mem-memset-arch.h
+++ b/tools/perf/bench/mem-memset-arch.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1 2
2#ifdef HAVE_ARCH_X86_64_SUPPORT 3#ifdef HAVE_ARCH_X86_64_SUPPORT
3 4
diff --git a/tools/perf/bench/mem-memset-x86-64-asm-def.h b/tools/perf/bench/mem-memset-x86-64-asm-def.h
index f02d028771d9..dac6d2b7c39b 100644
--- a/tools/perf/bench/mem-memset-x86-64-asm-def.h
+++ b/tools/perf/bench/mem-memset-x86-64-asm-def.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1 2
2MEMSET_FN(memset_orig, 3MEMSET_FN(memset_orig,
3 "x86-64-unrolled", 4 "x86-64-unrolled",
diff --git a/tools/perf/bench/mem-memset-x86-64-asm.S b/tools/perf/bench/mem-memset-x86-64-asm.S
index 58407aa24c1b..d550bd526162 100644
--- a/tools/perf/bench/mem-memset-x86-64-asm.S
+++ b/tools/perf/bench/mem-memset-x86-64-asm.S
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#define memset MEMSET /* don't hide glibc's memset() */ 2#define memset MEMSET /* don't hide glibc's memset() */
2#define altinstr_replacement text 3#define altinstr_replacement text
3#define globl p2align 4; .globl 4#define globl p2align 4; .globl
diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
index 469d65b21122..d95fdcc26f4b 100644
--- a/tools/perf/bench/numa.c
+++ b/tools/perf/bench/numa.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * numa.c 3 * numa.c
3 * 4 *
diff --git a/tools/perf/bench/sched-messaging.c b/tools/perf/bench/sched-messaging.c
index 4f961e74535b..f9d7641ae833 100644
--- a/tools/perf/bench/sched-messaging.c
+++ b/tools/perf/bench/sched-messaging.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * 3 *
3 * sched-messaging.c 4 * sched-messaging.c
diff --git a/tools/perf/bench/sched-pipe.c b/tools/perf/bench/sched-pipe.c
index a152737370c5..0591be008f2a 100644
--- a/tools/perf/bench/sched-pipe.c
+++ b/tools/perf/bench/sched-pipe.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * 3 *
3 * sched-pipe.c 4 * sched-pipe.c
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index c38373195c4a..3d32aa45016d 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * builtin-annotate.c 3 * builtin-annotate.c
3 * 4 *
diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c
index 445e62881254..17a6bcd01aa6 100644
--- a/tools/perf/builtin-bench.c
+++ b/tools/perf/builtin-bench.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * builtin-bench.c 3 * builtin-bench.c
3 * 4 *
diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c
index e3eb6240ced0..5f53a7ad5ef3 100644
--- a/tools/perf/builtin-buildid-cache.c
+++ b/tools/perf/builtin-buildid-cache.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * builtin-buildid-cache.c 3 * builtin-buildid-cache.c
3 * 4 *
diff --git a/tools/perf/builtin-buildid-list.c b/tools/perf/builtin-buildid-list.c
index fdaca16e0c74..ec2f327cd79d 100644
--- a/tools/perf/builtin-buildid-list.c
+++ b/tools/perf/builtin-buildid-list.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * builtin-buildid-list.c 3 * builtin-buildid-list.c
3 * 4 *
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 475999e48f66..fd32ad08c6d4 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * This is rewrite of original c2c tool introduced in here: 3 * This is rewrite of original c2c tool introduced in here:
3 * http://lwn.net/Articles/588866/ 4 * http://lwn.net/Articles/588866/
diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c
index a1d82e33282c..abfa49eaf7fd 100644
--- a/tools/perf/builtin-config.c
+++ b/tools/perf/builtin-config.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * builtin-config.c 3 * builtin-config.c
3 * 4 *
diff --git a/tools/perf/builtin-data.c b/tools/perf/builtin-data.c
index 46cd8490baf4..dde25d4ca56d 100644
--- a/tools/perf/builtin-data.c
+++ b/tools/perf/builtin-data.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/compiler.h> 2#include <linux/compiler.h>
2#include "builtin.h" 3#include "builtin.h"
3#include "perf.h" 4#include "perf.h"
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 0cd4cf6a344b..56223bdfa205 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * builtin-diff.c 3 * builtin-diff.c
3 * 4 *
diff --git a/tools/perf/builtin-evlist.c b/tools/perf/builtin-evlist.c
index 6d210e40d611..cdd145613f60 100644
--- a/tools/perf/builtin-evlist.c
+++ b/tools/perf/builtin-evlist.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Builtin evlist command: Show the list of event selectors present 3 * Builtin evlist command: Show the list of event selectors present
3 * in a perf.data file. 4 * in a perf.data file.
diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c
index dbe4e4153bcf..bd1fedef3d1c 100644
--- a/tools/perf/builtin-help.c
+++ b/tools/perf/builtin-help.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * builtin-help.c 3 * builtin-help.c
3 * 4 *
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index 2b8032908fb2..3e0e73b0dc67 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * builtin-inject.c 3 * builtin-inject.c
3 * 4 *
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 24ee68ecdd42..35d4b9c9a9e8 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "builtin.h" 2#include "builtin.h"
2#include "perf.h" 3#include "perf.h"
3 4
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index f309c3773522..5fb40368d5d1 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "builtin.h" 2#include "builtin.h"
2#include "perf.h" 3#include "perf.h"
3 4
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index 4bf2cb4d25aa..eeedbe433776 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * builtin-list.c 3 * builtin-list.c
3 * 4 *
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index ff98652484a7..fe69cd6b89e1 100644
--- a/tools/perf/builtin-lock.c
+++ b/tools/perf/builtin-lock.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <inttypes.h> 3#include <inttypes.h>
3#include "builtin.h" 4#include "builtin.h"
diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c
index 0f15634ef82c..4db960085273 100644
--- a/tools/perf/builtin-mem.c
+++ b/tools/perf/builtin-mem.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <inttypes.h> 2#include <inttypes.h>
2#include <sys/types.h> 3#include <sys/types.h>
3#include <sys/stat.h> 4#include <sys/stat.h>
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 56f8142ff97f..0c95ffefb6cc 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * builtin-record.c 3 * builtin-record.c
3 * 4 *
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index f9dff652dcbd..fae4b0340750 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * builtin-report.c 3 * builtin-report.c
3 * 4 *
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 322b4def8411..f380d91ee609 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "builtin.h" 2#include "builtin.h"
2#include "perf.h" 3#include "perf.h"
3 4
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 0c977b6e0f8b..0fe02758de7d 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "builtin.h" 2#include "builtin.h"
2 3
3#include "perf.h" 4#include "perf.h"
diff --git a/tools/perf/builtin-version.c b/tools/perf/builtin-version.c
index d25149456a2f..37019c5d675f 100644
--- a/tools/perf/builtin-version.c
+++ b/tools/perf/builtin-version.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "builtin.h" 2#include "builtin.h"
2#include "perf.h" 3#include "perf.h"
3#include <linux/compiler.h> 4#include <linux/compiler.h>
diff --git a/tools/perf/builtin.h b/tools/perf/builtin.h
index d4d19fe3d050..05745f3ce912 100644
--- a/tools/perf/builtin.h
+++ b/tools/perf/builtin.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef BUILTIN_H 2#ifndef BUILTIN_H
2#define BUILTIN_H 3#define BUILTIN_H
3 4
diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index 932fda54b8a6..50cd6228f506 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2 3
3HEADERS=' 4HEADERS='
4include/uapi/drm/drm.h 5include/uapi/drm/drm.h
diff --git a/tools/perf/jvmti/jvmti_agent.h b/tools/perf/jvmti/jvmti_agent.h
index c53a41f48b63..fe32d8344a82 100644
--- a/tools/perf/jvmti/jvmti_agent.h
+++ b/tools/perf/jvmti/jvmti_agent.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __JVMTI_AGENT_H__ 2#ifndef __JVMTI_AGENT_H__
2#define __JVMTI_AGENT_H__ 3#define __JVMTI_AGENT_H__
3 4
diff --git a/tools/perf/jvmti/libjvmti.c b/tools/perf/jvmti/libjvmti.c
index 6d710904c837..c62c9fc9a525 100644
--- a/tools/perf/jvmti/libjvmti.c
+++ b/tools/perf/jvmti/libjvmti.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/compiler.h> 2#include <linux/compiler.h>
2#include <sys/types.h> 3#include <sys/types.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/perf/perf-archive.sh b/tools/perf/perf-archive.sh
index e91930620269..0cfb3e2cefef 100644
--- a/tools/perf/perf-archive.sh
+++ b/tools/perf/perf-archive.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2# perf archive 3# perf archive
3# Arnaldo Carvalho de Melo <acme@redhat.com> 4# Arnaldo Carvalho de Melo <acme@redhat.com>
4 5
diff --git a/tools/perf/perf-completion.sh b/tools/perf/perf-completion.sh
index 3ba80b2359cc..345f5d6e9ed5 100644
--- a/tools/perf/perf-completion.sh
+++ b/tools/perf/perf-completion.sh
@@ -1,4 +1,5 @@
1# perf bash and zsh completion 1# perf bash and zsh completion
2# SPDX-License-Identifier: GPL-2.0
2 3
3# Taken from git.git's completion script. 4# Taken from git.git's completion script.
4__my_reassemble_comp_words_by_ref() 5__my_reassemble_comp_words_by_ref()
diff --git a/tools/perf/perf-read-vdso.c b/tools/perf/perf-read-vdso.c
index 764e2547c25a..8c0ca0cc428f 100644
--- a/tools/perf/perf-read-vdso.c
+++ b/tools/perf/perf-read-vdso.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <string.h> 3#include <string.h>
3 4
diff --git a/tools/perf/perf-sys.h b/tools/perf/perf-sys.h
index c11f0c76e90c..36673f98d66b 100644
--- a/tools/perf/perf-sys.h
+++ b/tools/perf/perf-sys.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_SYS_H 2#ifndef _PERF_SYS_H
2#define _PERF_SYS_H 3#define _PERF_SYS_H
3 4
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index 2f19e03c5c40..62b13518bc6e 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * perf.c 3 * perf.c
3 * 4 *
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index dc442ba21bf6..f75f3dec7485 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_PERF_H 2#ifndef _PERF_PERF_H
2#define _PERF_PERF_H 3#define _PERF_PERF_H
3 4
diff --git a/tools/perf/pmu-events/jevents.h b/tools/perf/pmu-events/jevents.h
index 611fac01913d..d87efd2685b8 100644
--- a/tools/perf/pmu-events/jevents.h
+++ b/tools/perf/pmu-events/jevents.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef JEVENTS_H 2#ifndef JEVENTS_H
2#define JEVENTS_H 1 3#define JEVENTS_H 1
3 4
diff --git a/tools/perf/pmu-events/jsmn.h b/tools/perf/pmu-events/jsmn.h
index d666b10cf25b..c7b0f6ea2a31 100644
--- a/tools/perf/pmu-events/jsmn.h
+++ b/tools/perf/pmu-events/jsmn.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __JSMN_H_ 2#ifndef __JSMN_H_
2#define __JSMN_H_ 3#define __JSMN_H_
3 4
diff --git a/tools/perf/pmu-events/json.h b/tools/perf/pmu-events/json.h
index 278ebd32cfb6..fbcd5a0590ad 100644
--- a/tools/perf/pmu-events/json.h
+++ b/tools/perf/pmu-events/json.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef JSON_H 2#ifndef JSON_H
2#define JSON_H 1 3#define JSON_H 1
3 4
diff --git a/tools/perf/pmu-events/pmu-events.h b/tools/perf/pmu-events/pmu-events.h
index 569eab3688dd..e08789ddfe6c 100644
--- a/tools/perf/pmu-events/pmu-events.h
+++ b/tools/perf/pmu-events/pmu-events.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef PMU_EVENTS_H 2#ifndef PMU_EVENTS_H
2#define PMU_EVENTS_H 3#define PMU_EVENTS_H
3 4
diff --git a/tools/perf/python/tracepoint.py b/tools/perf/python/tracepoint.py
index eb4dbed57de7..eb76f6516247 100755
--- a/tools/perf/python/tracepoint.py
+++ b/tools/perf/python/tracepoint.py
@@ -1,4 +1,5 @@
1#! /usr/bin/python 1#! /usr/bin/python
2# SPDX-License-Identifier: GPL-2.0
2# -*- python -*- 3# -*- python -*-
3# -*- coding: utf-8 -*- 4# -*- coding: utf-8 -*-
4 5
diff --git a/tools/perf/scripts/perl/Perf-Trace-Util/Makefile.PL b/tools/perf/scripts/perl/Perf-Trace-Util/Makefile.PL
index decdeb0f6789..e8994332d7dc 100644
--- a/tools/perf/scripts/perl/Perf-Trace-Util/Makefile.PL
+++ b/tools/perf/scripts/perl/Perf-Trace-Util/Makefile.PL
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1use 5.010000; 2use 5.010000;
2use ExtUtils::MakeMaker; 3use ExtUtils::MakeMaker;
3# See lib/ExtUtils/MakeMaker.pm for details of how to influence 4# See lib/ExtUtils/MakeMaker.pm for details of how to influence
diff --git a/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py b/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
index 9e0985794e20..81a56cd2b3c1 100755
--- a/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
+++ b/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
@@ -1,4 +1,5 @@
1# EventClass.py 1# EventClass.py
2# SPDX-License-Identifier: GPL-2.0
2# 3#
3# This is a library defining some events types classes, which could 4# This is a library defining some events types classes, which could
4# be used by other scripts to analyzing the perf samples. 5# be used by other scripts to analyzing the perf samples.
diff --git a/tools/perf/scripts/python/event_analyzing_sample.py b/tools/perf/scripts/python/event_analyzing_sample.py
index 163c39fa12d9..4e843b9864ec 100644
--- a/tools/perf/scripts/python/event_analyzing_sample.py
+++ b/tools/perf/scripts/python/event_analyzing_sample.py
@@ -1,4 +1,5 @@
1# event_analyzing_sample.py: general event handler in python 1# event_analyzing_sample.py: general event handler in python
2# SPDX-License-Identifier: GPL-2.0
2# 3#
3# Current perf report is already very powerful with the annotation integrated, 4# Current perf report is already very powerful with the annotation integrated,
4# and this script is not trying to be as powerful as perf report, but 5# and this script is not trying to be as powerful as perf report, but
diff --git a/tools/perf/scripts/python/net_dropmonitor.py b/tools/perf/scripts/python/net_dropmonitor.py
index 0b6ce8c253e8..a150164b44a3 100755
--- a/tools/perf/scripts/python/net_dropmonitor.py
+++ b/tools/perf/scripts/python/net_dropmonitor.py
@@ -1,4 +1,5 @@
1# Monitor the system for dropped packets and proudce a report of drop locations and counts 1# Monitor the system for dropped packets and proudce a report of drop locations and counts
2# SPDX-License-Identifier: GPL-2.0
2 3
3import os 4import os
4import sys 5import sys
diff --git a/tools/perf/scripts/python/netdev-times.py b/tools/perf/scripts/python/netdev-times.py
index 4c6f09ac7d12..9b2050f778f1 100644
--- a/tools/perf/scripts/python/netdev-times.py
+++ b/tools/perf/scripts/python/netdev-times.py
@@ -1,4 +1,5 @@
1# Display a process of packets and processed time. 1# Display a process of packets and processed time.
2# SPDX-License-Identifier: GPL-2.0
2# It helps us to investigate networking or network device. 3# It helps us to investigate networking or network device.
3# 4#
4# options 5# options
diff --git a/tools/perf/scripts/python/stackcollapse.py b/tools/perf/scripts/python/stackcollapse.py
index 5a605f70ef32..1697b5e18c96 100755
--- a/tools/perf/scripts/python/stackcollapse.py
+++ b/tools/perf/scripts/python/stackcollapse.py
@@ -1,4 +1,5 @@
1# stackcollapse.py - format perf samples with one line per distinct call stack 1# stackcollapse.py - format perf samples with one line per distinct call stack
2# SPDX-License-Identifier: GPL-2.0
2# 3#
3# This script's output has two space-separated fields. The first is a semicolon 4# This script's output has two space-separated fields. The first is a semicolon
4# separated stack including the program name (from the "comm" field) and the 5# separated stack including the program name (from the "comm" field) and the
diff --git a/tools/perf/scripts/python/stat-cpi.py b/tools/perf/scripts/python/stat-cpi.py
index 8b60f343dd07..8410672efb8b 100644
--- a/tools/perf/scripts/python/stat-cpi.py
+++ b/tools/perf/scripts/python/stat-cpi.py
@@ -1,4 +1,5 @@
1#!/usr/bin/env python 1#!/usr/bin/env python
2# SPDX-License-Identifier: GPL-2.0
2 3
3data = {} 4data = {}
4times = [] 5times = []
diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c
index c9aafed7da15..c180bbcdbef6 100644
--- a/tools/perf/tests/attr.c
+++ b/tools/perf/tests/attr.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * The struct perf_event_attr test support. 3 * The struct perf_event_attr test support.
3 * 4 *
diff --git a/tools/perf/tests/attr.py b/tools/perf/tests/attr.py
index 6bb50e82a3e3..907b1b2f56ad 100644
--- a/tools/perf/tests/attr.py
+++ b/tools/perf/tests/attr.py
@@ -1,4 +1,5 @@
1#! /usr/bin/python 1#! /usr/bin/python
2# SPDX-License-Identifier: GPL-2.0
2 3
3import os 4import os
4import sys 5import sys
diff --git a/tools/perf/tests/backward-ring-buffer.c b/tools/perf/tests/backward-ring-buffer.c
index d233ad336463..71b9a0b613d2 100644
--- a/tools/perf/tests/backward-ring-buffer.c
+++ b/tools/perf/tests/backward-ring-buffer.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Test backward bit in event attribute, read ring buffer from end to 3 * Test backward bit in event attribute, read ring buffer from end to
3 * beginning 4 * beginning
diff --git a/tools/perf/tests/bitmap.c b/tools/perf/tests/bitmap.c
index 0d7c06584905..47bedf25ba69 100644
--- a/tools/perf/tests/bitmap.c
+++ b/tools/perf/tests/bitmap.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/compiler.h> 2#include <linux/compiler.h>
2#include <linux/bitmap.h> 3#include <linux/bitmap.h>
3#include "tests.h" 4#include "tests.h"
diff --git a/tools/perf/tests/bp_signal.c b/tools/perf/tests/bp_signal.c
index 97937e1bc53a..335b695f4970 100644
--- a/tools/perf/tests/bp_signal.c
+++ b/tools/perf/tests/bp_signal.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Inspired by breakpoint overflow test done by 3 * Inspired by breakpoint overflow test done by
3 * Vince Weaver <vincent.weaver@maine.edu> for perf_event_tests 4 * Vince Weaver <vincent.weaver@maine.edu> for perf_event_tests
diff --git a/tools/perf/tests/bp_signal_overflow.c b/tools/perf/tests/bp_signal_overflow.c
index 61ecd8021f49..ca962559e845 100644
--- a/tools/perf/tests/bp_signal_overflow.c
+++ b/tools/perf/tests/bp_signal_overflow.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Originally done by Vince Weaver <vincent.weaver@maine.edu> for 3 * Originally done by Vince Weaver <vincent.weaver@maine.edu> for
3 * perf_event_tests (git://github.com/deater/perf_event_tests) 4 * perf_event_tests (git://github.com/deater/perf_event_tests)
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index 377bea009163..53d06f37406a 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * builtin-test.c 3 * builtin-test.c
3 * 4 *
diff --git a/tools/perf/tests/clang.c b/tools/perf/tests/clang.c
index c60ec916f0f2..f45fe11dcf50 100644
--- a/tools/perf/tests/clang.c
+++ b/tools/perf/tests/clang.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "tests.h" 2#include "tests.h"
2#include "debug.h" 3#include "debug.h"
3#include "util.h" 4#include "util.h"
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 466a462b26d1..fcc8984bc329 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <linux/kernel.h> 3#include <linux/kernel.h>
3#include <linux/types.h> 4#include <linux/types.h>
diff --git a/tools/perf/tests/cpumap.c b/tools/perf/tests/cpumap.c
index 199702252270..e78b897677bd 100644
--- a/tools/perf/tests/cpumap.c
+++ b/tools/perf/tests/cpumap.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "tests.h" 2#include "tests.h"
2#include <stdio.h> 3#include <stdio.h>
3#include "cpumap.h" 4#include "cpumap.h"
diff --git a/tools/perf/tests/dso-data.c b/tools/perf/tests/dso-data.c
index 30aead42d136..7f6c52021e41 100644
--- a/tools/perf/tests/dso-data.c
+++ b/tools/perf/tests/dso-data.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <dirent.h> 2#include <dirent.h>
2#include <stdlib.h> 3#include <stdlib.h>
3#include <linux/kernel.h> 4#include <linux/kernel.h>
diff --git a/tools/perf/tests/dwarf-unwind.c b/tools/perf/tests/dwarf-unwind.c
index 9ba1d216a89f..ac40e05bcab4 100644
--- a/tools/perf/tests/dwarf-unwind.c
+++ b/tools/perf/tests/dwarf-unwind.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/compiler.h> 2#include <linux/compiler.h>
2#include <linux/types.h> 3#include <linux/types.h>
3#include <inttypes.h> 4#include <inttypes.h>
diff --git a/tools/perf/tests/event-times.c b/tools/perf/tests/event-times.c
index b82b981c3259..1a2686f1fcf0 100644
--- a/tools/perf/tests/event-times.c
+++ b/tools/perf/tests/event-times.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/compiler.h> 2#include <linux/compiler.h>
2#include <errno.h> 3#include <errno.h>
3#include <inttypes.h> 4#include <inttypes.h>
diff --git a/tools/perf/tests/event_update.c b/tools/perf/tests/event_update.c
index 9484da2ec6b4..f14dcd613438 100644
--- a/tools/perf/tests/event_update.c
+++ b/tools/perf/tests/event_update.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/compiler.h> 2#include <linux/compiler.h>
2#include "evlist.h" 3#include "evlist.h"
3#include "evsel.h" 4#include "evsel.h"
diff --git a/tools/perf/tests/evsel-roundtrip-name.c b/tools/perf/tests/evsel-roundtrip-name.c
index d32759b6e38a..a104728ebf25 100644
--- a/tools/perf/tests/evsel-roundtrip-name.c
+++ b/tools/perf/tests/evsel-roundtrip-name.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "evlist.h" 2#include "evlist.h"
2#include "evsel.h" 3#include "evsel.h"
3#include "parse-events.h" 4#include "parse-events.h"
diff --git a/tools/perf/tests/evsel-tp-sched.c b/tools/perf/tests/evsel-tp-sched.c
index 5fc906d26c5c..699561fa512c 100644
--- a/tools/perf/tests/evsel-tp-sched.c
+++ b/tools/perf/tests/evsel-tp-sched.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/err.h> 2#include <linux/err.h>
2#include <traceevent/event-parse.h> 3#include <traceevent/event-parse.h>
3#include "evsel.h" 4#include "evsel.h"
diff --git a/tools/perf/tests/expr.c b/tools/perf/tests/expr.c
index cb251bf523e7..01f0706995a9 100644
--- a/tools/perf/tests/expr.c
+++ b/tools/perf/tests/expr.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "util/debug.h" 2#include "util/debug.h"
2#include "util/expr.h" 3#include "util/expr.h"
3#include "tests.h" 4#include "tests.h"
diff --git a/tools/perf/tests/fdarray.c b/tools/perf/tests/fdarray.c
index 7d3a9e2ff897..c7c81c4a5b2b 100644
--- a/tools/perf/tests/fdarray.c
+++ b/tools/perf/tests/fdarray.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <api/fd/array.h> 2#include <api/fd/array.h>
2#include <poll.h> 3#include <poll.h>
3#include "util/debug.h" 4#include "util/debug.h"
diff --git a/tools/perf/tests/hists_common.c b/tools/perf/tests/hists_common.c
index 00b8dc50f3db..f7c5b613d667 100644
--- a/tools/perf/tests/hists_common.c
+++ b/tools/perf/tests/hists_common.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <inttypes.h> 2#include <inttypes.h>
2#include "perf.h" 3#include "perf.h"
3#include "util/debug.h" 4#include "util/debug.h"
diff --git a/tools/perf/tests/hists_common.h b/tools/perf/tests/hists_common.h
index 888254e8665c..a2de0ff0ce3a 100644
--- a/tools/perf/tests/hists_common.h
+++ b/tools/perf/tests/hists_common.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_TESTS__HISTS_COMMON_H__ 2#ifndef __PERF_TESTS__HISTS_COMMON_H__
2#define __PERF_TESTS__HISTS_COMMON_H__ 3#define __PERF_TESTS__HISTS_COMMON_H__
3 4
diff --git a/tools/perf/tests/hists_cumulate.c b/tools/perf/tests/hists_cumulate.c
index 8d19c0200cb7..65fe02bebbee 100644
--- a/tools/perf/tests/hists_cumulate.c
+++ b/tools/perf/tests/hists_cumulate.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "perf.h" 2#include "perf.h"
2#include "util/debug.h" 3#include "util/debug.h"
3#include "util/event.h" 4#include "util/event.h"
diff --git a/tools/perf/tests/hists_filter.c b/tools/perf/tests/hists_filter.c
index 755ca551b810..1c5bedab3c2c 100644
--- a/tools/perf/tests/hists_filter.c
+++ b/tools/perf/tests/hists_filter.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "perf.h" 2#include "perf.h"
2#include "util/debug.h" 3#include "util/debug.h"
3#include "util/symbol.h" 4#include "util/symbol.h"
diff --git a/tools/perf/tests/hists_link.c b/tools/perf/tests/hists_link.c
index 073c9c2856bc..9a9d06cb0222 100644
--- a/tools/perf/tests/hists_link.c
+++ b/tools/perf/tests/hists_link.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "perf.h" 2#include "perf.h"
2#include "tests.h" 3#include "tests.h"
3#include "debug.h" 4#include "debug.h"
diff --git a/tools/perf/tests/hists_output.c b/tools/perf/tests/hists_output.c
index 282d62eaebe2..faacb4f41460 100644
--- a/tools/perf/tests/hists_output.c
+++ b/tools/perf/tests/hists_output.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "perf.h" 2#include "perf.h"
2#include "util/debug.h" 3#include "util/debug.h"
3#include "util/event.h" 4#include "util/event.h"
diff --git a/tools/perf/tests/is_printable_array.c b/tools/perf/tests/is_printable_array.c
index 38f765767587..9c7b3baca4fe 100644
--- a/tools/perf/tests/is_printable_array.c
+++ b/tools/perf/tests/is_printable_array.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/compiler.h> 2#include <linux/compiler.h>
2#include <linux/kernel.h> 3#include <linux/kernel.h>
3#include "tests.h" 4#include "tests.h"
diff --git a/tools/perf/tests/keep-tracking.c b/tools/perf/tests/keep-tracking.c
index 739428603b71..842d33637a18 100644
--- a/tools/perf/tests/keep-tracking.c
+++ b/tools/perf/tests/keep-tracking.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/types.h> 2#include <linux/types.h>
2#include <unistd.h> 3#include <unistd.h>
3#include <sys/prctl.h> 4#include <sys/prctl.h>
diff --git a/tools/perf/tests/kmod-path.c b/tools/perf/tests/kmod-path.c
index 8b9d4ba06c0e..8e57d46109de 100644
--- a/tools/perf/tests/kmod-path.c
+++ b/tools/perf/tests/kmod-path.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdbool.h> 2#include <stdbool.h>
2#include <stdlib.h> 3#include <stdlib.h>
3#include "tests.h" 4#include "tests.h"
diff --git a/tools/perf/tests/llvm.c b/tools/perf/tests/llvm.c
index 5187b50dbafe..a039f93199e5 100644
--- a/tools/perf/tests/llvm.c
+++ b/tools/perf/tests/llvm.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <bpf/libbpf.h> 3#include <bpf/libbpf.h>
3#include <util/llvm-utils.h> 4#include <util/llvm-utils.h>
diff --git a/tools/perf/tests/llvm.h b/tools/perf/tests/llvm.h
index b83571758d83..f68b0d9b8ae2 100644
--- a/tools/perf/tests/llvm.h
+++ b/tools/perf/tests/llvm.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef PERF_TEST_LLVM_H 2#ifndef PERF_TEST_LLVM_H
2#define PERF_TEST_LLVM_H 3#define PERF_TEST_LLVM_H
3 4
diff --git a/tools/perf/tests/mmap-basic.c b/tools/perf/tests/mmap-basic.c
index bc8a70ee46d8..5a8bf318f8a7 100644
--- a/tools/perf/tests/mmap-basic.c
+++ b/tools/perf/tests/mmap-basic.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <inttypes.h> 3#include <inttypes.h>
3/* For the CLR_() macros */ 4/* For the CLR_() macros */
diff --git a/tools/perf/tests/mmap-thread-lookup.c b/tools/perf/tests/mmap-thread-lookup.c
index f94a4196e7c9..3c3f3e029e33 100644
--- a/tools/perf/tests/mmap-thread-lookup.c
+++ b/tools/perf/tests/mmap-thread-lookup.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <inttypes.h> 2#include <inttypes.h>
2#include <unistd.h> 3#include <unistd.h>
3#include <sys/syscall.h> 4#include <sys/syscall.h>
diff --git a/tools/perf/tests/openat-syscall-all-cpus.c b/tools/perf/tests/openat-syscall-all-cpus.c
index 9cf1c35f2ad0..c531e6deb104 100644
--- a/tools/perf/tests/openat-syscall-all-cpus.c
+++ b/tools/perf/tests/openat-syscall-all-cpus.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <inttypes.h> 3#include <inttypes.h>
3/* For the CPU_* macros */ 4/* For the CPU_* macros */
diff --git a/tools/perf/tests/openat-syscall-tp-fields.c b/tools/perf/tests/openat-syscall-tp-fields.c
index b6ee1c41f45d..d9619d265314 100644
--- a/tools/perf/tests/openat-syscall-tp-fields.c
+++ b/tools/perf/tests/openat-syscall-tp-fields.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/err.h> 2#include <linux/err.h>
2#include "perf.h" 3#include "perf.h"
3#include "evlist.h" 4#include "evlist.h"
diff --git a/tools/perf/tests/openat-syscall.c b/tools/perf/tests/openat-syscall.c
index 9dc5c5d37553..00cd63f90b92 100644
--- a/tools/perf/tests/openat-syscall.c
+++ b/tools/perf/tests/openat-syscall.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <inttypes.h> 3#include <inttypes.h>
3#include <api/fs/tracing_path.h> 4#include <api/fs/tracing_path.h>
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index 0f0b025faa4b..f0679613bd18 100644
--- a/tools/perf/tests/parse-events.c
+++ b/tools/perf/tests/parse-events.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "parse-events.h" 2#include "parse-events.h"
2#include "evsel.h" 3#include "evsel.h"
3#include "evlist.h" 4#include "evlist.h"
diff --git a/tools/perf/tests/parse-no-sample-id-all.c b/tools/perf/tests/parse-no-sample-id-all.c
index 91867dcc39f0..2196d1497c0c 100644
--- a/tools/perf/tests/parse-no-sample-id-all.c
+++ b/tools/perf/tests/parse-no-sample-id-all.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/kernel.h> 2#include <linux/kernel.h>
2#include <linux/types.h> 3#include <linux/types.h>
3#include <stddef.h> 4#include <stddef.h>
diff --git a/tools/perf/tests/perf-hooks.c b/tools/perf/tests/perf-hooks.c
index bf2517d6de70..a693bcf017ea 100644
--- a/tools/perf/tests/perf-hooks.c
+++ b/tools/perf/tests/perf-hooks.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <signal.h> 2#include <signal.h>
2#include <stdlib.h> 3#include <stdlib.h>
3 4
diff --git a/tools/perf/tests/perf-record.c b/tools/perf/tests/perf-record.c
index 19b650064b70..c34904d37705 100644
--- a/tools/perf/tests/perf-record.c
+++ b/tools/perf/tests/perf-record.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <inttypes.h> 3#include <inttypes.h>
3/* For the CLR_() macros */ 4/* For the CLR_() macros */
diff --git a/tools/perf/tests/perf-targz-src-pkg b/tools/perf/tests/perf-targz-src-pkg
index f2d9c5fe58e0..fae26b1cf08f 100755
--- a/tools/perf/tests/perf-targz-src-pkg
+++ b/tools/perf/tests/perf-targz-src-pkg
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# Test one of the main kernel Makefile targets to generate a perf sources tarball 3# Test one of the main kernel Makefile targets to generate a perf sources tarball
3# suitable for build outside the full kernel sources. 4# suitable for build outside the full kernel sources.
4# 5#
diff --git a/tools/perf/tests/pmu.c b/tools/perf/tests/pmu.c
index 9f7f589f9c54..9abca267afa9 100644
--- a/tools/perf/tests/pmu.c
+++ b/tools/perf/tests/pmu.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "parse-events.h" 2#include "parse-events.h"
2#include "pmu.h" 3#include "pmu.h"
3#include "util.h" 4#include "util.h"
diff --git a/tools/perf/tests/python-use.c b/tools/perf/tests/python-use.c
index 598a7e058ad4..5d2df65ada6a 100644
--- a/tools/perf/tests/python-use.c
+++ b/tools/perf/tests/python-use.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Just test if we can load the python binding. 3 * Just test if we can load the python binding.
3 */ 4 */
diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c
index c3858487159d..3ec6302b6498 100644
--- a/tools/perf/tests/sample-parsing.c
+++ b/tools/perf/tests/sample-parsing.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdbool.h> 2#include <stdbool.h>
2#include <inttypes.h> 3#include <inttypes.h>
3#include <linux/kernel.h> 4#include <linux/kernel.h>
diff --git a/tools/perf/tests/sdt.c b/tools/perf/tests/sdt.c
index a9903d9b8bc2..5059452d27dd 100644
--- a/tools/perf/tests/sdt.c
+++ b/tools/perf/tests/sdt.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <stdio.h> 3#include <stdio.h>
3#include <sys/epoll.h> 4#include <sys/epoll.h>
diff --git a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
index 462fc755092e..7a84d73324e3 100755
--- a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
+++ b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
@@ -10,6 +10,9 @@
10 10
11. $(dirname $0)/lib/probe.sh 11. $(dirname $0)/lib/probe.sh
12 12
13ld=$(realpath /lib64/ld*.so.* | uniq)
14libc=$(echo $ld | sed 's/ld/libc/g')
15
13trace_libc_inet_pton_backtrace() { 16trace_libc_inet_pton_backtrace() {
14 idx=0 17 idx=0
15 expected[0]="PING.*bytes" 18 expected[0]="PING.*bytes"
@@ -18,8 +21,8 @@ trace_libc_inet_pton_backtrace() {
18 expected[3]=".*packets transmitted.*" 21 expected[3]=".*packets transmitted.*"
19 expected[4]="rtt min.*" 22 expected[4]="rtt min.*"
20 expected[5]="[0-9]+\.[0-9]+[[:space:]]+probe_libc:inet_pton:\([[:xdigit:]]+\)" 23 expected[5]="[0-9]+\.[0-9]+[[:space:]]+probe_libc:inet_pton:\([[:xdigit:]]+\)"
21 expected[6]=".*inet_pton[[:space:]]\(/usr/lib.*/libc-[0-9]+\.[0-9]+\.so\)$" 24 expected[6]=".*inet_pton[[:space:]]\($libc\)$"
22 expected[7]="getaddrinfo[[:space:]]\(/usr/lib.*/libc-[0-9]+\.[0-9]+\.so\)$" 25 expected[7]="getaddrinfo[[:space:]]\($libc\)$"
23 expected[8]=".*\(.*/bin/ping.*\)$" 26 expected[8]=".*\(.*/bin/ping.*\)$"
24 27
25 perf trace --no-syscalls -e probe_libc:inet_pton/max-stack=3/ ping -6 -c 1 ::1 2>&1 | grep -v ^$ | while read line ; do 28 perf trace --no-syscalls -e probe_libc:inet_pton/max-stack=3/ ping -6 -c 1 ::1 2>&1 | grep -v ^$ | while read line ; do
@@ -35,7 +38,7 @@ trace_libc_inet_pton_backtrace() {
35} 38}
36 39
37skip_if_no_perf_probe && \ 40skip_if_no_perf_probe && \
38perf probe -q /lib64/libc-*.so inet_pton && \ 41perf probe -q $libc inet_pton && \
39trace_libc_inet_pton_backtrace 42trace_libc_inet_pton_backtrace
40err=$? 43err=$?
41rm -f ${file} 44rm -f ${file}
diff --git a/tools/perf/tests/stat.c b/tools/perf/tests/stat.c
index 7f988a939036..94250024684a 100644
--- a/tools/perf/tests/stat.c
+++ b/tools/perf/tests/stat.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/compiler.h> 2#include <linux/compiler.h>
2#include "event.h" 3#include "event.h"
3#include "tests.h" 4#include "tests.h"
diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c
index d88511f6072c..725a196991a8 100644
--- a/tools/perf/tests/sw-clock.c
+++ b/tools/perf/tests/sw-clock.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <inttypes.h> 3#include <inttypes.h>
3#include <unistd.h> 4#include <unistd.h>
diff --git a/tools/perf/tests/switch-tracking.c b/tools/perf/tests/switch-tracking.c
index 2acd78555192..7d3f4bf9534f 100644
--- a/tools/perf/tests/switch-tracking.c
+++ b/tools/perf/tests/switch-tracking.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sys/time.h> 2#include <sys/time.h>
2#include <sys/prctl.h> 3#include <sys/prctl.h>
3#include <errno.h> 4#include <errno.h>
diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c
index f0881d0dd9c9..bc4a7344e274 100644
--- a/tools/perf/tests/task-exit.c
+++ b/tools/perf/tests/task-exit.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "evlist.h" 2#include "evlist.h"
2#include "evsel.h" 3#include "evsel.h"
3#include "thread_map.h" 4#include "thread_map.h"
diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h
index 921412a6a880..2862b80bc288 100644
--- a/tools/perf/tests/tests.h
+++ b/tools/perf/tests/tests.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef TESTS_H 2#ifndef TESTS_H
2#define TESTS_H 3#define TESTS_H
3 4
diff --git a/tools/perf/tests/thread-map.c b/tools/perf/tests/thread-map.c
index b3423c744f46..dbcb6a19b375 100644
--- a/tools/perf/tests/thread-map.c
+++ b/tools/perf/tests/thread-map.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdlib.h> 2#include <stdlib.h>
2#include <sys/types.h> 3#include <sys/types.h>
3#include <unistd.h> 4#include <unistd.h>
diff --git a/tools/perf/tests/thread-mg-share.c b/tools/perf/tests/thread-mg-share.c
index b9c7f58db6c4..b1d1bbafe7ae 100644
--- a/tools/perf/tests/thread-mg-share.c
+++ b/tools/perf/tests/thread-mg-share.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "tests.h" 2#include "tests.h"
2#include "machine.h" 3#include "machine.h"
3#include "thread.h" 4#include "thread.h"
diff --git a/tools/perf/tests/topology.c b/tools/perf/tests/topology.c
index 19b0561fd6f6..a59db7c45a65 100644
--- a/tools/perf/tests/topology.c
+++ b/tools/perf/tests/topology.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <string.h> 2#include <string.h>
2#include <stdlib.h> 3#include <stdlib.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/perf/tests/unit_number__scnprintf.c b/tools/perf/tests/unit_number__scnprintf.c
index 15cd1cf8c129..2bb8cb0039c1 100644
--- a/tools/perf/tests/unit_number__scnprintf.c
+++ b/tools/perf/tests/unit_number__scnprintf.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <inttypes.h> 2#include <inttypes.h>
2#include <linux/compiler.h> 3#include <linux/compiler.h>
3#include <linux/types.h> 4#include <linux/types.h>
diff --git a/tools/perf/tests/vmlinux-kallsyms.c b/tools/perf/tests/vmlinux-kallsyms.c
index 86cb8868f67f..f6789fb029d6 100644
--- a/tools/perf/tests/vmlinux-kallsyms.c
+++ b/tools/perf/tests/vmlinux-kallsyms.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/compiler.h> 2#include <linux/compiler.h>
2#include <linux/rbtree.h> 3#include <linux/rbtree.h>
3#include <inttypes.h> 4#include <inttypes.h>
diff --git a/tools/perf/trace/beauty/beauty.h b/tools/perf/trace/beauty/beauty.h
index 4b58581a6053..d80655cd1881 100644
--- a/tools/perf/trace/beauty/beauty.h
+++ b/tools/perf/trace/beauty/beauty.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_TRACE_BEAUTY_H 2#ifndef _PERF_TRACE_BEAUTY_H
2#define _PERF_TRACE_BEAUTY_H 3#define _PERF_TRACE_BEAUTY_H
3 4
diff --git a/tools/perf/trace/beauty/eventfd.c b/tools/perf/trace/beauty/eventfd.c
index b08f21eb6f4d..5d6a477a6400 100644
--- a/tools/perf/trace/beauty/eventfd.c
+++ b/tools/perf/trace/beauty/eventfd.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#ifndef EFD_SEMAPHORE 2#ifndef EFD_SEMAPHORE
2#define EFD_SEMAPHORE 1 3#define EFD_SEMAPHORE 1
3#endif 4#endif
diff --git a/tools/perf/trace/beauty/flock.c b/tools/perf/trace/beauty/flock.c
index 74613703a14e..f9707f57566c 100644
--- a/tools/perf/trace/beauty/flock.c
+++ b/tools/perf/trace/beauty/flock.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <fcntl.h> 2#include <fcntl.h>
2 3
3#ifndef LOCK_MAND 4#ifndef LOCK_MAND
diff --git a/tools/perf/trace/beauty/futex_op.c b/tools/perf/trace/beauty/futex_op.c
index bfd3359b09b6..61850fbc85ff 100644
--- a/tools/perf/trace/beauty/futex_op.c
+++ b/tools/perf/trace/beauty/futex_op.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/futex.h> 2#include <linux/futex.h>
2 3
3#ifndef FUTEX_WAIT_BITSET 4#ifndef FUTEX_WAIT_BITSET
diff --git a/tools/perf/trace/beauty/mmap.c b/tools/perf/trace/beauty/mmap.c
index 754558f9009d..51f1cea406f5 100644
--- a/tools/perf/trace/beauty/mmap.c
+++ b/tools/perf/trace/beauty/mmap.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <uapi/linux/mman.h> 2#include <uapi/linux/mman.h>
2 3
3static size_t syscall_arg__scnprintf_mmap_prot(char *bf, size_t size, 4static size_t syscall_arg__scnprintf_mmap_prot(char *bf, size_t size,
diff --git a/tools/perf/trace/beauty/mode_t.c b/tools/perf/trace/beauty/mode_t.c
index 930d8fef2400..d929ad7dd97b 100644
--- a/tools/perf/trace/beauty/mode_t.c
+++ b/tools/perf/trace/beauty/mode_t.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sys/types.h> 2#include <sys/types.h>
2#include <sys/stat.h> 3#include <sys/stat.h>
3#include <unistd.h> 4#include <unistd.h>
diff --git a/tools/perf/trace/beauty/msg_flags.c b/tools/perf/trace/beauty/msg_flags.c
index 1106c8960cc4..c064d6aae659 100644
--- a/tools/perf/trace/beauty/msg_flags.c
+++ b/tools/perf/trace/beauty/msg_flags.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sys/types.h> 2#include <sys/types.h>
2#include <sys/socket.h> 3#include <sys/socket.h>
3 4
diff --git a/tools/perf/trace/beauty/open_flags.c b/tools/perf/trace/beauty/open_flags.c
index e359e041dc0e..6aec6178a99d 100644
--- a/tools/perf/trace/beauty/open_flags.c
+++ b/tools/perf/trace/beauty/open_flags.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sys/types.h> 2#include <sys/types.h>
2#include <sys/stat.h> 3#include <sys/stat.h>
3#include <fcntl.h> 4#include <fcntl.h>
diff --git a/tools/perf/trace/beauty/perf_event_open.c b/tools/perf/trace/beauty/perf_event_open.c
index 311f09dd718d..2bafd7c995ff 100644
--- a/tools/perf/trace/beauty/perf_event_open.c
+++ b/tools/perf/trace/beauty/perf_event_open.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#ifndef PERF_FLAG_FD_NO_GROUP 2#ifndef PERF_FLAG_FD_NO_GROUP
2# define PERF_FLAG_FD_NO_GROUP (1UL << 0) 3# define PERF_FLAG_FD_NO_GROUP (1UL << 0)
3#endif 4#endif
diff --git a/tools/perf/trace/beauty/pid.c b/tools/perf/trace/beauty/pid.c
index b6d419e16dcf..0313df342830 100644
--- a/tools/perf/trace/beauty/pid.c
+++ b/tools/perf/trace/beauty/pid.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_arg *arg) 2size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_arg *arg)
2{ 3{
3 int pid = arg->val; 4 int pid = arg->val;
diff --git a/tools/perf/trace/beauty/sched_policy.c b/tools/perf/trace/beauty/sched_policy.c
index 34775295b9b3..ba5096ae76b6 100644
--- a/tools/perf/trace/beauty/sched_policy.c
+++ b/tools/perf/trace/beauty/sched_policy.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sched.h> 2#include <sched.h>
2 3
3/* 4/*
diff --git a/tools/perf/trace/beauty/seccomp.c b/tools/perf/trace/beauty/seccomp.c
index 356441bce27d..b7097fd5fed9 100644
--- a/tools/perf/trace/beauty/seccomp.c
+++ b/tools/perf/trace/beauty/seccomp.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#ifndef SECCOMP_SET_MODE_STRICT 2#ifndef SECCOMP_SET_MODE_STRICT
2#define SECCOMP_SET_MODE_STRICT 0 3#define SECCOMP_SET_MODE_STRICT 0
3#endif 4#endif
diff --git a/tools/perf/trace/beauty/signum.c b/tools/perf/trace/beauty/signum.c
index fde8f2fc6558..bde18a53f090 100644
--- a/tools/perf/trace/beauty/signum.c
+++ b/tools/perf/trace/beauty/signum.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <signal.h> 2#include <signal.h>
2 3
3static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscall_arg *arg) 4static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscall_arg *arg)
diff --git a/tools/perf/trace/beauty/socket_type.c b/tools/perf/trace/beauty/socket_type.c
index 0a5ce818131c..bca26aef4a77 100644
--- a/tools/perf/trace/beauty/socket_type.c
+++ b/tools/perf/trace/beauty/socket_type.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sys/types.h> 2#include <sys/types.h>
2#include <sys/socket.h> 3#include <sys/socket.h>
3 4
diff --git a/tools/perf/trace/beauty/waitid_options.c b/tools/perf/trace/beauty/waitid_options.c
index 7942724adec8..8465281a093d 100644
--- a/tools/perf/trace/beauty/waitid_options.c
+++ b/tools/perf/trace/beauty/waitid_options.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sys/types.h> 2#include <sys/types.h>
2#include <sys/wait.h> 3#include <sys/wait.h>
3 4
diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c
index d0c2007c307b..63399af3049f 100644
--- a/tools/perf/ui/browser.c
+++ b/tools/perf/ui/browser.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "../util.h" 2#include "../util.h"
2#include "../string2.h" 3#include "../string2.h"
3#include "../config.h" 4#include "../config.h"
diff --git a/tools/perf/ui/browser.h b/tools/perf/ui/browser.h
index a12eff75638b..03e1734412b9 100644
--- a/tools/perf/ui/browser.h
+++ b/tools/perf/ui/browser.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_UI_BROWSER_H_ 2#ifndef _PERF_UI_BROWSER_H_
2#define _PERF_UI_BROWSER_H_ 1 3#define _PERF_UI_BROWSER_H_ 1
3 4
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 786fecaf578e..8f7f59d1a2b5 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "../../util/util.h" 2#include "../../util/util.h"
2#include "../browser.h" 3#include "../browser.h"
3#include "../helpline.h" 4#include "../helpline.h"
diff --git a/tools/perf/ui/browsers/header.c b/tools/perf/ui/browsers/header.c
index e2c9390ff4c5..d75492189acb 100644
--- a/tools/perf/ui/browsers/header.c
+++ b/tools/perf/ui/browsers/header.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "util/cache.h" 2#include "util/cache.h"
2#include "util/debug.h" 3#include "util/debug.h"
3#include "ui/browser.h" 4#include "ui/browser.h"
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 13dfb0a0bdeb..628ad5f7eddb 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <dirent.h> 2#include <dirent.h>
2#include <errno.h> 3#include <errno.h>
3#include <inttypes.h> 4#include <inttypes.h>
diff --git a/tools/perf/ui/browsers/hists.h b/tools/perf/ui/browsers/hists.h
index 23d6acb84800..ba431777f559 100644
--- a/tools/perf/ui/browsers/hists.h
+++ b/tools/perf/ui/browsers/hists.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_UI_BROWSER_HISTS_H_ 2#ifndef _PERF_UI_BROWSER_HISTS_H_
2#define _PERF_UI_BROWSER_HISTS_H_ 1 3#define _PERF_UI_BROWSER_HISTS_H_ 1
3 4
diff --git a/tools/perf/ui/browsers/map.c b/tools/perf/ui/browsers/map.c
index ffa5addf631d..e03fa75f108a 100644
--- a/tools/perf/ui/browsers/map.c
+++ b/tools/perf/ui/browsers/map.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <elf.h> 2#include <elf.h>
2#include <inttypes.h> 3#include <inttypes.h>
3#include <sys/ttydefaults.h> 4#include <sys/ttydefaults.h>
diff --git a/tools/perf/ui/browsers/map.h b/tools/perf/ui/browsers/map.h
index 2d58e4b3eb6f..0ed7dbb3a373 100644
--- a/tools/perf/ui/browsers/map.h
+++ b/tools/perf/ui/browsers/map.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_UI_MAP_BROWSER_H_ 2#ifndef _PERF_UI_MAP_BROWSER_H_
2#define _PERF_UI_MAP_BROWSER_H_ 1 3#define _PERF_UI_MAP_BROWSER_H_ 1
3struct map; 4struct map;
diff --git a/tools/perf/ui/browsers/scripts.c b/tools/perf/ui/browsers/scripts.c
index ad6b6ee3770e..90a32ac69e76 100644
--- a/tools/perf/ui/browsers/scripts.c
+++ b/tools/perf/ui/browsers/scripts.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <elf.h> 2#include <elf.h>
2#include <inttypes.h> 3#include <inttypes.h>
3#include <sys/ttydefaults.h> 4#include <sys/ttydefaults.h>
diff --git a/tools/perf/ui/gtk/annotate.c b/tools/perf/ui/gtk/annotate.c
index 02176193f427..fc7a2e105bfd 100644
--- a/tools/perf/ui/gtk/annotate.c
+++ b/tools/perf/ui/gtk/annotate.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "gtk.h" 2#include "gtk.h"
2#include "util/debug.h" 3#include "util/debug.h"
3#include "util/annotate.h" 4#include "util/annotate.h"
diff --git a/tools/perf/ui/gtk/browser.c b/tools/perf/ui/gtk/browser.c
index c24d91221290..4820e25ac68d 100644
--- a/tools/perf/ui/gtk/browser.c
+++ b/tools/perf/ui/gtk/browser.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "../evlist.h" 2#include "../evlist.h"
2#include "../cache.h" 3#include "../cache.h"
3#include "../evsel.h" 4#include "../evsel.h"
diff --git a/tools/perf/ui/gtk/gtk.h b/tools/perf/ui/gtk/gtk.h
index 0a9173ff9a61..9846ea5c831b 100644
--- a/tools/perf/ui/gtk/gtk.h
+++ b/tools/perf/ui/gtk/gtk.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_GTK_H_ 2#ifndef _PERF_GTK_H_
2#define _PERF_GTK_H_ 1 3#define _PERF_GTK_H_ 1
3 4
diff --git a/tools/perf/ui/gtk/helpline.c b/tools/perf/ui/gtk/helpline.c
index 3388cbd12186..fbf1ea9ce9a2 100644
--- a/tools/perf/ui/gtk/helpline.c
+++ b/tools/perf/ui/gtk/helpline.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <string.h> 3#include <string.h>
3 4
diff --git a/tools/perf/ui/gtk/hists.c b/tools/perf/ui/gtk/hists.c
index e24f83957705..24e1ec201ffd 100644
--- a/tools/perf/ui/gtk/hists.c
+++ b/tools/perf/ui/gtk/hists.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "../evlist.h" 2#include "../evlist.h"
2#include "../cache.h" 3#include "../cache.h"
3#include "../evsel.h" 4#include "../evsel.h"
diff --git a/tools/perf/ui/gtk/progress.c b/tools/perf/ui/gtk/progress.c
index b656655fbc39..b6ad8857da78 100644
--- a/tools/perf/ui/gtk/progress.c
+++ b/tools/perf/ui/gtk/progress.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <inttypes.h> 2#include <inttypes.h>
2 3
3#include "gtk.h" 4#include "gtk.h"
diff --git a/tools/perf/ui/gtk/setup.c b/tools/perf/ui/gtk/setup.c
index 1d57676f8212..506e73b3834c 100644
--- a/tools/perf/ui/gtk/setup.c
+++ b/tools/perf/ui/gtk/setup.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "gtk.h" 2#include "gtk.h"
2#include "../../util/cache.h" 3#include "../../util/cache.h"
3#include "../../util/debug.h" 4#include "../../util/debug.h"
diff --git a/tools/perf/ui/gtk/util.c b/tools/perf/ui/gtk/util.c
index 00b91921edb1..7250d8101c8f 100644
--- a/tools/perf/ui/gtk/util.c
+++ b/tools/perf/ui/gtk/util.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "../util.h" 2#include "../util.h"
2#include "../../util/util.h" 3#include "../../util/util.h"
3#include "../../util/debug.h" 4#include "../../util/debug.h"
diff --git a/tools/perf/ui/helpline.c b/tools/perf/ui/helpline.c
index 379039ab00d8..b3c421429ed4 100644
--- a/tools/perf/ui/helpline.c
+++ b/tools/perf/ui/helpline.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <stdlib.h> 3#include <stdlib.h>
3#include <string.h> 4#include <string.h>
diff --git a/tools/perf/ui/helpline.h b/tools/perf/ui/helpline.h
index d52d0a1a881b..8f775a053ca3 100644
--- a/tools/perf/ui/helpline.h
+++ b/tools/perf/ui/helpline.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_UI_HELPLINE_H_ 2#ifndef _PERF_UI_HELPLINE_H_
2#define _PERF_UI_HELPLINE_H_ 1 3#define _PERF_UI_HELPLINE_H_ 1
3 4
diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c
index ddb2c6fbdf91..706f6f1e9c7d 100644
--- a/tools/perf/ui/hist.c
+++ b/tools/perf/ui/hist.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <inttypes.h> 2#include <inttypes.h>
2#include <math.h> 3#include <math.h>
3#include <linux/compiler.h> 4#include <linux/compiler.h>
@@ -532,7 +533,7 @@ void perf_hpp_list__prepend_sort_field(struct perf_hpp_list *list,
532 533
533void perf_hpp__column_unregister(struct perf_hpp_fmt *format) 534void perf_hpp__column_unregister(struct perf_hpp_fmt *format)
534{ 535{
535 list_del(&format->list); 536 list_del_init(&format->list);
536} 537}
537 538
538void perf_hpp__cancel_cumulate(void) 539void perf_hpp__cancel_cumulate(void)
@@ -606,6 +607,13 @@ next:
606 607
607static void fmt_free(struct perf_hpp_fmt *fmt) 608static void fmt_free(struct perf_hpp_fmt *fmt)
608{ 609{
610 /*
611 * At this point fmt should be completely
612 * unhooked, if not it's a bug.
613 */
614 BUG_ON(!list_empty(&fmt->list));
615 BUG_ON(!list_empty(&fmt->sort_list));
616
609 if (fmt->free) 617 if (fmt->free)
610 fmt->free(fmt); 618 fmt->free(fmt);
611} 619}
diff --git a/tools/perf/ui/keysyms.h b/tools/perf/ui/keysyms.h
index 65092d576b4e..fbfac29077f2 100644
--- a/tools/perf/ui/keysyms.h
+++ b/tools/perf/ui/keysyms.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_KEYSYMS_H_ 2#ifndef _PERF_KEYSYMS_H_
2#define _PERF_KEYSYMS_H_ 1 3#define _PERF_KEYSYMS_H_ 1
3 4
diff --git a/tools/perf/ui/libslang.h b/tools/perf/ui/libslang.h
index db816695ad97..c0686cda39a5 100644
--- a/tools/perf/ui/libslang.h
+++ b/tools/perf/ui/libslang.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_UI_SLANG_H_ 2#ifndef _PERF_UI_SLANG_H_
2#define _PERF_UI_SLANG_H_ 1 3#define _PERF_UI_SLANG_H_ 1
3/* 4/*
diff --git a/tools/perf/ui/progress.c b/tools/perf/ui/progress.c
index ae91c8148edf..b5a5df14d702 100644
--- a/tools/perf/ui/progress.c
+++ b/tools/perf/ui/progress.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/kernel.h> 2#include <linux/kernel.h>
2#include "../cache.h" 3#include "../cache.h"
3#include "progress.h" 4#include "progress.h"
diff --git a/tools/perf/ui/progress.h b/tools/perf/ui/progress.h
index 717d39d3052b..594bbe6935dd 100644
--- a/tools/perf/ui/progress.h
+++ b/tools/perf/ui/progress.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_UI_PROGRESS_H_ 2#ifndef _PERF_UI_PROGRESS_H_
2#define _PERF_UI_PROGRESS_H_ 1 3#define _PERF_UI_PROGRESS_H_ 1
3 4
diff --git a/tools/perf/ui/setup.c b/tools/perf/ui/setup.c
index caf1ce6f5152..44fe824e96cd 100644
--- a/tools/perf/ui/setup.c
+++ b/tools/perf/ui/setup.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <pthread.h> 2#include <pthread.h>
2#include <dlfcn.h> 3#include <dlfcn.h>
3 4
diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c
index 8bdb7a500181..de2810ae16be 100644
--- a/tools/perf/ui/stdio/hist.c
+++ b/tools/perf/ui/stdio/hist.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <linux/string.h> 3#include <linux/string.h>
3 4
diff --git a/tools/perf/ui/tui/helpline.c b/tools/perf/ui/tui/helpline.c
index 88f5143a5981..4ca799aadb4e 100644
--- a/tools/perf/ui/tui/helpline.c
+++ b/tools/perf/ui/tui/helpline.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <stdlib.h> 3#include <stdlib.h>
3#include <string.h> 4#include <string.h>
diff --git a/tools/perf/ui/tui/progress.c b/tools/perf/ui/tui/progress.c
index c4b99008e2c9..236bcb620ae4 100644
--- a/tools/perf/ui/tui/progress.c
+++ b/tools/perf/ui/tui/progress.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "../cache.h" 2#include "../cache.h"
2#include "../progress.h" 3#include "../progress.h"
3#include "../libslang.h" 4#include "../libslang.h"
diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c
index d9350a1da48b..d4ac41679721 100644
--- a/tools/perf/ui/tui/setup.c
+++ b/tools/perf/ui/tui/setup.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <signal.h> 3#include <signal.h>
3#include <stdbool.h> 4#include <stdbool.h>
diff --git a/tools/perf/ui/tui/tui.h b/tools/perf/ui/tui/tui.h
index 18961c7b6ec5..8de06f634c56 100644
--- a/tools/perf/ui/tui/tui.h
+++ b/tools/perf/ui/tui/tui.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_TUI_H_ 2#ifndef _PERF_TUI_H_
2#define _PERF_TUI_H_ 1 3#define _PERF_TUI_H_ 1
3 4
diff --git a/tools/perf/ui/tui/util.c b/tools/perf/ui/tui/util.c
index d96ad7c8325d..b9794d6185af 100644
--- a/tools/perf/ui/tui/util.c
+++ b/tools/perf/ui/tui/util.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "../../util/util.h" 2#include "../../util/util.h"
2#include <signal.h> 3#include <signal.h>
3#include <stdbool.h> 4#include <stdbool.h>
diff --git a/tools/perf/ui/ui.h b/tools/perf/ui/ui.h
index 4b6fb6c7a542..9b6fdf06e1d2 100644
--- a/tools/perf/ui/ui.h
+++ b/tools/perf/ui/ui.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_UI_H_ 2#ifndef _PERF_UI_H_
2#define _PERF_UI_H_ 1 3#define _PERF_UI_H_ 1
3 4
diff --git a/tools/perf/ui/util.c b/tools/perf/ui/util.c
index e3e0a963d03a..63bf06e80ab9 100644
--- a/tools/perf/ui/util.c
+++ b/tools/perf/ui/util.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "util.h" 2#include "util.h"
2#include "../debug.h" 3#include "../debug.h"
3 4
diff --git a/tools/perf/ui/util.h b/tools/perf/ui/util.h
index 361f08c52d37..5e44223b56fa 100644
--- a/tools/perf/ui/util.h
+++ b/tools/perf/ui/util.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_UI_UTIL_H_ 2#ifndef _PERF_UI_UTIL_H_
2#define _PERF_UI_UTIL_H_ 1 3#define _PERF_UI_UTIL_H_ 1
3 4
diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN
index 39f17507578d..3802cee5e188 100755
--- a/tools/perf/util/PERF-VERSION-GEN
+++ b/tools/perf/util/PERF-VERSION-GEN
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2 3
3if [ $# -eq 1 ] ; then 4if [ $# -eq 1 ] ; then
4 OUTPUT=$1 5 OUTPUT=$1
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 4397a8b6e6cd..aa66791b1bfc 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -606,9 +606,19 @@ static struct arch *arch__find(const char *name)
606int symbol__alloc_hist(struct symbol *sym) 606int symbol__alloc_hist(struct symbol *sym)
607{ 607{
608 struct annotation *notes = symbol__annotation(sym); 608 struct annotation *notes = symbol__annotation(sym);
609 const size_t size = symbol__size(sym); 609 size_t size = symbol__size(sym);
610 size_t sizeof_sym_hist; 610 size_t sizeof_sym_hist;
611 611
612 /*
613 * Add buffer of one element for zero length symbol.
614 * When sample is taken from first instruction of
615 * zero length symbol, perf still resolves it and
616 * shows symbol name in perf report and allows to
617 * annotate it.
618 */
619 if (size == 0)
620 size = 1;
621
612 /* Check for overflow when calculating sizeof_sym_hist */ 622 /* Check for overflow when calculating sizeof_sym_hist */
613 if (size > (SIZE_MAX - sizeof(struct sym_hist)) / sizeof(struct sym_hist_entry)) 623 if (size > (SIZE_MAX - sizeof(struct sym_hist)) / sizeof(struct sym_hist_entry))
614 return -1; 624 return -1;
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h
index 9ce575c25fd9..f6ba3560de5e 100644
--- a/tools/perf/util/annotate.h
+++ b/tools/perf/util/annotate.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_ANNOTATE_H 2#ifndef __PERF_ANNOTATE_H
2#define __PERF_ANNOTATE_H 3#define __PERF_ANNOTATE_H
3 4
diff --git a/tools/perf/util/block-range.c b/tools/perf/util/block-range.c
index 7b3e1d75d803..f1451c987eec 100644
--- a/tools/perf/util/block-range.c
+++ b/tools/perf/util/block-range.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "block-range.h" 2#include "block-range.h"
2#include "annotate.h" 3#include "annotate.h"
3 4
diff --git a/tools/perf/util/block-range.h b/tools/perf/util/block-range.h
index a8c841381131..a5ba719d69fb 100644
--- a/tools/perf/util/block-range.h
+++ b/tools/perf/util/block-range.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_BLOCK_RANGE_H 2#ifndef __PERF_BLOCK_RANGE_H
2#define __PERF_BLOCK_RANGE_H 3#define __PERF_BLOCK_RANGE_H
3 4
diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
index 4a1264c66101..72c107fcbc5a 100644
--- a/tools/perf/util/bpf-loader.c
+++ b/tools/perf/util/bpf-loader.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * bpf-loader.c 3 * bpf-loader.c
3 * 4 *
diff --git a/tools/perf/util/bpf-loader.h b/tools/perf/util/bpf-loader.h
index 48863867878b..5d3aefd6fae7 100644
--- a/tools/perf/util/bpf-loader.h
+++ b/tools/perf/util/bpf-loader.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * Copyright (C) 2015, Wang Nan <wangnan0@huawei.com> 3 * Copyright (C) 2015, Wang Nan <wangnan0@huawei.com>
3 * Copyright (C) 2015, Huawei Inc. 4 * Copyright (C) 2015, Huawei Inc.
diff --git a/tools/perf/util/bpf-prologue.c b/tools/perf/util/bpf-prologue.c
index 827f9140f3b8..29347756b0af 100644
--- a/tools/perf/util/bpf-prologue.c
+++ b/tools/perf/util/bpf-prologue.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * bpf-prologue.c 3 * bpf-prologue.c
3 * 4 *
diff --git a/tools/perf/util/bpf-prologue.h b/tools/perf/util/bpf-prologue.h
index ba564838375f..c50c7358009f 100644
--- a/tools/perf/util/bpf-prologue.h
+++ b/tools/perf/util/bpf-prologue.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * Copyright (C) 2015, He Kuang <hekuang@huawei.com> 3 * Copyright (C) 2015, He Kuang <hekuang@huawei.com>
3 * Copyright (C) 2015, Huawei Inc. 4 * Copyright (C) 2015, Huawei Inc.
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index c1a06fcd7e70..7f8553630c4d 100644
--- a/tools/perf/util/build-id.c
+++ b/tools/perf/util/build-id.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * build-id.c 3 * build-id.c
3 * 4 *
diff --git a/tools/perf/util/build-id.h b/tools/perf/util/build-id.h
index c94b0dcbfd74..f0c565164a97 100644
--- a/tools/perf/util/build-id.h
+++ b/tools/perf/util/build-id.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef PERF_BUILD_ID_H_ 2#ifndef PERF_BUILD_ID_H_
2#define PERF_BUILD_ID_H_ 1 3#define PERF_BUILD_ID_H_ 1
3 4
diff --git a/tools/perf/util/c++/clang-c.h b/tools/perf/util/c++/clang-c.h
index ccafcf72b37a..e513366f2ee0 100644
--- a/tools/perf/util/c++/clang-c.h
+++ b/tools/perf/util/c++/clang-c.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef PERF_UTIL_CLANG_C_H 2#ifndef PERF_UTIL_CLANG_C_H
2#define PERF_UTIL_CLANG_C_H 3#define PERF_UTIL_CLANG_C_H
3 4
diff --git a/tools/perf/util/c++/clang-test.cpp b/tools/perf/util/c++/clang-test.cpp
index 9b11e8c82798..a4014d786676 100644
--- a/tools/perf/util/c++/clang-test.cpp
+++ b/tools/perf/util/c++/clang-test.cpp
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "clang.h" 2#include "clang.h"
2#include "clang-c.h" 3#include "clang-c.h"
3#include "llvm/IR/Function.h" 4#include "llvm/IR/Function.h"
diff --git a/tools/perf/util/c++/clang.cpp b/tools/perf/util/c++/clang.cpp
index 1e974152cac2..1bfc946e37dc 100644
--- a/tools/perf/util/c++/clang.cpp
+++ b/tools/perf/util/c++/clang.cpp
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * llvm C frontend for perf. Support dynamically compile C file 3 * llvm C frontend for perf. Support dynamically compile C file
3 * 4 *
diff --git a/tools/perf/util/c++/clang.h b/tools/perf/util/c++/clang.h
index dd8b0427550d..6ce33e22f23c 100644
--- a/tools/perf/util/c++/clang.h
+++ b/tools/perf/util/c++/clang.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef PERF_UTIL_CLANG_H 2#ifndef PERF_UTIL_CLANG_H
2#define PERF_UTIL_CLANG_H 3#define PERF_UTIL_CLANG_H
3 4
diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h
index 0175765c05b9..9f2e36ef5072 100644
--- a/tools/perf/util/cache.h
+++ b/tools/perf/util/cache.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_CACHE_H 2#ifndef __PERF_CACHE_H
2#define __PERF_CACHE_H 3#define __PERF_CACHE_H
3 4
diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index a971caf3759d..6031933d811c 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Copyright (C) 2009-2011, Frederic Weisbecker <fweisbec@gmail.com> 3 * Copyright (C) 2009-2011, Frederic Weisbecker <fweisbec@gmail.com>
3 * 4 *
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h
index 1ed6fc61d0a5..f967aa47d0a1 100644
--- a/tools/perf/util/callchain.h
+++ b/tools/perf/util/callchain.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_CALLCHAIN_H 2#ifndef __PERF_CALLCHAIN_H
2#define __PERF_CALLCHAIN_H 3#define __PERF_CALLCHAIN_H
3 4
diff --git a/tools/perf/util/cgroup.c b/tools/perf/util/cgroup.c
index 0e77bc9e5f3c..d9ffc1e6eb39 100644
--- a/tools/perf/util/cgroup.c
+++ b/tools/perf/util/cgroup.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "util.h" 2#include "util.h"
2#include "../perf.h" 3#include "../perf.h"
3#include <subcmd/parse-options.h> 4#include <subcmd/parse-options.h>
diff --git a/tools/perf/util/cgroup.h b/tools/perf/util/cgroup.h
index d91966b97cbd..afafc87e9201 100644
--- a/tools/perf/util/cgroup.h
+++ b/tools/perf/util/cgroup.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __CGROUP_H__ 2#ifndef __CGROUP_H__
2#define __CGROUP_H__ 3#define __CGROUP_H__
3 4
diff --git a/tools/perf/util/cloexec.c b/tools/perf/util/cloexec.c
index 4b4f00df58a8..ca0fff6272be 100644
--- a/tools/perf/util/cloexec.c
+++ b/tools/perf/util/cloexec.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <sched.h> 3#include <sched.h>
3#include "util.h" 4#include "util.h"
diff --git a/tools/perf/util/cloexec.h b/tools/perf/util/cloexec.h
index 94a5a7d829d5..78216b1015c4 100644
--- a/tools/perf/util/cloexec.h
+++ b/tools/perf/util/cloexec.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_CLOEXEC_H 2#ifndef __PERF_CLOEXEC_H
2#define __PERF_CLOEXEC_H 3#define __PERF_CLOEXEC_H
3 4
diff --git a/tools/perf/util/color.c b/tools/perf/util/color.c
index dbbf89b050a5..39e628b8938e 100644
--- a/tools/perf/util/color.c
+++ b/tools/perf/util/color.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/kernel.h> 2#include <linux/kernel.h>
2#include "cache.h" 3#include "cache.h"
3#include "config.h" 4#include "config.h"
diff --git a/tools/perf/util/color.h b/tools/perf/util/color.h
index 52122bcc3170..22777b1812ee 100644
--- a/tools/perf/util/color.h
+++ b/tools/perf/util/color.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_COLOR_H 2#ifndef __PERF_COLOR_H
2#define __PERF_COLOR_H 3#define __PERF_COLOR_H
3 4
diff --git a/tools/perf/util/comm.c b/tools/perf/util/comm.c
index 7bc981b6bf29..8808570f8e9c 100644
--- a/tools/perf/util/comm.c
+++ b/tools/perf/util/comm.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "comm.h" 2#include "comm.h"
2#include "util.h" 3#include "util.h"
3#include <errno.h> 4#include <errno.h>
diff --git a/tools/perf/util/comm.h b/tools/perf/util/comm.h
index 71c9c39340d4..3e5c438fe85e 100644
--- a/tools/perf/util/comm.h
+++ b/tools/perf/util/comm.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_COMM_H 2#ifndef __PERF_COMM_H
2#define __PERF_COMM_H 3#define __PERF_COMM_H
3 4
diff --git a/tools/perf/util/compress.h b/tools/perf/util/compress.h
index 67fd1bb7c2b7..ecca688a25fb 100644
--- a/tools/perf/util/compress.h
+++ b/tools/perf/util/compress.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef PERF_COMPRESS_H 2#ifndef PERF_COMPRESS_H
2#define PERF_COMPRESS_H 3#define PERF_COMPRESS_H
3 4
diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index bc75596f9e79..4b893c622236 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * config.c 3 * config.c
3 * 4 *
diff --git a/tools/perf/util/config.h b/tools/perf/util/config.h
index b6bb11f3f165..baf82bf227ac 100644
--- a/tools/perf/util/config.h
+++ b/tools/perf/util/config.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_CONFIG_H 2#ifndef __PERF_CONFIG_H
2#define __PERF_CONFIG_H 3#define __PERF_CONFIG_H
3 4
diff --git a/tools/perf/util/counts.c b/tools/perf/util/counts.c
index c4af82ab7808..03032b410c29 100644
--- a/tools/perf/util/counts.c
+++ b/tools/perf/util/counts.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <stdlib.h> 3#include <stdlib.h>
3#include "evsel.h" 4#include "evsel.h"
diff --git a/tools/perf/util/counts.h b/tools/perf/util/counts.h
index cb45a6aecf9d..0d1050ccc586 100644
--- a/tools/perf/util/counts.h
+++ b/tools/perf/util/counts.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_COUNTS_H 2#ifndef __PERF_COUNTS_H
2#define __PERF_COUNTS_H 3#define __PERF_COUNTS_H
3 4
diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c
index 37b3bb79ee08..1ccbd3342069 100644
--- a/tools/perf/util/cpumap.c
+++ b/tools/perf/util/cpumap.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "util.h" 2#include "util.h"
2#include <api/fs/fs.h> 3#include <api/fs/fs.h>
3#include "../perf.h" 4#include "../perf.h"
diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h
index 6b8bff87481d..ed8999d1a640 100644
--- a/tools/perf/util/cpumap.h
+++ b/tools/perf/util/cpumap.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_CPUMAP_H 2#ifndef __PERF_CPUMAP_H
2#define __PERF_CPUMAP_H 3#define __PERF_CPUMAP_H
3 4
diff --git a/tools/perf/util/ctype.c b/tools/perf/util/ctype.c
index 4b261c2ec0f1..ee4c1e8ed54b 100644
--- a/tools/perf/util/ctype.c
+++ b/tools/perf/util/ctype.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Sane locale-independent, ASCII ctype. 3 * Sane locale-independent, ASCII ctype.
3 * 4 *
diff --git a/tools/perf/util/data-convert-bt.h b/tools/perf/util/data-convert-bt.h
index 9a3b587f76c1..821674d63c4e 100644
--- a/tools/perf/util/data-convert-bt.h
+++ b/tools/perf/util/data-convert-bt.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __DATA_CONVERT_BT_H 2#ifndef __DATA_CONVERT_BT_H
2#define __DATA_CONVERT_BT_H 3#define __DATA_CONVERT_BT_H
3#include "data-convert.h" 4#include "data-convert.h"
diff --git a/tools/perf/util/data-convert.h b/tools/perf/util/data-convert.h
index 5314962fe95b..af90b6076c06 100644
--- a/tools/perf/util/data-convert.h
+++ b/tools/perf/util/data-convert.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __DATA_CONVERT_H 2#ifndef __DATA_CONVERT_H
2#define __DATA_CONVERT_H 3#define __DATA_CONVERT_H
3 4
diff --git a/tools/perf/util/data.c b/tools/perf/util/data.c
index 263f5a906ba5..79192758bdb3 100644
--- a/tools/perf/util/data.c
+++ b/tools/perf/util/data.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/compiler.h> 2#include <linux/compiler.h>
2#include <linux/kernel.h> 3#include <linux/kernel.h>
3#include <sys/types.h> 4#include <sys/types.h>
diff --git a/tools/perf/util/data.h b/tools/perf/util/data.h
index ae510ce16cb1..80241ba78101 100644
--- a/tools/perf/util/data.h
+++ b/tools/perf/util/data.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_DATA_H 2#ifndef __PERF_DATA_H
2#define __PERF_DATA_H 3#define __PERF_DATA_H
3 4
diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c
index a5b3777ffee6..dc8b53b6950e 100644
--- a/tools/perf/util/debug.c
+++ b/tools/perf/util/debug.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* For general debugging purposes */ 2/* For general debugging purposes */
2 3
3#include "../perf.h" 4#include "../perf.h"
diff --git a/tools/perf/util/debug.h b/tools/perf/util/debug.h
index c818bdb1c1ab..77445dfc5c7d 100644
--- a/tools/perf/util/debug.h
+++ b/tools/perf/util/debug.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* For debugging general purposes */ 2/* For debugging general purposes */
2#ifndef __PERF_DEBUG_H 3#ifndef __PERF_DEBUG_H
3#define __PERF_DEBUG_H 4#define __PERF_DEBUG_H
diff --git a/tools/perf/util/demangle-java.c b/tools/perf/util/demangle-java.c
index cb66d334f532..e4c486756053 100644
--- a/tools/perf/util/demangle-java.c
+++ b/tools/perf/util/demangle-java.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sys/types.h> 2#include <sys/types.h>
2#include <stdio.h> 3#include <stdio.h>
3#include <string.h> 4#include <string.h>
diff --git a/tools/perf/util/demangle-java.h b/tools/perf/util/demangle-java.h
index a981c1f968fe..f936c8eabe5d 100644
--- a/tools/perf/util/demangle-java.h
+++ b/tools/perf/util/demangle-java.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_DEMANGLE_JAVA 2#ifndef __PERF_DEMANGLE_JAVA
2#define __PERF_DEMANGLE_JAVA 1 3#define __PERF_DEMANGLE_JAVA 1
3/* 4/*
diff --git a/tools/perf/util/demangle-rust.c b/tools/perf/util/demangle-rust.c
index f9dafa888c06..423afbbd386b 100644
--- a/tools/perf/util/demangle-rust.c
+++ b/tools/perf/util/demangle-rust.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <string.h> 2#include <string.h>
2#include "util.h" 3#include "util.h"
3#include "debug.h" 4#include "debug.h"
diff --git a/tools/perf/util/demangle-rust.h b/tools/perf/util/demangle-rust.h
index 7b41ead7e0dd..2fca618b1aa5 100644
--- a/tools/perf/util/demangle-rust.h
+++ b/tools/perf/util/demangle-rust.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_DEMANGLE_RUST 2#ifndef __PERF_DEMANGLE_RUST
2#define __PERF_DEMANGLE_RUST 1 3#define __PERF_DEMANGLE_RUST 1
3 4
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index b9e087fb8247..00c98c968cb1 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <asm/bug.h> 2#include <asm/bug.h>
2#include <linux/kernel.h> 3#include <linux/kernel.h>
3#include <sys/time.h> 4#include <sys/time.h>
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
index f886141678eb..926ff2e7f668 100644
--- a/tools/perf/util/dso.h
+++ b/tools/perf/util/dso.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_DSO 2#ifndef __PERF_DSO
2#define __PERF_DSO 3#define __PERF_DSO
3 4
diff --git a/tools/perf/util/dump-insn.c b/tools/perf/util/dump-insn.c
index ffbdb19f05d0..10988d3de7ce 100644
--- a/tools/perf/util/dump-insn.c
+++ b/tools/perf/util/dump-insn.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/compiler.h> 2#include <linux/compiler.h>
2#include "dump-insn.h" 3#include "dump-insn.h"
3 4
diff --git a/tools/perf/util/dump-insn.h b/tools/perf/util/dump-insn.h
index 90fb115981cf..0e06280a8860 100644
--- a/tools/perf/util/dump-insn.h
+++ b/tools/perf/util/dump-insn.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_DUMP_INSN_H 2#ifndef __PERF_DUMP_INSN_H
2#define __PERF_DUMP_INSN_H 1 3#define __PERF_DUMP_INSN_H 1
3 4
diff --git a/tools/perf/util/dwarf-regs.c b/tools/perf/util/dwarf-regs.c
index c708395b3cb6..db55eddce8cd 100644
--- a/tools/perf/util/dwarf-regs.c
+++ b/tools/perf/util/dwarf-regs.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * dwarf-regs.c : Mapping of DWARF debug register numbers into register names. 3 * dwarf-regs.c : Mapping of DWARF debug register numbers into register names.
3 * 4 *
diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c
index 9e21538c42ae..6276b340f893 100644
--- a/tools/perf/util/env.c
+++ b/tools/perf/util/env.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "cpumap.h" 2#include "cpumap.h"
2#include "env.h" 3#include "env.h"
3#include "util.h" 4#include "util.h"
diff --git a/tools/perf/util/env.h b/tools/perf/util/env.h
index b164dfd2dcbf..1eb35b190b34 100644
--- a/tools/perf/util/env.h
+++ b/tools/perf/util/env.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_ENV_H 2#ifndef __PERF_ENV_H
2#define __PERF_ENV_H 3#define __PERF_ENV_H
3 4
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 1c905ba3641b..fc690fecbfd6 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <dirent.h> 2#include <dirent.h>
2#include <errno.h> 3#include <errno.h>
3#include <inttypes.h> 4#include <inttypes.h>
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index ee7bcc898d35..5524ee69279c 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_RECORD_H 2#ifndef __PERF_RECORD_H
2#define __PERF_RECORD_H 3#define __PERF_RECORD_H
3 4
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
index bf2c4936e35f..c1750a400bb7 100644
--- a/tools/perf/util/evlist.h
+++ b/tools/perf/util/evlist.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_EVLIST_H 2#ifndef __PERF_EVLIST_H
2#define __PERF_EVLIST_H 1 3#define __PERF_EVLIST_H 1
3 4
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index dd2c4b5112a5..b4df79d72329 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_EVSEL_H 2#ifndef __PERF_EVSEL_H
2#define __PERF_EVSEL_H 1 3#define __PERF_EVSEL_H 1
3 4
diff --git a/tools/perf/util/evsel_fprintf.c b/tools/perf/util/evsel_fprintf.c
index 583f3a602506..1fd7c2e46db2 100644
--- a/tools/perf/util/evsel_fprintf.c
+++ b/tools/perf/util/evsel_fprintf.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <inttypes.h> 2#include <inttypes.h>
2#include <stdio.h> 3#include <stdio.h>
3#include <stdbool.h> 4#include <stdbool.h>
diff --git a/tools/perf/util/expr.h b/tools/perf/util/expr.h
index 400ef9eab00a..046160831f90 100644
--- a/tools/perf/util/expr.h
+++ b/tools/perf/util/expr.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef PARSE_CTX_H 2#ifndef PARSE_CTX_H
2#define PARSE_CTX_H 1 3#define PARSE_CTX_H 1
3 4
diff --git a/tools/perf/util/find-vdso-map.c b/tools/perf/util/find-vdso-map.c
index 95ef1cffc056..d7823e3508fc 100644
--- a/tools/perf/util/find-vdso-map.c
+++ b/tools/perf/util/find-vdso-map.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1static int find_vdso_map(void **start, void **end) 2static int find_vdso_map(void **start, void **end)
2{ 3{
3 FILE *maps; 4 FILE *maps;
diff --git a/tools/perf/util/genelf.h b/tools/perf/util/genelf.h
index 2424bd9862a3..de322d51c7fe 100644
--- a/tools/perf/util/genelf.h
+++ b/tools/perf/util/genelf.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __GENELF_H__ 2#ifndef __GENELF_H__
2#define __GENELF_H__ 3#define __GENELF_H__
3 4
diff --git a/tools/perf/util/generate-cmdlist.sh b/tools/perf/util/generate-cmdlist.sh
index 0ac2037c970c..9bbcec4e3365 100755
--- a/tools/perf/util/generate-cmdlist.sh
+++ b/tools/perf/util/generate-cmdlist.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2 3
3echo "/* Automatically generated by $0 */ 4echo "/* Automatically generated by $0 */
4struct cmdname_help 5struct cmdname_help
diff --git a/tools/perf/util/group.h b/tools/perf/util/group.h
index 116debe7a995..f36c7e31780a 100644
--- a/tools/perf/util/group.h
+++ b/tools/perf/util/group.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef GROUP_H 2#ifndef GROUP_H
2#define GROUP_H 1 3#define GROUP_H 1
3 4
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 605bbd5404fb..ba0cea8fef72 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <inttypes.h> 3#include <inttypes.h>
3#include "util.h" 4#include "util.h"
diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h
index f7a16ee527b8..29ccbfdf8724 100644
--- a/tools/perf/util/header.h
+++ b/tools/perf/util/header.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_HEADER_H 2#ifndef __PERF_HEADER_H
2#define __PERF_HEADER_H 3#define __PERF_HEADER_H
3 4
diff --git a/tools/perf/util/help-unknown-cmd.c b/tools/perf/util/help-unknown-cmd.c
index 15b95300d7f3..4f07a5ba5030 100644
--- a/tools/perf/util/help-unknown-cmd.c
+++ b/tools/perf/util/help-unknown-cmd.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "cache.h" 2#include "cache.h"
2#include "config.h" 3#include "config.h"
3#include <poll.h> 4#include <poll.h>
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index e60d8d8ea4c2..097473600d94 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "util.h" 2#include "util.h"
2#include "build-id.h" 3#include "build-id.h"
3#include "hist.h" 4#include "hist.h"
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index e60dda26a920..f6630cb95eff 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_HIST_H 2#ifndef __PERF_HIST_H
2#define __PERF_HIST_H 3#define __PERF_HIST_H
3 4
diff --git a/tools/perf/util/include/asm/asm-offsets.h b/tools/perf/util/include/asm/asm-offsets.h
index ed538942523d..3aff4cf44944 100644
--- a/tools/perf/util/include/asm/asm-offsets.h
+++ b/tools/perf/util/include/asm/asm-offsets.h
@@ -1 +1,2 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* stub */ 2/* stub */
diff --git a/tools/perf/util/include/asm/cpufeature.h b/tools/perf/util/include/asm/cpufeature.h
index acffd5e4d1d4..2270481c7e0a 100644
--- a/tools/perf/util/include/asm/cpufeature.h
+++ b/tools/perf/util/include/asm/cpufeature.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1 2
2#ifndef PERF_CPUFEATURE_H 3#ifndef PERF_CPUFEATURE_H
3#define PERF_CPUFEATURE_H 4#define PERF_CPUFEATURE_H
diff --git a/tools/perf/util/include/asm/dwarf2.h b/tools/perf/util/include/asm/dwarf2.h
index afe38199e922..e9876be63dbf 100644
--- a/tools/perf/util/include/asm/dwarf2.h
+++ b/tools/perf/util/include/asm/dwarf2.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1 2
2#ifndef PERF_DWARF2_H 3#ifndef PERF_DWARF2_H
3#define PERF_DWARF2_H 4#define PERF_DWARF2_H
diff --git a/tools/perf/util/include/asm/uaccess.h b/tools/perf/util/include/asm/uaccess.h
index d0f72b8fcc35..6a6f4b990547 100644
--- a/tools/perf/util/include/asm/uaccess.h
+++ b/tools/perf/util/include/asm/uaccess.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_ASM_UACCESS_H_ 2#ifndef _PERF_ASM_UACCESS_H_
2#define _PERF_ASM_UACCESS_H_ 3#define _PERF_ASM_UACCESS_H_
3 4
diff --git a/tools/perf/util/include/dwarf-regs.h b/tools/perf/util/include/dwarf-regs.h
index 43bfd8da7919..7d99a084e82d 100644
--- a/tools/perf/util/include/dwarf-regs.h
+++ b/tools/perf/util/include/dwarf-regs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_DWARF_REGS_H_ 2#ifndef _PERF_DWARF_REGS_H_
2#define _PERF_DWARF_REGS_H_ 3#define _PERF_DWARF_REGS_H_
3 4
diff --git a/tools/perf/util/include/linux/linkage.h b/tools/perf/util/include/linux/linkage.h
index 06387cffe125..f01d48a8d707 100644
--- a/tools/perf/util/include/linux/linkage.h
+++ b/tools/perf/util/include/linux/linkage.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1 2
2#ifndef PERF_LINUX_LINKAGE_H_ 3#ifndef PERF_LINUX_LINKAGE_H_
3#define PERF_LINUX_LINKAGE_H_ 4#define PERF_LINUX_LINKAGE_H_
diff --git a/tools/perf/util/intel-pt-decoder/gen-insn-attr-x86.awk b/tools/perf/util/intel-pt-decoder/gen-insn-attr-x86.awk
index 54e961659514..ddd5c4c21129 100644
--- a/tools/perf/util/intel-pt-decoder/gen-insn-attr-x86.awk
+++ b/tools/perf/util/intel-pt-decoder/gen-insn-attr-x86.awk
@@ -1,4 +1,5 @@
1#!/bin/awk -f 1#!/bin/awk -f
2# SPDX-License-Identifier: GPL-2.0
2# gen-insn-attr-x86.awk: Instruction attribute table generator 3# gen-insn-attr-x86.awk: Instruction attribute table generator
3# Written by Masami Hiramatsu <mhiramat@redhat.com> 4# Written by Masami Hiramatsu <mhiramat@redhat.com>
4# 5#
diff --git a/tools/perf/util/intlist.h b/tools/perf/util/intlist.h
index 020b9ca1b47e..85bab8735fa9 100644
--- a/tools/perf/util/intlist.h
+++ b/tools/perf/util/intlist.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_INTLIST_H 2#ifndef __PERF_INTLIST_H
2#define __PERF_INTLIST_H 3#define __PERF_INTLIST_H
3 4
diff --git a/tools/perf/util/jit.h b/tools/perf/util/jit.h
index 3f42ee4d2a0b..c2582fa9fe21 100644
--- a/tools/perf/util/jit.h
+++ b/tools/perf/util/jit.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __JIT_H__ 2#ifndef __JIT_H__
2#define __JIT_H__ 3#define __JIT_H__
3 4
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index 9084930e1757..36483db032e8 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sys/sysmacros.h> 2#include <sys/sysmacros.h>
2#include <sys/types.h> 3#include <sys/types.h>
3#include <errno.h> 4#include <errno.h>
diff --git a/tools/perf/util/kvm-stat.h b/tools/perf/util/kvm-stat.h
index d01e73592f6e..7b1f06567521 100644
--- a/tools/perf/util/kvm-stat.h
+++ b/tools/perf/util/kvm-stat.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_KVM_STAT_H 2#ifndef __PERF_KVM_STAT_H
2#define __PERF_KVM_STAT_H 3#define __PERF_KVM_STAT_H
3 4
diff --git a/tools/perf/util/levenshtein.c b/tools/perf/util/levenshtein.c
index f616e4f65b67..a217ecf0359d 100644
--- a/tools/perf/util/levenshtein.c
+++ b/tools/perf/util/levenshtein.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "levenshtein.h" 2#include "levenshtein.h"
2#include <errno.h> 3#include <errno.h>
3#include <stdlib.h> 4#include <stdlib.h>
diff --git a/tools/perf/util/levenshtein.h b/tools/perf/util/levenshtein.h
index b0fcb6d8a881..34ca173c557d 100644
--- a/tools/perf/util/levenshtein.h
+++ b/tools/perf/util/levenshtein.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_LEVENSHTEIN_H 2#ifndef __PERF_LEVENSHTEIN_H
2#define __PERF_LEVENSHTEIN_H 3#define __PERF_LEVENSHTEIN_H
3 4
diff --git a/tools/perf/util/libunwind/arm64.c b/tools/perf/util/libunwind/arm64.c
index 6559bc586643..66756e6be111 100644
--- a/tools/perf/util/libunwind/arm64.c
+++ b/tools/perf/util/libunwind/arm64.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * This file setups defines to compile arch specific binary from the 3 * This file setups defines to compile arch specific binary from the
3 * generic one. 4 * generic one.
diff --git a/tools/perf/util/libunwind/x86_32.c b/tools/perf/util/libunwind/x86_32.c
index 957ffff72428..c5e568188e19 100644
--- a/tools/perf/util/libunwind/x86_32.c
+++ b/tools/perf/util/libunwind/x86_32.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * This file setups defines to compile arch specific binary from the 3 * This file setups defines to compile arch specific binary from the
3 * generic one. 4 * generic one.
diff --git a/tools/perf/util/llvm-utils.c b/tools/perf/util/llvm-utils.c
index 209b0c82eff4..4952b429caa7 100644
--- a/tools/perf/util/llvm-utils.c
+++ b/tools/perf/util/llvm-utils.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Copyright (C) 2015, Wang Nan <wangnan0@huawei.com> 3 * Copyright (C) 2015, Wang Nan <wangnan0@huawei.com>
3 * Copyright (C) 2015, Huawei Inc. 4 * Copyright (C) 2015, Huawei Inc.
diff --git a/tools/perf/util/llvm-utils.h b/tools/perf/util/llvm-utils.h
index c87a2a92a88f..d3ad8deb5db4 100644
--- a/tools/perf/util/llvm-utils.h
+++ b/tools/perf/util/llvm-utils.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * Copyright (C) 2015, Wang Nan <wangnan0@huawei.com> 3 * Copyright (C) 2015, Wang Nan <wangnan0@huawei.com>
3 * Copyright (C) 2015, Huawei Inc. 4 * Copyright (C) 2015, Huawei Inc.
diff --git a/tools/perf/util/lzma.c b/tools/perf/util/lzma.c
index 4ca7c5c6cdcd..07498eaddc08 100644
--- a/tools/perf/util/lzma.c
+++ b/tools/perf/util/lzma.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <lzma.h> 3#include <lzma.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index df709363ef69..bd5d5b5e2218 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <dirent.h> 2#include <dirent.h>
2#include <errno.h> 3#include <errno.h>
3#include <inttypes.h> 4#include <inttypes.h>
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h
index 3cdb1340f917..d551aa80a59b 100644
--- a/tools/perf/util/machine.h
+++ b/tools/perf/util/machine.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_MACHINE_H 2#ifndef __PERF_MACHINE_H
2#define __PERF_MACHINE_H 3#define __PERF_MACHINE_H
3 4
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index bdaa0a4edc17..4e7bd2750122 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "symbol.h" 2#include "symbol.h"
2#include <errno.h> 3#include <errno.h>
3#include <inttypes.h> 4#include <inttypes.h>
diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h
index 73aacf7a7dc4..1fb9b8589adc 100644
--- a/tools/perf/util/map.h
+++ b/tools/perf/util/map.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_MAP_H 2#ifndef __PERF_MAP_H
2#define __PERF_MAP_H 3#define __PERF_MAP_H
3 4
diff --git a/tools/perf/util/mem-events.c b/tools/perf/util/mem-events.c
index 28afe5fa84d6..93f74d8d3cdd 100644
--- a/tools/perf/util/mem-events.c
+++ b/tools/perf/util/mem-events.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stddef.h> 2#include <stddef.h>
2#include <stdlib.h> 3#include <stdlib.h>
3#include <string.h> 4#include <string.h>
diff --git a/tools/perf/util/mem-events.h b/tools/perf/util/mem-events.h
index 40f72ee4f42a..a889ec2fa9f5 100644
--- a/tools/perf/util/mem-events.h
+++ b/tools/perf/util/mem-events.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_MEM_EVENTS_H 2#ifndef __PERF_MEM_EVENTS_H
2#define __PERF_MEM_EVENTS_H 3#define __PERF_MEM_EVENTS_H
3 4
diff --git a/tools/perf/util/memswap.c b/tools/perf/util/memswap.c
index 55f7faa8d9ec..c1317e4983bc 100644
--- a/tools/perf/util/memswap.c
+++ b/tools/perf/util/memswap.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <byteswap.h> 2#include <byteswap.h>
2#include "memswap.h" 3#include "memswap.h"
3#include <linux/types.h> 4#include <linux/types.h>
diff --git a/tools/perf/util/memswap.h b/tools/perf/util/memswap.h
index 7d1b1c34bb57..1e29ff903ca9 100644
--- a/tools/perf/util/memswap.h
+++ b/tools/perf/util/memswap.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef PERF_MEMSWAP_H_ 2#ifndef PERF_MEMSWAP_H_
2#define PERF_MEMSWAP_H_ 3#define PERF_MEMSWAP_H_
3 4
diff --git a/tools/perf/util/ordered-events.c b/tools/perf/util/ordered-events.c
index 4de398cfb577..8e09fd2d842f 100644
--- a/tools/perf/util/ordered-events.c
+++ b/tools/perf/util/ordered-events.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <inttypes.h> 3#include <inttypes.h>
3#include <linux/list.h> 4#include <linux/list.h>
diff --git a/tools/perf/util/ordered-events.h b/tools/perf/util/ordered-events.h
index e11468a9a6e4..96e5292d88e2 100644
--- a/tools/perf/util/ordered-events.h
+++ b/tools/perf/util/ordered-events.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __ORDERED_EVENTS_H 2#ifndef __ORDERED_EVENTS_H
2#define __ORDERED_EVENTS_H 3#define __ORDERED_EVENTS_H
3 4
diff --git a/tools/perf/util/parse-branch-options.c b/tools/perf/util/parse-branch-options.c
index e71fb5f31e84..bd779d9f4d1e 100644
--- a/tools/perf/util/parse-branch-options.c
+++ b/tools/perf/util/parse-branch-options.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "perf.h" 2#include "perf.h"
2#include "util/util.h" 3#include "util/util.h"
3#include "util/debug.h" 4#include "util/debug.h"
diff --git a/tools/perf/util/parse-branch-options.h b/tools/perf/util/parse-branch-options.h
index 6086fd90eb23..11d1722733f2 100644
--- a/tools/perf/util/parse-branch-options.h
+++ b/tools/perf/util/parse-branch-options.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_PARSE_BRANCH_OPTIONS_H 2#ifndef _PERF_PARSE_BRANCH_OPTIONS_H
2#define _PERF_PARSE_BRANCH_OPTIONS_H 1 3#define _PERF_PARSE_BRANCH_OPTIONS_H 1
3#include <stdint.h> 4#include <stdint.h>
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 39b15968eab1..56694e3409ea 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/hw_breakpoint.h> 2#include <linux/hw_breakpoint.h>
2#include <linux/err.h> 3#include <linux/err.h>
3#include <dirent.h> 4#include <dirent.h>
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index 635135125111..eed50b54bab3 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_PARSE_EVENTS_H 2#ifndef __PERF_PARSE_EVENTS_H
2#define __PERF_PARSE_EVENTS_H 3#define __PERF_PARSE_EVENTS_H
3/* 4/*
diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
index c42edeac451f..6680e4fb7967 100644
--- a/tools/perf/util/parse-events.l
+++ b/tools/perf/util/parse-events.l
@@ -8,6 +8,9 @@
8 8
9%{ 9%{
10#include <errno.h> 10#include <errno.h>
11#include <sys/types.h>
12#include <sys/stat.h>
13#include <unistd.h>
11#include "../perf.h" 14#include "../perf.h"
12#include "parse-events.h" 15#include "parse-events.h"
13#include "parse-events-bison.h" 16#include "parse-events-bison.h"
@@ -53,9 +56,8 @@ static int str(yyscan_t scanner, int token)
53 return token; 56 return token;
54} 57}
55 58
56static bool isbpf(yyscan_t scanner) 59static bool isbpf_suffix(char *text)
57{ 60{
58 char *text = parse_events_get_text(scanner);
59 int len = strlen(text); 61 int len = strlen(text);
60 62
61 if (len < 2) 63 if (len < 2)
@@ -68,6 +70,17 @@ static bool isbpf(yyscan_t scanner)
68 return false; 70 return false;
69} 71}
70 72
73static bool isbpf(yyscan_t scanner)
74{
75 char *text = parse_events_get_text(scanner);
76 struct stat st;
77
78 if (!isbpf_suffix(text))
79 return false;
80
81 return stat(text, &st) == 0;
82}
83
71/* 84/*
72 * This function is called when the parser gets two kind of input: 85 * This function is called when the parser gets two kind of input:
73 * 86 *
@@ -141,6 +154,10 @@ do { \
141 yycolumn += yyleng; \ 154 yycolumn += yyleng; \
142} while (0); 155} while (0);
143 156
157#define USER_REJECT \
158 yycolumn -= yyleng; \
159 REJECT
160
144%} 161%}
145 162
146%x mem 163%x mem
@@ -322,8 +339,8 @@ r{num_raw_hex} { return raw(yyscanner); }
322{num_hex} { return value(yyscanner, 16); } 339{num_hex} { return value(yyscanner, 16); }
323 340
324{modifier_event} { return str(yyscanner, PE_MODIFIER_EVENT); } 341{modifier_event} { return str(yyscanner, PE_MODIFIER_EVENT); }
325{bpf_object} { if (!isbpf(yyscanner)) REJECT; return str(yyscanner, PE_BPF_OBJECT); } 342{bpf_object} { if (!isbpf(yyscanner)) USER_REJECT; return str(yyscanner, PE_BPF_OBJECT); }
326{bpf_source} { if (!isbpf(yyscanner)) REJECT; return str(yyscanner, PE_BPF_SOURCE); } 343{bpf_source} { if (!isbpf(yyscanner)) USER_REJECT; return str(yyscanner, PE_BPF_SOURCE); }
327{name} { return pmu_str_check(yyscanner); } 344{name} { return pmu_str_check(yyscanner); }
328"/" { BEGIN(config); return '/'; } 345"/" { BEGIN(config); return '/'; }
329- { return '-'; } 346- { return '-'; }
diff --git a/tools/perf/util/parse-regs-options.c b/tools/perf/util/parse-regs-options.c
index 646ecf736aad..e6599e290f46 100644
--- a/tools/perf/util/parse-regs-options.c
+++ b/tools/perf/util/parse-regs-options.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "perf.h" 2#include "perf.h"
2#include "util/util.h" 3#include "util/util.h"
3#include "util/debug.h" 4#include "util/debug.h"
diff --git a/tools/perf/util/parse-regs-options.h b/tools/perf/util/parse-regs-options.h
index 7d762b188007..cdefb1acf6be 100644
--- a/tools/perf/util/parse-regs-options.h
+++ b/tools/perf/util/parse-regs-options.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_PARSE_REGS_OPTIONS_H 2#ifndef _PERF_PARSE_REGS_OPTIONS_H
2#define _PERF_PARSE_REGS_OPTIONS_H 1 3#define _PERF_PARSE_REGS_OPTIONS_H 1
3struct option; 4struct option;
diff --git a/tools/perf/util/path.c b/tools/perf/util/path.c
index 50ec3bc87a60..933f5c6bffb4 100644
--- a/tools/perf/util/path.c
+++ b/tools/perf/util/path.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * I'm tired of doing "vsnprintf()" etc just to open a 3 * I'm tired of doing "vsnprintf()" etc just to open a
3 * file, so here's a "return static buffer with printf" 4 * file, so here's a "return static buffer with printf"
diff --git a/tools/perf/util/path.h b/tools/perf/util/path.h
index 9a276a58e3c2..14a254ada7eb 100644
--- a/tools/perf/util/path.h
+++ b/tools/perf/util/path.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_PATH_H 2#ifndef _PERF_PATH_H
2#define _PERF_PATH_H 3#define _PERF_PATH_H
3 4
diff --git a/tools/perf/util/perf-hooks.c b/tools/perf/util/perf-hooks.c
index d55092964da2..4f3aa8d99ef4 100644
--- a/tools/perf/util/perf-hooks.c
+++ b/tools/perf/util/perf-hooks.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * perf_hooks.c 3 * perf_hooks.c
3 * 4 *
diff --git a/tools/perf/util/perf-hooks.h b/tools/perf/util/perf-hooks.h
index 838d5797bc1e..27fbec62d4fe 100644
--- a/tools/perf/util/perf-hooks.h
+++ b/tools/perf/util/perf-hooks.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef PERF_UTIL_PERF_HOOKS_H 2#ifndef PERF_UTIL_PERF_HOOKS_H
2#define PERF_UTIL_PERF_HOOKS_H 3#define PERF_UTIL_PERF_HOOKS_H
3 4
diff --git a/tools/perf/util/perf_regs.c b/tools/perf/util/perf_regs.c
index b2ae039eff85..2acfcc527cac 100644
--- a/tools/perf/util/perf_regs.c
+++ b/tools/perf/util/perf_regs.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include "perf_regs.h" 3#include "perf_regs.h"
3#include "event.h" 4#include "event.h"
diff --git a/tools/perf/util/perf_regs.h b/tools/perf/util/perf_regs.h
index 32b37d19dcc3..c9319f8d17a6 100644
--- a/tools/perf/util/perf_regs.h
+++ b/tools/perf/util/perf_regs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_REGS_H 2#ifndef __PERF_REGS_H
2#define __PERF_REGS_H 3#define __PERF_REGS_H
3 4
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 1c4d7b4e4fb5..b10b35a63138 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/list.h> 2#include <linux/list.h>
2#include <linux/compiler.h> 3#include <linux/compiler.h>
3#include <sys/types.h> 4#include <sys/types.h>
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index fe0de0502ce2..eca99435f4a0 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PMU_H 2#ifndef __PMU_H
2#define __PMU_H 3#define __PMU_H
3 4
diff --git a/tools/perf/util/print_binary.c b/tools/perf/util/print_binary.c
index e908177b9976..779e35c9e566 100644
--- a/tools/perf/util/print_binary.c
+++ b/tools/perf/util/print_binary.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "print_binary.h" 2#include "print_binary.h"
2#include <linux/log2.h> 3#include <linux/log2.h>
3#include "sane_ctype.h" 4#include "sane_ctype.h"
diff --git a/tools/perf/util/print_binary.h b/tools/perf/util/print_binary.h
index da0427263d2d..2be3075e2b05 100644
--- a/tools/perf/util/print_binary.h
+++ b/tools/perf/util/print_binary.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef PERF_PRINT_BINARY_H 2#ifndef PERF_PRINT_BINARY_H
2#define PERF_PRINT_BINARY_H 3#define PERF_PRINT_BINARY_H
3 4
diff --git a/tools/perf/util/probe-event.h b/tools/perf/util/probe-event.h
index 078681d12168..45b14f020558 100644
--- a/tools/perf/util/probe-event.h
+++ b/tools/perf/util/probe-event.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PROBE_EVENT_H 2#ifndef _PROBE_EVENT_H
2#define _PROBE_EVENT_H 3#define _PROBE_EVENT_H
3 4
diff --git a/tools/perf/util/probe-file.h b/tools/perf/util/probe-file.h
index 2ca4163abafe..63f29b1d22c1 100644
--- a/tools/perf/util/probe-file.h
+++ b/tools/perf/util/probe-file.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PROBE_FILE_H 2#ifndef __PROBE_FILE_H
2#define __PROBE_FILE_H 3#define __PROBE_FILE_H
3 4
diff --git a/tools/perf/util/probe-finder.h b/tools/perf/util/probe-finder.h
index 27f061551012..16252980ff00 100644
--- a/tools/perf/util/probe-finder.h
+++ b/tools/perf/util/probe-finder.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PROBE_FINDER_H 2#ifndef _PROBE_FINDER_H
2#define _PROBE_FINDER_H 3#define _PROBE_FINDER_H
3 4
diff --git a/tools/perf/util/pstack.c b/tools/perf/util/pstack.c
index b234a6e3d0d4..797fe1ae2d2e 100644
--- a/tools/perf/util/pstack.c
+++ b/tools/perf/util/pstack.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Simple pointer stack 3 * Simple pointer stack
3 * 4 *
diff --git a/tools/perf/util/pstack.h b/tools/perf/util/pstack.h
index ded7f2e36624..8729b8be061d 100644
--- a/tools/perf/util/pstack.h
+++ b/tools/perf/util/pstack.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_PSTACK_ 2#ifndef _PERF_PSTACK_
2#define _PERF_PSTACK_ 3#define _PERF_PSTACK_
3 4
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
index c129e99114ae..8e49d9cafcfc 100644
--- a/tools/perf/util/python.c
+++ b/tools/perf/util/python.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <Python.h> 2#include <Python.h>
2#include <structmember.h> 3#include <structmember.h>
3#include <inttypes.h> 4#include <inttypes.h>
diff --git a/tools/perf/util/quote.c b/tools/perf/util/quote.c
index 1ba8920151d8..22eaa201aa27 100644
--- a/tools/perf/util/quote.c
+++ b/tools/perf/util/quote.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <stdlib.h> 3#include <stdlib.h>
3#include "strbuf.h" 4#include "strbuf.h"
diff --git a/tools/perf/util/quote.h b/tools/perf/util/quote.h
index 055ca45bed99..274bf26d3511 100644
--- a/tools/perf/util/quote.h
+++ b/tools/perf/util/quote.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_QUOTE_H 2#ifndef __PERF_QUOTE_H
2#define __PERF_QUOTE_H 3#define __PERF_QUOTE_H
3 4
diff --git a/tools/perf/util/rb_resort.h b/tools/perf/util/rb_resort.h
index 808cc45611fe..7d8972b33f6b 100644
--- a/tools/perf/util/rb_resort.h
+++ b/tools/perf/util/rb_resort.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_RESORT_RB_H_ 2#ifndef _PERF_RESORT_RB_H_
2#define _PERF_RESORT_RB_H_ 3#define _PERF_RESORT_RB_H_
3/* 4/*
diff --git a/tools/perf/util/rblist.h b/tools/perf/util/rblist.h
index ff9913b994c2..4c8638a22571 100644
--- a/tools/perf/util/rblist.h
+++ b/tools/perf/util/rblist.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_RBLIST_H 2#ifndef __PERF_RBLIST_H
2#define __PERF_RBLIST_H 3#define __PERF_RBLIST_H
3 4
diff --git a/tools/perf/util/record.c b/tools/perf/util/record.c
index d91bdf5a1aa4..1e97937b03a9 100644
--- a/tools/perf/util/record.c
+++ b/tools/perf/util/record.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "evlist.h" 2#include "evlist.h"
2#include "evsel.h" 3#include "evsel.h"
3#include "cpumap.h" 4#include "cpumap.h"
diff --git a/tools/perf/util/sane_ctype.h b/tools/perf/util/sane_ctype.h
index 4308c22c22ad..c2b42ff9ff32 100644
--- a/tools/perf/util/sane_ctype.h
+++ b/tools/perf/util/sane_ctype.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_SANE_CTYPE_H 2#ifndef _PERF_SANE_CTYPE_H
2#define _PERF_SANE_CTYPE_H 3#define _PERF_SANE_CTYPE_H
3 4
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index a7ebd9fe8e40..da55081aefc6 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <inttypes.h> 3#include <inttypes.h>
3#include <linux/kernel.h> 4#include <linux/kernel.h>
@@ -374,6 +375,8 @@ void perf_tool__fill_defaults(struct perf_tool *tool)
374 tool->mmap2 = process_event_stub; 375 tool->mmap2 = process_event_stub;
375 if (tool->comm == NULL) 376 if (tool->comm == NULL)
376 tool->comm = process_event_stub; 377 tool->comm = process_event_stub;
378 if (tool->namespaces == NULL)
379 tool->namespaces = process_event_stub;
377 if (tool->fork == NULL) 380 if (tool->fork == NULL)
378 tool->fork = process_event_stub; 381 tool->fork = process_event_stub;
379 if (tool->exit == NULL) 382 if (tool->exit == NULL)
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index 47b5e7dbcb18..41caa098ed15 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_SESSION_H 2#ifndef __PERF_SESSION_H
2#define __PERF_SESSION_H 3#define __PERF_SESSION_H
3 4
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index eb3ab902a1c0..84a33f1e9ec9 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <inttypes.h> 3#include <inttypes.h>
3#include <regex.h> 4#include <regex.h>
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index f36dc4980a6c..b2b55e5149a7 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_SORT_H 2#ifndef __PERF_SORT_H
2#define __PERF_SORT_H 3#define __PERF_SORT_H
3#include "../builtin.h" 4#include "../builtin.h"
diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
index ed8e8d2de942..4105682afc7a 100644
--- a/tools/perf/util/srcline.c
+++ b/tools/perf/util/srcline.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <inttypes.h> 2#include <inttypes.h>
2#include <stdio.h> 3#include <stdio.h>
3#include <stdlib.h> 4#include <stdlib.h>
diff --git a/tools/perf/util/srcline.h b/tools/perf/util/srcline.h
index 7b52ba88676e..8e73f607dfa3 100644
--- a/tools/perf/util/srcline.h
+++ b/tools/perf/util/srcline.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef PERF_SRCLINE_H 2#ifndef PERF_SRCLINE_H
2#define PERF_SRCLINE_H 3#define PERF_SRCLINE_H
3 4
diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c
index a04cf56d3517..37363869c9a1 100644
--- a/tools/perf/util/stat-shadow.c
+++ b/tools/perf/util/stat-shadow.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include "evsel.h" 3#include "evsel.h"
3#include "stat.h" 4#include "stat.h"
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
index 35e9848734d6..c9bae5fb8b47 100644
--- a/tools/perf/util/stat.c
+++ b/tools/perf/util/stat.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <inttypes.h> 3#include <inttypes.h>
3#include <math.h> 4#include <math.h>
diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h
index eacaf958e19d..96326b1f9443 100644
--- a/tools/perf/util/stat.h
+++ b/tools/perf/util/stat.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_STATS_H 2#ifndef __PERF_STATS_H
2#define __PERF_STATS_H 3#define __PERF_STATS_H
3 4
diff --git a/tools/perf/util/strbuf.c b/tools/perf/util/strbuf.c
index aafe908b82b5..3d1cf5bf7f18 100644
--- a/tools/perf/util/strbuf.c
+++ b/tools/perf/util/strbuf.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "debug.h" 2#include "debug.h"
2#include "util.h" 3#include "util.h"
3#include <linux/kernel.h> 4#include <linux/kernel.h>
diff --git a/tools/perf/util/strbuf.h b/tools/perf/util/strbuf.h
index 802d743378af..ea94d8628980 100644
--- a/tools/perf/util/strbuf.h
+++ b/tools/perf/util/strbuf.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_STRBUF_H 2#ifndef __PERF_STRBUF_H
2#define __PERF_STRBUF_H 3#define __PERF_STRBUF_H
3 4
diff --git a/tools/perf/util/strfilter.c b/tools/perf/util/strfilter.c
index 4dc0af669a30..7f3253d44afd 100644
--- a/tools/perf/util/strfilter.c
+++ b/tools/perf/util/strfilter.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "util.h" 2#include "util.h"
2#include "string2.h" 3#include "string2.h"
3#include "strfilter.h" 4#include "strfilter.h"
diff --git a/tools/perf/util/strfilter.h b/tools/perf/util/strfilter.h
index cff5eda88728..e0c25a40f796 100644
--- a/tools/perf/util/strfilter.h
+++ b/tools/perf/util/strfilter.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_STRFILTER_H 2#ifndef __PERF_STRFILTER_H
2#define __PERF_STRFILTER_H 3#define __PERF_STRFILTER_H
3/* General purpose glob matching filter */ 4/* General purpose glob matching filter */
diff --git a/tools/perf/util/string.c b/tools/perf/util/string.c
index cca53b693a48..aaa08ee8c717 100644
--- a/tools/perf/util/string.c
+++ b/tools/perf/util/string.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "string2.h" 2#include "string2.h"
2#include <linux/kernel.h> 3#include <linux/kernel.h>
3#include <linux/string.h> 4#include <linux/string.h>
diff --git a/tools/perf/util/string2.h b/tools/perf/util/string2.h
index 2f619681bd6a..ee14ca5451ab 100644
--- a/tools/perf/util/string2.h
+++ b/tools/perf/util/string2.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef PERF_STRING_H 2#ifndef PERF_STRING_H
2#define PERF_STRING_H 3#define PERF_STRING_H
3 4
diff --git a/tools/perf/util/strlist.h b/tools/perf/util/strlist.h
index 19207e50fce5..d58f1e08b170 100644
--- a/tools/perf/util/strlist.h
+++ b/tools/perf/util/strlist.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_STRLIST_H 2#ifndef __PERF_STRLIST_H
2#define __PERF_STRLIST_H 3#define __PERF_STRLIST_H
3 4
diff --git a/tools/perf/util/svghelper.h b/tools/perf/util/svghelper.h
index 946fdf2db97c..e55338d5c3bd 100644
--- a/tools/perf/util/svghelper.h
+++ b/tools/perf/util/svghelper.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_SVGHELPER_H 2#ifndef __PERF_SVGHELPER_H
2#define __PERF_SVGHELPER_H 3#define __PERF_SVGHELPER_H
3 4
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index 9cf781f0d8a2..2de770511e70 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <fcntl.h> 2#include <fcntl.h>
2#include <stdio.h> 3#include <stdio.h>
3#include <errno.h> 4#include <errno.h>
diff --git a/tools/perf/util/symbol-minimal.c b/tools/perf/util/symbol-minimal.c
index 1a5aa35b0100..ff48d0d49584 100644
--- a/tools/perf/util/symbol-minimal.c
+++ b/tools/perf/util/symbol-minimal.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "symbol.h" 2#include "symbol.h"
2#include "util.h" 3#include "util.h"
3 4
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 5909ee4c7ade..6492ef38b090 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <dirent.h> 2#include <dirent.h>
2#include <errno.h> 3#include <errno.h>
3#include <stdlib.h> 4#include <stdlib.h>
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index aad99e7e179b..6352022593c6 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_SYMBOL 2#ifndef __PERF_SYMBOL
2#define __PERF_SYMBOL 1 3#define __PERF_SYMBOL 1
3 4
diff --git a/tools/perf/util/symbol_fprintf.c b/tools/perf/util/symbol_fprintf.c
index 63694e174e5c..6dd2cb88ccbe 100644
--- a/tools/perf/util/symbol_fprintf.c
+++ b/tools/perf/util/symbol_fprintf.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <elf.h> 2#include <elf.h>
2#include <inttypes.h> 3#include <inttypes.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/perf/util/syscalltbl.h b/tools/perf/util/syscalltbl.h
index e9fb8786da7c..c8e7e9ce0f01 100644
--- a/tools/perf/util/syscalltbl.h
+++ b/tools/perf/util/syscalltbl.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_SYSCALLTBL_H 2#ifndef __PERF_SYSCALLTBL_H
2#define __PERF_SYSCALLTBL_H 3#define __PERF_SYSCALLTBL_H
3 4
diff --git a/tools/perf/util/target.h b/tools/perf/util/target.h
index 7381b1ca4041..446aa7a56f25 100644
--- a/tools/perf/util/target.h
+++ b/tools/perf/util/target.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_TARGET_H 2#ifndef _PERF_TARGET_H
2#define _PERF_TARGET_H 3#define _PERF_TARGET_H
3 4
diff --git a/tools/perf/util/term.c b/tools/perf/util/term.c
index 8f254a74d97d..e7aa82c06c76 100644
--- a/tools/perf/util/term.c
+++ b/tools/perf/util/term.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "term.h" 2#include "term.h"
2#include <stdlib.h> 3#include <stdlib.h>
3#include <termios.h> 4#include <termios.h>
diff --git a/tools/perf/util/term.h b/tools/perf/util/term.h
index 2c06a61846a1..607b170a9017 100644
--- a/tools/perf/util/term.h
+++ b/tools/perf/util/term.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_TERM_H 2#ifndef __PERF_TERM_H
2#define __PERF_TERM_H 3#define __PERF_TERM_H
3 4
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
index aee9a42102ba..1dbcd3c8dee0 100644
--- a/tools/perf/util/thread.c
+++ b/tools/perf/util/thread.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "../perf.h" 2#include "../perf.h"
2#include <errno.h> 3#include <errno.h>
3#include <stdlib.h> 4#include <stdlib.h>
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h
index cb1a5dd5c2b9..fdcea7c0cac1 100644
--- a/tools/perf/util/thread.h
+++ b/tools/perf/util/thread.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_THREAD_H 2#ifndef __PERF_THREAD_H
2#define __PERF_THREAD_H 3#define __PERF_THREAD_H
3 4
diff --git a/tools/perf/util/thread_map.c b/tools/perf/util/thread_map.c
index 63ead7b06324..be0d5a736dea 100644
--- a/tools/perf/util/thread_map.c
+++ b/tools/perf/util/thread_map.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <dirent.h> 2#include <dirent.h>
2#include <errno.h> 3#include <errno.h>
3#include <limits.h> 4#include <limits.h>
diff --git a/tools/perf/util/thread_map.h b/tools/perf/util/thread_map.h
index bd34d7a0b9fa..f15803985435 100644
--- a/tools/perf/util/thread_map.h
+++ b/tools/perf/util/thread_map.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_THREAD_MAP_H 2#ifndef __PERF_THREAD_MAP_H
2#define __PERF_THREAD_MAP_H 3#define __PERF_THREAD_MAP_H
3 4
diff --git a/tools/perf/util/time-utils.c b/tools/perf/util/time-utils.c
index 5b5d0214debd..81927d027417 100644
--- a/tools/perf/util/time-utils.c
+++ b/tools/perf/util/time-utils.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdlib.h> 2#include <stdlib.h>
2#include <string.h> 3#include <string.h>
3#include <sys/time.h> 4#include <sys/time.h>
diff --git a/tools/perf/util/time-utils.h b/tools/perf/util/time-utils.h
index 8656be08513b..15b475c50ccf 100644
--- a/tools/perf/util/time-utils.h
+++ b/tools/perf/util/time-utils.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TIME_UTILS_H_ 2#ifndef _TIME_UTILS_H_
2#define _TIME_UTILS_H_ 3#define _TIME_UTILS_H_
3 4
diff --git a/tools/perf/util/tool.h b/tools/perf/util/tool.h
index d549e50db397..2532b558099b 100644
--- a/tools/perf/util/tool.h
+++ b/tools/perf/util/tool.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_TOOL_H 2#ifndef __PERF_TOOL_H
2#define __PERF_TOOL_H 3#define __PERF_TOOL_H
3 4
diff --git a/tools/perf/util/top.h b/tools/perf/util/top.h
index 9bdfb78a9a35..506150a75bd0 100644
--- a/tools/perf/util/top.h
+++ b/tools/perf/util/top.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_TOP_H 2#ifndef __PERF_TOP_H
2#define __PERF_TOP_H 1 3#define __PERF_TOP_H 1
3 4
diff --git a/tools/perf/util/trace-event.c b/tools/perf/util/trace-event.c
index c330780674fc..16a776371d03 100644
--- a/tools/perf/util/trace-event.c
+++ b/tools/perf/util/trace-event.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1 2
2#include <stdio.h> 3#include <stdio.h>
3#include <unistd.h> 4#include <unistd.h>
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index 1fbc044f9eb0..dcbdb53dc702 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_UTIL_TRACE_EVENT_H 2#ifndef _PERF_UTIL_TRACE_EVENT_H
2#define _PERF_UTIL_TRACE_EVENT_H 3#define _PERF_UTIL_TRACE_EVENT_H
3 4
diff --git a/tools/perf/util/trigger.h b/tools/perf/util/trigger.h
index e97d7016d771..370138e7e35c 100644
--- a/tools/perf/util/trigger.h
+++ b/tools/perf/util/trigger.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __TRIGGER_H_ 2#ifndef __TRIGGER_H_
2#define __TRIGGER_H_ 1 3#define __TRIGGER_H_ 1
3 4
diff --git a/tools/perf/util/tsc.c b/tools/perf/util/tsc.c
index 1b741646eed0..bfa782421cbd 100644
--- a/tools/perf/util/tsc.c
+++ b/tools/perf/util/tsc.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/compiler.h> 2#include <linux/compiler.h>
2#include <linux/types.h> 3#include <linux/types.h>
3 4
diff --git a/tools/perf/util/tsc.h b/tools/perf/util/tsc.h
index d5b11e2b85e0..e0c3af34ac8d 100644
--- a/tools/perf/util/tsc.h
+++ b/tools/perf/util/tsc.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_TSC_H 2#ifndef __PERF_TSC_H
2#define __PERF_TSC_H 3#define __PERF_TSC_H
3 4
diff --git a/tools/perf/util/units.c b/tools/perf/util/units.c
index 4767ec2c5ef6..a46762aec4c9 100644
--- a/tools/perf/util/units.c
+++ b/tools/perf/util/units.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "units.h" 2#include "units.h"
2#include <inttypes.h> 3#include <inttypes.h>
3#include <limits.h> 4#include <limits.h>
diff --git a/tools/perf/util/units.h b/tools/perf/util/units.h
index f02c87317150..99263b6a23f7 100644
--- a/tools/perf/util/units.h
+++ b/tools/perf/util/units.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef PERF_UNIT_H 2#ifndef PERF_UNIT_H
2#define PERF_UNIT_H 3#define PERF_UNIT_H
3 4
diff --git a/tools/perf/util/unwind-libdw.c b/tools/perf/util/unwind-libdw.c
index 7755a5e0fe5e..1e9c974faf67 100644
--- a/tools/perf/util/unwind-libdw.c
+++ b/tools/perf/util/unwind-libdw.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/compiler.h> 2#include <linux/compiler.h>
2#include <elfutils/libdw.h> 3#include <elfutils/libdw.h>
3#include <elfutils/libdwfl.h> 4#include <elfutils/libdwfl.h>
diff --git a/tools/perf/util/unwind-libdw.h b/tools/perf/util/unwind-libdw.h
index 4a2b269a7b3b..0cbd2650e280 100644
--- a/tools/perf/util/unwind-libdw.h
+++ b/tools/perf/util/unwind-libdw.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_UNWIND_LIBDW_H 2#ifndef __PERF_UNWIND_LIBDW_H
2#define __PERF_UNWIND_LIBDW_H 3#define __PERF_UNWIND_LIBDW_H
3 4
diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind-libunwind-local.c
index 672c2ada9357..7a42f703e858 100644
--- a/tools/perf/util/unwind-libunwind-local.c
+++ b/tools/perf/util/unwind-libunwind-local.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Post mortem Dwarf CFI based unwinding on top of regs and stack dumps. 3 * Post mortem Dwarf CFI based unwinding on top of regs and stack dumps.
3 * 4 *
diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c
index 8aef572d0889..647a1e6b4c7b 100644
--- a/tools/perf/util/unwind-libunwind.c
+++ b/tools/perf/util/unwind-libunwind.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "unwind.h" 2#include "unwind.h"
2#include "thread.h" 3#include "thread.h"
3#include "session.h" 4#include "session.h"
diff --git a/tools/perf/util/unwind.h b/tools/perf/util/unwind.h
index bfbdcc6198c9..8a44a1569a21 100644
--- a/tools/perf/util/unwind.h
+++ b/tools/perf/util/unwind.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __UNWIND_H 2#ifndef __UNWIND_H
2#define __UNWIND_H 3#define __UNWIND_H
3 4
diff --git a/tools/perf/util/usage.c b/tools/perf/util/usage.c
index 6cc9d9888ce0..070d25ceea6a 100644
--- a/tools/perf/util/usage.c
+++ b/tools/perf/util/usage.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * usage.c 3 * usage.c
3 * 4 *
diff --git a/tools/perf/util/util-cxx.h b/tools/perf/util/util-cxx.h
index 0e0e019c9f34..80a99e458d4e 100644
--- a/tools/perf/util/util-cxx.h
+++ b/tools/perf/util/util-cxx.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * Support C++ source use utilities defined in util.h 3 * Support C++ source use utilities defined in util.h
3 */ 4 */
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index 4c360daa4e24..3687b720327a 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "../perf.h" 2#include "../perf.h"
2#include "util.h" 3#include "util.h"
3#include "debug.h" 4#include "debug.h"
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index b136c271125f..b52765e6d7b4 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef GIT_COMPAT_UTIL_H 2#ifndef GIT_COMPAT_UTIL_H
2#define GIT_COMPAT_UTIL_H 3#define GIT_COMPAT_UTIL_H
3 4
diff --git a/tools/perf/util/values.c b/tools/perf/util/values.c
index 8a32bb0095e5..4b7a303e4ba8 100644
--- a/tools/perf/util/values.c
+++ b/tools/perf/util/values.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <inttypes.h> 2#include <inttypes.h>
2#include <stdio.h> 3#include <stdio.h>
3#include <stdlib.h> 4#include <stdlib.h>
diff --git a/tools/perf/util/values.h b/tools/perf/util/values.h
index 808ff9c73bf5..8c41f22f42cf 100644
--- a/tools/perf/util/values.h
+++ b/tools/perf/util/values.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_VALUES_H 2#ifndef __PERF_VALUES_H
2#define __PERF_VALUES_H 3#define __PERF_VALUES_H
3 4
diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c
index d3c39eec89a8..cffcda448c28 100644
--- a/tools/perf/util/vdso.c
+++ b/tools/perf/util/vdso.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <unistd.h> 3#include <unistd.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/perf/util/vdso.h b/tools/perf/util/vdso.h
index cdc4fabfc212..bc74ace603ae 100644
--- a/tools/perf/util/vdso.h
+++ b/tools/perf/util/vdso.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __PERF_VDSO__ 2#ifndef __PERF_VDSO__
2#define __PERF_VDSO__ 3#define __PERF_VDSO__
3 4
diff --git a/tools/perf/util/xyarray.c b/tools/perf/util/xyarray.c
index c8f415d9877b..dc95154f5646 100644
--- a/tools/perf/util/xyarray.c
+++ b/tools/perf/util/xyarray.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include "xyarray.h" 2#include "xyarray.h"
2#include "util.h" 3#include "util.h"
3#include <stdlib.h> 4#include <stdlib.h>
diff --git a/tools/perf/util/xyarray.h b/tools/perf/util/xyarray.h
index 4ba726c90870..7ffe562e7ae7 100644
--- a/tools/perf/util/xyarray.h
+++ b/tools/perf/util/xyarray.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PERF_XYARRAY_H_ 2#ifndef _PERF_XYARRAY_H_
2#define _PERF_XYARRAY_H_ 1 3#define _PERF_XYARRAY_H_ 1
3 4
@@ -23,12 +24,12 @@ static inline void *xyarray__entry(struct xyarray *xy, int x, int y)
23 24
24static inline int xyarray__max_y(struct xyarray *xy) 25static inline int xyarray__max_y(struct xyarray *xy)
25{ 26{
26 return xy->max_x; 27 return xy->max_y;
27} 28}
28 29
29static inline int xyarray__max_x(struct xyarray *xy) 30static inline int xyarray__max_x(struct xyarray *xy)
30{ 31{
31 return xy->max_y; 32 return xy->max_x;
32} 33}
33 34
34#endif /* _PERF_XYARRAY_H_ */ 35#endif /* _PERF_XYARRAY_H_ */
diff --git a/tools/perf/util/zlib.c b/tools/perf/util/zlib.c
index 1329d843eb7b..008fe68d7b76 100644
--- a/tools/perf/util/zlib.c
+++ b/tools/perf/util/zlib.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <unistd.h> 3#include <unistd.h>
3#include <sys/stat.h> 4#include <sys/stat.h>
diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile
index 4c5a481a850c..d6e1c02ddcfe 100644
--- a/tools/power/cpupower/Makefile
+++ b/tools/power/cpupower/Makefile
@@ -26,7 +26,7 @@ endif
26 26
27ifneq ($(OUTPUT),) 27ifneq ($(OUTPUT),)
28# check that the output directory actually exists 28# check that the output directory actually exists
29OUTDIR := $(realpath $(OUTPUT)) 29OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd)
30$(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) 30$(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist))
31endif 31endif
32 32
diff --git a/tools/power/cpupower/bench/Makefile b/tools/power/cpupower/bench/Makefile
index 3e59f1aa3947..d79ab161cc75 100644
--- a/tools/power/cpupower/bench/Makefile
+++ b/tools/power/cpupower/bench/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1OUTPUT := ./ 2OUTPUT := ./
2ifeq ("$(origin O)", "command line") 3ifeq ("$(origin O)", "command line")
3ifneq ($(O),) 4ifneq ($(O),)
diff --git a/tools/power/cpupower/debug/i386/Makefile b/tools/power/cpupower/debug/i386/Makefile
index c05cc0ac80c7..b3f771039b17 100644
--- a/tools/power/cpupower/debug/i386/Makefile
+++ b/tools/power/cpupower/debug/i386/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1OUTPUT=./ 2OUTPUT=./
2ifeq ("$(origin O)", "command line") 3ifeq ("$(origin O)", "command line")
3 OUTPUT := $(O)/ 4 OUTPUT := $(O)/
diff --git a/tools/power/cpupower/debug/kernel/Makefile b/tools/power/cpupower/debug/kernel/Makefile
index a8a6f8eec5c2..c23e5a6ceb7e 100644
--- a/tools/power/cpupower/debug/kernel/Makefile
+++ b/tools/power/cpupower/debug/kernel/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1obj-m := 2obj-m :=
2 3
3KDIR := /lib/modules/$(shell uname -r)/build 4KDIR := /lib/modules/$(shell uname -r)/build
diff --git a/tools/power/cpupower/debug/x86_64/Makefile b/tools/power/cpupower/debug/x86_64/Makefile
index 1c5214526716..59af84b8ef45 100644
--- a/tools/power/cpupower/debug/x86_64/Makefile
+++ b/tools/power/cpupower/debug/x86_64/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1OUTPUT=./ 2OUTPUT=./
2ifeq ("$(origin O)", "command line") 3ifeq ("$(origin O)", "command line")
3 OUTPUT := $(O)/ 4 OUTPUT := $(O)/
diff --git a/tools/power/cpupower/lib/cpuidle.h b/tools/power/cpupower/lib/cpuidle.h
index 04eb3cfa6e42..2e10fead2e1e 100644
--- a/tools/power/cpupower/lib/cpuidle.h
+++ b/tools/power/cpupower/lib/cpuidle.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __CPUPOWER_CPUIDLE_H__ 2#ifndef __CPUPOWER_CPUIDLE_H__
2#define __CPUPOWER_CPUIDLE_H__ 3#define __CPUPOWER_CPUIDLE_H__
3 4
diff --git a/tools/power/cpupower/lib/cpupower.h b/tools/power/cpupower/lib/cpupower.h
index fa031fcc7710..e4e4292eacec 100644
--- a/tools/power/cpupower/lib/cpupower.h
+++ b/tools/power/cpupower/lib/cpupower.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __CPUPOWER_CPUPOWER_H__ 2#ifndef __CPUPOWER_CPUPOWER_H__
2#define __CPUPOWER_CPUPOWER_H__ 3#define __CPUPOWER_CPUPOWER_H__
3 4
diff --git a/tools/power/cpupower/lib/cpupower_intern.h b/tools/power/cpupower/lib/cpupower_intern.h
index f8ec4009621c..92affdfbe417 100644
--- a/tools/power/cpupower/lib/cpupower_intern.h
+++ b/tools/power/cpupower/lib/cpupower_intern.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#define PATH_TO_CPU "/sys/devices/system/cpu/" 2#define PATH_TO_CPU "/sys/devices/system/cpu/"
2#define MAX_LINE_LEN 4096 3#define MAX_LINE_LEN 4096
3#define SYSFS_PATH_MAX 255 4#define SYSFS_PATH_MAX 255
diff --git a/tools/power/cpupower/utils/builtin.h b/tools/power/cpupower/utils/builtin.h
index 2284c8ea4e2a..f7065ae60a14 100644
--- a/tools/power/cpupower/utils/builtin.h
+++ b/tools/power/cpupower/utils/builtin.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef BUILTIN_H 2#ifndef BUILTIN_H
2#define BUILTIN_H 3#define BUILTIN_H
3 4
diff --git a/tools/power/cpupower/utils/cpuidle-set.c b/tools/power/cpupower/utils/cpuidle-set.c
index 691c24d50ef4..569f268f4c7f 100644
--- a/tools/power/cpupower/utils/cpuidle-set.c
+++ b/tools/power/cpupower/utils/cpuidle-set.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <unistd.h> 2#include <unistd.h>
2#include <stdio.h> 3#include <stdio.h>
3#include <errno.h> 4#include <errno.h>
diff --git a/tools/power/cpupower/utils/helpers/amd.c b/tools/power/cpupower/utils/helpers/amd.c
index 5fd5c5b8c7b8..bb41cdd0df6b 100644
--- a/tools/power/cpupower/utils/helpers/amd.c
+++ b/tools/power/cpupower/utils/helpers/amd.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#if defined(__i386__) || defined(__x86_64__) 2#if defined(__i386__) || defined(__x86_64__)
2#include <unistd.h> 3#include <unistd.h>
3#include <errno.h> 4#include <errno.h>
diff --git a/tools/power/cpupower/utils/helpers/bitmask.c b/tools/power/cpupower/utils/helpers/bitmask.c
index 5c074c60f904..6c7932f5bd66 100644
--- a/tools/power/cpupower/utils/helpers/bitmask.c
+++ b/tools/power/cpupower/utils/helpers/bitmask.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <stdlib.h> 3#include <stdlib.h>
3#include <string.h> 4#include <string.h>
diff --git a/tools/power/cpupower/utils/helpers/bitmask.h b/tools/power/cpupower/utils/helpers/bitmask.h
index eb289df41053..b98d93a44e1b 100644
--- a/tools/power/cpupower/utils/helpers/bitmask.h
+++ b/tools/power/cpupower/utils/helpers/bitmask.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __CPUPOWER_BITMASK__ 2#ifndef __CPUPOWER_BITMASK__
2#define __CPUPOWER_BITMASK__ 3#define __CPUPOWER_BITMASK__
3 4
diff --git a/tools/power/cpupower/utils/helpers/cpuid.c b/tools/power/cpupower/utils/helpers/cpuid.c
index 32d37c9be791..732b0b41ba26 100644
--- a/tools/power/cpupower/utils/helpers/cpuid.c
+++ b/tools/power/cpupower/utils/helpers/cpuid.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <errno.h> 3#include <errno.h>
3#include <string.h> 4#include <string.h>
diff --git a/tools/power/cpupower/utils/helpers/misc.c b/tools/power/cpupower/utils/helpers/misc.c
index a5e7ddf19dbd..80fdf55f414d 100644
--- a/tools/power/cpupower/utils/helpers/misc.c
+++ b/tools/power/cpupower/utils/helpers/misc.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#if defined(__i386__) || defined(__x86_64__) 2#if defined(__i386__) || defined(__x86_64__)
2 3
3#include "helpers/helpers.h" 4#include "helpers/helpers.h"
diff --git a/tools/power/cpupower/utils/helpers/msr.c b/tools/power/cpupower/utils/helpers/msr.c
index 31a4b24a8bc6..ab9950748838 100644
--- a/tools/power/cpupower/utils/helpers/msr.c
+++ b/tools/power/cpupower/utils/helpers/msr.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#if defined(__i386__) || defined(__x86_64__) 2#if defined(__i386__) || defined(__x86_64__)
2 3
3#include <fcntl.h> 4#include <fcntl.h>
diff --git a/tools/power/cpupower/utils/helpers/pci.c b/tools/power/cpupower/utils/helpers/pci.c
index 8b278983cfc5..113f3da2a203 100644
--- a/tools/power/cpupower/utils/helpers/pci.c
+++ b/tools/power/cpupower/utils/helpers/pci.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#if defined(__i386__) || defined(__x86_64__) 2#if defined(__i386__) || defined(__x86_64__)
2 3
3#include <helpers/helpers.h> 4#include <helpers/helpers.h>
diff --git a/tools/power/cpupower/utils/helpers/sysfs.h b/tools/power/cpupower/utils/helpers/sysfs.h
index d28f11fedbda..0f0b9ad97e4a 100644
--- a/tools/power/cpupower/utils/helpers/sysfs.h
+++ b/tools/power/cpupower/utils/helpers/sysfs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __CPUPOWER_HELPERS_SYSFS_H__ 2#ifndef __CPUPOWER_HELPERS_SYSFS_H__
2#define __CPUPOWER_HELPERS_SYSFS_H__ 3#define __CPUPOWER_HELPERS_SYSFS_H__
3 4
diff --git a/tools/power/cpupower/utils/version-gen.sh b/tools/power/cpupower/utils/version-gen.sh
index 5ec41c556992..c70de2eabffb 100755
--- a/tools/power/cpupower/utils/version-gen.sh
+++ b/tools/power/cpupower/utils/version-gen.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# 3#
3# Script which prints out the version to use for building cpupowerutils. 4# Script which prints out the version to use for building cpupowerutils.
4# Must be called from tools/power/cpupower/ 5# Must be called from tools/power/cpupower/
diff --git a/tools/power/pm-graph/Makefile b/tools/power/pm-graph/Makefile
index 32f40eacdafe..4e1e999e7b05 100644
--- a/tools/power/pm-graph/Makefile
+++ b/tools/power/pm-graph/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1PREFIX ?= /usr 2PREFIX ?= /usr
2DESTDIR ?= 3DESTDIR ?=
3 4
diff --git a/tools/power/x86/turbostat/Makefile b/tools/power/x86/turbostat/Makefile
index 8792ad8dbf83..a9bc914a8fe8 100644
--- a/tools/power/x86/turbostat/Makefile
+++ b/tools/power/x86/turbostat/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1CC = $(CROSS_COMPILE)gcc 2CC = $(CROSS_COMPILE)gcc
2BUILD_OUTPUT := $(CURDIR) 3BUILD_OUTPUT := $(CURDIR)
3PREFIX ?= /usr 4PREFIX ?= /usr
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 0dafba2c1e7d..bd9c6b31a504 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -92,7 +92,6 @@ unsigned int do_ring_perf_limit_reasons;
92unsigned int crystal_hz; 92unsigned int crystal_hz;
93unsigned long long tsc_hz; 93unsigned long long tsc_hz;
94int base_cpu; 94int base_cpu;
95int do_migrate;
96double discover_bclk(unsigned int family, unsigned int model); 95double discover_bclk(unsigned int family, unsigned int model);
97unsigned int has_hwp; /* IA32_PM_ENABLE, IA32_HWP_CAPABILITIES */ 96unsigned int has_hwp; /* IA32_PM_ENABLE, IA32_HWP_CAPABILITIES */
98 /* IA32_HWP_REQUEST, IA32_HWP_STATUS */ 97 /* IA32_HWP_REQUEST, IA32_HWP_STATUS */
@@ -303,9 +302,6 @@ int for_all_cpus(int (func)(struct thread_data *, struct core_data *, struct pkg
303 302
304int cpu_migrate(int cpu) 303int cpu_migrate(int cpu)
305{ 304{
306 if (!do_migrate)
307 return 0;
308
309 CPU_ZERO_S(cpu_affinity_setsize, cpu_affinity_set); 305 CPU_ZERO_S(cpu_affinity_setsize, cpu_affinity_set);
310 CPU_SET_S(cpu, cpu_affinity_setsize, cpu_affinity_set); 306 CPU_SET_S(cpu, cpu_affinity_setsize, cpu_affinity_set);
311 if (sched_setaffinity(0, cpu_affinity_setsize, cpu_affinity_set) == -1) 307 if (sched_setaffinity(0, cpu_affinity_setsize, cpu_affinity_set) == -1)
@@ -5007,7 +5003,6 @@ void cmdline(int argc, char **argv)
5007 {"hide", required_argument, 0, 'H'}, // meh, -h taken by --help 5003 {"hide", required_argument, 0, 'H'}, // meh, -h taken by --help
5008 {"Joules", no_argument, 0, 'J'}, 5004 {"Joules", no_argument, 0, 'J'},
5009 {"list", no_argument, 0, 'l'}, 5005 {"list", no_argument, 0, 'l'},
5010 {"migrate", no_argument, 0, 'm'},
5011 {"out", required_argument, 0, 'o'}, 5006 {"out", required_argument, 0, 'o'},
5012 {"quiet", no_argument, 0, 'q'}, 5007 {"quiet", no_argument, 0, 'q'},
5013 {"show", required_argument, 0, 's'}, 5008 {"show", required_argument, 0, 's'},
@@ -5019,7 +5014,7 @@ void cmdline(int argc, char **argv)
5019 5014
5020 progname = argv[0]; 5015 progname = argv[0];
5021 5016
5022 while ((opt = getopt_long_only(argc, argv, "+C:c:Ddhi:Jmo:qST:v", 5017 while ((opt = getopt_long_only(argc, argv, "+C:c:Ddhi:JM:m:o:qST:v",
5023 long_options, &option_index)) != -1) { 5018 long_options, &option_index)) != -1) {
5024 switch (opt) { 5019 switch (opt) {
5025 case 'a': 5020 case 'a':
@@ -5062,9 +5057,6 @@ void cmdline(int argc, char **argv)
5062 list_header_only++; 5057 list_header_only++;
5063 quiet++; 5058 quiet++;
5064 break; 5059 break;
5065 case 'm':
5066 do_migrate = 1;
5067 break;
5068 case 'o': 5060 case 'o':
5069 outf = fopen_or_die(optarg, "w"); 5061 outf = fopen_or_die(optarg, "w");
5070 break; 5062 break;
diff --git a/tools/power/x86/x86_energy_perf_policy/Makefile b/tools/power/x86/x86_energy_perf_policy/Makefile
index a711eec0c895..2447b1bbaacf 100644
--- a/tools/power/x86/x86_energy_perf_policy/Makefile
+++ b/tools/power/x86/x86_energy_perf_policy/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1CC = $(CROSS_COMPILE)gcc 2CC = $(CROSS_COMPILE)gcc
2BUILD_OUTPUT := $(CURDIR) 3BUILD_OUTPUT := $(CURDIR)
3PREFIX := /usr 4PREFIX := /usr
diff --git a/tools/scripts/Makefile.arch b/tools/scripts/Makefile.arch
index ad85b921a607..78d90a249e88 100644
--- a/tools/scripts/Makefile.arch
+++ b/tools/scripts/Makefile.arch
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1HOSTARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ 2HOSTARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
2 -e s/sun4u/sparc/ -e s/sparc64/sparc/ \ 3 -e s/sun4u/sparc/ -e s/sparc64/sparc/ \
3 -e /arm64/!s/arm.*/arm/ -e s/sa110/arm/ \ 4 -e /arm64/!s/arm.*/arm/ -e s/sa110/arm/ \
diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
index 9dc8f078a83c..654efd9768fd 100644
--- a/tools/scripts/Makefile.include
+++ b/tools/scripts/Makefile.include
@@ -1,7 +1,8 @@
1# SPDX-License-Identifier: GPL-2.0
1ifneq ($(O),) 2ifneq ($(O),)
2ifeq ($(origin O), command line) 3ifeq ($(origin O), command line)
3 ABSOLUTE_O := $(realpath $(O)) 4 dummy := $(if $(shell test -d $(O) || echo $(O)),$(error O=$(O) does not exist),)
4 dummy := $(if $(ABSOLUTE_O),,$(error O=$(O) does not exist)) 5 ABSOLUTE_O := $(shell cd $(O) ; pwd)
5 OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/) 6 OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/)
6 COMMAND_O := O=$(ABSOLUTE_O) 7 COMMAND_O := O=$(ABSOLUTE_O)
7ifeq ($(objtree),) 8ifeq ($(objtree),)
@@ -12,7 +13,7 @@ endif
12 13
13# check that the output directory actually exists 14# check that the output directory actually exists
14ifneq ($(OUTPUT),) 15ifneq ($(OUTPUT),)
15OUTDIR := $(realpath $(OUTPUT)) 16OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd)
16$(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) 17$(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist))
17endif 18endif
18 19
diff --git a/tools/spi/spidev_fdx.c b/tools/spi/spidev_fdx.c
index 0ea3e51292fc..7d2a867cd4ae 100644
--- a/tools/spi/spidev_fdx.c
+++ b/tools/spi/spidev_fdx.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <unistd.h> 3#include <unistd.h>
3#include <stdlib.h> 4#include <stdlib.h>
diff --git a/tools/testing/fault-injection/failcmd.sh b/tools/testing/fault-injection/failcmd.sh
index 78a9ed7fecdb..29a6c63c5a15 100644
--- a/tools/testing/fault-injection/failcmd.sh
+++ b/tools/testing/fault-injection/failcmd.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2# 3#
3# NAME 4# NAME
4# failcmd.sh - run a command with injecting slab/page allocation failures 5# failcmd.sh - run a command with injecting slab/page allocation failures
diff --git a/tools/testing/ktest/compare-ktest-sample.pl b/tools/testing/ktest/compare-ktest-sample.pl
index a373a5bfff68..4118eb4a842d 100755
--- a/tools/testing/ktest/compare-ktest-sample.pl
+++ b/tools/testing/ktest/compare-ktest-sample.pl
@@ -1,4 +1,5 @@
1#!/usr/bin/perl 1#!/usr/bin/perl
2# SPDX-License-Identifier: GPL-2.0
2 3
3open (IN,"ktest.pl"); 4open (IN,"ktest.pl");
4while (<IN>) { 5while (<IN>) {
diff --git a/tools/testing/nvdimm/Kbuild b/tools/testing/nvdimm/Kbuild
index d870520da68b..65368d9027f5 100644
--- a/tools/testing/nvdimm/Kbuild
+++ b/tools/testing/nvdimm/Kbuild
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1ldflags-y += --wrap=ioremap_wc 2ldflags-y += --wrap=ioremap_wc
2ldflags-y += --wrap=memremap 3ldflags-y += --wrap=memremap
3ldflags-y += --wrap=devm_ioremap_nocache 4ldflags-y += --wrap=devm_ioremap_nocache
diff --git a/tools/testing/nvdimm/Makefile b/tools/testing/nvdimm/Makefile
index 3dfe024b4e7e..c37a6a0bde28 100644
--- a/tools/testing/nvdimm/Makefile
+++ b/tools/testing/nvdimm/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1KDIR ?= ../../../ 2KDIR ?= ../../../
2 3
3default: 4default:
diff --git a/tools/testing/nvdimm/config_check.c b/tools/testing/nvdimm/config_check.c
index 7dc5a0af9b54..cac891028cd1 100644
--- a/tools/testing/nvdimm/config_check.c
+++ b/tools/testing/nvdimm/config_check.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/bug.h> 2#include <linux/bug.h>
2 3
3void check(void) 4void check(void)
diff --git a/tools/testing/nvdimm/test/Kbuild b/tools/testing/nvdimm/test/Kbuild
index d32f25bba42a..fb3c3d7cdb9b 100644
--- a/tools/testing/nvdimm/test/Kbuild
+++ b/tools/testing/nvdimm/test/Kbuild
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1ccflags-y := -I$(src)/../../../../drivers/nvdimm/ 2ccflags-y := -I$(src)/../../../../drivers/nvdimm/
2ccflags-y += -I$(src)/../../../../drivers/acpi/nfit/ 3ccflags-y += -I$(src)/../../../../drivers/acpi/nfit/
3 4
diff --git a/tools/testing/radix-tree/Makefile b/tools/testing/radix-tree/Makefile
index 6a9480c03cbd..fa7ee369b3c9 100644
--- a/tools/testing/radix-tree/Makefile
+++ b/tools/testing/radix-tree/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1 2
2CFLAGS += -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address 3CFLAGS += -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address
3LDFLAGS += -fsanitize=address 4LDFLAGS += -fsanitize=address
diff --git a/tools/testing/radix-tree/linux.c b/tools/testing/radix-tree/linux.c
index cf48c8473f48..6903ccf35595 100644
--- a/tools/testing/radix-tree/linux.c
+++ b/tools/testing/radix-tree/linux.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdlib.h> 2#include <stdlib.h>
2#include <string.h> 3#include <string.h>
3#include <malloc.h> 4#include <malloc.h>
diff --git a/tools/testing/radix-tree/linux/gfp.h b/tools/testing/radix-tree/linux/gfp.h
index 39a0dcb9475a..e9fff59dfd8a 100644
--- a/tools/testing/radix-tree/linux/gfp.h
+++ b/tools/testing/radix-tree/linux/gfp.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _GFP_H 2#ifndef _GFP_H
2#define _GFP_H 3#define _GFP_H
3 4
diff --git a/tools/testing/radix-tree/linux/kernel.h b/tools/testing/radix-tree/linux/kernel.h
index b21a77fddcf7..c3bc3f364f68 100644
--- a/tools/testing/radix-tree/linux/kernel.h
+++ b/tools/testing/radix-tree/linux/kernel.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _KERNEL_H 2#ifndef _KERNEL_H
2#define _KERNEL_H 3#define _KERNEL_H
3 4
diff --git a/tools/testing/radix-tree/linux/percpu.h b/tools/testing/radix-tree/linux/percpu.h
index 3ea01a1a88c2..b2403aa743b2 100644
--- a/tools/testing/radix-tree/linux/percpu.h
+++ b/tools/testing/radix-tree/linux/percpu.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#define DECLARE_PER_CPU(type, val) extern type val 2#define DECLARE_PER_CPU(type, val) extern type val
2#define DEFINE_PER_CPU(type, val) type val 3#define DEFINE_PER_CPU(type, val) type val
3 4
diff --git a/tools/testing/radix-tree/linux/preempt.h b/tools/testing/radix-tree/linux/preempt.h
index 35c5ac81529f..edb10302b903 100644
--- a/tools/testing/radix-tree/linux/preempt.h
+++ b/tools/testing/radix-tree/linux/preempt.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __LINUX_PREEMPT_H 2#ifndef __LINUX_PREEMPT_H
2#define __LINUX_PREEMPT_H 3#define __LINUX_PREEMPT_H
3 4
diff --git a/tools/testing/radix-tree/linux/radix-tree.h b/tools/testing/radix-tree/linux/radix-tree.h
index bf1bb231f9b5..24f13d27a8da 100644
--- a/tools/testing/radix-tree/linux/radix-tree.h
+++ b/tools/testing/radix-tree/linux/radix-tree.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _TEST_RADIX_TREE_H 2#ifndef _TEST_RADIX_TREE_H
2#define _TEST_RADIX_TREE_H 3#define _TEST_RADIX_TREE_H
3 4
diff --git a/tools/testing/radix-tree/linux/rcupdate.h b/tools/testing/radix-tree/linux/rcupdate.h
index f7129ea2a899..73ed33658203 100644
--- a/tools/testing/radix-tree/linux/rcupdate.h
+++ b/tools/testing/radix-tree/linux/rcupdate.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _RCUPDATE_H 2#ifndef _RCUPDATE_H
2#define _RCUPDATE_H 3#define _RCUPDATE_H
3 4
diff --git a/tools/testing/radix-tree/linux/slab.h b/tools/testing/radix-tree/linux/slab.h
index e40337f41a38..979baeec7e70 100644
--- a/tools/testing/radix-tree/linux/slab.h
+++ b/tools/testing/radix-tree/linux/slab.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef SLAB_H 2#ifndef SLAB_H
2#define SLAB_H 3#define SLAB_H
3 4
diff --git a/tools/testing/radix-tree/main.c b/tools/testing/radix-tree/main.c
index bc9a78449572..257f3f8aacaa 100644
--- a/tools/testing/radix-tree/main.c
+++ b/tools/testing/radix-tree/main.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <stdlib.h> 3#include <stdlib.h>
3#include <unistd.h> 4#include <unistd.h>
diff --git a/tools/testing/radix-tree/regression.h b/tools/testing/radix-tree/regression.h
index e018c4816688..3c8a1584e9ee 100644
--- a/tools/testing/radix-tree/regression.h
+++ b/tools/testing/radix-tree/regression.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __REGRESSION_H__ 2#ifndef __REGRESSION_H__
2#define __REGRESSION_H__ 3#define __REGRESSION_H__
3 4
diff --git a/tools/testing/radix-tree/regression1.c b/tools/testing/radix-tree/regression1.c
index bf97742fc18c..0aece092f40e 100644
--- a/tools/testing/radix-tree/regression1.c
+++ b/tools/testing/radix-tree/regression1.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Regression1 3 * Regression1
3 * Description: 4 * Description:
diff --git a/tools/testing/radix-tree/regression2.c b/tools/testing/radix-tree/regression2.c
index 42dd2a33ed24..424b91c77831 100644
--- a/tools/testing/radix-tree/regression2.c
+++ b/tools/testing/radix-tree/regression2.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Regression2 3 * Regression2
3 * Description: 4 * Description:
diff --git a/tools/testing/radix-tree/regression3.c b/tools/testing/radix-tree/regression3.c
index 670c3d2ae7b1..ace2543c3eda 100644
--- a/tools/testing/radix-tree/regression3.c
+++ b/tools/testing/radix-tree/regression3.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Regression3 3 * Regression3
3 * Description: 4 * Description:
diff --git a/tools/testing/radix-tree/tag_check.c b/tools/testing/radix-tree/tag_check.c
index 36dcf7d6945d..543181e4847b 100644
--- a/tools/testing/radix-tree/tag_check.c
+++ b/tools/testing/radix-tree/tag_check.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdlib.h> 2#include <stdlib.h>
2#include <assert.h> 3#include <assert.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/testing/radix-tree/test.c b/tools/testing/radix-tree/test.c
index 1a257d738a1e..5978ab1f403d 100644
--- a/tools/testing/radix-tree/test.c
+++ b/tools/testing/radix-tree/test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdlib.h> 2#include <stdlib.h>
2#include <assert.h> 3#include <assert.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/testing/radix-tree/test.h b/tools/testing/radix-tree/test.h
index 0f8220cc6166..d9c031dbeb1a 100644
--- a/tools/testing/radix-tree/test.h
+++ b/tools/testing/radix-tree/test.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#include <linux/gfp.h> 2#include <linux/gfp.h>
2#include <linux/types.h> 3#include <linux/types.h>
3#include <linux/radix-tree.h> 4#include <linux/radix-tree.h>
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index ff805643b5f7..3c9c0bbe7dbb 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1TARGETS = bpf 2TARGETS = bpf
2TARGETS += breakpoints 3TARGETS += breakpoints
3TARGETS += capabilities 4TARGETS += capabilities
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index f4b23d697448..eab7644a07b4 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1LIBDIR := ../../../lib 2LIBDIR := ../../../lib
2BPFDIR := $(LIBDIR)/bpf 3BPFDIR := $(LIBDIR)/bpf
3APIDIR := ../../../include/uapi 4APIDIR := ../../../include/uapi
diff --git a/tools/testing/selftests/bpf/bpf_endian.h b/tools/testing/selftests/bpf/bpf_endian.h
index 74af266aa512..b25595ea4a78 100644
--- a/tools/testing/selftests/bpf/bpf_endian.h
+++ b/tools/testing/selftests/bpf/bpf_endian.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __BPF_ENDIAN__ 2#ifndef __BPF_ENDIAN__
2#define __BPF_ENDIAN__ 3#define __BPF_ENDIAN__
3 4
diff --git a/tools/testing/selftests/bpf/bpf_helpers.h b/tools/testing/selftests/bpf/bpf_helpers.h
index 36fb9161b34a..50353c10573c 100644
--- a/tools/testing/selftests/bpf/bpf_helpers.h
+++ b/tools/testing/selftests/bpf/bpf_helpers.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __BPF_HELPERS_H 2#ifndef __BPF_HELPERS_H
2#define __BPF_HELPERS_H 3#define __BPF_HELPERS_H
3 4
@@ -65,7 +66,7 @@ static int (*bpf_xdp_adjust_head)(void *ctx, int offset) =
65static int (*bpf_setsockopt)(void *ctx, int level, int optname, void *optval, 66static int (*bpf_setsockopt)(void *ctx, int level, int optname, void *optval,
66 int optlen) = 67 int optlen) =
67 (void *) BPF_FUNC_setsockopt; 68 (void *) BPF_FUNC_setsockopt;
68static int (*bpf_sk_redirect_map)(void *map, int key, int flags) = 69static int (*bpf_sk_redirect_map)(void *ctx, void *map, int key, int flags) =
69 (void *) BPF_FUNC_sk_redirect_map; 70 (void *) BPF_FUNC_sk_redirect_map;
70static int (*bpf_sock_map_update)(void *map, void *key, void *value, 71static int (*bpf_sock_map_update)(void *map, void *key, void *value,
71 unsigned long long flags) = 72 unsigned long long flags) =
diff --git a/tools/testing/selftests/bpf/bpf_util.h b/tools/testing/selftests/bpf/bpf_util.h
index 6c53a8906eff..d0811b3d6a6f 100644
--- a/tools/testing/selftests/bpf/bpf_util.h
+++ b/tools/testing/selftests/bpf/bpf_util.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __BPF_UTIL__ 2#ifndef __BPF_UTIL__
2#define __BPF_UTIL__ 3#define __BPF_UTIL__
3 4
diff --git a/tools/testing/selftests/bpf/include/uapi/linux/types.h b/tools/testing/selftests/bpf/include/uapi/linux/types.h
index 51841848fbfe..91fa51a9c31d 100644
--- a/tools/testing/selftests/bpf/include/uapi/linux/types.h
+++ b/tools/testing/selftests/bpf/include/uapi/linux/types.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _UAPI_LINUX_TYPES_H 2#ifndef _UAPI_LINUX_TYPES_H
2#define _UAPI_LINUX_TYPES_H 3#define _UAPI_LINUX_TYPES_H
3 4
diff --git a/tools/testing/selftests/bpf/sockmap_verdict_prog.c b/tools/testing/selftests/bpf/sockmap_verdict_prog.c
index 9b99bd10807d..2cd2d552938b 100644
--- a/tools/testing/selftests/bpf/sockmap_verdict_prog.c
+++ b/tools/testing/selftests/bpf/sockmap_verdict_prog.c
@@ -61,8 +61,8 @@ int bpf_prog2(struct __sk_buff *skb)
61 bpf_printk("verdict: data[0] = redir(%u:%u)\n", map, sk); 61 bpf_printk("verdict: data[0] = redir(%u:%u)\n", map, sk);
62 62
63 if (!map) 63 if (!map)
64 return bpf_sk_redirect_map(&sock_map_rx, sk, 0); 64 return bpf_sk_redirect_map(skb, &sock_map_rx, sk, 0);
65 return bpf_sk_redirect_map(&sock_map_tx, sk, 0); 65 return bpf_sk_redirect_map(skb, &sock_map_tx, sk, 0);
66} 66}
67 67
68char _license[] SEC("license") = "GPL"; 68char _license[] SEC("license") = "GPL";
diff --git a/tools/testing/selftests/bpf/test_kmod.sh b/tools/testing/selftests/bpf/test_kmod.sh
index 6d58cca8e235..ed4774d8d6ed 100755
--- a/tools/testing/selftests/bpf/test_kmod.sh
+++ b/tools/testing/selftests/bpf/test_kmod.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2 3
3SRC_TREE=../../../../ 4SRC_TREE=../../../../
4 5
diff --git a/tools/testing/selftests/bpf/test_lpm_map.c b/tools/testing/selftests/bpf/test_lpm_map.c
index e97565243d59..f93a333cbf2c 100644
--- a/tools/testing/selftests/bpf/test_lpm_map.c
+++ b/tools/testing/selftests/bpf/test_lpm_map.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Randomized tests for eBPF longest-prefix-match maps 3 * Randomized tests for eBPF longest-prefix-match maps
3 * 4 *
diff --git a/tools/testing/selftests/bpf/test_maps.c b/tools/testing/selftests/bpf/test_maps.c
index fe3a443a1102..50ce52d2013d 100644
--- a/tools/testing/selftests/bpf/test_maps.c
+++ b/tools/testing/selftests/bpf/test_maps.c
@@ -466,7 +466,7 @@ static void test_sockmap(int tasks, void *data)
466 int one = 1, map_fd_rx, map_fd_tx, map_fd_break, s, sc, rc; 466 int one = 1, map_fd_rx, map_fd_tx, map_fd_break, s, sc, rc;
467 struct bpf_map *bpf_map_rx, *bpf_map_tx, *bpf_map_break; 467 struct bpf_map *bpf_map_rx, *bpf_map_tx, *bpf_map_break;
468 int ports[] = {50200, 50201, 50202, 50204}; 468 int ports[] = {50200, 50201, 50202, 50204};
469 int err, i, fd, sfd[6] = {0xdeadbeef}; 469 int err, i, fd, udp, sfd[6] = {0xdeadbeef};
470 u8 buf[20] = {0x0, 0x5, 0x3, 0x2, 0x1, 0x0}; 470 u8 buf[20] = {0x0, 0x5, 0x3, 0x2, 0x1, 0x0};
471 int parse_prog, verdict_prog; 471 int parse_prog, verdict_prog;
472 struct sockaddr_in addr; 472 struct sockaddr_in addr;
@@ -548,6 +548,16 @@ static void test_sockmap(int tasks, void *data)
548 goto out_sockmap; 548 goto out_sockmap;
549 } 549 }
550 550
551 /* Test update with unsupported UDP socket */
552 udp = socket(AF_INET, SOCK_DGRAM, 0);
553 i = 0;
554 err = bpf_map_update_elem(fd, &i, &udp, BPF_ANY);
555 if (!err) {
556 printf("Failed socket SOCK_DGRAM allowed '%i:%i'\n",
557 i, udp);
558 goto out_sockmap;
559 }
560
551 /* Test update without programs */ 561 /* Test update without programs */
552 for (i = 0; i < 6; i++) { 562 for (i = 0; i < 6; i++) {
553 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_ANY); 563 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_ANY);
diff --git a/tools/testing/selftests/bpf/test_tag.c b/tools/testing/selftests/bpf/test_tag.c
index de409fc50c35..8b201895c569 100644
--- a/tools/testing/selftests/bpf/test_tag.c
+++ b/tools/testing/selftests/bpf/test_tag.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdint.h> 2#include <stdint.h>
2#include <stdio.h> 3#include <stdio.h>
3#include <stdlib.h> 4#include <stdlib.h>
diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c
index 26f3250bdcd2..64ae21f64489 100644
--- a/tools/testing/selftests/bpf/test_verifier.c
+++ b/tools/testing/selftests/bpf/test_verifier.c
@@ -1130,15 +1130,27 @@ static struct bpf_test tests[] = {
1130 .errstr = "invalid bpf_context access", 1130 .errstr = "invalid bpf_context access",
1131 }, 1131 },
1132 { 1132 {
1133 "check skb->mark is writeable by SK_SKB", 1133 "invalid access of skb->mark for SK_SKB",
1134 .insns = {
1135 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1,
1136 offsetof(struct __sk_buff, mark)),
1137 BPF_EXIT_INSN(),
1138 },
1139 .result = REJECT,
1140 .prog_type = BPF_PROG_TYPE_SK_SKB,
1141 .errstr = "invalid bpf_context access",
1142 },
1143 {
1144 "check skb->mark is not writeable by SK_SKB",
1134 .insns = { 1145 .insns = {
1135 BPF_MOV64_IMM(BPF_REG_0, 0), 1146 BPF_MOV64_IMM(BPF_REG_0, 0),
1136 BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_0, 1147 BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_0,
1137 offsetof(struct __sk_buff, mark)), 1148 offsetof(struct __sk_buff, mark)),
1138 BPF_EXIT_INSN(), 1149 BPF_EXIT_INSN(),
1139 }, 1150 },
1140 .result = ACCEPT, 1151 .result = REJECT,
1141 .prog_type = BPF_PROG_TYPE_SK_SKB, 1152 .prog_type = BPF_PROG_TYPE_SK_SKB,
1153 .errstr = "invalid bpf_context access",
1142 }, 1154 },
1143 { 1155 {
1144 "check skb->tc_index is writeable by SK_SKB", 1156 "check skb->tc_index is writeable by SK_SKB",
@@ -6645,6 +6657,500 @@ static struct bpf_test tests[] = {
6645 .errstr = "BPF_END uses reserved fields", 6657 .errstr = "BPF_END uses reserved fields",
6646 .result = REJECT, 6658 .result = REJECT,
6647 }, 6659 },
6660 {
6661 "arithmetic ops make PTR_TO_CTX unusable",
6662 .insns = {
6663 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1,
6664 offsetof(struct __sk_buff, data) -
6665 offsetof(struct __sk_buff, mark)),
6666 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1,
6667 offsetof(struct __sk_buff, mark)),
6668 BPF_EXIT_INSN(),
6669 },
6670 .errstr = "dereference of modified ctx ptr R1 off=68+8, ctx+const is allowed, ctx+const+const is not",
6671 .result = REJECT,
6672 .prog_type = BPF_PROG_TYPE_SCHED_CLS,
6673 },
6674 {
6675 "XDP pkt read, pkt_end mangling, bad access 1",
6676 .insns = {
6677 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6678 offsetof(struct xdp_md, data)),
6679 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6680 offsetof(struct xdp_md, data_end)),
6681 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6682 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6683 BPF_ALU64_IMM(BPF_ADD, BPF_REG_3, 8),
6684 BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_3, 1),
6685 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
6686 BPF_MOV64_IMM(BPF_REG_0, 0),
6687 BPF_EXIT_INSN(),
6688 },
6689 .errstr = "R1 offset is outside of the packet",
6690 .result = REJECT,
6691 .prog_type = BPF_PROG_TYPE_XDP,
6692 },
6693 {
6694 "XDP pkt read, pkt_end mangling, bad access 2",
6695 .insns = {
6696 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6697 offsetof(struct xdp_md, data)),
6698 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6699 offsetof(struct xdp_md, data_end)),
6700 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6701 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6702 BPF_ALU64_IMM(BPF_SUB, BPF_REG_3, 8),
6703 BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_3, 1),
6704 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
6705 BPF_MOV64_IMM(BPF_REG_0, 0),
6706 BPF_EXIT_INSN(),
6707 },
6708 .errstr = "R1 offset is outside of the packet",
6709 .result = REJECT,
6710 .prog_type = BPF_PROG_TYPE_XDP,
6711 },
6712 {
6713 "XDP pkt read, pkt_data' > pkt_end, good access",
6714 .insns = {
6715 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6716 offsetof(struct xdp_md, data)),
6717 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6718 offsetof(struct xdp_md, data_end)),
6719 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6720 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6721 BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_3, 1),
6722 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
6723 BPF_MOV64_IMM(BPF_REG_0, 0),
6724 BPF_EXIT_INSN(),
6725 },
6726 .result = ACCEPT,
6727 .prog_type = BPF_PROG_TYPE_XDP,
6728 },
6729 {
6730 "XDP pkt read, pkt_data' > pkt_end, bad access 1",
6731 .insns = {
6732 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6733 offsetof(struct xdp_md, data)),
6734 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6735 offsetof(struct xdp_md, data_end)),
6736 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6737 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6738 BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_3, 1),
6739 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -4),
6740 BPF_MOV64_IMM(BPF_REG_0, 0),
6741 BPF_EXIT_INSN(),
6742 },
6743 .errstr = "R1 offset is outside of the packet",
6744 .result = REJECT,
6745 .prog_type = BPF_PROG_TYPE_XDP,
6746 .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
6747 },
6748 {
6749 "XDP pkt read, pkt_data' > pkt_end, bad access 2",
6750 .insns = {
6751 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6752 offsetof(struct xdp_md, data)),
6753 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6754 offsetof(struct xdp_md, data_end)),
6755 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6756 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6757 BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_3, 0),
6758 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
6759 BPF_MOV64_IMM(BPF_REG_0, 0),
6760 BPF_EXIT_INSN(),
6761 },
6762 .errstr = "R1 offset is outside of the packet",
6763 .result = REJECT,
6764 .prog_type = BPF_PROG_TYPE_XDP,
6765 },
6766 {
6767 "XDP pkt read, pkt_end > pkt_data', good access",
6768 .insns = {
6769 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6770 offsetof(struct xdp_md, data)),
6771 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6772 offsetof(struct xdp_md, data_end)),
6773 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6774 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6775 BPF_JMP_REG(BPF_JGT, BPF_REG_3, BPF_REG_1, 1),
6776 BPF_JMP_IMM(BPF_JA, 0, 0, 1),
6777 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
6778 BPF_MOV64_IMM(BPF_REG_0, 0),
6779 BPF_EXIT_INSN(),
6780 },
6781 .result = ACCEPT,
6782 .prog_type = BPF_PROG_TYPE_XDP,
6783 .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
6784 },
6785 {
6786 "XDP pkt read, pkt_end > pkt_data', bad access 1",
6787 .insns = {
6788 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6789 offsetof(struct xdp_md, data)),
6790 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6791 offsetof(struct xdp_md, data_end)),
6792 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6793 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6794 BPF_JMP_REG(BPF_JGT, BPF_REG_3, BPF_REG_1, 1),
6795 BPF_JMP_IMM(BPF_JA, 0, 0, 1),
6796 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
6797 BPF_MOV64_IMM(BPF_REG_0, 0),
6798 BPF_EXIT_INSN(),
6799 },
6800 .errstr = "R1 offset is outside of the packet",
6801 .result = REJECT,
6802 .prog_type = BPF_PROG_TYPE_XDP,
6803 },
6804 {
6805 "XDP pkt read, pkt_end > pkt_data', bad access 2",
6806 .insns = {
6807 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6808 offsetof(struct xdp_md, data)),
6809 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6810 offsetof(struct xdp_md, data_end)),
6811 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6812 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6813 BPF_JMP_REG(BPF_JGT, BPF_REG_3, BPF_REG_1, 1),
6814 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
6815 BPF_MOV64_IMM(BPF_REG_0, 0),
6816 BPF_EXIT_INSN(),
6817 },
6818 .errstr = "R1 offset is outside of the packet",
6819 .result = REJECT,
6820 .prog_type = BPF_PROG_TYPE_XDP,
6821 },
6822 {
6823 "XDP pkt read, pkt_data' < pkt_end, good access",
6824 .insns = {
6825 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6826 offsetof(struct xdp_md, data)),
6827 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6828 offsetof(struct xdp_md, data_end)),
6829 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6830 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6831 BPF_JMP_REG(BPF_JLT, BPF_REG_1, BPF_REG_3, 1),
6832 BPF_JMP_IMM(BPF_JA, 0, 0, 1),
6833 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
6834 BPF_MOV64_IMM(BPF_REG_0, 0),
6835 BPF_EXIT_INSN(),
6836 },
6837 .result = ACCEPT,
6838 .prog_type = BPF_PROG_TYPE_XDP,
6839 .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
6840 },
6841 {
6842 "XDP pkt read, pkt_data' < pkt_end, bad access 1",
6843 .insns = {
6844 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6845 offsetof(struct xdp_md, data)),
6846 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6847 offsetof(struct xdp_md, data_end)),
6848 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6849 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6850 BPF_JMP_REG(BPF_JLT, BPF_REG_1, BPF_REG_3, 1),
6851 BPF_JMP_IMM(BPF_JA, 0, 0, 1),
6852 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
6853 BPF_MOV64_IMM(BPF_REG_0, 0),
6854 BPF_EXIT_INSN(),
6855 },
6856 .errstr = "R1 offset is outside of the packet",
6857 .result = REJECT,
6858 .prog_type = BPF_PROG_TYPE_XDP,
6859 },
6860 {
6861 "XDP pkt read, pkt_data' < pkt_end, bad access 2",
6862 .insns = {
6863 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6864 offsetof(struct xdp_md, data)),
6865 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6866 offsetof(struct xdp_md, data_end)),
6867 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6868 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6869 BPF_JMP_REG(BPF_JLT, BPF_REG_1, BPF_REG_3, 1),
6870 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
6871 BPF_MOV64_IMM(BPF_REG_0, 0),
6872 BPF_EXIT_INSN(),
6873 },
6874 .errstr = "R1 offset is outside of the packet",
6875 .result = REJECT,
6876 .prog_type = BPF_PROG_TYPE_XDP,
6877 },
6878 {
6879 "XDP pkt read, pkt_end < pkt_data', good access",
6880 .insns = {
6881 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6882 offsetof(struct xdp_md, data)),
6883 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6884 offsetof(struct xdp_md, data_end)),
6885 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6886 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6887 BPF_JMP_REG(BPF_JLT, BPF_REG_3, BPF_REG_1, 1),
6888 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
6889 BPF_MOV64_IMM(BPF_REG_0, 0),
6890 BPF_EXIT_INSN(),
6891 },
6892 .result = ACCEPT,
6893 .prog_type = BPF_PROG_TYPE_XDP,
6894 },
6895 {
6896 "XDP pkt read, pkt_end < pkt_data', bad access 1",
6897 .insns = {
6898 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6899 offsetof(struct xdp_md, data)),
6900 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6901 offsetof(struct xdp_md, data_end)),
6902 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6903 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6904 BPF_JMP_REG(BPF_JLT, BPF_REG_3, BPF_REG_1, 1),
6905 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -4),
6906 BPF_MOV64_IMM(BPF_REG_0, 0),
6907 BPF_EXIT_INSN(),
6908 },
6909 .errstr = "R1 offset is outside of the packet",
6910 .result = REJECT,
6911 .prog_type = BPF_PROG_TYPE_XDP,
6912 .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
6913 },
6914 {
6915 "XDP pkt read, pkt_end < pkt_data', bad access 2",
6916 .insns = {
6917 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6918 offsetof(struct xdp_md, data)),
6919 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6920 offsetof(struct xdp_md, data_end)),
6921 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6922 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6923 BPF_JMP_REG(BPF_JLT, BPF_REG_3, BPF_REG_1, 0),
6924 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
6925 BPF_MOV64_IMM(BPF_REG_0, 0),
6926 BPF_EXIT_INSN(),
6927 },
6928 .errstr = "R1 offset is outside of the packet",
6929 .result = REJECT,
6930 .prog_type = BPF_PROG_TYPE_XDP,
6931 },
6932 {
6933 "XDP pkt read, pkt_data' >= pkt_end, good access",
6934 .insns = {
6935 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6936 offsetof(struct xdp_md, data)),
6937 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6938 offsetof(struct xdp_md, data_end)),
6939 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6940 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6941 BPF_JMP_REG(BPF_JGE, BPF_REG_1, BPF_REG_3, 1),
6942 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
6943 BPF_MOV64_IMM(BPF_REG_0, 0),
6944 BPF_EXIT_INSN(),
6945 },
6946 .result = ACCEPT,
6947 .prog_type = BPF_PROG_TYPE_XDP,
6948 .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
6949 },
6950 {
6951 "XDP pkt read, pkt_data' >= pkt_end, bad access 1",
6952 .insns = {
6953 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6954 offsetof(struct xdp_md, data)),
6955 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6956 offsetof(struct xdp_md, data_end)),
6957 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6958 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6959 BPF_JMP_REG(BPF_JGE, BPF_REG_1, BPF_REG_3, 1),
6960 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
6961 BPF_MOV64_IMM(BPF_REG_0, 0),
6962 BPF_EXIT_INSN(),
6963 },
6964 .errstr = "R1 offset is outside of the packet",
6965 .result = REJECT,
6966 .prog_type = BPF_PROG_TYPE_XDP,
6967 },
6968 {
6969 "XDP pkt read, pkt_data' >= pkt_end, bad access 2",
6970 .insns = {
6971 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6972 offsetof(struct xdp_md, data)),
6973 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6974 offsetof(struct xdp_md, data_end)),
6975 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6976 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6977 BPF_JMP_REG(BPF_JGE, BPF_REG_1, BPF_REG_3, 0),
6978 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
6979 BPF_MOV64_IMM(BPF_REG_0, 0),
6980 BPF_EXIT_INSN(),
6981 },
6982 .errstr = "R1 offset is outside of the packet",
6983 .result = REJECT,
6984 .prog_type = BPF_PROG_TYPE_XDP,
6985 .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
6986 },
6987 {
6988 "XDP pkt read, pkt_end >= pkt_data', good access",
6989 .insns = {
6990 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
6991 offsetof(struct xdp_md, data)),
6992 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
6993 offsetof(struct xdp_md, data_end)),
6994 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
6995 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
6996 BPF_JMP_REG(BPF_JGE, BPF_REG_3, BPF_REG_1, 1),
6997 BPF_JMP_IMM(BPF_JA, 0, 0, 1),
6998 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
6999 BPF_MOV64_IMM(BPF_REG_0, 0),
7000 BPF_EXIT_INSN(),
7001 },
7002 .result = ACCEPT,
7003 .prog_type = BPF_PROG_TYPE_XDP,
7004 },
7005 {
7006 "XDP pkt read, pkt_end >= pkt_data', bad access 1",
7007 .insns = {
7008 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
7009 offsetof(struct xdp_md, data)),
7010 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
7011 offsetof(struct xdp_md, data_end)),
7012 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
7013 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
7014 BPF_JMP_REG(BPF_JGE, BPF_REG_3, BPF_REG_1, 1),
7015 BPF_JMP_IMM(BPF_JA, 0, 0, 1),
7016 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -4),
7017 BPF_MOV64_IMM(BPF_REG_0, 0),
7018 BPF_EXIT_INSN(),
7019 },
7020 .errstr = "R1 offset is outside of the packet",
7021 .result = REJECT,
7022 .prog_type = BPF_PROG_TYPE_XDP,
7023 .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
7024 },
7025 {
7026 "XDP pkt read, pkt_end >= pkt_data', bad access 2",
7027 .insns = {
7028 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
7029 offsetof(struct xdp_md, data)),
7030 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
7031 offsetof(struct xdp_md, data_end)),
7032 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
7033 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
7034 BPF_JMP_REG(BPF_JGE, BPF_REG_3, BPF_REG_1, 1),
7035 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
7036 BPF_MOV64_IMM(BPF_REG_0, 0),
7037 BPF_EXIT_INSN(),
7038 },
7039 .errstr = "R1 offset is outside of the packet",
7040 .result = REJECT,
7041 .prog_type = BPF_PROG_TYPE_XDP,
7042 },
7043 {
7044 "XDP pkt read, pkt_data' <= pkt_end, good access",
7045 .insns = {
7046 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
7047 offsetof(struct xdp_md, data)),
7048 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
7049 offsetof(struct xdp_md, data_end)),
7050 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
7051 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
7052 BPF_JMP_REG(BPF_JLE, BPF_REG_1, BPF_REG_3, 1),
7053 BPF_JMP_IMM(BPF_JA, 0, 0, 1),
7054 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
7055 BPF_MOV64_IMM(BPF_REG_0, 0),
7056 BPF_EXIT_INSN(),
7057 },
7058 .result = ACCEPT,
7059 .prog_type = BPF_PROG_TYPE_XDP,
7060 },
7061 {
7062 "XDP pkt read, pkt_data' <= pkt_end, bad access 1",
7063 .insns = {
7064 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
7065 offsetof(struct xdp_md, data)),
7066 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
7067 offsetof(struct xdp_md, data_end)),
7068 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
7069 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
7070 BPF_JMP_REG(BPF_JLE, BPF_REG_1, BPF_REG_3, 1),
7071 BPF_JMP_IMM(BPF_JA, 0, 0, 1),
7072 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -4),
7073 BPF_MOV64_IMM(BPF_REG_0, 0),
7074 BPF_EXIT_INSN(),
7075 },
7076 .errstr = "R1 offset is outside of the packet",
7077 .result = REJECT,
7078 .prog_type = BPF_PROG_TYPE_XDP,
7079 .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
7080 },
7081 {
7082 "XDP pkt read, pkt_data' <= pkt_end, bad access 2",
7083 .insns = {
7084 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
7085 offsetof(struct xdp_md, data)),
7086 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
7087 offsetof(struct xdp_md, data_end)),
7088 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
7089 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
7090 BPF_JMP_REG(BPF_JLE, BPF_REG_1, BPF_REG_3, 1),
7091 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
7092 BPF_MOV64_IMM(BPF_REG_0, 0),
7093 BPF_EXIT_INSN(),
7094 },
7095 .errstr = "R1 offset is outside of the packet",
7096 .result = REJECT,
7097 .prog_type = BPF_PROG_TYPE_XDP,
7098 },
7099 {
7100 "XDP pkt read, pkt_end <= pkt_data', good access",
7101 .insns = {
7102 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
7103 offsetof(struct xdp_md, data)),
7104 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
7105 offsetof(struct xdp_md, data_end)),
7106 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
7107 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
7108 BPF_JMP_REG(BPF_JLE, BPF_REG_3, BPF_REG_1, 1),
7109 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
7110 BPF_MOV64_IMM(BPF_REG_0, 0),
7111 BPF_EXIT_INSN(),
7112 },
7113 .result = ACCEPT,
7114 .prog_type = BPF_PROG_TYPE_XDP,
7115 .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
7116 },
7117 {
7118 "XDP pkt read, pkt_end <= pkt_data', bad access 1",
7119 .insns = {
7120 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
7121 offsetof(struct xdp_md, data)),
7122 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
7123 offsetof(struct xdp_md, data_end)),
7124 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
7125 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
7126 BPF_JMP_REG(BPF_JLE, BPF_REG_3, BPF_REG_1, 1),
7127 BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
7128 BPF_MOV64_IMM(BPF_REG_0, 0),
7129 BPF_EXIT_INSN(),
7130 },
7131 .errstr = "R1 offset is outside of the packet",
7132 .result = REJECT,
7133 .prog_type = BPF_PROG_TYPE_XDP,
7134 },
7135 {
7136 "XDP pkt read, pkt_end <= pkt_data', bad access 2",
7137 .insns = {
7138 BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
7139 offsetof(struct xdp_md, data)),
7140 BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
7141 offsetof(struct xdp_md, data_end)),
7142 BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
7143 BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
7144 BPF_JMP_REG(BPF_JLE, BPF_REG_3, BPF_REG_1, 0),
7145 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
7146 BPF_MOV64_IMM(BPF_REG_0, 0),
7147 BPF_EXIT_INSN(),
7148 },
7149 .errstr = "R1 offset is outside of the packet",
7150 .result = REJECT,
7151 .prog_type = BPF_PROG_TYPE_XDP,
7152 .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
7153 },
6648}; 7154};
6649 7155
6650static int probe_filter_length(const struct bpf_insn *fp) 7156static int probe_filter_length(const struct bpf_insn *fp)
diff --git a/tools/testing/selftests/breakpoints/Makefile b/tools/testing/selftests/breakpoints/Makefile
index 247b0a1899d7..9ec2c78de8ca 100644
--- a/tools/testing/selftests/breakpoints/Makefile
+++ b/tools/testing/selftests/breakpoints/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# Taken from perf makefile 2# Taken from perf makefile
2uname_M := $(shell uname -m 2>/dev/null || echo not) 3uname_M := $(shell uname -m 2>/dev/null || echo not)
3ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) 4ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
diff --git a/tools/testing/selftests/capabilities/Makefile b/tools/testing/selftests/capabilities/Makefile
index 29b8adfdac71..6e9d98d457d5 100644
--- a/tools/testing/selftests/capabilities/Makefile
+++ b/tools/testing/selftests/capabilities/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1TEST_GEN_FILES := validate_cap 2TEST_GEN_FILES := validate_cap
2TEST_GEN_PROGS := test_execve 3TEST_GEN_PROGS := test_execve
3 4
diff --git a/tools/testing/selftests/capabilities/test_execve.c b/tools/testing/selftests/capabilities/test_execve.c
index cf6778441381..3ab39a61b95b 100644
--- a/tools/testing/selftests/capabilities/test_execve.c
+++ b/tools/testing/selftests/capabilities/test_execve.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#define _GNU_SOURCE 2#define _GNU_SOURCE
2 3
3#include <cap-ng.h> 4#include <cap-ng.h>
diff --git a/tools/testing/selftests/capabilities/validate_cap.c b/tools/testing/selftests/capabilities/validate_cap.c
index 694cd73d4493..cdfc94268fe6 100644
--- a/tools/testing/selftests/capabilities/validate_cap.c
+++ b/tools/testing/selftests/capabilities/validate_cap.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <cap-ng.h> 2#include <cap-ng.h>
2#include <linux/capability.h> 3#include <linux/capability.h>
3#include <stdbool.h> 4#include <stdbool.h>
diff --git a/tools/testing/selftests/cpu-hotplug/Makefile b/tools/testing/selftests/cpu-hotplug/Makefile
index fe1f99101c5d..d8be047ee5b6 100644
--- a/tools/testing/selftests/cpu-hotplug/Makefile
+++ b/tools/testing/selftests/cpu-hotplug/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1all: 2all:
2 3
3TEST_PROGS := cpu-on-off-test.sh 4TEST_PROGS := cpu-on-off-test.sh
diff --git a/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh
index b18b253d7bfb..f3a8933c1275 100755
--- a/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh
+++ b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2 3
3SYSFS= 4SYSFS=
4 5
diff --git a/tools/testing/selftests/cpufreq/Makefile b/tools/testing/selftests/cpufreq/Makefile
index 3955cd96f3a2..c86ca8342222 100644
--- a/tools/testing/selftests/cpufreq/Makefile
+++ b/tools/testing/selftests/cpufreq/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1all: 2all:
2 3
3TEST_PROGS := main.sh 4TEST_PROGS := main.sh
diff --git a/tools/testing/selftests/cpufreq/cpu.sh b/tools/testing/selftests/cpufreq/cpu.sh
index 8e08a83d65f2..39fdcdfb8e97 100755
--- a/tools/testing/selftests/cpufreq/cpu.sh
+++ b/tools/testing/selftests/cpufreq/cpu.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2# 3#
3# CPU helpers 4# CPU helpers
4 5
diff --git a/tools/testing/selftests/cpufreq/cpufreq.sh b/tools/testing/selftests/cpufreq/cpufreq.sh
index 1ed3832030b4..b583a2fb4504 100755
--- a/tools/testing/selftests/cpufreq/cpufreq.sh
+++ b/tools/testing/selftests/cpufreq/cpufreq.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2 3
3# protect against multiple inclusion 4# protect against multiple inclusion
4if [ $FILE_CPUFREQ ]; then 5if [ $FILE_CPUFREQ ]; then
diff --git a/tools/testing/selftests/cpufreq/governor.sh b/tools/testing/selftests/cpufreq/governor.sh
index def645103555..fe37df79c087 100755
--- a/tools/testing/selftests/cpufreq/governor.sh
+++ b/tools/testing/selftests/cpufreq/governor.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2# 3#
3# Test governors 4# Test governors
4 5
diff --git a/tools/testing/selftests/cpufreq/main.sh b/tools/testing/selftests/cpufreq/main.sh
index 01bac76ac0ec..d83922de9d89 100755
--- a/tools/testing/selftests/cpufreq/main.sh
+++ b/tools/testing/selftests/cpufreq/main.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2 3
3source cpu.sh 4source cpu.sh
4source cpufreq.sh 5source cpufreq.sh
diff --git a/tools/testing/selftests/cpufreq/module.sh b/tools/testing/selftests/cpufreq/module.sh
index 8ff2244a33a1..22563cd122e7 100755
--- a/tools/testing/selftests/cpufreq/module.sh
+++ b/tools/testing/selftests/cpufreq/module.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2# 3#
3# Modules specific tests cases 4# Modules specific tests cases
4 5
diff --git a/tools/testing/selftests/cpufreq/special-tests.sh b/tools/testing/selftests/cpufreq/special-tests.sh
index 58b730f23ef7..8d40505dc468 100755
--- a/tools/testing/selftests/cpufreq/special-tests.sh
+++ b/tools/testing/selftests/cpufreq/special-tests.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2# 3#
3# Special test cases reported by people 4# Special test cases reported by people
4 5
diff --git a/tools/testing/selftests/drivers/gpu/drm_mm.sh b/tools/testing/selftests/drivers/gpu/drm_mm.sh
index 96dd55c92799..b789dc8257e6 100755
--- a/tools/testing/selftests/drivers/gpu/drm_mm.sh
+++ b/tools/testing/selftests/drivers/gpu/drm_mm.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# Runs API tests for struct drm_mm (DRM range manager) 3# Runs API tests for struct drm_mm (DRM range manager)
3 4
4if ! /sbin/modprobe -n -q test-drm_mm; then 5if ! /sbin/modprobe -n -q test-drm_mm; then
diff --git a/tools/testing/selftests/drivers/gpu/i915.sh b/tools/testing/selftests/drivers/gpu/i915.sh
index c06d6e8a8dcc..d3895bc714b7 100755
--- a/tools/testing/selftests/drivers/gpu/i915.sh
+++ b/tools/testing/selftests/drivers/gpu/i915.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# Runs hardware independent tests for i915 (drivers/gpu/drm/i915) 3# Runs hardware independent tests for i915 (drivers/gpu/drm/i915)
3 4
4if ! /sbin/modprobe -q -r i915; then 5if ! /sbin/modprobe -q -r i915; then
diff --git a/tools/testing/selftests/efivarfs/create-read.c b/tools/testing/selftests/efivarfs/create-read.c
index 7feef1880968..9674a19396a3 100644
--- a/tools/testing/selftests/efivarfs/create-read.c
+++ b/tools/testing/selftests/efivarfs/create-read.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <stdint.h> 3#include <stdint.h>
3#include <stdlib.h> 4#include <stdlib.h>
diff --git a/tools/testing/selftests/efivarfs/efivarfs.sh b/tools/testing/selftests/efivarfs/efivarfs.sh
index 057278448515..c6d5790575ae 100755
--- a/tools/testing/selftests/efivarfs/efivarfs.sh
+++ b/tools/testing/selftests/efivarfs/efivarfs.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2 3
3efivarfs_mount=/sys/firmware/efi/efivars 4efivarfs_mount=/sys/firmware/efi/efivars
4test_guid=210be57c-9849-4fc7-a635-e6382d1aec27 5test_guid=210be57c-9849-4fc7-a635-e6382d1aec27
diff --git a/tools/testing/selftests/efivarfs/open-unlink.c b/tools/testing/selftests/efivarfs/open-unlink.c
index 4af74f733036..562742d44ac9 100644
--- a/tools/testing/selftests/efivarfs/open-unlink.c
+++ b/tools/testing/selftests/efivarfs/open-unlink.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <errno.h> 2#include <errno.h>
2#include <stdio.h> 3#include <stdio.h>
3#include <stdint.h> 4#include <stdint.h>
diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile
index 2e13035dff7f..427c41ba5151 100644
--- a/tools/testing/selftests/exec/Makefile
+++ b/tools/testing/selftests/exec/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1CFLAGS = -Wall 2CFLAGS = -Wall
2 3
3TEST_GEN_PROGS := execveat 4TEST_GEN_PROGS := execveat
diff --git a/tools/testing/selftests/filesystems/Makefile b/tools/testing/selftests/filesystems/Makefile
index 0ab11307b414..13a73bf725b5 100644
--- a/tools/testing/selftests/filesystems/Makefile
+++ b/tools/testing/selftests/filesystems/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1TEST_PROGS := dnotify_test 2TEST_PROGS := dnotify_test
2all: $(TEST_PROGS) 3all: $(TEST_PROGS)
3 4
diff --git a/tools/testing/selftests/filesystems/dnotify_test.c b/tools/testing/selftests/filesystems/dnotify_test.c
index 8b37b4a1e18d..c0a9b2d3302d 100644
--- a/tools/testing/selftests/filesystems/dnotify_test.c
+++ b/tools/testing/selftests/filesystems/dnotify_test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#define _GNU_SOURCE /* needed to get the defines */ 2#define _GNU_SOURCE /* needed to get the defines */
2#include <fcntl.h> /* in glibc 2.2 this has the needed 3#include <fcntl.h> /* in glibc 2.2 this has the needed
3 values defined */ 4 values defined */
diff --git a/tools/testing/selftests/firmware/fw_fallback.sh b/tools/testing/selftests/firmware/fw_fallback.sh
index 8f511035f783..a52a3bab532b 100755
--- a/tools/testing/selftests/firmware/fw_fallback.sh
+++ b/tools/testing/selftests/firmware/fw_fallback.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# This validates that the kernel will fall back to using the fallback mechanism 3# This validates that the kernel will fall back to using the fallback mechanism
3# to load firmware it can't find on disk itself. We must request a firmware 4# to load firmware it can't find on disk itself. We must request a firmware
4# that the kernel won't find, and any installed helper (e.g. udev) also 5# that the kernel won't find, and any installed helper (e.g. udev) also
diff --git a/tools/testing/selftests/firmware/fw_filesystem.sh b/tools/testing/selftests/firmware/fw_filesystem.sh
index 7d8fd2e3695a..62f2d6f54929 100755
--- a/tools/testing/selftests/firmware/fw_filesystem.sh
+++ b/tools/testing/selftests/firmware/fw_filesystem.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# This validates that the kernel will load firmware out of its list of 3# This validates that the kernel will load firmware out of its list of
3# firmware locations on disk. Since the user helper does similar work, 4# firmware locations on disk. Since the user helper does similar work,
4# we reset the custom load directory to a location the user helper doesn't 5# we reset the custom load directory to a location the user helper doesn't
diff --git a/tools/testing/selftests/ftrace/Makefile b/tools/testing/selftests/ftrace/Makefile
index a8a5e21850e7..cd1f5b3a7774 100644
--- a/tools/testing/selftests/ftrace/Makefile
+++ b/tools/testing/selftests/ftrace/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1all: 2all:
2 3
3TEST_PROGS := ftracetest 4TEST_PROGS := ftracetest
diff --git a/tools/testing/selftests/ftrace/test.d/00basic/basic2.tc b/tools/testing/selftests/ftrace/test.d/00basic/basic2.tc
index ebfce83f35b4..531e472362df 100644
--- a/tools/testing/selftests/ftrace/test.d/00basic/basic2.tc
+++ b/tools/testing/selftests/ftrace/test.d/00basic/basic2.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: Basic test for tracers 3# description: Basic test for tracers
3# flags: instance 4# flags: instance
4test -f available_tracers 5test -f available_tracers
diff --git a/tools/testing/selftests/ftrace/test.d/00basic/basic3.tc b/tools/testing/selftests/ftrace/test.d/00basic/basic3.tc
index 9e33f841812f..58a2506f788e 100644
--- a/tools/testing/selftests/ftrace/test.d/00basic/basic3.tc
+++ b/tools/testing/selftests/ftrace/test.d/00basic/basic3.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: Basic trace clock test 3# description: Basic trace clock test
3# flags: instance 4# flags: instance
4test -f trace_clock 5test -f trace_clock
diff --git a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc
index 283b45ecb199..6ff851a75884 100644
--- a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc
+++ b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: event tracing - enable/disable with event level files 3# description: event tracing - enable/disable with event level files
3# flags: instance 4# flags: instance
4 5
diff --git a/tools/testing/selftests/ftrace/test.d/event/event-pid.tc b/tools/testing/selftests/ftrace/test.d/event/event-pid.tc
index 96c1a95be4f7..cc14feec6e1f 100644
--- a/tools/testing/selftests/ftrace/test.d/event/event-pid.tc
+++ b/tools/testing/selftests/ftrace/test.d/event/event-pid.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: event tracing - restricts events based on pid 3# description: event tracing - restricts events based on pid
3# flags: instance 4# flags: instance
4 5
diff --git a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
index b8fe2e5b9e67..85094904aa79 100644
--- a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
+++ b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: event tracing - enable/disable with subsystem level files 3# description: event tracing - enable/disable with subsystem level files
3# flags: instance 4# flags: instance
4 5
diff --git a/tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc b/tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc
index 15e2d3fe1731..cc1cf4d30ef5 100644
--- a/tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc
+++ b/tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: event tracing - enable/disable with top level files 3# description: event tracing - enable/disable with top level files
3 4
4do_reset() { 5do_reset() {
diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc b/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc
index 15c2dba06ea2..45df747887e0 100644
--- a/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc
+++ b/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: ftrace - function graph filters with stack tracer 3# description: ftrace - function graph filters with stack tracer
3 4
4# Make sure that function graph filtering works, and is not 5# Make sure that function graph filtering works, and is not
diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter.tc b/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter.tc
index 0ab2189613ef..0387e22e7577 100644
--- a/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter.tc
+++ b/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: ftrace - function graph filters 3# description: ftrace - function graph filters
3 4
4# Make sure that function graph filtering works 5# Make sure that function graph filtering works
diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-glob.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-glob.tc
index 8095e122daa9..589d52b211b7 100644
--- a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-glob.tc
+++ b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-glob.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: ftrace - function glob filters 3# description: ftrace - function glob filters
3 4
4# Make sure that function glob matching filter works. 5# Make sure that function glob matching filter works.
diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc
index bab5ff7c607e..78524fcc25ae 100644
--- a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc
+++ b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: ftrace - function pid filters 3# description: ftrace - function pid filters
3 4
4# Make sure that function pid matching filter works. 5# Make sure that function pid matching filter works.
diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc
index 77dfb6b48186..9d4afcca1e36 100644
--- a/tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc
+++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: ftrace - test for function event triggers 3# description: ftrace - test for function event triggers
3# flags: instance 4# flags: instance
4# 5#
diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc
index 7808336d6f50..fe0dc5a7ea26 100644
--- a/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc
+++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: ftrace - function profiler with function tracing 3# description: ftrace - function profiler with function tracing
3 4
4# There was a bug after a rewrite of the ftrace infrastructure that 5# There was a bug after a rewrite of the ftrace infrastructure that
diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc
index 113b4d9bc733..5ad723724adb 100644
--- a/tools/testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc
+++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: ftrace - test reading of set_ftrace_filter 3# description: ftrace - test reading of set_ftrace_filter
3# 4#
4# The set_ftrace_filter file of ftrace is used to list functions as well as 5# The set_ftrace_filter file of ftrace is used to list functions as well as
diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc
index 7a9ab4ff83b6..cdc92a371cd7 100644
--- a/tools/testing/selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc
+++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: ftrace - test for function traceon/off triggers 3# description: ftrace - test for function traceon/off triggers
3# flags: instance 4# flags: instance
4# 5#
diff --git a/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc b/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc
index 8a353314dc9b..d7f48b55df51 100644
--- a/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc
+++ b/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: Test creation and deletion of trace instances while setting an event 3# description: Test creation and deletion of trace instances while setting an event
3 4
4if [ ! -d instances ] ; then 5if [ ! -d instances ] ; then
diff --git a/tools/testing/selftests/ftrace/test.d/instances/instance.tc b/tools/testing/selftests/ftrace/test.d/instances/instance.tc
index 1e1abe0ad354..ddda62203366 100644
--- a/tools/testing/selftests/ftrace/test.d/instances/instance.tc
+++ b/tools/testing/selftests/ftrace/test.d/instances/instance.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: Test creation and deletion of trace instances 3# description: Test creation and deletion of trace instances
3 4
4if [ ! -d instances ] ; then 5if [ ! -d instances ] ; then
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/add_and_remove.tc b/tools/testing/selftests/ftrace/test.d/kprobe/add_and_remove.tc
index c3843ed49bf6..4604d2103c89 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/add_and_remove.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/add_and_remove.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: Kprobe dynamic event - adding and removing 3# description: Kprobe dynamic event - adding and removing
3 4
4[ -f kprobe_events ] || exit_unsupported # this is configurable 5[ -f kprobe_events ] || exit_unsupported # this is configurable
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc b/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc
index 74507db8bbc8..0e6f415c6152 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: Kprobe dynamic event - busy event check 3# description: Kprobe dynamic event - busy event check
3 4
4[ -f kprobe_events ] || exit_unsupported 5[ -f kprobe_events ] || exit_unsupported
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args.tc
index 64949d4eda69..679bbd23bcc3 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: Kprobe dynamic event with arguments 3# description: Kprobe dynamic event with arguments
3 4
4[ -f kprobe_events ] || exit_unsupported # this is configurable 5[ -f kprobe_events ] || exit_unsupported # this is configurable
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_type.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_type.tc
index c75faefb4fff..17d33ba192f6 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_type.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_type.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: Kprobes event arguments with types 3# description: Kprobes event arguments with types
3 4
4[ -f kprobe_events ] || exit_unsupported # this is configurable 5[ -f kprobe_events ] || exit_unsupported # this is configurable
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
index b9302cc82c12..2724a1068cb1 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: Kprobe event auto/manual naming 3# description: Kprobe event auto/manual naming
3 4
4[ -f kprobe_events ] || exit_unsupported # this is configurable 5[ -f kprobe_events ] || exit_unsupported # this is configurable
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_ftrace.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_ftrace.tc
index d6f2f4965697..cc4cac0e60f2 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_ftrace.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_ftrace.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: Kprobe dynamic event with function tracer 3# description: Kprobe dynamic event with function tracer
3 4
4[ -f kprobe_events ] || exit_unsupported # this is configurable 5[ -f kprobe_events ] || exit_unsupported # this is configurable
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
index 6d634e4b7680..1e9f75f7a30f 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: Kprobe dynamic event - probing module 3# description: Kprobe dynamic event - probing module
3 4
4[ -f kprobe_events ] || exit_unsupported # this is configurable 5[ -f kprobe_events ] || exit_unsupported # this is configurable
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_args.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_args.tc
index 0d09546258fd..f1825bdbe3f3 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_args.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_args.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: Kretprobe dynamic event with arguments 3# description: Kretprobe dynamic event with arguments
3 4
4[ -f kprobe_events ] || exit_unsupported # this is configurable 5[ -f kprobe_events ] || exit_unsupported # this is configurable
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_maxactive.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_maxactive.tc
index 7ec6f2639ad6..7c0290684c43 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_maxactive.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_maxactive.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: Kretprobe dynamic event with maxactive 3# description: Kretprobe dynamic event with maxactive
3 4
4[ -f kprobe_events ] || exit_unsupported # this is configurable 5[ -f kprobe_events ] || exit_unsupported # this is configurable
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc b/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
index a4fd4c851a5b..bb16cf91f1b5 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: Register/unregister many kprobe events 3# description: Register/unregister many kprobe events
3 4
4[ -f kprobe_events ] || exit_unsupported # this is configurable 5[ -f kprobe_events ] || exit_unsupported # this is configurable
diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-eventonoff.tc b/tools/testing/selftests/ftrace/test.d/trigger/trigger-eventonoff.tc
index c5435adfdd93..839ac4320b24 100644
--- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-eventonoff.tc
+++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-eventonoff.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: event trigger - test event enable/disable trigger 3# description: event trigger - test event enable/disable trigger
3# flags: instance 4# flags: instance
4 5
diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-filter.tc b/tools/testing/selftests/ftrace/test.d/trigger/trigger-filter.tc
index 48849a8d577f..66873c4b12c9 100644
--- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-filter.tc
+++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-filter.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: event trigger - test trigger filter 3# description: event trigger - test trigger filter
3# flags: instance 4# flags: instance
4 5
diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc b/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc
index b7f86d10b549..4237b32769f1 100644
--- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc
+++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: event trigger - test histogram modifiers 3# description: event trigger - test histogram modifiers
3# flags: instance 4# flags: instance
4 5
diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc b/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc
index fb66f7d9339d..d24e2b8bd863 100644
--- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc
+++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: event trigger - test histogram trigger 3# description: event trigger - test histogram trigger
3# flags: instance 4# flags: instance
4 5
diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc b/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc
index f9153087dd7c..4c0774fff378 100644
--- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc
+++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: event trigger - test multiple histogram triggers 3# description: event trigger - test multiple histogram triggers
3# flags: instance 4# flags: instance
4 5
diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-snapshot.tc b/tools/testing/selftests/ftrace/test.d/trigger/trigger-snapshot.tc
index ed94f0c4e0e4..3fc6321e081f 100644
--- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-snapshot.tc
+++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-snapshot.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: event trigger - test snapshot-trigger 3# description: event trigger - test snapshot-trigger
3 4
4do_reset() { 5do_reset() {
diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-stacktrace.tc b/tools/testing/selftests/ftrace/test.d/trigger/trigger-stacktrace.tc
index 9fa23b085def..3652824f81ed 100644
--- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-stacktrace.tc
+++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-stacktrace.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: event trigger - test stacktrace-trigger 3# description: event trigger - test stacktrace-trigger
3 4
4do_reset() { 5do_reset() {
diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-traceonoff.tc b/tools/testing/selftests/ftrace/test.d/trigger/trigger-traceonoff.tc
index 87648e5f987c..6d9051cdf408 100644
--- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-traceonoff.tc
+++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-traceonoff.tc
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# description: event trigger - test traceon/off trigger 3# description: event trigger - test traceon/off trigger
3 4
4do_reset() { 5do_reset() {
diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile
index f0c0369ccb79..cea4adcd42b8 100644
--- a/tools/testing/selftests/futex/Makefile
+++ b/tools/testing/selftests/futex/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1SUBDIRS := functional 2SUBDIRS := functional
2 3
3TEST_PROGS := run.sh 4TEST_PROGS := run.sh
diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile
index a648e7a6cbc3..ff8feca49746 100644
--- a/tools/testing/selftests/futex/functional/Makefile
+++ b/tools/testing/selftests/futex/functional/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1INCLUDES := -I../include -I../../ 2INCLUDES := -I../include -I../../
2CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES) 3CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES)
3LDFLAGS := $(LDFLAGS) -pthread -lrt 4LDFLAGS := $(LDFLAGS) -pthread -lrt
diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile
index 298929df97e6..1bbb47565c55 100644
--- a/tools/testing/selftests/gpio/Makefile
+++ b/tools/testing/selftests/gpio/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1 2
2TEST_PROGS := gpio-mockup.sh 3TEST_PROGS := gpio-mockup.sh
3TEST_FILES := gpio-mockup-sysfs.sh $(BINARIES) 4TEST_FILES := gpio-mockup-sysfs.sh $(BINARIES)
diff --git a/tools/testing/selftests/gpio/gpio-mockup-sysfs.sh b/tools/testing/selftests/gpio/gpio-mockup-sysfs.sh
index 085d7a39899c..dd269d877562 100755
--- a/tools/testing/selftests/gpio/gpio-mockup-sysfs.sh
+++ b/tools/testing/selftests/gpio/gpio-mockup-sysfs.sh
@@ -1,4 +1,5 @@
1 1
2# SPDX-License-Identifier: GPL-2.0
2is_consistent() 3is_consistent()
3{ 4{
4 val= 5 val=
diff --git a/tools/testing/selftests/gpio/gpio-mockup.sh b/tools/testing/selftests/gpio/gpio-mockup.sh
index b183439e058e..183fb932edbd 100755
--- a/tools/testing/selftests/gpio/gpio-mockup.sh
+++ b/tools/testing/selftests/gpio/gpio-mockup.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2 3
3#exit status 4#exit status
4#1: run as non-root user 5#1: run as non-root user
diff --git a/tools/testing/selftests/ia64/Makefile b/tools/testing/selftests/ia64/Makefile
index 2b3de2d3e945..4bce1a84b3a1 100644
--- a/tools/testing/selftests/ia64/Makefile
+++ b/tools/testing/selftests/ia64/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1TEST_PROGS := aliasing-test 2TEST_PROGS := aliasing-test
2 3
3all: $(TEST_PROGS) 4all: $(TEST_PROGS)
diff --git a/tools/testing/selftests/intel_pstate/Makefile b/tools/testing/selftests/intel_pstate/Makefile
index a97e24edde39..5a3f7d37e912 100644
--- a/tools/testing/selftests/intel_pstate/Makefile
+++ b/tools/testing/selftests/intel_pstate/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1CFLAGS := $(CFLAGS) -Wall -D_GNU_SOURCE 2CFLAGS := $(CFLAGS) -Wall -D_GNU_SOURCE
2LDLIBS := $(LDLIBS) -lm 3LDLIBS := $(LDLIBS) -lm
3 4
diff --git a/tools/testing/selftests/intel_pstate/aperf.c b/tools/testing/selftests/intel_pstate/aperf.c
index cd72f3dc83e9..d21edea9c560 100644
--- a/tools/testing/selftests/intel_pstate/aperf.c
+++ b/tools/testing/selftests/intel_pstate/aperf.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <math.h> 2#include <math.h>
2#include <unistd.h> 3#include <unistd.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/testing/selftests/intel_pstate/msr.c b/tools/testing/selftests/intel_pstate/msr.c
index abbbfc84d359..88fdd2a4b0a0 100644
--- a/tools/testing/selftests/intel_pstate/msr.c
+++ b/tools/testing/selftests/intel_pstate/msr.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <math.h> 2#include <math.h>
2#include <unistd.h> 3#include <unistd.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh
index d3ab48f91cd6..c670359becc6 100755
--- a/tools/testing/selftests/intel_pstate/run.sh
+++ b/tools/testing/selftests/intel_pstate/run.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2# 3#
3# This test runs on Intel x86 based hardware which support the intel_pstate 4# This test runs on Intel x86 based hardware which support the intel_pstate
4# driver. The test checks the frequency settings from the maximum turbo 5# driver. The test checks the frequency settings from the maximum turbo
diff --git a/tools/testing/selftests/ipc/Makefile b/tools/testing/selftests/ipc/Makefile
index 30ef4c7f53ea..1c4448a843a4 100644
--- a/tools/testing/selftests/ipc/Makefile
+++ b/tools/testing/selftests/ipc/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1uname_M := $(shell uname -m 2>/dev/null || echo not) 2uname_M := $(shell uname -m 2>/dev/null || echo not)
2ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/) 3ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/)
3ifeq ($(ARCH),i386) 4ifeq ($(ARCH),i386)
diff --git a/tools/testing/selftests/ipc/msgque.c b/tools/testing/selftests/ipc/msgque.c
index 1b2ce334bb3f..ee9382bdfadc 100644
--- a/tools/testing/selftests/ipc/msgque.c
+++ b/tools/testing/selftests/ipc/msgque.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdlib.h> 2#include <stdlib.h>
2#include <stdio.h> 3#include <stdio.h>
3#include <string.h> 4#include <string.h>
diff --git a/tools/testing/selftests/kcmp/kcmp_test.c b/tools/testing/selftests/kcmp/kcmp_test.c
index 73684c4a1ed6..6ea7b9f37a41 100644
--- a/tools/testing/selftests/kcmp/kcmp_test.c
+++ b/tools/testing/selftests/kcmp/kcmp_test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#define _GNU_SOURCE 2#define _GNU_SOURCE
2 3
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index f65886af7c0c..5bef05d6ba39 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -31,7 +31,11 @@ define RUN_TESTS
31 echo "selftests: Warning: file $$BASENAME_TEST is not executable, correct this.";\ 31 echo "selftests: Warning: file $$BASENAME_TEST is not executable, correct this.";\
32 echo "not ok 1..$$test_num selftests: $$BASENAME_TEST [FAIL]"; \ 32 echo "not ok 1..$$test_num selftests: $$BASENAME_TEST [FAIL]"; \
33 else \ 33 else \
34 cd `dirname $$TEST` > /dev/null; (./$$BASENAME_TEST > /tmp/$$BASENAME_TEST 2>&1 && echo "ok 1..$$test_num selftests: $$BASENAME_TEST [PASS]") || echo "not ok 1..$$test_num selftests: $$BASENAME_TEST [FAIL]"; cd - > /dev/null;\ 34 if [ "X$(summary)" != "X" ]; then \
35 cd `dirname $$TEST` > /dev/null; (./$$BASENAME_TEST > /tmp/$$BASENAME_TEST 2>&1 && echo "ok 1..$$test_num selftests: $$BASENAME_TEST [PASS]") || echo "not ok 1..$$test_num selftests: $$BASENAME_TEST [FAIL]"; cd - > /dev/null;\
36 else \
37 cd `dirname $$TEST` > /dev/null; (./$$BASENAME_TEST && echo "ok 1..$$test_num selftests: $$BASENAME_TEST [PASS]") || echo "not ok 1..$$test_num selftests: $$BASENAME_TEST [FAIL]"; cd - > /dev/null;\
38 fi; \
35 fi; \ 39 fi; \
36 done; 40 done;
37endef 41endef
diff --git a/tools/testing/selftests/lib/bitmap.sh b/tools/testing/selftests/lib/bitmap.sh
index b073c22a3435..4dee4d2a8bbe 100755
--- a/tools/testing/selftests/lib/bitmap.sh
+++ b/tools/testing/selftests/lib/bitmap.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# Runs bitmap infrastructure tests using test_bitmap kernel module 3# Runs bitmap infrastructure tests using test_bitmap kernel module
3if ! /sbin/modprobe -q -n test_bitmap; then 4if ! /sbin/modprobe -q -n test_bitmap; then
4 echo "bitmap: [SKIP]" 5 echo "bitmap: [SKIP]"
diff --git a/tools/testing/selftests/lib/prime_numbers.sh b/tools/testing/selftests/lib/prime_numbers.sh
index da4cbcd766f5..b363994e5e11 100755
--- a/tools/testing/selftests/lib/prime_numbers.sh
+++ b/tools/testing/selftests/lib/prime_numbers.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# Checks fast/slow prime_number generation for inconsistencies 3# Checks fast/slow prime_number generation for inconsistencies
3 4
4if ! /sbin/modprobe -q -r prime_numbers; then 5if ! /sbin/modprobe -q -r prime_numbers; then
diff --git a/tools/testing/selftests/lib/printf.sh b/tools/testing/selftests/lib/printf.sh
index cbf3b124bd94..0c37377fd7d4 100755
--- a/tools/testing/selftests/lib/printf.sh
+++ b/tools/testing/selftests/lib/printf.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# Runs printf infrastructure using test_printf kernel module 3# Runs printf infrastructure using test_printf kernel module
3if ! /sbin/modprobe -q -n test_printf; then 4if ! /sbin/modprobe -q -n test_printf; then
4 echo "printf: [SKIP]" 5 echo "printf: [SKIP]"
diff --git a/tools/testing/selftests/locking/ww_mutex.sh b/tools/testing/selftests/locking/ww_mutex.sh
index 6905da965f3b..2c3d6b1878c2 100644
--- a/tools/testing/selftests/locking/ww_mutex.sh
+++ b/tools/testing/selftests/locking/ww_mutex.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# Runs API tests for struct ww_mutex (Wait/Wound mutexes) 3# Runs API tests for struct ww_mutex (Wait/Wound mutexes)
3 4
4if /sbin/modprobe -q test-ww_mutex; then 5if /sbin/modprobe -q test-ww_mutex; then
diff --git a/tools/testing/selftests/media_tests/Makefile b/tools/testing/selftests/media_tests/Makefile
index 6b34a0199468..be5bd4ffb895 100644
--- a/tools/testing/selftests/media_tests/Makefile
+++ b/tools/testing/selftests/media_tests/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1TEST_PROGS := media_device_test media_device_open video_device_test 2TEST_PROGS := media_device_test media_device_open video_device_test
2all: $(TEST_PROGS) 3all: $(TEST_PROGS)
3 4
diff --git a/tools/testing/selftests/media_tests/bind_unbind_sample.sh b/tools/testing/selftests/media_tests/bind_unbind_sample.sh
index 9f362f10631a..0101c1ec4ff7 100755
--- a/tools/testing/selftests/media_tests/bind_unbind_sample.sh
+++ b/tools/testing/selftests/media_tests/bind_unbind_sample.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2# Find device number in /sys/bus/usb/drivers/drivername 3# Find device number in /sys/bus/usb/drivers/drivername
3# Edit this file to update the driver numer and name 4# Edit this file to update the driver numer and name
4# Example test for uvcvideo driver 5# Example test for uvcvideo driver
diff --git a/tools/testing/selftests/media_tests/open_loop_test.sh b/tools/testing/selftests/media_tests/open_loop_test.sh
index dcd3c17efc17..d4c0179bbe2c 100755
--- a/tools/testing/selftests/media_tests/open_loop_test.sh
+++ b/tools/testing/selftests/media_tests/open_loop_test.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2 i=0 3 i=0
3file=/dev/media$1 4file=/dev/media$1
4 while :; do 5 while :; do
diff --git a/tools/testing/selftests/membarrier/membarrier_test.c b/tools/testing/selftests/membarrier/membarrier_test.c
index 21399fcf1a59..9e674d9514d1 100644
--- a/tools/testing/selftests/membarrier/membarrier_test.c
+++ b/tools/testing/selftests/membarrier/membarrier_test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#define _GNU_SOURCE 2#define _GNU_SOURCE
2#include <linux/membarrier.h> 3#include <linux/membarrier.h>
3#include <syscall.h> 4#include <syscall.h>
diff --git a/tools/testing/selftests/memfd/Makefile b/tools/testing/selftests/memfd/Makefile
index bc9d02d615da..3926a0409dda 100644
--- a/tools/testing/selftests/memfd/Makefile
+++ b/tools/testing/selftests/memfd/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1CFLAGS += -D_FILE_OFFSET_BITS=64 2CFLAGS += -D_FILE_OFFSET_BITS=64
2CFLAGS += -I../../../../include/uapi/ 3CFLAGS += -I../../../../include/uapi/
3CFLAGS += -I../../../../include/ 4CFLAGS += -I../../../../include/
diff --git a/tools/testing/selftests/memfd/fuse_mnt.c b/tools/testing/selftests/memfd/fuse_mnt.c
index feacf1280fcd..6936f2a001f3 100644
--- a/tools/testing/selftests/memfd/fuse_mnt.c
+++ b/tools/testing/selftests/memfd/fuse_mnt.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * memfd test file-system 3 * memfd test file-system
3 * This file uses FUSE to create a dummy file-system with only one file /memfd. 4 * This file uses FUSE to create a dummy file-system with only one file /memfd.
diff --git a/tools/testing/selftests/memfd/fuse_test.c b/tools/testing/selftests/memfd/fuse_test.c
index 7f3617274bf5..1ccb7a3eb14b 100644
--- a/tools/testing/selftests/memfd/fuse_test.c
+++ b/tools/testing/selftests/memfd/fuse_test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * memfd GUP test-case 3 * memfd GUP test-case
3 * This tests memfd interactions with get_user_pages(). We require the 4 * This tests memfd interactions with get_user_pages(). We require the
diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c
index f94c6d1fb46f..845e5f67b6f0 100644
--- a/tools/testing/selftests/memfd/memfd_test.c
+++ b/tools/testing/selftests/memfd/memfd_test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#define _GNU_SOURCE 2#define _GNU_SOURCE
2#define __EXPORTED_HEADERS__ 3#define __EXPORTED_HEADERS__
3 4
diff --git a/tools/testing/selftests/memfd/run_fuse_test.sh b/tools/testing/selftests/memfd/run_fuse_test.sh
index 69b930e1e041..407df68dfe27 100755
--- a/tools/testing/selftests/memfd/run_fuse_test.sh
+++ b/tools/testing/selftests/memfd/run_fuse_test.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2 3
3if test -d "./mnt" ; then 4if test -d "./mnt" ; then
4 fusermount -u ./mnt 5 fusermount -u ./mnt
diff --git a/tools/testing/selftests/memory-hotplug/Makefile b/tools/testing/selftests/memory-hotplug/Makefile
index afb2624c7048..23db11c94b59 100644
--- a/tools/testing/selftests/memory-hotplug/Makefile
+++ b/tools/testing/selftests/memory-hotplug/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1all: 2all:
2 3
3include ../lib.mk 4include ../lib.mk
diff --git a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
index 35025ce9ca66..ae2c790d0880 100755
--- a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
+++ b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2 3
3SYSFS= 4SYSFS=
4 5
diff --git a/tools/testing/selftests/mount/Makefile b/tools/testing/selftests/mount/Makefile
index 9093d7ffe87f..e094f71c6dbc 100644
--- a/tools/testing/selftests/mount/Makefile
+++ b/tools/testing/selftests/mount/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# Makefile for mount selftests. 2# Makefile for mount selftests.
2CFLAGS = -Wall \ 3CFLAGS = -Wall \
3 -O2 4 -O2
diff --git a/tools/testing/selftests/mount/unprivileged-remount-test.c b/tools/testing/selftests/mount/unprivileged-remount-test.c
index 517785052f1c..584dc6bc3b06 100644
--- a/tools/testing/selftests/mount/unprivileged-remount-test.c
+++ b/tools/testing/selftests/mount/unprivileged-remount-test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#define _GNU_SOURCE 2#define _GNU_SOURCE
2#include <sched.h> 3#include <sched.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/testing/selftests/mqueue/Makefile b/tools/testing/selftests/mqueue/Makefile
index 152823b6cb21..743d3f9e5918 100644
--- a/tools/testing/selftests/mqueue/Makefile
+++ b/tools/testing/selftests/mqueue/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1CFLAGS += -O2 2CFLAGS += -O2
2LDLIBS = -lrt -lpthread -lpopt 3LDLIBS = -lrt -lpthread -lpopt
3TEST_GEN_PROGS := mq_open_tests mq_perf_tests 4TEST_GEN_PROGS := mq_open_tests mq_perf_tests
diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
index d86bca991f45..500c74db746c 100644
--- a/tools/testing/selftests/net/Makefile
+++ b/tools/testing/selftests/net/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# Makefile for net selftests 2# Makefile for net selftests
2 3
3CFLAGS = -Wall -Wl,--no-as-needed -O2 -g 4CFLAGS = -Wall -Wl,--no-as-needed -O2 -g
diff --git a/tools/testing/selftests/net/netdevice.sh b/tools/testing/selftests/net/netdevice.sh
index 90cb903c3381..903679e0ff31 100755
--- a/tools/testing/selftests/net/netdevice.sh
+++ b/tools/testing/selftests/net/netdevice.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# 3#
3# This test is for checking network interface 4# This test is for checking network interface
4# For the moment it tests only ethernet interface (but wifi could be easily added) 5# For the moment it tests only ethernet interface (but wifi could be easily added)
diff --git a/tools/testing/selftests/net/reuseport_bpf_cpu.c b/tools/testing/selftests/net/reuseport_bpf_cpu.c
index b23d6f54de7b..2d646174729f 100644
--- a/tools/testing/selftests/net/reuseport_bpf_cpu.c
+++ b/tools/testing/selftests/net/reuseport_bpf_cpu.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Test functionality of BPF filters with SO_REUSEPORT. This program creates 3 * Test functionality of BPF filters with SO_REUSEPORT. This program creates
3 * an SO_REUSEPORT receiver group containing one socket per CPU core. It then 4 * an SO_REUSEPORT receiver group containing one socket per CPU core. It then
diff --git a/tools/testing/selftests/net/reuseport_bpf_numa.c b/tools/testing/selftests/net/reuseport_bpf_numa.c
index 6f20bc9ff627..365c32e84189 100644
--- a/tools/testing/selftests/net/reuseport_bpf_numa.c
+++ b/tools/testing/selftests/net/reuseport_bpf_numa.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Test functionality of BPF filters with SO_REUSEPORT. Same test as 3 * Test functionality of BPF filters with SO_REUSEPORT. Same test as
3 * in reuseport_bpf_cpu, only as one socket per NUMA node. 4 * in reuseport_bpf_cpu, only as one socket per NUMA node.
diff --git a/tools/testing/selftests/net/reuseport_dualstack.c b/tools/testing/selftests/net/reuseport_dualstack.c
index 90958aaaafb9..fe3230c55986 100644
--- a/tools/testing/selftests/net/reuseport_dualstack.c
+++ b/tools/testing/selftests/net/reuseport_dualstack.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * It is possible to use SO_REUSEPORT to open multiple sockets bound to 3 * It is possible to use SO_REUSEPORT to open multiple sockets bound to
3 * equivalent local addresses using AF_INET and AF_INET6 at the same time. If 4 * equivalent local addresses using AF_INET and AF_INET6 at the same time. If
diff --git a/tools/testing/selftests/net/run_afpackettests b/tools/testing/selftests/net/run_afpackettests
index 5246e782d6e8..21fe149e3de1 100755
--- a/tools/testing/selftests/net/run_afpackettests
+++ b/tools/testing/selftests/net/run_afpackettests
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2 3
3if [ $(id -u) != 0 ]; then 4if [ $(id -u) != 0 ]; then
4 echo $msg must be run as root >&2 5 echo $msg must be run as root >&2
diff --git a/tools/testing/selftests/net/run_netsocktests b/tools/testing/selftests/net/run_netsocktests
index 16058bbea7a8..b093f39c298c 100755
--- a/tools/testing/selftests/net/run_netsocktests
+++ b/tools/testing/selftests/net/run_netsocktests
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2 3
3echo "--------------------" 4echo "--------------------"
4echo "running socket test" 5echo "running socket test"
diff --git a/tools/testing/selftests/net/socket.c b/tools/testing/selftests/net/socket.c
index 0f227f2f9be9..afca1ead677f 100644
--- a/tools/testing/selftests/net/socket.c
+++ b/tools/testing/selftests/net/socket.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <errno.h> 3#include <errno.h>
3#include <unistd.h> 4#include <unistd.h>
diff --git a/tools/testing/selftests/net/test_bpf.sh b/tools/testing/selftests/net/test_bpf.sh
index 8b29796d46aa..65677909c574 100755
--- a/tools/testing/selftests/net/test_bpf.sh
+++ b/tools/testing/selftests/net/test_bpf.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# Runs bpf test using test_bpf kernel module 3# Runs bpf test using test_bpf kernel module
3 4
4if /sbin/modprobe -q test_bpf ; then 5if /sbin/modprobe -q test_bpf ; then
diff --git a/tools/testing/selftests/networking/timestamping/Makefile b/tools/testing/selftests/networking/timestamping/Makefile
index 92fb8ee917c5..a728040edbe1 100644
--- a/tools/testing/selftests/networking/timestamping/Makefile
+++ b/tools/testing/selftests/networking/timestamping/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1CFLAGS += -I../../../../../usr/include 2CFLAGS += -I../../../../../usr/include
2 3
3TEST_PROGS := hwtstamp_config rxtimestamp timestamping txtimestamp 4TEST_PROGS := hwtstamp_config rxtimestamp timestamping txtimestamp
diff --git a/tools/testing/selftests/networking/timestamping/hwtstamp_config.c b/tools/testing/selftests/networking/timestamping/hwtstamp_config.c
index e8b685a7f15f..e1fdee841021 100644
--- a/tools/testing/selftests/networking/timestamping/hwtstamp_config.c
+++ b/tools/testing/selftests/networking/timestamping/hwtstamp_config.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* Test program for SIOC{G,S}HWTSTAMP 2/* Test program for SIOC{G,S}HWTSTAMP
2 * Copyright 2013 Solarflare Communications 3 * Copyright 2013 Solarflare Communications
3 * Author: Ben Hutchings 4 * Author: Ben Hutchings
diff --git a/tools/testing/selftests/nsfs/owner.c b/tools/testing/selftests/nsfs/owner.c
index 437205f8b714..96a976c74550 100644
--- a/tools/testing/selftests/nsfs/owner.c
+++ b/tools/testing/selftests/nsfs/owner.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#define _GNU_SOURCE 2#define _GNU_SOURCE
2#include <sched.h> 3#include <sched.h>
3#include <unistd.h> 4#include <unistd.h>
diff --git a/tools/testing/selftests/nsfs/pidns.c b/tools/testing/selftests/nsfs/pidns.c
index ae3a0d68e966..1182d4e437a2 100644
--- a/tools/testing/selftests/nsfs/pidns.c
+++ b/tools/testing/selftests/nsfs/pidns.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#define _GNU_SOURCE 2#define _GNU_SOURCE
2#include <sched.h> 3#include <sched.h>
3#include <unistd.h> 4#include <unistd.h>
diff --git a/tools/testing/selftests/powerpc/Makefile b/tools/testing/selftests/powerpc/Makefile
index 72c3ac2323e1..f6b1338730db 100644
--- a/tools/testing/selftests/powerpc/Makefile
+++ b/tools/testing/selftests/powerpc/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# Makefile for powerpc selftests 2# Makefile for powerpc selftests
2 3
3# ARCH can be overridden by the user for cross compiling 4# ARCH can be overridden by the user for cross compiling
diff --git a/tools/testing/selftests/powerpc/benchmarks/Makefile b/tools/testing/selftests/powerpc/benchmarks/Makefile
index fb96a89bd953..a35058e3766c 100644
--- a/tools/testing/selftests/powerpc/benchmarks/Makefile
+++ b/tools/testing/selftests/powerpc/benchmarks/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1TEST_GEN_PROGS := gettimeofday context_switch mmap_bench futex_bench null_syscall 2TEST_GEN_PROGS := gettimeofday context_switch mmap_bench futex_bench null_syscall
2 3
3CFLAGS += -O2 4CFLAGS += -O2
diff --git a/tools/testing/selftests/powerpc/cache_shape/Makefile b/tools/testing/selftests/powerpc/cache_shape/Makefile
index b24485ab30e2..1be547434a49 100644
--- a/tools/testing/selftests/powerpc/cache_shape/Makefile
+++ b/tools/testing/selftests/powerpc/cache_shape/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1TEST_PROGS := cache_shape 2TEST_PROGS := cache_shape
2 3
3all: $(TEST_PROGS) 4all: $(TEST_PROGS)
diff --git a/tools/testing/selftests/powerpc/copyloops/Makefile b/tools/testing/selftests/powerpc/copyloops/Makefile
index 681ab19d0a84..ac4a52e19e59 100644
--- a/tools/testing/selftests/powerpc/copyloops/Makefile
+++ b/tools/testing/selftests/powerpc/copyloops/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# The loops are all 64-bit code 2# The loops are all 64-bit code
2CFLAGS += -m64 3CFLAGS += -m64
3CFLAGS += -I$(CURDIR) 4CFLAGS += -I$(CURDIR)
diff --git a/tools/testing/selftests/powerpc/copyloops/asm/export.h b/tools/testing/selftests/powerpc/copyloops/asm/export.h
index 2d14a9b4248c..0bab35f6777a 100644
--- a/tools/testing/selftests/powerpc/copyloops/asm/export.h
+++ b/tools/testing/selftests/powerpc/copyloops/asm/export.h
@@ -1 +1,2 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#define EXPORT_SYMBOL(x) 2#define EXPORT_SYMBOL(x)
diff --git a/tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h b/tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h
index 80d34a9ffff4..5ffe04d802c9 100644
--- a/tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h
+++ b/tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#include <ppc-asm.h> 2#include <ppc-asm.h>
2 3
3#define CONFIG_ALTIVEC 4#define CONFIG_ALTIVEC
diff --git a/tools/testing/selftests/powerpc/copyloops/validate.c b/tools/testing/selftests/powerpc/copyloops/validate.c
index 7fb436f82d16..0f6873618552 100644
--- a/tools/testing/selftests/powerpc/copyloops/validate.c
+++ b/tools/testing/selftests/powerpc/copyloops/validate.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <malloc.h> 2#include <malloc.h>
2#include <string.h> 3#include <string.h>
3#include <stdlib.h> 4#include <stdlib.h>
diff --git a/tools/testing/selftests/powerpc/dscr/Makefile b/tools/testing/selftests/powerpc/dscr/Makefile
index c5639deb8887..55d7db7a616b 100644
--- a/tools/testing/selftests/powerpc/dscr/Makefile
+++ b/tools/testing/selftests/powerpc/dscr/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1TEST_GEN_PROGS := dscr_default_test dscr_explicit_test dscr_user_test \ 2TEST_GEN_PROGS := dscr_default_test dscr_explicit_test dscr_user_test \
2 dscr_inherit_test dscr_inherit_exec_test dscr_sysfs_test \ 3 dscr_inherit_test dscr_inherit_exec_test dscr_sysfs_test \
3 dscr_sysfs_thread_test 4 dscr_sysfs_thread_test
diff --git a/tools/testing/selftests/powerpc/include/basic_asm.h b/tools/testing/selftests/powerpc/include/basic_asm.h
index 12eaddf72e66..886dc026fe7a 100644
--- a/tools/testing/selftests/powerpc/include/basic_asm.h
+++ b/tools/testing/selftests/powerpc/include/basic_asm.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _SELFTESTS_POWERPC_BASIC_ASM_H 2#ifndef _SELFTESTS_POWERPC_BASIC_ASM_H
2#define _SELFTESTS_POWERPC_BASIC_ASM_H 3#define _SELFTESTS_POWERPC_BASIC_ASM_H
3 4
diff --git a/tools/testing/selftests/powerpc/include/instructions.h b/tools/testing/selftests/powerpc/include/instructions.h
index 0fb0bd3b28c9..f36061eb6f0f 100644
--- a/tools/testing/selftests/powerpc/include/instructions.h
+++ b/tools/testing/selftests/powerpc/include/instructions.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _SELFTESTS_POWERPC_INSTRUCTIONS_H 2#ifndef _SELFTESTS_POWERPC_INSTRUCTIONS_H
2#define _SELFTESTS_POWERPC_INSTRUCTIONS_H 3#define _SELFTESTS_POWERPC_INSTRUCTIONS_H
3 4
diff --git a/tools/testing/selftests/powerpc/math/Makefile b/tools/testing/selftests/powerpc/math/Makefile
index fa8bae920c91..0dd3a01fdab9 100644
--- a/tools/testing/selftests/powerpc/math/Makefile
+++ b/tools/testing/selftests/powerpc/math/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1TEST_GEN_PROGS := fpu_syscall fpu_preempt fpu_signal vmx_syscall vmx_preempt vmx_signal vsx_preempt 2TEST_GEN_PROGS := fpu_syscall fpu_preempt fpu_signal vmx_syscall vmx_preempt vmx_signal vsx_preempt
2 3
3include ../../lib.mk 4include ../../lib.mk
diff --git a/tools/testing/selftests/powerpc/mm/Makefile b/tools/testing/selftests/powerpc/mm/Makefile
index 1cffe54dccfb..bf315bcbe663 100644
--- a/tools/testing/selftests/powerpc/mm/Makefile
+++ b/tools/testing/selftests/powerpc/mm/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1noarg: 2noarg:
2 $(MAKE) -C ../ 3 $(MAKE) -C ../
3 4
diff --git a/tools/testing/selftests/powerpc/mm/hugetlb_vs_thp_test.c b/tools/testing/selftests/powerpc/mm/hugetlb_vs_thp_test.c
index 49003674de4f..9932359ce38f 100644
--- a/tools/testing/selftests/powerpc/mm/hugetlb_vs_thp_test.c
+++ b/tools/testing/selftests/powerpc/mm/hugetlb_vs_thp_test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <sys/mman.h> 3#include <sys/mman.h>
3#include <unistd.h> 4#include <unistd.h>
diff --git a/tools/testing/selftests/powerpc/pmu/Makefile b/tools/testing/selftests/powerpc/pmu/Makefile
index e4e55d1d3e0f..6e1629bf5b09 100644
--- a/tools/testing/selftests/powerpc/pmu/Makefile
+++ b/tools/testing/selftests/powerpc/pmu/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1noarg: 2noarg:
2 $(MAKE) -C ../ 3 $(MAKE) -C ../
3 4
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/Makefile b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
index 6001fb0a377a..c4e64bc2e265 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/Makefile
+++ b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1noarg: 2noarg:
2 $(MAKE) -C ../../ 3 $(MAKE) -C ../../
3 4
diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile
index 8932263e5a74..480305266504 100644
--- a/tools/testing/selftests/powerpc/ptrace/Makefile
+++ b/tools/testing/selftests/powerpc/ptrace/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1TEST_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \ 2TEST_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \
2 ptrace-tar ptrace-tm-tar ptrace-tm-spd-tar ptrace-vsx ptrace-tm-vsx \ 3 ptrace-tar ptrace-tm-tar ptrace-tm-spd-tar ptrace-vsx ptrace-tm-vsx \
3 ptrace-tm-spd-vsx ptrace-tm-spr 4 ptrace-tm-spd-vsx ptrace-tm-spr
diff --git a/tools/testing/selftests/powerpc/signal/Makefile b/tools/testing/selftests/powerpc/signal/Makefile
index f0eef27458e2..a7cbd5082e27 100644
--- a/tools/testing/selftests/powerpc/signal/Makefile
+++ b/tools/testing/selftests/powerpc/signal/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1TEST_PROGS := signal signal_tm 2TEST_PROGS := signal signal_tm
2 3
3all: $(TEST_PROGS) 4all: $(TEST_PROGS)
diff --git a/tools/testing/selftests/powerpc/stringloops/Makefile b/tools/testing/selftests/powerpc/stringloops/Makefile
index 557b9379f3bb..1125e489055e 100644
--- a/tools/testing/selftests/powerpc/stringloops/Makefile
+++ b/tools/testing/selftests/powerpc/stringloops/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# The loops are all 64-bit code 2# The loops are all 64-bit code
2CFLAGS += -m64 3CFLAGS += -m64
3CFLAGS += -I$(CURDIR) 4CFLAGS += -I$(CURDIR)
diff --git a/tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h b/tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h
index 11bece87e880..136242ec4b0e 100644
--- a/tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h
+++ b/tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#include <ppc-asm.h> 2#include <ppc-asm.h>
2 3
3#ifndef r1 4#ifndef r1
diff --git a/tools/testing/selftests/powerpc/stringloops/memcmp.c b/tools/testing/selftests/powerpc/stringloops/memcmp.c
index 30b1222380ca..8250db25b379 100644
--- a/tools/testing/selftests/powerpc/stringloops/memcmp.c
+++ b/tools/testing/selftests/powerpc/stringloops/memcmp.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <malloc.h> 2#include <malloc.h>
2#include <stdlib.h> 3#include <stdlib.h>
3#include <string.h> 4#include <string.h>
diff --git a/tools/testing/selftests/powerpc/switch_endian/Makefile b/tools/testing/selftests/powerpc/switch_endian/Makefile
index b92c2a132c4f..30b8ff8fb82e 100644
--- a/tools/testing/selftests/powerpc/switch_endian/Makefile
+++ b/tools/testing/selftests/powerpc/switch_endian/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1TEST_GEN_PROGS := switch_endian_test 2TEST_GEN_PROGS := switch_endian_test
2 3
3ASFLAGS += -O2 -Wall -g -nostdlib -m64 4ASFLAGS += -O2 -Wall -g -nostdlib -m64
diff --git a/tools/testing/selftests/powerpc/switch_endian/check.S b/tools/testing/selftests/powerpc/switch_endian/check.S
index e2484d2c24f4..927a5c675e83 100644
--- a/tools/testing/selftests/powerpc/switch_endian/check.S
+++ b/tools/testing/selftests/powerpc/switch_endian/check.S
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#include "common.h" 2#include "common.h"
2 3
3/* 4/*
diff --git a/tools/testing/selftests/powerpc/switch_endian/common.h b/tools/testing/selftests/powerpc/switch_endian/common.h
index 69e399698c64..1434cbc2a6ad 100644
--- a/tools/testing/selftests/powerpc/switch_endian/common.h
+++ b/tools/testing/selftests/powerpc/switch_endian/common.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#include <ppc-asm.h> 2#include <ppc-asm.h>
2#include <asm/unistd.h> 3#include <asm/unistd.h>
3 4
diff --git a/tools/testing/selftests/powerpc/switch_endian/switch_endian_test.S b/tools/testing/selftests/powerpc/switch_endian/switch_endian_test.S
index bceb53f57573..cc4930467235 100644
--- a/tools/testing/selftests/powerpc/switch_endian/switch_endian_test.S
+++ b/tools/testing/selftests/powerpc/switch_endian/switch_endian_test.S
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#include "common.h" 2#include "common.h"
2 3
3 .data 4 .data
diff --git a/tools/testing/selftests/powerpc/syscalls/ipc.h b/tools/testing/selftests/powerpc/syscalls/ipc.h
index fbebc022edf6..26a20682c9a4 100644
--- a/tools/testing/selftests/powerpc/syscalls/ipc.h
+++ b/tools/testing/selftests/powerpc/syscalls/ipc.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifdef __NR_semop 2#ifdef __NR_semop
2DO_TEST(semop, __NR_semop) 3DO_TEST(semop, __NR_semop)
3#endif 4#endif
diff --git a/tools/testing/selftests/powerpc/tm/Makefile b/tools/testing/selftests/powerpc/tm/Makefile
index 7bfcd454fb2a..fca7c7f5e640 100644
--- a/tools/testing/selftests/powerpc/tm/Makefile
+++ b/tools/testing/selftests/powerpc/tm/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1SIGNAL_CONTEXT_CHK_TESTS := tm-signal-context-chk-gpr tm-signal-context-chk-fpu \ 2SIGNAL_CONTEXT_CHK_TESTS := tm-signal-context-chk-gpr tm-signal-context-chk-fpu \
2 tm-signal-context-chk-vmx tm-signal-context-chk-vsx 3 tm-signal-context-chk-vmx tm-signal-context-chk-vsx
3 4
diff --git a/tools/testing/selftests/powerpc/tm/tm-resched-dscr.c b/tools/testing/selftests/powerpc/tm/tm-resched-dscr.c
index a7ac2e4c60d9..4cdb83964bb3 100644
--- a/tools/testing/selftests/powerpc/tm/tm-resched-dscr.c
+++ b/tools/testing/selftests/powerpc/tm/tm-resched-dscr.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* Test context switching to see if the DSCR SPR is correctly preserved 2/* Test context switching to see if the DSCR SPR is correctly preserved
2 * when within a transaction. 3 * when within a transaction.
3 * 4 *
diff --git a/tools/testing/selftests/powerpc/tm/tm-syscall-asm.S b/tools/testing/selftests/powerpc/tm/tm-syscall-asm.S
index 431f61ae2368..bd1ca25febe4 100644
--- a/tools/testing/selftests/powerpc/tm/tm-syscall-asm.S
+++ b/tools/testing/selftests/powerpc/tm/tm-syscall-asm.S
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#include <ppc-asm.h> 2#include <ppc-asm.h>
2#include <asm/unistd.h> 3#include <asm/unistd.h>
3 4
diff --git a/tools/testing/selftests/powerpc/vphn/test-vphn.c b/tools/testing/selftests/powerpc/vphn/test-vphn.c
index 5742f6876b25..81d3069ffb84 100644
--- a/tools/testing/selftests/powerpc/vphn/test-vphn.c
+++ b/tools/testing/selftests/powerpc/vphn/test-vphn.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <stdio.h> 2#include <stdio.h>
2#include <byteswap.h> 3#include <byteswap.h>
3#include "utils.h" 4#include "utils.h"
diff --git a/tools/testing/selftests/prctl/Makefile b/tools/testing/selftests/prctl/Makefile
index 35aa1c8f2df2..c7923b205222 100644
--- a/tools/testing/selftests/prctl/Makefile
+++ b/tools/testing/selftests/prctl/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1ifndef CROSS_COMPILE 2ifndef CROSS_COMPILE
2uname_M := $(shell uname -m 2>/dev/null || echo not) 3uname_M := $(shell uname -m 2>/dev/null || echo not)
3ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) 4ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
diff --git a/tools/testing/selftests/prctl/disable-tsc-ctxt-sw-stress-test.c b/tools/testing/selftests/prctl/disable-tsc-ctxt-sw-stress-test.c
index f7499d1c0415..62a93cc61b7c 100644
--- a/tools/testing/selftests/prctl/disable-tsc-ctxt-sw-stress-test.c
+++ b/tools/testing/selftests/prctl/disable-tsc-ctxt-sw-stress-test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...) 3 * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...)
3 * 4 *
diff --git a/tools/testing/selftests/prctl/disable-tsc-on-off-stress-test.c b/tools/testing/selftests/prctl/disable-tsc-on-off-stress-test.c
index a06f027e9d16..79950f9a26fd 100644
--- a/tools/testing/selftests/prctl/disable-tsc-on-off-stress-test.c
+++ b/tools/testing/selftests/prctl/disable-tsc-on-off-stress-test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...) 3 * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...)
3 * 4 *
diff --git a/tools/testing/selftests/prctl/disable-tsc-test.c b/tools/testing/selftests/prctl/disable-tsc-test.c
index 8d494f7bebdb..f84d4ee111d3 100644
--- a/tools/testing/selftests/prctl/disable-tsc-test.c
+++ b/tools/testing/selftests/prctl/disable-tsc-test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...) 3 * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...)
3 * 4 *
diff --git a/tools/testing/selftests/pstore/Makefile b/tools/testing/selftests/pstore/Makefile
index c5f2440ba1f7..5ef57855a2be 100644
--- a/tools/testing/selftests/pstore/Makefile
+++ b/tools/testing/selftests/pstore/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# Makefile for pstore selftests. 2# Makefile for pstore selftests.
2# Expects pstore backend is registered. 3# Expects pstore backend is registered.
3 4
diff --git a/tools/testing/selftests/ptp/Makefile b/tools/testing/selftests/ptp/Makefile
index d4064c742c26..ef06de0898b7 100644
--- a/tools/testing/selftests/ptp/Makefile
+++ b/tools/testing/selftests/ptp/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1CFLAGS += -I../../../../usr/include/ 2CFLAGS += -I../../../../usr/include/
2TEST_PROGS := testptp 3TEST_PROGS := testptp
3LDLIBS += -lrt 4LDLIBS += -lrt
diff --git a/tools/testing/selftests/ptrace/peeksiginfo.c b/tools/testing/selftests/ptrace/peeksiginfo.c
index c34cd8ac8aaa..54900657eb44 100644
--- a/tools/testing/selftests/ptrace/peeksiginfo.c
+++ b/tools/testing/selftests/ptrace/peeksiginfo.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#define _GNU_SOURCE 2#define _GNU_SOURCE
2#include <stdio.h> 3#include <stdio.h>
3#include <signal.h> 4#include <signal.h>
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/Makefile b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/Makefile
index 16b01559fa55..4bed0b678f8b 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/Makefile
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1all: srcu.c store_buffering 2all: srcu.c store_buffering
2 3
3LINUX_SOURCE = ../../../../../.. 4LINUX_SOURCE = ../../../../../..
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/include/linux/types.h b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/include/linux/types.h
index 4a3d538fef12..891ad13e95b2 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/include/linux/types.h
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/include/linux/types.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * This header has been modifies to remove definitions of types that 3 * This header has been modifies to remove definitions of types that
3 * are defined in standard userspace headers or are problematic for some 4 * are defined in standard userspace headers or are problematic for some
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/modify_srcu.awk b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/modify_srcu.awk
index c9e8bc5082a7..e05182d3e47d 100755
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/modify_srcu.awk
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/modify_srcu.awk
@@ -1,4 +1,5 @@
1#!/usr/bin/awk -f 1#!/usr/bin/awk -f
2# SPDX-License-Identifier: GPL-2.0
2 3
3# Modify SRCU for formal verification. The first argument should be srcu.h and 4# Modify SRCU for formal verification. The first argument should be srcu.h and
4# the second should be srcu.c. Outputs modified srcu.h and srcu.c into the 5# the second should be srcu.c. Outputs modified srcu.h and srcu.c into the
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/assume.h b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/assume.h
index a64955447995..570a49d9da7e 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/assume.h
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/assume.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef ASSUME_H 2#ifndef ASSUME_H
2#define ASSUME_H 3#define ASSUME_H
3 4
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/barriers.h b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/barriers.h
index 6687acc08e6d..be3fdd351937 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/barriers.h
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/barriers.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef BARRIERS_H 2#ifndef BARRIERS_H
2#define BARRIERS_H 3#define BARRIERS_H
3 4
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/bug_on.h b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/bug_on.h
index 2a80e91f78e7..5e7912c6a521 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/bug_on.h
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/bug_on.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef BUG_ON_H 2#ifndef BUG_ON_H
2#define BUG_ON_H 3#define BUG_ON_H
3 4
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/combined_source.c b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/combined_source.c
index 29eb5d2697ed..e67ee5b3dd7c 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/combined_source.c
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/combined_source.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <config.h> 2#include <config.h>
2 3
3/* Include all source files. */ 4/* Include all source files. */
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/config.h b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/config.h
index a60038aeea7a..283d7103334f 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/config.h
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/config.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* "Cheater" definitions based on restricted Kconfig choices. */ 2/* "Cheater" definitions based on restricted Kconfig choices. */
2 3
3#undef CONFIG_TINY_RCU 4#undef CONFIG_TINY_RCU
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/include_srcu.c b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/include_srcu.c
index 5ec582a53018..e5202d4cff30 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/include_srcu.c
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/include_srcu.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <config.h> 2#include <config.h>
2 3
3#include <assert.h> 4#include <assert.h>
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/int_typedefs.h b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/int_typedefs.h
index 3aad63917858..0dd27aa517a7 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/int_typedefs.h
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/int_typedefs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef INT_TYPEDEFS_H 2#ifndef INT_TYPEDEFS_H
2#define INT_TYPEDEFS_H 3#define INT_TYPEDEFS_H
3 4
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/locks.h b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/locks.h
index 356004665576..cf6938d679d7 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/locks.h
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/locks.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef LOCKS_H 2#ifndef LOCKS_H
2#define LOCKS_H 3#define LOCKS_H
3 4
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/misc.c b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/misc.c
index ca892e3b2351..9440cc39e3c6 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/misc.c
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/misc.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <config.h> 2#include <config.h>
2 3
3#include "misc.h" 4#include "misc.h"
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/percpu.h b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/percpu.h
index 3de5a49de49b..27e67a3f291f 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/percpu.h
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/percpu.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef PERCPU_H 2#ifndef PERCPU_H
2#define PERCPU_H 3#define PERCPU_H
3 4
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/preempt.c b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/preempt.c
index 4f1b068e9b7a..b4083ae348fb 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/preempt.c
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/preempt.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <config.h> 2#include <config.h>
2 3
3#include "preempt.h" 4#include "preempt.h"
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/preempt.h b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/preempt.h
index 2f95ee0e4dd5..f8b762cd214c 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/preempt.h
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/preempt.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef PREEMPT_H 2#ifndef PREEMPT_H
2#define PREEMPT_H 3#define PREEMPT_H
3 4
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/simple_sync_srcu.c b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/simple_sync_srcu.c
index ac9cbc62b411..97f592048e0b 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/simple_sync_srcu.c
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/simple_sync_srcu.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <config.h> 2#include <config.h>
2 3
3#include <assert.h> 4#include <assert.h>
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/workqueues.h b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/workqueues.h
index e58c8dfd3e90..28b960300971 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/workqueues.h
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/workqueues.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef WORKQUEUES_H 2#ifndef WORKQUEUES_H
2#define WORKQUEUES_H 3#define WORKQUEUES_H
3 4
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/store_buffering/Makefile b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/store_buffering/Makefile
index 3a3aee149225..ad21b925fbb4 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/store_buffering/Makefile
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/store_buffering/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1CBMC_FLAGS = -I../.. -I../../src -I../../include -I../../empty_includes -32 -pointer-check -mm pso 2CBMC_FLAGS = -I../.. -I../../src -I../../include -I../../empty_includes -32 -pointer-check -mm pso
2 3
3all: 4all:
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/store_buffering/test.c b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/store_buffering/test.c
index 470b1105a112..2ce2016f7871 100644
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/store_buffering/test.c
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/store_buffering/test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <src/combined_source.c> 2#include <src/combined_source.c>
2 3
3int x; 4int x;
diff --git a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/test_script.sh b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/test_script.sh
index d1545972a0fa..2fe1f0339b4f 100755
--- a/tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/test_script.sh
+++ b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/test_script.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2 3
3# This script expects a mode (either --should-pass or --should-fail) followed by 4# This script expects a mode (either --should-pass or --should-fail) followed by
4# an input file. The script uses the following environment variables. The test C 5# an input file. The script uses the following environment variables. The test C
diff --git a/tools/testing/selftests/seccomp/Makefile b/tools/testing/selftests/seccomp/Makefile
index 553d870b4ca9..fce7f4ce0692 100644
--- a/tools/testing/selftests/seccomp/Makefile
+++ b/tools/testing/selftests/seccomp/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1all: 2all:
2 3
3include ../lib.mk 4include ../lib.mk
diff --git a/tools/testing/selftests/sigaltstack/sas.c b/tools/testing/selftests/sigaltstack/sas.c
index 97bb150837df..228c2ae47687 100644
--- a/tools/testing/selftests/sigaltstack/sas.c
+++ b/tools/testing/selftests/sigaltstack/sas.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Stas Sergeev <stsp@users.sourceforge.net> 3 * Stas Sergeev <stsp@users.sourceforge.net>
3 * 4 *
diff --git a/tools/testing/selftests/splice/Makefile b/tools/testing/selftests/splice/Makefile
index 7e1187e007fa..e519b159b60d 100644
--- a/tools/testing/selftests/splice/Makefile
+++ b/tools/testing/selftests/splice/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1TEST_PROGS := default_file_splice_read.sh 2TEST_PROGS := default_file_splice_read.sh
2TEST_GEN_PROGS_EXTENDED := default_file_splice_read 3TEST_GEN_PROGS_EXTENDED := default_file_splice_read
3 4
diff --git a/tools/testing/selftests/splice/default_file_splice_read.c b/tools/testing/selftests/splice/default_file_splice_read.c
index 01dd6091554c..a3c6e5672e09 100644
--- a/tools/testing/selftests/splice/default_file_splice_read.c
+++ b/tools/testing/selftests/splice/default_file_splice_read.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#define _GNU_SOURCE 2#define _GNU_SOURCE
2#include <fcntl.h> 3#include <fcntl.h>
3 4
diff --git a/tools/testing/selftests/splice/default_file_splice_read.sh b/tools/testing/selftests/splice/default_file_splice_read.sh
index 1ea2adeabc94..490db5a2e435 100755
--- a/tools/testing/selftests/splice/default_file_splice_read.sh
+++ b/tools/testing/selftests/splice/default_file_splice_read.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2n=`./default_file_splice_read </dev/null | wc -c` 3n=`./default_file_splice_read </dev/null | wc -c`
3 4
4test "$n" = 0 && exit 0 5test "$n" = 0 && exit 0
diff --git a/tools/testing/selftests/static_keys/test_static_keys.sh b/tools/testing/selftests/static_keys/test_static_keys.sh
index 1261e3fa1e3a..24cff498b31a 100755
--- a/tools/testing/selftests/static_keys/test_static_keys.sh
+++ b/tools/testing/selftests/static_keys/test_static_keys.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# Runs static keys kernel module tests 3# Runs static keys kernel module tests
3 4
4if /sbin/modprobe -q test_static_key_base; then 5if /sbin/modprobe -q test_static_key_base; then
diff --git a/tools/testing/selftests/sync/Makefile b/tools/testing/selftests/sync/Makefile
index 8e04d0afcbd7..b3c8ba3cb668 100644
--- a/tools/testing/selftests/sync/Makefile
+++ b/tools/testing/selftests/sync/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1CFLAGS += -O2 -g -std=gnu89 -pthread -Wall -Wextra 2CFLAGS += -O2 -g -std=gnu89 -pthread -Wall -Wextra
2CFLAGS += -I../../../../usr/include/ 3CFLAGS += -I../../../../usr/include/
3LDFLAGS += -pthread 4LDFLAGS += -pthread
diff --git a/tools/testing/selftests/tc-testing/tc-tests/filters/tests.json b/tools/testing/selftests/tc-testing/tc-tests/filters/tests.json
index c727b96a59b0..5fa02d86b35f 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/filters/tests.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/filters/tests.json
@@ -17,5 +17,26 @@
17 "teardown": [ 17 "teardown": [
18 "$TC qdisc del dev $DEV1 ingress" 18 "$TC qdisc del dev $DEV1 ingress"
19 ] 19 ]
20 },
21 {
22 "id": "d052",
23 "name": "Add 1M filters with the same action",
24 "category": [
25 "filter",
26 "flower"
27 ],
28 "setup": [
29 "$TC qdisc add dev $DEV2 ingress",
30 "./tdc_batch.py $DEV2 $BATCH_FILE --share_action -n 1000000"
31 ],
32 "cmdUnderTest": "$TC -b $BATCH_FILE",
33 "expExitCode": "0",
34 "verifyCmd": "$TC actions list action gact",
35 "matchPattern": "action order 0: gact action drop.*index 1 ref 1000000 bind 1000000",
36 "matchCount": "1",
37 "teardown": [
38 "$TC qdisc del dev $DEV2 ingress",
39 "/bin/rm $BATCH_FILE"
40 ]
20 } 41 }
21] \ No newline at end of file 42]
diff --git a/tools/testing/selftests/tc-testing/tdc.py b/tools/testing/selftests/tc-testing/tdc.py
index cd61b7844c0d..b8462e1b74f9 100755
--- a/tools/testing/selftests/tc-testing/tdc.py
+++ b/tools/testing/selftests/tc-testing/tdc.py
@@ -1,4 +1,5 @@
1#!/usr/bin/env python3 1#!/usr/bin/env python3
2# SPDX-License-Identifier: GPL-2.0
2 3
3""" 4"""
4tdc.py - Linux tc (Traffic Control) unit test driver 5tdc.py - Linux tc (Traffic Control) unit test driver
@@ -88,7 +89,7 @@ def prepare_env(cmdlist):
88 exit(1) 89 exit(1)
89 90
90 91
91def test_runner(filtered_tests): 92def test_runner(filtered_tests, args):
92 """ 93 """
93 Driver function for the unit tests. 94 Driver function for the unit tests.
94 95
@@ -105,6 +106,8 @@ def test_runner(filtered_tests):
105 for tidx in testlist: 106 for tidx in testlist:
106 result = True 107 result = True
107 tresult = "" 108 tresult = ""
109 if "flower" in tidx["category"] and args.device == None:
110 continue
108 print("Test " + tidx["id"] + ": " + tidx["name"]) 111 print("Test " + tidx["id"] + ": " + tidx["name"])
109 prepare_env(tidx["setup"]) 112 prepare_env(tidx["setup"])
110 (p, procout) = exec_cmd(tidx["cmdUnderTest"]) 113 (p, procout) = exec_cmd(tidx["cmdUnderTest"])
@@ -150,7 +153,11 @@ def ns_create():
150 exec_cmd(cmd, False) 153 exec_cmd(cmd, False)
151 cmd = 'ip link set $DEV0 up' 154 cmd = 'ip link set $DEV0 up'
152 exec_cmd(cmd, False) 155 exec_cmd(cmd, False)
153 cmd = 'ip -s $NS link set $DEV1 up' 156 cmd = 'ip -n $NS link set $DEV1 up'
157 exec_cmd(cmd, False)
158 cmd = 'ip link set $DEV2 netns $NS'
159 exec_cmd(cmd, False)
160 cmd = 'ip -n $NS link set $DEV2 up'
154 exec_cmd(cmd, False) 161 exec_cmd(cmd, False)
155 162
156 163
@@ -211,7 +218,8 @@ def set_args(parser):
211 help='Execute the single test case with specified ID') 218 help='Execute the single test case with specified ID')
212 parser.add_argument('-i', '--id', action='store_true', dest='gen_id', 219 parser.add_argument('-i', '--id', action='store_true', dest='gen_id',
213 help='Generate ID numbers for new test cases') 220 help='Generate ID numbers for new test cases')
214 return parser 221 parser.add_argument('-d', '--device',
222 help='Execute the test case in flower category')
215 return parser 223 return parser
216 224
217 225
@@ -225,6 +233,8 @@ def check_default_settings(args):
225 233
226 if args.path != None: 234 if args.path != None:
227 NAMES['TC'] = args.path 235 NAMES['TC'] = args.path
236 if args.device != None:
237 NAMES['DEV2'] = args.device
228 if not os.path.isfile(NAMES['TC']): 238 if not os.path.isfile(NAMES['TC']):
229 print("The specified tc path " + NAMES['TC'] + " does not exist.") 239 print("The specified tc path " + NAMES['TC'] + " does not exist.")
230 exit(1) 240 exit(1)
@@ -381,14 +391,17 @@ def set_operation_mode(args):
381 if (len(alltests) == 0): 391 if (len(alltests) == 0):
382 print("Cannot find a test case with ID matching " + target_id) 392 print("Cannot find a test case with ID matching " + target_id)
383 exit(1) 393 exit(1)
384 catresults = test_runner(alltests) 394 catresults = test_runner(alltests, args)
385 print("All test results: " + "\n\n" + catresults) 395 print("All test results: " + "\n\n" + catresults)
386 elif (len(target_category) > 0): 396 elif (len(target_category) > 0):
397 if (target_category == "flower") and args.device == None:
398 print("Please specify a NIC device (-d) to run category flower")
399 exit(1)
387 if (target_category not in ucat): 400 if (target_category not in ucat):
388 print("Specified category is not present in this file.") 401 print("Specified category is not present in this file.")
389 exit(1) 402 exit(1)
390 else: 403 else:
391 catresults = test_runner(testcases[target_category]) 404 catresults = test_runner(testcases[target_category], args)
392 print("Category " + target_category + "\n\n" + catresults) 405 print("Category " + target_category + "\n\n" + catresults)
393 406
394 ns_destroy() 407 ns_destroy()
diff --git a/tools/testing/selftests/tc-testing/tdc_batch.py b/tools/testing/selftests/tc-testing/tdc_batch.py
new file mode 100755
index 000000000000..707c6bfef689
--- /dev/null
+++ b/tools/testing/selftests/tc-testing/tdc_batch.py
@@ -0,0 +1,62 @@
1#!/usr/bin/python3
2
3"""
4tdc_batch.py - a script to generate TC batch file
5
6Copyright (C) 2017 Chris Mi <chrism@mellanox.com>
7"""
8
9import argparse
10
11parser = argparse.ArgumentParser(description='TC batch file generator')
12parser.add_argument("device", help="device name")
13parser.add_argument("file", help="batch file name")
14parser.add_argument("-n", "--number", type=int,
15 help="how many lines in batch file")
16parser.add_argument("-o", "--skip_sw",
17 help="skip_sw (offload), by default skip_hw",
18 action="store_true")
19parser.add_argument("-s", "--share_action",
20 help="all filters share the same action",
21 action="store_true")
22parser.add_argument("-p", "--prio",
23 help="all filters have different prio",
24 action="store_true")
25args = parser.parse_args()
26
27device = args.device
28file = open(args.file, 'w')
29
30number = 1
31if args.number:
32 number = args.number
33
34skip = "skip_hw"
35if args.skip_sw:
36 skip = "skip_sw"
37
38share_action = ""
39if args.share_action:
40 share_action = "index 1"
41
42prio = "prio 1"
43if args.prio:
44 prio = ""
45 if number > 0x4000:
46 number = 0x4000
47
48index = 0
49for i in range(0x100):
50 for j in range(0x100):
51 for k in range(0x100):
52 mac = ("%02x:%02x:%02x" % (i, j, k))
53 src_mac = "e4:11:00:" + mac
54 dst_mac = "e4:12:00:" + mac
55 cmd = ("filter add dev %s %s protocol ip parent ffff: flower %s "
56 "src_mac %s dst_mac %s action drop %s" %
57 (device, prio, skip, src_mac, dst_mac, share_action))
58 file.write("%s\n" % cmd)
59 index += 1
60 if index >= number:
61 file.close()
62 exit(0)
diff --git a/tools/testing/selftests/tc-testing/tdc_config.py b/tools/testing/selftests/tc-testing/tdc_config.py
index 01087375a7c3..eb188c729dd6 100644
--- a/tools/testing/selftests/tc-testing/tdc_config.py
+++ b/tools/testing/selftests/tc-testing/tdc_config.py
@@ -1,4 +1,5 @@
1""" 1"""
2# SPDX-License-Identifier: GPL-2.0
2tdc_config.py - tdc user-specified values 3tdc_config.py - tdc user-specified values
3 4
4Copyright (C) 2017 Lucas Bates <lucasb@mojatatu.com> 5Copyright (C) 2017 Lucas Bates <lucasb@mojatatu.com>
@@ -12,6 +13,8 @@ NAMES = {
12 # Name of veth devices to be created for the namespace 13 # Name of veth devices to be created for the namespace
13 'DEV0': 'v0p0', 14 'DEV0': 'v0p0',
14 'DEV1': 'v0p1', 15 'DEV1': 'v0p1',
16 'DEV2': '',
17 'BATCH_FILE': './batch.txt',
15 # Name of the namespace to use 18 # Name of the namespace to use
16 'NS': 'tcut' 19 'NS': 'tcut'
17 } 20 }
diff --git a/tools/testing/selftests/tc-testing/tdc_helper.py b/tools/testing/selftests/tc-testing/tdc_helper.py
index c3254f861fb2..ccf2d2458703 100644
--- a/tools/testing/selftests/tc-testing/tdc_helper.py
+++ b/tools/testing/selftests/tc-testing/tdc_helper.py
@@ -1,4 +1,5 @@
1""" 1"""
2# SPDX-License-Identifier: GPL-2.0
2tdc_helper.py - tdc helper functions 3tdc_helper.py - tdc helper functions
3 4
4Copyright (C) 2017 Lucas Bates <lucasb@mojatatu.com> 5Copyright (C) 2017 Lucas Bates <lucasb@mojatatu.com>
diff --git a/tools/testing/selftests/timers/Makefile b/tools/testing/selftests/timers/Makefile
index ae4593115408..3496680981f2 100644
--- a/tools/testing/selftests/timers/Makefile
+++ b/tools/testing/selftests/timers/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1CFLAGS += -O3 -Wl,-no-as-needed -Wall 2CFLAGS += -O3 -Wl,-no-as-needed -Wall
2LDFLAGS += -lrt -lpthread -lm 3LDFLAGS += -lrt -lpthread -lm
3 4
diff --git a/tools/testing/selftests/user/test_user_copy.sh b/tools/testing/selftests/user/test_user_copy.sh
index 350107f40c1d..d60506fc77f8 100755
--- a/tools/testing/selftests/user/test_user_copy.sh
+++ b/tools/testing/selftests/user/test_user_copy.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# Runs copy_to/from_user infrastructure using test_user_copy kernel module 3# Runs copy_to/from_user infrastructure using test_user_copy kernel module
3 4
4if /sbin/modprobe -q test_user_copy; then 5if /sbin/modprobe -q test_user_copy; then
diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Makefile
index 706b68b1c372..3d5a62ff7d31 100644
--- a/tools/testing/selftests/vDSO/Makefile
+++ b/tools/testing/selftests/vDSO/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1ifndef CROSS_COMPILE 2ifndef CROSS_COMPILE
2CFLAGS := -std=gnu99 3CFLAGS := -std=gnu99
3CFLAGS_vdso_standalone_test_x86 := -nostdlib -fno-asynchronous-unwind-tables -fno-stack-protector 4CFLAGS_vdso_standalone_test_x86 := -nostdlib -fno-asynchronous-unwind-tables -fno-stack-protector
diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
index cbb29e41ef2b..e49eca1915f8 100644
--- a/tools/testing/selftests/vm/Makefile
+++ b/tools/testing/selftests/vm/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# Makefile for vm selftests 2# Makefile for vm selftests
2 3
3ifndef OUTPUT 4ifndef OUTPUT
diff --git a/tools/testing/selftests/vm/compaction_test.c b/tools/testing/selftests/vm/compaction_test.c
index 6d1437f895b8..a65b016d4c13 100644
--- a/tools/testing/selftests/vm/compaction_test.c
+++ b/tools/testing/selftests/vm/compaction_test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * 3 *
3 * A test for the patch "Allow compaction of unevictable pages". 4 * A test for the patch "Allow compaction of unevictable pages".
diff --git a/tools/testing/selftests/vm/hugepage-mmap.c b/tools/testing/selftests/vm/hugepage-mmap.c
index a10f310d2362..93f9e7b81331 100644
--- a/tools/testing/selftests/vm/hugepage-mmap.c
+++ b/tools/testing/selftests/vm/hugepage-mmap.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * hugepage-mmap: 3 * hugepage-mmap:
3 * 4 *
diff --git a/tools/testing/selftests/vm/hugepage-shm.c b/tools/testing/selftests/vm/hugepage-shm.c
index 0d0ef4fc0c04..e2527f32005b 100644
--- a/tools/testing/selftests/vm/hugepage-shm.c
+++ b/tools/testing/selftests/vm/hugepage-shm.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * hugepage-shm: 3 * hugepage-shm:
3 * 4 *
diff --git a/tools/testing/selftests/vm/map_hugetlb.c b/tools/testing/selftests/vm/map_hugetlb.c
index 77687ab59f77..9b777fa95f09 100644
--- a/tools/testing/selftests/vm/map_hugetlb.c
+++ b/tools/testing/selftests/vm/map_hugetlb.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Example of using hugepage memory in a user application using the mmap 3 * Example of using hugepage memory in a user application using the mmap
3 * system call with MAP_HUGETLB flag. Before running this program make 4 * system call with MAP_HUGETLB flag. Before running this program make
diff --git a/tools/testing/selftests/vm/mlock-random-test.c b/tools/testing/selftests/vm/mlock-random-test.c
index 83de4f58d262..ff4d72eb74b9 100644
--- a/tools/testing/selftests/vm/mlock-random-test.c
+++ b/tools/testing/selftests/vm/mlock-random-test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * It tests the mlock/mlock2() when they are invoked 3 * It tests the mlock/mlock2() when they are invoked
3 * on randomly memory region. 4 * on randomly memory region.
diff --git a/tools/testing/selftests/vm/mlock2-tests.c b/tools/testing/selftests/vm/mlock2-tests.c
index e5dbc87b4297..4997b9222cfa 100644
--- a/tools/testing/selftests/vm/mlock2-tests.c
+++ b/tools/testing/selftests/vm/mlock2-tests.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#define _GNU_SOURCE 2#define _GNU_SOURCE
2#include <sys/mman.h> 3#include <sys/mman.h>
3#include <stdint.h> 4#include <stdint.h>
diff --git a/tools/testing/selftests/vm/mlock2.h b/tools/testing/selftests/vm/mlock2.h
index 7ee062929d3e..2a6e76c226bc 100644
--- a/tools/testing/selftests/vm/mlock2.h
+++ b/tools/testing/selftests/vm/mlock2.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#include <syscall.h> 2#include <syscall.h>
2#include <errno.h> 3#include <errno.h>
3#include <stdio.h> 4#include <stdio.h>
diff --git a/tools/testing/selftests/vm/on-fault-limit.c b/tools/testing/selftests/vm/on-fault-limit.c
index 7f96a5c2e292..634d87dfb2a4 100644
--- a/tools/testing/selftests/vm/on-fault-limit.c
+++ b/tools/testing/selftests/vm/on-fault-limit.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sys/mman.h> 2#include <sys/mman.h>
2#include <stdio.h> 3#include <stdio.h>
3#include <unistd.h> 4#include <unistd.h>
diff --git a/tools/testing/selftests/vm/run_vmtests b/tools/testing/selftests/vm/run_vmtests
index 07548a1fa901..cc826326de87 100755
--- a/tools/testing/selftests/vm/run_vmtests
+++ b/tools/testing/selftests/vm/run_vmtests
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2#please run as root 3#please run as root
3 4
4#we need 256M, below is the size in kB 5#we need 256M, below is the size in kB
diff --git a/tools/testing/selftests/vm/thuge-gen.c b/tools/testing/selftests/vm/thuge-gen.c
index 88a2ab535e01..361ef7192cc6 100644
--- a/tools/testing/selftests/vm/thuge-gen.c
+++ b/tools/testing/selftests/vm/thuge-gen.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* Test selecting other page sizes for mmap/shmget. 2/* Test selecting other page sizes for mmap/shmget.
2 3
3 Before running this huge pages for each huge page size must have been 4 Before running this huge pages for each huge page size must have been
diff --git a/tools/testing/selftests/watchdog/Makefile b/tools/testing/selftests/watchdog/Makefile
index ee068511fd0b..6b5598b55252 100644
--- a/tools/testing/selftests/watchdog/Makefile
+++ b/tools/testing/selftests/watchdog/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1TEST_GEN_PROGS := watchdog-test 2TEST_GEN_PROGS := watchdog-test
2 3
3include ../lib.mk 4include ../lib.mk
diff --git a/tools/testing/selftests/watchdog/watchdog-test.c b/tools/testing/selftests/watchdog/watchdog-test.c
index a1391be2dc1e..6e290874b70e 100644
--- a/tools/testing/selftests/watchdog/watchdog-test.c
+++ b/tools/testing/selftests/watchdog/watchdog-test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Watchdog Driver Test Program 3 * Watchdog Driver Test Program
3 */ 4 */
diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile
index 0a74a20ca32b..7b1adeee4b0f 100644
--- a/tools/testing/selftests/x86/Makefile
+++ b/tools/testing/selftests/x86/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1all: 2all:
2 3
3include ../lib.mk 4include ../lib.mk
diff --git a/tools/testing/selftests/x86/ioperm.c b/tools/testing/selftests/x86/ioperm.c
index b77313ba2ab1..01de41c1b725 100644
--- a/tools/testing/selftests/x86/ioperm.c
+++ b/tools/testing/selftests/x86/ioperm.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * ioperm.c - Test case for ioperm(2) 3 * ioperm.c - Test case for ioperm(2)
3 * Copyright (c) 2015 Andrew Lutomirski 4 * Copyright (c) 2015 Andrew Lutomirski
diff --git a/tools/testing/selftests/x86/iopl.c b/tools/testing/selftests/x86/iopl.c
index c496ca97bc18..6aa27f34644c 100644
--- a/tools/testing/selftests/x86/iopl.c
+++ b/tools/testing/selftests/x86/iopl.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * iopl.c - Test case for a Linux on Xen 64-bit bug 3 * iopl.c - Test case for a Linux on Xen 64-bit bug
3 * Copyright (c) 2015 Andrew Lutomirski 4 * Copyright (c) 2015 Andrew Lutomirski
diff --git a/tools/testing/selftests/x86/ldt_gdt.c b/tools/testing/selftests/x86/ldt_gdt.c
index b9a22f18566a..961e3ee26c27 100644
--- a/tools/testing/selftests/x86/ldt_gdt.c
+++ b/tools/testing/selftests/x86/ldt_gdt.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * ldt_gdt.c - Test cases for LDT and GDT access 3 * ldt_gdt.c - Test cases for LDT and GDT access
3 * Copyright (c) 2015 Andrew Lutomirski 4 * Copyright (c) 2015 Andrew Lutomirski
diff --git a/tools/testing/selftests/x86/mpx-debug.h b/tools/testing/selftests/x86/mpx-debug.h
index 9230981f2e12..7546eba7f17a 100644
--- a/tools/testing/selftests/x86/mpx-debug.h
+++ b/tools/testing/selftests/x86/mpx-debug.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _MPX_DEBUG_H 2#ifndef _MPX_DEBUG_H
2#define _MPX_DEBUG_H 3#define _MPX_DEBUG_H
3 4
diff --git a/tools/testing/selftests/x86/mpx-dig.c b/tools/testing/selftests/x86/mpx-dig.c
index ce85356d7e2e..c13607ef5c11 100644
--- a/tools/testing/selftests/x86/mpx-dig.c
+++ b/tools/testing/selftests/x86/mpx-dig.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Written by Dave Hansen <dave.hansen@intel.com> 3 * Written by Dave Hansen <dave.hansen@intel.com>
3 */ 4 */
diff --git a/tools/testing/selftests/x86/mpx-hw.h b/tools/testing/selftests/x86/mpx-hw.h
index 093c190178a9..3f0093911f03 100644
--- a/tools/testing/selftests/x86/mpx-hw.h
+++ b/tools/testing/selftests/x86/mpx-hw.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _MPX_HW_H 2#ifndef _MPX_HW_H
2#define _MPX_HW_H 3#define _MPX_HW_H
3 4
diff --git a/tools/testing/selftests/x86/mpx-mm.h b/tools/testing/selftests/x86/mpx-mm.h
index af706a5398f7..6dbdd66b8242 100644
--- a/tools/testing/selftests/x86/mpx-mm.h
+++ b/tools/testing/selftests/x86/mpx-mm.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _MPX_MM_H 2#ifndef _MPX_MM_H
2#define _MPX_MM_H 3#define _MPX_MM_H
3 4
diff --git a/tools/testing/selftests/x86/pkey-helpers.h b/tools/testing/selftests/x86/pkey-helpers.h
index b20293956eec..3818f25391c2 100644
--- a/tools/testing/selftests/x86/pkey-helpers.h
+++ b/tools/testing/selftests/x86/pkey-helpers.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _PKEYS_HELPER_H 2#ifndef _PKEYS_HELPER_H
2#define _PKEYS_HELPER_H 3#define _PKEYS_HELPER_H
3#define _GNU_SOURCE 4#define _GNU_SOURCE
diff --git a/tools/testing/selftests/x86/protection_keys.c b/tools/testing/selftests/x86/protection_keys.c
index 23927845518d..555e43ca846b 100644
--- a/tools/testing/selftests/x86/protection_keys.c
+++ b/tools/testing/selftests/x86/protection_keys.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Tests x86 Memory Protection Keys (see Documentation/x86/protection-keys.txt) 3 * Tests x86 Memory Protection Keys (see Documentation/x86/protection-keys.txt)
3 * 4 *
diff --git a/tools/testing/selftests/x86/ptrace_syscall.c b/tools/testing/selftests/x86/ptrace_syscall.c
index eaea92439708..1ae1c5a7392e 100644
--- a/tools/testing/selftests/x86/ptrace_syscall.c
+++ b/tools/testing/selftests/x86/ptrace_syscall.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#define _GNU_SOURCE 2#define _GNU_SOURCE
2 3
3#include <sys/ptrace.h> 4#include <sys/ptrace.h>
diff --git a/tools/testing/selftests/x86/raw_syscall_helper_32.S b/tools/testing/selftests/x86/raw_syscall_helper_32.S
index 534e71e35c6a..94410fa2b5ed 100644
--- a/tools/testing/selftests/x86/raw_syscall_helper_32.S
+++ b/tools/testing/selftests/x86/raw_syscall_helper_32.S
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1.global sys32_helper 2.global sys32_helper
2sys32_helper: 3sys32_helper:
3 /* Args: syscall_args_32*, function pointer */ 4 /* Args: syscall_args_32*, function pointer */
diff --git a/tools/testing/selftests/x86/test_FCMOV.c b/tools/testing/selftests/x86/test_FCMOV.c
index 4adcca0c80c4..6b5036fbb735 100644
--- a/tools/testing/selftests/x86/test_FCMOV.c
+++ b/tools/testing/selftests/x86/test_FCMOV.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#undef _GNU_SOURCE 2#undef _GNU_SOURCE
2#define _GNU_SOURCE 1 3#define _GNU_SOURCE 1
3#undef __USE_GNU 4#undef __USE_GNU
diff --git a/tools/testing/selftests/x86/test_FCOMI.c b/tools/testing/selftests/x86/test_FCOMI.c
index db4933e31af9..aec6692c6dcf 100644
--- a/tools/testing/selftests/x86/test_FCOMI.c
+++ b/tools/testing/selftests/x86/test_FCOMI.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#undef _GNU_SOURCE 2#undef _GNU_SOURCE
2#define _GNU_SOURCE 1 3#define _GNU_SOURCE 1
3#undef __USE_GNU 4#undef __USE_GNU
diff --git a/tools/testing/selftests/x86/test_FISTTP.c b/tools/testing/selftests/x86/test_FISTTP.c
index b8e61a047f6b..09789c0ce3e9 100644
--- a/tools/testing/selftests/x86/test_FISTTP.c
+++ b/tools/testing/selftests/x86/test_FISTTP.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#undef _GNU_SOURCE 2#undef _GNU_SOURCE
2#define _GNU_SOURCE 1 3#define _GNU_SOURCE 1
3#undef __USE_GNU 4#undef __USE_GNU
diff --git a/tools/testing/selftests/x86/test_vdso.c b/tools/testing/selftests/x86/test_vdso.c
index 65d7a2bf7e14..29973cde06d3 100644
--- a/tools/testing/selftests/x86/test_vdso.c
+++ b/tools/testing/selftests/x86/test_vdso.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * ldt_gdt.c - Test cases for LDT and GDT access 3 * ldt_gdt.c - Test cases for LDT and GDT access
3 * Copyright (c) 2011-2015 Andrew Lutomirski 4 * Copyright (c) 2011-2015 Andrew Lutomirski
diff --git a/tools/testing/selftests/zram/Makefile b/tools/testing/selftests/zram/Makefile
index c3a87e5f9d36..7f78eb1b59cb 100644
--- a/tools/testing/selftests/zram/Makefile
+++ b/tools/testing/selftests/zram/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1all: 2all:
2 3
3TEST_PROGS := zram.sh 4TEST_PROGS := zram.sh
diff --git a/tools/testing/selftests/zram/zram.sh b/tools/testing/selftests/zram/zram.sh
index 683a292e3290..754de7da426a 100755
--- a/tools/testing/selftests/zram/zram.sh
+++ b/tools/testing/selftests/zram/zram.sh
@@ -1,4 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
2TCID="zram.sh" 3TCID="zram.sh"
3 4
4. ./zram_lib.sh 5. ./zram_lib.sh
diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile
index 3a961e998281..21169322baea 100644
--- a/tools/thermal/tmon/Makefile
+++ b/tools/thermal/tmon/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1VERSION = 1.0 2VERSION = 1.0
2 3
3BINDIR=usr/bin 4BINDIR=usr/bin
diff --git a/tools/thermal/tmon/tmon.8 b/tools/thermal/tmon/tmon.8
index 02d5179803aa..2f122de5841b 100644
--- a/tools/thermal/tmon/tmon.8
+++ b/tools/thermal/tmon/tmon.8
@@ -1,4 +1,5 @@
1.TH TMON 8 1.TH TMON 8
2# SPDX-License-Identifier: GPL-2.0
2.SH NAME 3.SH NAME
3\fBtmon\fP - A monitoring and testing tool for Linux kernel thermal subsystem 4\fBtmon\fP - A monitoring and testing tool for Linux kernel thermal subsystem
4 5
diff --git a/tools/usb/Makefile b/tools/usb/Makefile
index acf2165c04e6..4e6506078494 100644
--- a/tools/usb/Makefile
+++ b/tools/usb/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# Makefile for USB tools 2# Makefile for USB tools
2 3
3CC = $(CROSS_COMPILE)gcc 4CC = $(CROSS_COMPILE)gcc
diff --git a/tools/usb/ffs-aio-example/multibuff/host_app/Makefile b/tools/usb/ffs-aio-example/multibuff/host_app/Makefile
index 8c4a6f0aa82d..df36e4c28f61 100644
--- a/tools/usb/ffs-aio-example/multibuff/host_app/Makefile
+++ b/tools/usb/ffs-aio-example/multibuff/host_app/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1CC = gcc 2CC = gcc
2LIBUSB_CFLAGS = $(shell pkg-config --cflags libusb-1.0) 3LIBUSB_CFLAGS = $(shell pkg-config --cflags libusb-1.0)
3LIBUSB_LIBS = $(shell pkg-config --libs libusb-1.0) 4LIBUSB_LIBS = $(shell pkg-config --libs libusb-1.0)
diff --git a/tools/usb/hcd-tests.sh b/tools/usb/hcd-tests.sh
index b30b3dc4c788..e8cad6a4f9c9 100644
--- a/tools/usb/hcd-tests.sh
+++ b/tools/usb/hcd-tests.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2# 3#
3# test types can be passed on the command line: 4# test types can be passed on the command line:
4# 5#
diff --git a/tools/usb/usbip/Makefile.am b/tools/usb/usbip/Makefile.am
index 66f8bf038c9f..da3a430849a8 100644
--- a/tools/usb/usbip/Makefile.am
+++ b/tools/usb/usbip/Makefile.am
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1SUBDIRS := libsrc src 2SUBDIRS := libsrc src
2includedir = @includedir@/usbip 3includedir = @includedir@/usbip
3include_HEADERS := $(addprefix libsrc/, \ 4include_HEADERS := $(addprefix libsrc/, \
diff --git a/tools/usb/usbip/cleanup.sh b/tools/usb/usbip/cleanup.sh
index 955c3ccb729a..8028c3a5c22b 100755
--- a/tools/usb/usbip/cleanup.sh
+++ b/tools/usb/usbip/cleanup.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2 3
3if [ -r Makefile ]; then 4if [ -r Makefile ]; then
4 make distclean 5 make distclean
diff --git a/tools/usb/usbip/libsrc/Makefile.am b/tools/usb/usbip/libsrc/Makefile.am
index 90daf95c0804..dabd2c91d311 100644
--- a/tools/usb/usbip/libsrc/Makefile.am
+++ b/tools/usb/usbip/libsrc/Makefile.am
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1libusbip_la_CPPFLAGS = -DUSBIDS_FILE='"@USBIDS_DIR@/usb.ids"' 2libusbip_la_CPPFLAGS = -DUSBIDS_FILE='"@USBIDS_DIR@/usb.ids"'
2libusbip_la_CFLAGS = @EXTRA_CFLAGS@ 3libusbip_la_CFLAGS = @EXTRA_CFLAGS@
3libusbip_la_LDFLAGS = -version-info @LIBUSBIP_VERSION@ 4libusbip_la_LDFLAGS = -version-info @LIBUSBIP_VERSION@
diff --git a/tools/usb/usbip/libsrc/list.h b/tools/usb/usbip/libsrc/list.h
index 5eaaa78e2c6a..a941671e4900 100644
--- a/tools/usb/usbip/libsrc/list.h
+++ b/tools/usb/usbip/libsrc/list.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LIST_H 2#ifndef _LIST_H
2#define _LIST_H 3#define _LIST_H
3 4
diff --git a/tools/usb/usbip/libsrc/sysfs_utils.c b/tools/usb/usbip/libsrc/sysfs_utils.c
index 36ac88ece0b8..14d5e67d398a 100644
--- a/tools/usb/usbip/libsrc/sysfs_utils.c
+++ b/tools/usb/usbip/libsrc/sysfs_utils.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <sys/types.h> 2#include <sys/types.h>
2#include <sys/stat.h> 3#include <sys/stat.h>
3#include <fcntl.h> 4#include <fcntl.h>
diff --git a/tools/usb/usbip/libsrc/sysfs_utils.h b/tools/usb/usbip/libsrc/sysfs_utils.h
index 32ac1d105d18..0cd5f17e7eb2 100644
--- a/tools/usb/usbip/libsrc/sysfs_utils.h
+++ b/tools/usb/usbip/libsrc/sysfs_utils.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1 2
2#ifndef __SYSFS_UTILS_H 3#ifndef __SYSFS_UTILS_H
3#define __SYSFS_UTILS_H 4#define __SYSFS_UTILS_H
diff --git a/tools/usb/usbip/libsrc/usbip_common.c b/tools/usb/usbip/libsrc/usbip_common.c
index 1517a232ab18..001bb8e8f668 100644
--- a/tools/usb/usbip/libsrc/usbip_common.c
+++ b/tools/usb/usbip/libsrc/usbip_common.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Copyright (C) 2005-2007 Takahiro Hirofuchi 3 * Copyright (C) 2005-2007 Takahiro Hirofuchi
3 */ 4 */
diff --git a/tools/usb/usbip/libsrc/usbip_common.h b/tools/usb/usbip/libsrc/usbip_common.h
index 51ef5fe485dd..e45ec9d2fdbc 100644
--- a/tools/usb/usbip/libsrc/usbip_common.h
+++ b/tools/usb/usbip/libsrc/usbip_common.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * Copyright (C) 2005-2007 Takahiro Hirofuchi 3 * Copyright (C) 2005-2007 Takahiro Hirofuchi
3 */ 4 */
diff --git a/tools/usb/usbip/libsrc/vhci_driver.c b/tools/usb/usbip/libsrc/vhci_driver.c
index 9bd2cd71645d..5727dfb15a83 100644
--- a/tools/usb/usbip/libsrc/vhci_driver.c
+++ b/tools/usb/usbip/libsrc/vhci_driver.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Copyright (C) 2005-2007 Takahiro Hirofuchi 3 * Copyright (C) 2005-2007 Takahiro Hirofuchi
3 */ 4 */
diff --git a/tools/usb/usbip/libsrc/vhci_driver.h b/tools/usb/usbip/libsrc/vhci_driver.h
index 4898d3bafb10..418b404d5121 100644
--- a/tools/usb/usbip/libsrc/vhci_driver.h
+++ b/tools/usb/usbip/libsrc/vhci_driver.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * Copyright (C) 2005-2007 Takahiro Hirofuchi 3 * Copyright (C) 2005-2007 Takahiro Hirofuchi
3 */ 4 */
diff --git a/tools/usb/usbip/src/Makefile.am b/tools/usb/usbip/src/Makefile.am
index e81a4ebadeff..e26f39e0579d 100644
--- a/tools/usb/usbip/src/Makefile.am
+++ b/tools/usb/usbip/src/Makefile.am
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1AM_CPPFLAGS = -I$(top_srcdir)/libsrc -DUSBIDS_FILE='"@USBIDS_DIR@/usb.ids"' 2AM_CPPFLAGS = -I$(top_srcdir)/libsrc -DUSBIDS_FILE='"@USBIDS_DIR@/usb.ids"'
2AM_CFLAGS = @EXTRA_CFLAGS@ 3AM_CFLAGS = @EXTRA_CFLAGS@
3LDADD = $(top_builddir)/libsrc/libusbip.la 4LDADD = $(top_builddir)/libsrc/libusbip.la
diff --git a/tools/usb/usbip/src/usbip_network.h b/tools/usb/usbip/src/usbip_network.h
index c1e875cf1078..7032687621d3 100644
--- a/tools/usb/usbip/src/usbip_network.h
+++ b/tools/usb/usbip/src/usbip_network.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * Copyright (C) 2005-2007 Takahiro Hirofuchi 3 * Copyright (C) 2005-2007 Takahiro Hirofuchi
3 */ 4 */
diff --git a/tools/virtio/Makefile b/tools/virtio/Makefile
index 39c89a5ea990..8e2a908115c2 100644
--- a/tools/virtio/Makefile
+++ b/tools/virtio/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1all: test mod 2all: test mod
2test: virtio_test vringh_test 3test: virtio_test vringh_test
3virtio_test: virtio_ring.o virtio_test.o 4virtio_test: virtio_ring.o virtio_test.o
diff --git a/tools/virtio/asm/barrier.h b/tools/virtio/asm/barrier.h
index ba34f9e96efd..0ac3caf90877 100644
--- a/tools/virtio/asm/barrier.h
+++ b/tools/virtio/asm/barrier.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#if defined(__i386__) || defined(__x86_64__) 2#if defined(__i386__) || defined(__x86_64__)
2#define barrier() asm volatile("" ::: "memory") 3#define barrier() asm volatile("" ::: "memory")
3#define virt_mb() __sync_synchronize() 4#define virt_mb() __sync_synchronize()
diff --git a/tools/virtio/linux/bug.h b/tools/virtio/linux/bug.h
index fb94f0787c47..b14c2c3b6b85 100644
--- a/tools/virtio/linux/bug.h
+++ b/tools/virtio/linux/bug.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef BUG_H 2#ifndef BUG_H
2#define BUG_H 3#define BUG_H
3 4
diff --git a/tools/virtio/linux/compiler.h b/tools/virtio/linux/compiler.h
index c9ccfd42ec13..903dc9c4bd11 100644
--- a/tools/virtio/linux/compiler.h
+++ b/tools/virtio/linux/compiler.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef LINUX_COMPILER_H 2#ifndef LINUX_COMPILER_H
2#define LINUX_COMPILER_H 3#define LINUX_COMPILER_H
3 4
diff --git a/tools/virtio/linux/dma-mapping.h b/tools/virtio/linux/dma-mapping.h
index 18601f6689b9..1571e24e9494 100644
--- a/tools/virtio/linux/dma-mapping.h
+++ b/tools/virtio/linux/dma-mapping.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LINUX_DMA_MAPPING_H 2#ifndef _LINUX_DMA_MAPPING_H
2#define _LINUX_DMA_MAPPING_H 3#define _LINUX_DMA_MAPPING_H
3 4
diff --git a/tools/virtio/linux/err.h b/tools/virtio/linux/err.h
index e32eff8b2a14..0943c644a701 100644
--- a/tools/virtio/linux/err.h
+++ b/tools/virtio/linux/err.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef ERR_H 2#ifndef ERR_H
2#define ERR_H 3#define ERR_H
3#define MAX_ERRNO 4095 4#define MAX_ERRNO 4095
diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
index d9554fc3f340..395521a7a8d8 100644
--- a/tools/virtio/linux/kernel.h
+++ b/tools/virtio/linux/kernel.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef KERNEL_H 2#ifndef KERNEL_H
2#define KERNEL_H 3#define KERNEL_H
3#include <stdbool.h> 4#include <stdbool.h>
diff --git a/tools/virtio/linux/module.h b/tools/virtio/linux/module.h
index 28ce95a05997..9dfa96fea2b2 100644
--- a/tools/virtio/linux/module.h
+++ b/tools/virtio/linux/module.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#include <linux/export.h> 2#include <linux/export.h>
2 3
3#define MODULE_LICENSE(__MODULE_LICENSE_value) \ 4#define MODULE_LICENSE(__MODULE_LICENSE_value) \
diff --git a/tools/virtio/linux/scatterlist.h b/tools/virtio/linux/scatterlist.h
index 68c9e2adc996..9a45f90e2d08 100644
--- a/tools/virtio/linux/scatterlist.h
+++ b/tools/virtio/linux/scatterlist.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef SCATTERLIST_H 2#ifndef SCATTERLIST_H
2#define SCATTERLIST_H 3#define SCATTERLIST_H
3#include <linux/kernel.h> 4#include <linux/kernel.h>
diff --git a/tools/virtio/linux/slab.h b/tools/virtio/linux/slab.h
index 7e1c1197d439..319dcaa07755 100644
--- a/tools/virtio/linux/slab.h
+++ b/tools/virtio/linux/slab.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef LINUX_SLAB_H 2#ifndef LINUX_SLAB_H
2#define GFP_KERNEL 0 3#define GFP_KERNEL 0
3#define GFP_ATOMIC 0 4#define GFP_ATOMIC 0
diff --git a/tools/virtio/linux/uaccess.h b/tools/virtio/linux/uaccess.h
index fa05d01b2c90..991dfb263998 100644
--- a/tools/virtio/linux/uaccess.h
+++ b/tools/virtio/linux/uaccess.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef UACCESS_H 2#ifndef UACCESS_H
2#define UACCESS_H 3#define UACCESS_H
3 4
diff --git a/tools/virtio/linux/virtio.h b/tools/virtio/linux/virtio.h
index d8f534025b7f..b751350d4ce8 100644
--- a/tools/virtio/linux/virtio.h
+++ b/tools/virtio/linux/virtio.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef LINUX_VIRTIO_H 2#ifndef LINUX_VIRTIO_H
2#define LINUX_VIRTIO_H 3#define LINUX_VIRTIO_H
3#include <linux/scatterlist.h> 4#include <linux/scatterlist.h>
diff --git a/tools/virtio/linux/virtio_byteorder.h b/tools/virtio/linux/virtio_byteorder.h
index 9de9e6ac1d10..5b50f7eebd9c 100644
--- a/tools/virtio/linux/virtio_byteorder.h
+++ b/tools/virtio/linux/virtio_byteorder.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _LINUX_VIRTIO_BYTEORDER_STUB_H 2#ifndef _LINUX_VIRTIO_BYTEORDER_STUB_H
2#define _LINUX_VIRTIO_BYTEORDER_STUB_H 3#define _LINUX_VIRTIO_BYTEORDER_STUB_H
3 4
diff --git a/tools/virtio/linux/virtio_config.h b/tools/virtio/linux/virtio_config.h
index 9ba11815e0a1..dbf14c1e2188 100644
--- a/tools/virtio/linux/virtio_config.h
+++ b/tools/virtio/linux/virtio_config.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#include <linux/virtio_byteorder.h> 2#include <linux/virtio_byteorder.h>
2#include <linux/virtio.h> 3#include <linux/virtio.h>
3#include <uapi/linux/virtio_config.h> 4#include <uapi/linux/virtio_config.h>
diff --git a/tools/virtio/ringtest/Makefile b/tools/virtio/ringtest/Makefile
index c012edbdb13b..85c98c2810fb 100644
--- a/tools/virtio/ringtest/Makefile
+++ b/tools/virtio/ringtest/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1all: 2all:
2 3
3all: ring virtio_ring_0_9 virtio_ring_poll virtio_ring_inorder ptr_ring noring 4all: ring virtio_ring_0_9 virtio_ring_poll virtio_ring_inorder ptr_ring noring
diff --git a/tools/virtio/ringtest/noring.c b/tools/virtio/ringtest/noring.c
index b8d1c1daac7c..ce2440d5ca93 100644
--- a/tools/virtio/ringtest/noring.c
+++ b/tools/virtio/ringtest/noring.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#define _GNU_SOURCE 2#define _GNU_SOURCE
2#include "main.h" 3#include "main.h"
3#include <assert.h> 4#include <assert.h>
diff --git a/tools/virtio/ringtest/ptr_ring.c b/tools/virtio/ringtest/ptr_ring.c
index 7b22f1b20652..38bb171aceba 100644
--- a/tools/virtio/ringtest/ptr_ring.c
+++ b/tools/virtio/ringtest/ptr_ring.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#define _GNU_SOURCE 2#define _GNU_SOURCE
2#include "main.h" 3#include "main.h"
3#include <stdlib.h> 4#include <stdlib.h>
diff --git a/tools/virtio/ringtest/run-on-all.sh b/tools/virtio/ringtest/run-on-all.sh
index 29b0d3920bfc..dcc3ea758f48 100755
--- a/tools/virtio/ringtest/run-on-all.sh
+++ b/tools/virtio/ringtest/run-on-all.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
2 3
3CPUS_ONLINE=$(lscpu --online -p=cpu|grep -v -e '#') 4CPUS_ONLINE=$(lscpu --online -p=cpu|grep -v -e '#')
4#use last CPU for host. Why not the first? 5#use last CPU for host. Why not the first?
diff --git a/tools/virtio/uapi/linux/virtio_ring.h b/tools/virtio/uapi/linux/virtio_ring.h
index 4d99c78234d3..cf50b2e5ff02 100644
--- a/tools/virtio/uapi/linux/virtio_ring.h
+++ b/tools/virtio/uapi/linux/virtio_ring.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef VIRTIO_RING_H 2#ifndef VIRTIO_RING_H
2#define VIRTIO_RING_H 3#define VIRTIO_RING_H
3#include "../../../../include/uapi/linux/virtio_ring.h" 4#include "../../../../include/uapi/linux/virtio_ring.h"
diff --git a/tools/virtio/virtio-trace/Makefile b/tools/virtio/virtio-trace/Makefile
index 0d2381633475..7843ebcda71d 100644
--- a/tools/virtio/virtio-trace/Makefile
+++ b/tools/virtio/virtio-trace/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1CC = gcc 2CC = gcc
2CFLAGS = -O2 -Wall -pthread 3CFLAGS = -O2 -Wall -pthread
3 4
diff --git a/tools/virtio/virtio-trace/trace-agent.h b/tools/virtio/virtio-trace/trace-agent.h
index 8de79bfeaa73..e67885969f0e 100644
--- a/tools/virtio/virtio-trace/trace-agent.h
+++ b/tools/virtio/virtio-trace/trace-agent.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef __TRACE_AGENT_H__ 2#ifndef __TRACE_AGENT_H__
2#define __TRACE_AGENT_H__ 3#define __TRACE_AGENT_H__
3#include <pthread.h> 4#include <pthread.h>
diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c
index 0fecaec90d0d..b427def67e7e 100644
--- a/tools/virtio/virtio_test.c
+++ b/tools/virtio/virtio_test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#define _GNU_SOURCE 2#define _GNU_SOURCE
2#include <getopt.h> 3#include <getopt.h>
3#include <string.h> 4#include <string.h>
diff --git a/tools/virtio/vringh_test.c b/tools/virtio/vringh_test.c
index 9476c616d064..293653463303 100644
--- a/tools/virtio/vringh_test.c
+++ b/tools/virtio/vringh_test.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* Simple test of virtio code, entirely in userpsace. */ 2/* Simple test of virtio code, entirely in userpsace. */
2#define _GNU_SOURCE 3#define _GNU_SOURCE
3#include <sched.h> 4#include <sched.h>
diff --git a/tools/vm/Makefile b/tools/vm/Makefile
index 006029456988..be320b905ea7 100644
--- a/tools/vm/Makefile
+++ b/tools/vm/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# Makefile for vm tools 2# Makefile for vm tools
2# 3#
3TARGETS=page-types slabinfo page_owner_sort 4TARGETS=page-types slabinfo page_owner_sort
diff --git a/tools/vm/page_owner_sort.c b/tools/vm/page_owner_sort.c
index f1c055f3c243..18fc112b65cd 100644
--- a/tools/vm/page_owner_sort.c
+++ b/tools/vm/page_owner_sort.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * User-space helper to sort the output of /sys/kernel/debug/page_owner 3 * User-space helper to sort the output of /sys/kernel/debug/page_owner
3 * 4 *
diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c
index b9d34b37c017..b0b7ef6d0de1 100644
--- a/tools/vm/slabinfo.c
+++ b/tools/vm/slabinfo.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Slabinfo: Tool to get reports about slabs 3 * Slabinfo: Tool to get reports about slabs
3 * 4 *