Files
linux/tools/include/linux
Yang Jihong cfd2b5c110 perf tools: Fix compile error for x86
Commit a0a12c3ed0 ("asm goto: eradicate CC_HAS_ASM_GOTO") eradicates
CC_HAS_ASM_GOTO, and in the process also causes the perf tool on x86 to
use asm_volatile_goto when compiling __GEN_RMWcc.

However, asm_volatile_goto is not declared in the perf tool headers,
which causes a compilation error:

  In file included from tools/arch/x86/include/asm/atomic.h:7,
                   from tools/include/asm/atomic.h:6,
                   from tools/include/linux/atomic.h:5,
                   from tools/include/linux/refcount.h:41,
                   from tools/lib/perf/include/internal/cpumap.h:5,
                   from tools/perf/util/cpumap.h:7,
                   from tools/perf/util/env.h:7,
                   from tools/perf/util/header.h:12,
                   from pmu-events/pmu-events.c:9:
  tools/arch/x86/include/asm/atomic.h: In function ‘atomic_dec_and_test’:
  tools/arch/x86/include/asm/rmwcc.h:7:2: error: implicit declaration of function ‘asm_volatile_goto’ [-Werror=implicit-function-declaration]
    asm_volatile_goto (fullop "; j" cc " %l[cc_label]"  \
    ^~~~~~~~~~~~~~~~~

Define asm_volatile_goto in compiler_types.h if not declared, like the
main kernel header files do.

Fixes: a0a12c3ed0 ("asm goto: eradicate CC_HAS_ASM_GOTO")
Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-08-22 09:44:19 -07:00
..
2022-07-10 21:17:30 -04:00
2022-06-29 13:21:52 -07:00
2022-02-20 08:44:37 +02:00
2022-02-20 08:44:37 +02:00
2019-06-08 13:42:13 -06:00
2021-02-08 12:28:07 +01:00
2021-01-14 18:34:29 -08:00
2022-01-20 08:52:54 +02:00
2022-02-20 08:44:37 +02:00
2021-11-30 09:14:42 -08:00
2022-02-20 08:44:37 +02:00
2018-09-10 13:48:23 +02:00
2022-02-20 08:44:37 +02:00
2022-04-22 14:24:28 -04:00