treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / powerpc / include / asm / svm.h
blob85580b30aba482852a06f04a2b257a70f7897e5c
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 static inline bool is_secure_guest(void)
15 return mfmsr() & MSR_S;
18 void dtl_cache_ctor(void *addr);
19 #define get_dtl_cache_ctor() (is_secure_guest() ? dtl_cache_ctor : NULL)
21 #else /* CONFIG_PPC_SVM */
23 static inline bool is_secure_guest(void)
25 return false;
28 #define get_dtl_cache_ctor() NULL
30 #endif /* CONFIG_PPC_SVM */
31 #endif /* _ASM_POWERPC_SVM_H */