~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm64/include/asm/cpucaps.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 
  3 #ifndef __ASM_CPUCAPS_H
  4 #define __ASM_CPUCAPS_H
  5 
  6 #include <asm/cpucap-defs.h>
  7 
  8 #ifndef __ASSEMBLY__
  9 #include <linux/types.h>
 10 /*
 11  * Check whether a cpucap is possible at compiletime.
 12  */
 13 static __always_inline bool
 14 cpucap_is_possible(const unsigned int cap)
 15 {
 16         compiletime_assert(__builtin_constant_p(cap),
 17                            "cap must be a constant");
 18         compiletime_assert(cap < ARM64_NCAPS,
 19                            "cap must be < ARM64_NCAPS");
 20 
 21         switch (cap) {
 22         case ARM64_HAS_PAN:
 23                 return IS_ENABLED(CONFIG_ARM64_PAN);
 24         case ARM64_HAS_EPAN:
 25                 return IS_ENABLED(CONFIG_ARM64_EPAN);
 26         case ARM64_SVE:
 27                 return IS_ENABLED(CONFIG_ARM64_SVE);
 28         case ARM64_SME:
 29         case ARM64_SME2:
 30         case ARM64_SME_FA64:
 31                 return IS_ENABLED(CONFIG_ARM64_SME);
 32         case ARM64_HAS_CNP:
 33                 return IS_ENABLED(CONFIG_ARM64_CNP);
 34         case ARM64_HAS_ADDRESS_AUTH:
 35         case ARM64_HAS_GENERIC_AUTH:
 36                 return IS_ENABLED(CONFIG_ARM64_PTR_AUTH);
 37         case ARM64_HAS_GIC_PRIO_MASKING:
 38                 return IS_ENABLED(CONFIG_ARM64_PSEUDO_NMI);
 39         case ARM64_MTE:
 40                 return IS_ENABLED(CONFIG_ARM64_MTE);
 41         case ARM64_BTI:
 42                 return IS_ENABLED(CONFIG_ARM64_BTI);
 43         case ARM64_HAS_TLB_RANGE:
 44                 return IS_ENABLED(CONFIG_ARM64_TLB_RANGE);
 45         case ARM64_UNMAP_KERNEL_AT_EL0:
 46                 return IS_ENABLED(CONFIG_UNMAP_KERNEL_AT_EL0);
 47         case ARM64_WORKAROUND_843419:
 48                 return IS_ENABLED(CONFIG_ARM64_ERRATUM_843419);
 49         case ARM64_WORKAROUND_1742098:
 50                 return IS_ENABLED(CONFIG_ARM64_ERRATUM_1742098);
 51         case ARM64_WORKAROUND_2645198:
 52                 return IS_ENABLED(CONFIG_ARM64_ERRATUM_2645198);
 53         case ARM64_WORKAROUND_2658417:
 54                 return IS_ENABLED(CONFIG_ARM64_ERRATUM_2658417);
 55         case ARM64_WORKAROUND_CAVIUM_23154:
 56                 return IS_ENABLED(CONFIG_CAVIUM_ERRATUM_23154);
 57         case ARM64_WORKAROUND_NVIDIA_CARMEL_CNP:
 58                 return IS_ENABLED(CONFIG_NVIDIA_CARMEL_CNP_ERRATUM);
 59         case ARM64_WORKAROUND_REPEAT_TLBI:
 60                 return IS_ENABLED(CONFIG_ARM64_WORKAROUND_REPEAT_TLBI);
 61         case ARM64_WORKAROUND_SPECULATIVE_SSBS:
 62                 return IS_ENABLED(CONFIG_ARM64_ERRATUM_3194386);
 63         }
 64 
 65         return true;
 66 }
 67 #endif /* __ASSEMBLY__ */
 68 
 69 #endif /* __ASM_CPUCAPS_H */
 70 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php