Sfoglia il codice sorgente

s390: report new vector facilities

Add hardware capability bits and feature tags to /proc/cpuinfo for
the "Vector Packed Decimal Facility" (tag "vxd" / hwcap bit 2^12)
and the "Vector Enhancements Facility 1" (tag "vxe" / hwcap bit 2^13).

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Martin Schwidefsky 9 anni fa
parent
commit
2583b848ca
3 ha cambiato i file con 10 aggiunte e 2 eliminazioni
  1. 2 0
      arch/s390/include/asm/elf.h
  2. 1 1
      arch/s390/kernel/processor.c
  3. 7 1
      arch/s390/kernel/setup.c

+ 2 - 0
arch/s390/include/asm/elf.h

@@ -103,6 +103,8 @@
 #define HWCAP_S390_HIGH_GPRS	512
 #define HWCAP_S390_HIGH_GPRS	512
 #define HWCAP_S390_TE		1024
 #define HWCAP_S390_TE		1024
 #define HWCAP_S390_VXRS		2048
 #define HWCAP_S390_VXRS		2048
+#define HWCAP_S390_VXRS_BCD	4096
+#define HWCAP_S390_VXRS_EXT	8192
 
 
 /* Internal bits, not exposed via elf */
 /* Internal bits, not exposed via elf */
 #define HWCAP_INT_SIE		1UL
 #define HWCAP_INT_SIE		1UL

+ 1 - 1
arch/s390/kernel/processor.c

@@ -92,7 +92,7 @@ static void show_cpu_summary(struct seq_file *m, void *v)
 {
 {
 	static const char *hwcap_str[] = {
 	static const char *hwcap_str[] = {
 		"esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp",
 		"esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp",
-		"edat", "etf3eh", "highgprs", "te", "vx"
+		"edat", "etf3eh", "highgprs", "te", "vx", "vxd", "vxe"
 	};
 	};
 	static const char * const int_hwcap_str[] = {
 	static const char * const int_hwcap_str[] = {
 		"sie"
 		"sie"

+ 7 - 1
arch/s390/kernel/setup.c

@@ -769,8 +769,14 @@ static int __init setup_hwcaps(void)
 	 * can be disabled with the "novx" parameter. Use MACHINE_HAS_VX
 	 * can be disabled with the "novx" parameter. Use MACHINE_HAS_VX
 	 * instead of facility bit 129.
 	 * instead of facility bit 129.
 	 */
 	 */
-	if (MACHINE_HAS_VX)
+	if (MACHINE_HAS_VX) {
 		elf_hwcap |= HWCAP_S390_VXRS;
 		elf_hwcap |= HWCAP_S390_VXRS;
+		if (test_facility(134))
+			elf_hwcap |= HWCAP_S390_VXRS_EXT;
+		if (test_facility(135))
+			elf_hwcap |= HWCAP_S390_VXRS_BCD;
+	}
+
 	get_cpu_id(&cpu_id);
 	get_cpu_id(&cpu_id);
 	add_device_randomness(&cpu_id, sizeof(cpu_id));
 	add_device_randomness(&cpu_id, sizeof(cpu_id));
 	switch (cpu_id.machine) {
 	switch (cpu_id.machine) {