2016-12-06 13:18:51 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
HEADERS='
|
2017-07-31 19:45:32 +00:00
|
|
|
include/uapi/drm/drm.h
|
|
|
|
include/uapi/drm/i915_drm.h
|
2017-03-30 14:16:59 +00:00
|
|
|
include/uapi/linux/fcntl.h
|
2016-12-06 13:18:51 +00:00
|
|
|
include/uapi/linux/perf_event.h
|
2017-07-20 13:46:34 +00:00
|
|
|
include/uapi/linux/sched.h
|
2017-03-30 14:16:59 +00:00
|
|
|
include/uapi/linux/stat.h
|
2017-07-31 19:45:32 +00:00
|
|
|
include/uapi/sound/asound.h
|
2016-12-06 13:18:51 +00:00
|
|
|
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/arm/include/uapi/asm/perf_regs.h
|
|
|
|
arch/arm64/include/uapi/asm/perf_regs.h
|
|
|
|
arch/powerpc/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
|
2017-07-18 20:09:21 +00:00
|
|
|
arch/x86/include/uapi/asm/unistd.h
|
2016-12-06 13:18:51 +00:00
|
|
|
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/sie.h
|
|
|
|
arch/arm/include/uapi/asm/kvm.h
|
|
|
|
arch/arm64/include/uapi/asm/kvm.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
|
2017-08-01 01:52:28 +00:00
|
|
|
include/uapi/asm-generic/ioctls.h
|
2016-12-06 13:18:51 +00:00
|
|
|
include/uapi/asm-generic/mman-common.h
|
|
|
|
'
|
|
|
|
|
|
|
|
check () {
|
|
|
|
file=$1
|
tools perf: Do not check spaces/blank lines when checking header file copy drift
We copy headers from include/, arch/ to allow tools/ use defines,
structs from newer kernels and still be able to build on older systems.
We then, as part of a build, check if those copies got out of sync, when
we emit a warning, so that we can check if something needs to be
reflected on the tools, e.g. a 'perf trace' syscall argument beautifier
needs tweaking.
But we don't have to be super strict with that, for instance, extra
spaces, tabs or blank lines aren't problematic, so change
check-headers.sh to have "--ignore-blank-lines --ignore-space-change" as
default "diff" arguments.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-d8emqpdc3m2qtzt1ei8ra2tf@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-08-01 01:55:12 +00:00
|
|
|
opts="--ignore-blank-lines --ignore-space-change"
|
2016-12-06 13:18:51 +00:00
|
|
|
|
|
|
|
shift
|
|
|
|
while [ -n "$*" ]; do
|
|
|
|
opts="$opts \"$1\""
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
cmd="diff $opts ../$file ../../$file > /dev/null"
|
|
|
|
|
|
|
|
test -f ../../$file &&
|
2017-07-30 09:37:47 +00:00
|
|
|
eval $cmd || echo "Warning: Kernel ABI header at 'tools/$file' differs from latest version at '$file'" >&2
|
2016-12-06 13:18:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# simple diff check
|
|
|
|
for i in $HEADERS; do
|
|
|
|
check $i -B
|
|
|
|
done
|
|
|
|
|
|
|
|
# diff with extra ignore lines
|
tools perf: Do not check spaces/blank lines when checking header file copy drift
We copy headers from include/, arch/ to allow tools/ use defines,
structs from newer kernels and still be able to build on older systems.
We then, as part of a build, check if those copies got out of sync, when
we emit a warning, so that we can check if something needs to be
reflected on the tools, e.g. a 'perf trace' syscall argument beautifier
needs tweaking.
But we don't have to be super strict with that, for instance, extra
spaces, tabs or blank lines aren't problematic, so change
check-headers.sh to have "--ignore-blank-lines --ignore-space-change" as
default "diff" arguments.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-d8emqpdc3m2qtzt1ei8ra2tf@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-08-01 01:55:12 +00:00
|
|
|
check arch/x86/lib/memcpy_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
|
|
|
|
check arch/x86/lib/memset_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
|
|
|
|
check include/uapi/asm-generic/mman.h -I "^#include <\(uapi/\)*asm-generic/mman-common.h>"
|
|
|
|
check include/uapi/linux/mman.h -I "^#include <\(uapi/\)*asm/mman.h>"
|