Commit 00e67bf0 authored by Marco Elver's avatar Marco Elver Committed by Heiko Carstens

kfence, x86: only define helpers if !MODULE

x86's <asm/tlbflush.h> only declares non-module accessible functions
(such as flush_tlb_one_kernel) if !MODULE.

In preparation of including <asm/kfence.h> from the KFENCE test module,
only define the helpers if !MODULE to avoid breaking the build with
CONFIG_KFENCE_KUNIT_TEST=m.
Signed-off-by: default avatarMarco Elver <elver@google.com>
Link: https://lore.kernel.org/r/YQJdarx6XSUQ1tFZ@elver.google.comSigned-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 3da77cf3
......@@ -8,6 +8,8 @@
#ifndef _ASM_X86_KFENCE_H
#define _ASM_X86_KFENCE_H
#ifndef MODULE
#include <linux/bug.h>
#include <linux/kfence.h>
......@@ -66,4 +68,6 @@ static inline bool kfence_protect_page(unsigned long addr, bool protect)
return true;
}
#endif /* !MODULE */
#endif /* _ASM_X86_KFENCE_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment