perf beauty mmap_flags: Fix script for archs that use the generic mman.h
To address this error: grep: /root/linux-next/tools/arch/xxxxx/include/uapi/asm//mman.h: No such file or directory Signed-off-by: Yanteng Si <siyanteng@loongson.cn> Acked-by: Huacai Chen <chenhuacai@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: loongarch@lists.linux.dev Cc: loongson-kernel@lists.loongnix.cn Link: https://lore.kernel.org/r/42e8e3565d6035302907426c1e65483b2a4007f5.1692962043.git.siyanteng@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
c56f286f24
commit
49cf0bf637
@ -19,7 +19,7 @@ arch_mman=${arch_header_dir}/mman.h
|
||||
|
||||
printf "static const char *mmap_flags[] = {\n"
|
||||
regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MAP_([[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*'
|
||||
grep -E -q $regex ${arch_mman} && \
|
||||
([ -f ${arch_mman} ] && grep -E -q $regex ${arch_mman}) && \
|
||||
(grep -E $regex ${arch_mman} | \
|
||||
sed -r "s/$regex/\2 \1 \1 \1 \2/g" | \
|
||||
xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n#ifndef MAP_%s\n#define MAP_%s %s\n#endif\n")
|
||||
|
Loading…
x
Reference in New Issue
Block a user