mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 01:51:34 +00:00
dde994dd54
This is a tools/-side patch for the patch that adds the original copy of the IBS header file, in arch/x86/include/asm/. We also add an entry to check-headers.sh, so future changes continue to be copied. Committer notes: Had to add this -#include <asm/msr-index.h> +#include "msr-index.h" And change the check-headers.sh entry to ignore this line when diffing with the original kernel header. This is needed so that we can use 'perf report' on a perf.data with IBS data on a !x86 system, i.e. building on ARM fails without this as there is no asm/msr-index.h there. This was done on the next patch in this series and is done for things like Intel PT and ARM CoreSight. Signed-off-by: Kim Phillips <kim.phillips@amd.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Joao Martins <joao.m.martins@oracle.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Robert Richter <robert.richter@amd.com> Cc: Stephane Eranian <eranian@google.com> Link: https //lore.kernel.org/r/20210817221509.88391-3-kim.phillips@amd.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
169 lines
5.0 KiB
Bash
Executable File
169 lines
5.0 KiB
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
FILES='
|
|
include/uapi/linux/const.h
|
|
include/uapi/drm/drm.h
|
|
include/uapi/drm/i915_drm.h
|
|
include/uapi/linux/fadvise.h
|
|
include/uapi/linux/fcntl.h
|
|
include/uapi/linux/fs.h
|
|
include/uapi/linux/fscrypt.h
|
|
include/uapi/linux/kcmp.h
|
|
include/uapi/linux/kvm.h
|
|
include/uapi/linux/in.h
|
|
include/uapi/linux/mount.h
|
|
include/uapi/linux/openat2.h
|
|
include/uapi/linux/perf_event.h
|
|
include/uapi/linux/prctl.h
|
|
include/uapi/linux/sched.h
|
|
include/uapi/linux/stat.h
|
|
include/uapi/linux/usbdevice_fs.h
|
|
include/uapi/linux/vhost.h
|
|
include/uapi/sound/asound.h
|
|
include/linux/bits.h
|
|
include/vdso/bits.h
|
|
include/linux/const.h
|
|
include/vdso/const.h
|
|
include/linux/hash.h
|
|
include/uapi/linux/hw_breakpoint.h
|
|
arch/x86/include/asm/disabled-features.h
|
|
arch/x86/include/asm/required-features.h
|
|
arch/x86/include/asm/cpufeatures.h
|
|
arch/x86/include/asm/inat_types.h
|
|
arch/x86/include/asm/emulate_prefix.h
|
|
arch/x86/include/asm/irq_vectors.h
|
|
arch/x86/include/asm/msr-index.h
|
|
arch/x86/include/uapi/asm/prctl.h
|
|
arch/x86/lib/x86-opcode-map.txt
|
|
arch/x86/tools/gen-insn-attr-x86.awk
|
|
arch/arm/include/uapi/asm/perf_regs.h
|
|
arch/arm64/include/uapi/asm/perf_regs.h
|
|
arch/mips/include/uapi/asm/perf_regs.h
|
|
arch/powerpc/include/uapi/asm/perf_regs.h
|
|
arch/s390/include/uapi/asm/perf_regs.h
|
|
arch/x86/include/uapi/asm/perf_regs.h
|
|
arch/x86/include/uapi/asm/kvm.h
|
|
arch/x86/include/uapi/asm/kvm_perf.h
|
|
arch/x86/include/uapi/asm/svm.h
|
|
arch/x86/include/uapi/asm/unistd.h
|
|
arch/x86/include/uapi/asm/vmx.h
|
|
arch/powerpc/include/uapi/asm/kvm.h
|
|
arch/s390/include/uapi/asm/kvm.h
|
|
arch/s390/include/uapi/asm/kvm_perf.h
|
|
arch/s390/include/uapi/asm/ptrace.h
|
|
arch/s390/include/uapi/asm/sie.h
|
|
arch/arm/include/uapi/asm/kvm.h
|
|
arch/arm64/include/uapi/asm/kvm.h
|
|
arch/arm64/include/uapi/asm/unistd.h
|
|
arch/alpha/include/uapi/asm/errno.h
|
|
arch/mips/include/asm/errno.h
|
|
arch/mips/include/uapi/asm/errno.h
|
|
arch/parisc/include/uapi/asm/errno.h
|
|
arch/powerpc/include/uapi/asm/errno.h
|
|
arch/sparc/include/uapi/asm/errno.h
|
|
arch/x86/include/uapi/asm/errno.h
|
|
include/asm-generic/bitops/arch_hweight.h
|
|
include/asm-generic/bitops/const_hweight.h
|
|
include/asm-generic/bitops/__fls.h
|
|
include/asm-generic/bitops/fls.h
|
|
include/asm-generic/bitops/fls64.h
|
|
include/linux/coresight-pmu.h
|
|
include/uapi/asm-generic/errno.h
|
|
include/uapi/asm-generic/errno-base.h
|
|
include/uapi/asm-generic/ioctls.h
|
|
include/uapi/asm-generic/mman-common.h
|
|
include/uapi/asm-generic/unistd.h
|
|
'
|
|
|
|
SYNC_CHECK_FILES='
|
|
arch/x86/include/asm/inat.h
|
|
arch/x86/include/asm/insn.h
|
|
arch/x86/lib/inat.c
|
|
arch/x86/lib/insn.c
|
|
'
|
|
|
|
# These copies are under tools/perf/trace/beauty/ as they are not used to in
|
|
# building object files only by scripts in tools/perf/trace/beauty/ to generate
|
|
# tables that then gets included in .c files for things like id->string syscall
|
|
# tables (and the reverse lookup as well: string -> id)
|
|
|
|
BEAUTY_FILES='
|
|
include/linux/socket.h
|
|
'
|
|
|
|
check_2 () {
|
|
file1=$1
|
|
file2=$2
|
|
|
|
shift
|
|
shift
|
|
|
|
cmd="diff $* $file1 $file2 > /dev/null"
|
|
|
|
test -f $file2 && {
|
|
eval $cmd || {
|
|
echo "Warning: Kernel ABI header at '$file1' differs from latest version at '$file2'" >&2
|
|
echo diff -u $file1 $file2
|
|
}
|
|
}
|
|
}
|
|
|
|
check () {
|
|
file=$1
|
|
|
|
shift
|
|
|
|
check_2 tools/$file $file $*
|
|
}
|
|
|
|
beauty_check () {
|
|
file=$1
|
|
|
|
shift
|
|
|
|
check_2 tools/perf/trace/beauty/$file $file $*
|
|
}
|
|
|
|
# Check if we have the kernel headers (tools/perf/../../include), else
|
|
# we're probably on a detached tarball, so no point in trying to check
|
|
# differences.
|
|
test -d ../../include || exit 0
|
|
|
|
cd ../..
|
|
|
|
# simple diff check
|
|
for i in $FILES; do
|
|
check $i -B
|
|
done
|
|
|
|
for i in $SYNC_CHECK_FILES; do
|
|
check $i '-I "^.*\/\*.*__ignore_sync_check__.*\*\/.*$"'
|
|
done
|
|
|
|
# diff with extra ignore lines
|
|
check arch/x86/lib/memcpy_64.S '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" -I"^SYM_FUNC_START\(_LOCAL\)*(memcpy_\(erms\|orig\))"'
|
|
check arch/x86/lib/memset_64.S '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" -I"^SYM_FUNC_START\(_LOCAL\)*(memset_\(erms\|orig\))"'
|
|
check arch/x86/include/asm/amd-ibs.h '-I "^#include [<\"]\(asm/\)*msr-index.h"'
|
|
check include/uapi/asm-generic/mman.h '-I "^#include <\(uapi/\)*asm-generic/mman-common\(-tools\)*.h>"'
|
|
check include/uapi/linux/mman.h '-I "^#include <\(uapi/\)*asm/mman.h>"'
|
|
check include/linux/build_bug.h '-I "^#\(ifndef\|endif\)\( \/\/\)* static_assert$"'
|
|
check include/linux/ctype.h '-I "isdigit("'
|
|
check lib/ctype.c '-I "^EXPORT_SYMBOL" -I "^#include <linux/export.h>" -B'
|
|
|
|
# diff non-symmetric files
|
|
check_2 tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl
|
|
check_2 tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl
|
|
check_2 tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kernel/syscalls/syscall.tbl
|
|
check_2 tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl arch/mips/kernel/syscalls/syscall_n64.tbl
|
|
|
|
for i in $BEAUTY_FILES; do
|
|
beauty_check $i -B
|
|
done
|
|
|
|
# check duplicated library files
|
|
check_2 tools/perf/util/hashmap.h tools/lib/bpf/hashmap.h
|
|
check_2 tools/perf/util/hashmap.c tools/lib/bpf/hashmap.c
|
|
|
|
cd tools/perf
|