printf: Remove unused 'bprintf'
[drm/drm-misc.git] / arch / powerpc / include / asm / svm.h
bloba02bd54b894801e1d1c1f20d271658a61c6c2f2d
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3 * SVM helper functions
5 * Copyright 2018 Anshuman Khandual, IBM Corporation.
6 */
8 #ifndef _ASM_POWERPC_SVM_H
9 #define _ASM_POWERPC_SVM_H
11 #ifdef CONFIG_PPC_SVM
13 #include <asm/reg.h>
15 static inline bool is_secure_guest(void)
17 return mfmsr() & MSR_S;
20 void dtl_cache_ctor(void *addr);
21 #define get_dtl_cache_ctor() (is_secure_guest() ? dtl_cache_ctor : NULL)
23 #else /* CONFIG_PPC_SVM */
25 static inline bool is_secure_guest(void)
27 return false;
30 #define get_dtl_cache_ctor() NULL
32 #endif /* CONFIG_PPC_SVM */
33 #endif /* _ASM_POWERPC_SVM_H */