mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 21:11:47 +07:00
98beb3edeb
This was added in commiteb11186930
("compiler-types.h: add asm_inline definition") and breaks samples/bpf as clang does not support asm __inline. Fixes:eb11186930
("compiler-types.h: add asm_inline definition") Co-developed-by: Florent Revest <revest@google.com> Signed-off-by: Florent Revest <revest@google.com> Signed-off-by: KP Singh <kpsingh@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Song Liu <songliubraving@fb.com> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20191002191652.11432-1-kpsingh@chromium.org
29 lines
725 B
C
29 lines
725 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (c) 2019 Facebook */
|
|
#ifndef __ASM_GOTO_WORKAROUND_H
|
|
#define __ASM_GOTO_WORKAROUND_H
|
|
|
|
/*
|
|
* This will bring in asm_volatile_goto and asm_inline macro definitions
|
|
* if enabled by compiler and config options.
|
|
*/
|
|
#include <linux/types.h>
|
|
|
|
#ifdef asm_volatile_goto
|
|
#undef asm_volatile_goto
|
|
#define asm_volatile_goto(x...) asm volatile("invalid use of asm_volatile_goto")
|
|
#endif
|
|
|
|
/*
|
|
* asm_inline is defined as asm __inline in "include/linux/compiler_types.h"
|
|
* if supported by the kernel's CC (i.e CONFIG_CC_HAS_ASM_INLINE) which is not
|
|
* supported by CLANG.
|
|
*/
|
|
#ifdef asm_inline
|
|
#undef asm_inline
|
|
#define asm_inline asm
|
|
#endif
|
|
|
|
#define volatile(x...) volatile("")
|
|
#endif
|