Merge branch 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
[sfrench/cifs-2.6.git] / arch / arm / include / asm / arm-cci.h
1 /*
2  * arch/arm/include/asm/arm-cci.h
3  *
4  * Copyright (C) 2015 ARM Ltd.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  */
18
19 #ifndef __ASM_ARM_CCI_H
20 #define __ASM_ARM_CCI_H
21
22 #ifdef CONFIG_MCPM
23 #include <asm/mcpm.h>
24
25 /*
26  * We don't have a reliable way of detecting whether,
27  * if we have access to secure-only registers, unless
28  * mcpm is registered.
29  */
30 static inline bool platform_has_secure_cci_access(void)
31 {
32         return mcpm_is_available();
33 }
34
35 #else
36 static inline bool platform_has_secure_cci_access(void)
37 {
38         return false;
39 }
40 #endif
41
42 #endif