Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/hwcaps: shorten HWCAP defines

Remove s390 part of all HWCAP defines, just to make them shorter and
easier to handle. The namespace is anyway per architecture.
This is similar to what arm64 has.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>

+49 -49
+1 -1
arch/s390/include/asm/cpufeature.h
··· 23 23 #define MAX_ELF_HWCAP_FEATURES (8 * sizeof(elf_hwcap)) 24 24 #define MAX_CPU_FEATURES MAX_ELF_HWCAP_FEATURES 25 25 26 - #define cpu_feature(feat) ilog2(HWCAP_S390_ ## feat) 26 + #define cpu_feature(feat) ilog2(HWCAP_ ## feat) 27 27 28 28 int cpu_have_feature(unsigned int nr); 29 29
+22 -22
arch/s390/include/asm/elf.h
··· 92 92 #define R_390_NUM 61 93 93 94 94 /* Bits present in AT_HWCAP. */ 95 - #define HWCAP_S390_ESAN3 1 96 - #define HWCAP_S390_ZARCH 2 97 - #define HWCAP_S390_STFLE 4 98 - #define HWCAP_S390_MSA 8 99 - #define HWCAP_S390_LDISP 16 100 - #define HWCAP_S390_EIMM 32 101 - #define HWCAP_S390_DFP 64 102 - #define HWCAP_S390_HPAGE 128 103 - #define HWCAP_S390_ETF3EH 256 104 - #define HWCAP_S390_HIGH_GPRS 512 105 - #define HWCAP_S390_TE 1024 106 - #define HWCAP_S390_VXRS 2048 107 - #define HWCAP_S390_VXRS_BCD 4096 108 - #define HWCAP_S390_VXRS_EXT 8192 109 - #define HWCAP_S390_GS 16384 110 - #define HWCAP_S390_VXRS_EXT2 32768 111 - #define HWCAP_S390_VXRS_PDE 65536 112 - #define HWCAP_S390_SORT 131072 113 - #define HWCAP_S390_DFLT 262144 114 - #define HWCAP_S390_VXRS_PDE2 524288 115 - #define HWCAP_S390_NNPA 1048576 116 - #define HWCAP_S390_PCI_MIO 2097152 95 + #define HWCAP_ESAN3 1 96 + #define HWCAP_ZARCH 2 97 + #define HWCAP_STFLE 4 98 + #define HWCAP_MSA 8 99 + #define HWCAP_LDISP 16 100 + #define HWCAP_EIMM 32 101 + #define HWCAP_DFP 64 102 + #define HWCAP_HPAGE 128 103 + #define HWCAP_ETF3EH 256 104 + #define HWCAP_HIGH_GPRS 512 105 + #define HWCAP_TE 1024 106 + #define HWCAP_VXRS 2048 107 + #define HWCAP_VXRS_BCD 4096 108 + #define HWCAP_VXRS_EXT 8192 109 + #define HWCAP_GS 16384 110 + #define HWCAP_VXRS_EXT2 32768 111 + #define HWCAP_VXRS_PDE 65536 112 + #define HWCAP_SORT 131072 113 + #define HWCAP_DFLT 262144 114 + #define HWCAP_VXRS_PDE2 524288 115 + #define HWCAP_NNPA 1048576 116 + #define HWCAP_PCI_MIO 2097152 117 117 118 118 /* Internal bits, not exposed via elf */ 119 119 #define HWCAP_INT_SIE 1UL
+26 -26
arch/s390/kernel/setup.c
··· 888 888 * Bit 22: extended-translation facility 3 is installed 889 889 * Bit 30: extended-translation facility 3 enhancement facility 890 890 * These get translated to: 891 - * HWCAP_S390_ESAN3 bit 0, HWCAP_S390_ZARCH bit 1, 892 - * HWCAP_S390_STFLE bit 2, HWCAP_S390_MSA bit 3, 893 - * HWCAP_S390_LDISP bit 4, HWCAP_S390_EIMM bit 5 and 894 - * HWCAP_S390_ETF3EH bit 8 (22 && 30). 891 + * HWCAP_ESAN3 bit 0, HWCAP_ZARCH bit 1, 892 + * HWCAP_STFLE bit 2, HWCAP_MSA bit 3, 893 + * HWCAP_LDISP bit 4, HWCAP_EIMM bit 5 and 894 + * HWCAP_ETF3EH bit 8 (22 && 30). 895 895 */ 896 896 for (i = 0; i < 6; i++) 897 897 if (test_facility(stfl_bits[i])) 898 898 elf_hwcap |= 1UL << i; 899 899 900 900 if (test_facility(22) && test_facility(30)) 901 - elf_hwcap |= HWCAP_S390_ETF3EH; 901 + elf_hwcap |= HWCAP_ETF3EH; 902 902 903 903 /* 904 904 * Check for additional facilities with store-facility-list-extended. ··· 911 911 * Bit 42: decimal floating point facility is installed 912 912 * Bit 44: perform floating point operation facility is installed 913 913 * translated to: 914 - * HWCAP_S390_DFP bit 6 (42 && 44). 914 + * HWCAP_DFP bit 6 (42 && 44). 915 915 */ 916 916 if ((elf_hwcap & (1UL << 2)) && test_facility(42) && test_facility(44)) 917 - elf_hwcap |= HWCAP_S390_DFP; 917 + elf_hwcap |= HWCAP_DFP; 918 918 919 919 /* 920 - * Huge page support HWCAP_S390_HPAGE is bit 7. 920 + * Huge page support HWCAP_HPAGE is bit 7. 921 921 */ 922 922 if (MACHINE_HAS_EDAT1) 923 - elf_hwcap |= HWCAP_S390_HPAGE; 923 + elf_hwcap |= HWCAP_HPAGE; 924 924 925 925 /* 926 926 * 64-bit register support for 31-bit processes 927 - * HWCAP_S390_HIGH_GPRS is bit 9. 927 + * HWCAP_HIGH_GPRS is bit 9. 928 928 */ 929 - elf_hwcap |= HWCAP_S390_HIGH_GPRS; 929 + elf_hwcap |= HWCAP_HIGH_GPRS; 930 930 931 931 /* 932 - * Transactional execution support HWCAP_S390_TE is bit 10. 932 + * Transactional execution support HWCAP_TE is bit 10. 933 933 */ 934 934 if (MACHINE_HAS_TE) 935 - elf_hwcap |= HWCAP_S390_TE; 935 + elf_hwcap |= HWCAP_TE; 936 936 937 937 /* 938 - * Vector extension HWCAP_S390_VXRS is bit 11. The Vector extension 938 + * Vector extension HWCAP_VXRS is bit 11. The Vector extension 939 939 * can be disabled with the "novx" parameter. Use MACHINE_HAS_VX 940 940 * instead of facility bit 129. 941 941 */ 942 942 if (MACHINE_HAS_VX) { 943 - elf_hwcap |= HWCAP_S390_VXRS; 943 + elf_hwcap |= HWCAP_VXRS; 944 944 if (test_facility(134)) 945 - elf_hwcap |= HWCAP_S390_VXRS_BCD; 945 + elf_hwcap |= HWCAP_VXRS_BCD; 946 946 if (test_facility(135)) 947 - elf_hwcap |= HWCAP_S390_VXRS_EXT; 947 + elf_hwcap |= HWCAP_VXRS_EXT; 948 948 if (test_facility(148)) 949 - elf_hwcap |= HWCAP_S390_VXRS_EXT2; 949 + elf_hwcap |= HWCAP_VXRS_EXT2; 950 950 if (test_facility(152)) 951 - elf_hwcap |= HWCAP_S390_VXRS_PDE; 951 + elf_hwcap |= HWCAP_VXRS_PDE; 952 952 if (test_facility(192)) 953 - elf_hwcap |= HWCAP_S390_VXRS_PDE2; 953 + elf_hwcap |= HWCAP_VXRS_PDE2; 954 954 } 955 955 if (test_facility(150)) 956 - elf_hwcap |= HWCAP_S390_SORT; 956 + elf_hwcap |= HWCAP_SORT; 957 957 if (test_facility(151)) 958 - elf_hwcap |= HWCAP_S390_DFLT; 958 + elf_hwcap |= HWCAP_DFLT; 959 959 if (test_facility(165)) 960 - elf_hwcap |= HWCAP_S390_NNPA; 960 + elf_hwcap |= HWCAP_NNPA; 961 961 962 962 /* 963 - * Guarded storage support HWCAP_S390_GS is bit 12. 963 + * Guarded storage support HWCAP_GS is bit 12. 964 964 */ 965 965 if (MACHINE_HAS_GS) 966 - elf_hwcap |= HWCAP_S390_GS; 966 + elf_hwcap |= HWCAP_GS; 967 967 if (MACHINE_HAS_PCI_MIO) 968 - elf_hwcap |= HWCAP_S390_PCI_MIO; 968 + elf_hwcap |= HWCAP_PCI_MIO; 969 969 970 970 get_cpu_id(&cpu_id); 971 971 add_device_randomness(&cpu_id, sizeof(cpu_id));