cpufeature.h 942 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Module interface for CPU features
  4. *
  5. * Copyright IBM Corp. 2015, 2022
  6. * Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
  7. */
  8. #ifndef __ASM_S390_CPUFEATURE_H
  9. #define __ASM_S390_CPUFEATURE_H
  10. #include <asm/facility.h>
  11. enum {
  12. S390_CPU_FEATURE_MSA,
  13. S390_CPU_FEATURE_VXRS,
  14. S390_CPU_FEATURE_UV,
  15. S390_CPU_FEATURE_D288,
  16. MAX_CPU_FEATURES
  17. };
  18. #define cpu_feature(feature) (feature)
  19. int cpu_have_feature(unsigned int nr);
  20. #define cpu_has_bear() test_facility(193)
  21. #define cpu_has_edat1() test_facility(8)
  22. #define cpu_has_edat2() test_facility(78)
  23. #define cpu_has_gs() test_facility(133)
  24. #define cpu_has_nx() test_facility(130)
  25. #define cpu_has_rdp() test_facility(194)
  26. #define cpu_has_seq_insn() test_facility(85)
  27. #define cpu_has_tlb_lc() test_facility(51)
  28. #define cpu_has_topology() test_facility(11)
  29. #define cpu_has_vx() test_facility(129)
  30. #endif /* __ASM_S390_CPUFEATURE_H */