summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/coco.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/coco.h')
-rw-r--r--arch/x86/include/asm/coco.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/include/asm/coco.h b/arch/x86/include/asm/coco.h
index 21940ef8d2..a368afce37 100644
--- a/arch/x86/include/asm/coco.h
+++ b/arch/x86/include/asm/coco.h
@@ -11,10 +11,9 @@ enum cc_vendor {
CC_VENDOR_INTEL,
};
+#ifdef CONFIG_ARCH_HAS_CC_PLATFORM
extern enum cc_vendor cc_vendor;
extern u64 cc_mask;
-
-#ifdef CONFIG_ARCH_HAS_CC_PLATFORM
static inline void cc_set_mask(u64 mask)
{
RIP_REL_REF(cc_mask) = mask;
@@ -22,7 +21,11 @@ static inline void cc_set_mask(u64 mask)
u64 cc_mkenc(u64 val);
u64 cc_mkdec(u64 val);
+void cc_random_init(void);
#else
+#define cc_vendor (CC_VENDOR_NONE)
+static const u64 cc_mask = 0;
+
static inline u64 cc_mkenc(u64 val)
{
return val;
@@ -32,6 +35,7 @@ static inline u64 cc_mkdec(u64 val)
{
return val;
}
+static inline void cc_random_init(void) { }
#endif
#endif /* _ASM_X86_COCO_H */