mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 00:36:53 +07:00
794f594e0c
The intention is to have this as a library, since it is not perf specific at all. I did the switch for the files where I'm the only contributor, with the exception of a few lines changed by Jiri Olsa. Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-a04q6chdyjknm1hr305ulx8h@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
16 lines
626 B
Bash
Executable File
16 lines
626 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: LGPL-2.1
|
|
|
|
[ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/drm/
|
|
|
|
printf "#ifndef DRM_COMMAND_BASE\n"
|
|
grep "#define DRM_COMMAND_BASE" $header_dir/drm.h
|
|
printf "#endif\n"
|
|
|
|
printf "static const char *drm_ioctl_cmds[] = {\n"
|
|
grep "^#define DRM_IOCTL.*DRM_IO" $header_dir/drm.h | \
|
|
sed -r 's/^#define +DRM_IOCTL_([A-Z0-9_]+)[ ]+DRM_IO[A-Z]* *\( *(0x[[:xdigit:]]+),*.*/ [\2] = "\1",/g'
|
|
grep "^#define DRM_I915_[A-Z_0-9]\+[ ]\+0x" $header_dir/i915_drm.h | \
|
|
sed -r 's/^#define +DRM_I915_([A-Z0-9_]+)[ ]+(0x[[:xdigit:]]+)/\t[DRM_COMMAND_BASE + \2] = "I915_\1",/g'
|
|
printf "};\n"
|