Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf bench mem: Prepare the x86-64 build for upstream memcpy_mcsafe() changes

The following upcoming upstream commit:

92b0729c34ca ("x86/mm, x86/mce: Add memcpy_mcsafe()")

Adds _ASM_EXTABLE_FAULT(), which is not available in user-space
and breaks the build.

We don't really need _ASM_EXTABLE_FAULT() in user-space, so simply
wrap it to nothing.

Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>

+5
+5
tools/perf/bench/mem-memcpy-x86-64-asm.S
··· 1 + 2 + /* Various wrappers to make the kernel .S file build in user-space: */ 3 + 1 4 #define memcpy MEMCPY /* don't hide glibc's memcpy() */ 2 5 #define altinstr_replacement text 3 6 #define globl p2align 4; .globl 7 + #define _ASM_EXTABLE_FAULT(x, y) 8 + 4 9 #include "../../../arch/x86/lib/memcpy_64.S" 5 10 /* 6 11 * We need to provide note.GNU-stack section, saying that we want