diff options
author | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2009-03-26 10:24:56 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-03-26 10:24:32 -0400 |
commit | 488253ce49714f4e9d42413c1d60b7724059a338 (patch) | |
tree | bb19988030f8015238437f98e49e8388c6c8e17e /arch/s390 | |
parent | 7e9b580e5f0644cd8952b6671fd5380fd430bca3 (diff) |
[S390] Add hwcap flag for the etf3 enhancement facility
The Extended Translation Facility 3 (ETF3) added instructions which
allow conversions between different unicode character maps (UTF-8,
UTF-32 ...). These instructions got enhanced with a later version of
the ETF3 allowing malformed multibyte chars to be recognized and
reported correctly. The attached patch reserves bit 8 in the elf
hwcaps vector for the enhanced version of ETF3. The bit corresponds to
the stfle bits 22 and 30 and will only be set if both of the stfle
bits are set.
Signed-off-by: Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/processor.c | 6 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 13 |
2 files changed, 13 insertions, 6 deletions
diff --git a/arch/s390/kernel/processor.c b/arch/s390/kernel/processor.c index 423da1bd42a4..802c8ab247f3 100644 --- a/arch/s390/kernel/processor.c +++ b/arch/s390/kernel/processor.c | |||
@@ -31,9 +31,9 @@ void __cpuinit print_cpu_info(void) | |||
31 | 31 | ||
32 | static int show_cpuinfo(struct seq_file *m, void *v) | 32 | static int show_cpuinfo(struct seq_file *m, void *v) |
33 | { | 33 | { |
34 | static const char *hwcap_str[8] = { | 34 | static const char *hwcap_str[9] = { |
35 | "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp", | 35 | "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp", |
36 | "edat" | 36 | "edat", "etf3eh" |
37 | }; | 37 | }; |
38 | struct _lowcore *lc; | 38 | struct _lowcore *lc; |
39 | unsigned long n = (unsigned long) v - 1; | 39 | unsigned long n = (unsigned long) v - 1; |
@@ -48,7 +48,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
48 | num_online_cpus(), loops_per_jiffy/(500000/HZ), | 48 | num_online_cpus(), loops_per_jiffy/(500000/HZ), |
49 | (loops_per_jiffy/(5000/HZ))%100); | 49 | (loops_per_jiffy/(5000/HZ))%100); |
50 | seq_puts(m, "features\t: "); | 50 | seq_puts(m, "features\t: "); |
51 | for (i = 0; i < 8; i++) | 51 | for (i = 0; i < 9; i++) |
52 | if (hwcap_str[i] && (elf_hwcap & (1UL << i))) | 52 | if (hwcap_str[i] && (elf_hwcap & (1UL << i))) |
53 | seq_printf(m, "%s ", hwcap_str[i]); | 53 | seq_printf(m, "%s ", hwcap_str[i]); |
54 | seq_puts(m, "\n"); | 54 | seq_puts(m, "\n"); |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 18222ac4078f..06201b93cbbf 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -696,15 +696,22 @@ static void __init setup_hwcaps(void) | |||
696 | * Bit 17: the message-security assist is installed | 696 | * Bit 17: the message-security assist is installed |
697 | * Bit 19: the long-displacement facility is installed | 697 | * Bit 19: the long-displacement facility is installed |
698 | * Bit 21: the extended-immediate facility is installed | 698 | * Bit 21: the extended-immediate facility is installed |
699 | * Bit 22: extended-translation facility 3 is installed | ||
700 | * Bit 30: extended-translation facility 3 enhancement facility | ||
699 | * These get translated to: | 701 | * These get translated to: |
700 | * HWCAP_S390_ESAN3 bit 0, HWCAP_S390_ZARCH bit 1, | 702 | * HWCAP_S390_ESAN3 bit 0, HWCAP_S390_ZARCH bit 1, |
701 | * HWCAP_S390_STFLE bit 2, HWCAP_S390_MSA bit 3, | 703 | * HWCAP_S390_STFLE bit 2, HWCAP_S390_MSA bit 3, |
702 | * HWCAP_S390_LDISP bit 4, and HWCAP_S390_EIMM bit 5. | 704 | * HWCAP_S390_LDISP bit 4, HWCAP_S390_EIMM bit 5 and |
705 | * HWCAP_S390_ETF3EH bit 8 (22 && 30). | ||
703 | */ | 706 | */ |
704 | for (i = 0; i < 6; i++) | 707 | for (i = 0; i < 6; i++) |
705 | if (facility_list & (1UL << (31 - stfl_bits[i]))) | 708 | if (facility_list & (1UL << (31 - stfl_bits[i]))) |
706 | elf_hwcap |= 1UL << i; | 709 | elf_hwcap |= 1UL << i; |
707 | 710 | ||
711 | if ((facility_list & (1UL << (31 - 22))) | ||
712 | && (facility_list & (1UL << (31 - 30)))) | ||
713 | elf_hwcap |= 1UL << 8; | ||
714 | |||
708 | /* | 715 | /* |
709 | * Check for additional facilities with store-facility-list-extended. | 716 | * Check for additional facilities with store-facility-list-extended. |
710 | * stfle stores doublewords (8 byte) with bit 1ULL<<63 as bit 0 | 717 | * stfle stores doublewords (8 byte) with bit 1ULL<<63 as bit 0 |
@@ -716,12 +723,12 @@ static void __init setup_hwcaps(void) | |||
716 | * Bit 42: decimal floating point facility is installed | 723 | * Bit 42: decimal floating point facility is installed |
717 | * Bit 44: perform floating point operation facility is installed | 724 | * Bit 44: perform floating point operation facility is installed |
718 | * translated to: | 725 | * translated to: |
719 | * HWCAP_S390_DFP bit 6. | 726 | * HWCAP_S390_DFP bit 6 (42 && 44). |
720 | */ | 727 | */ |
721 | if ((elf_hwcap & (1UL << 2)) && | 728 | if ((elf_hwcap & (1UL << 2)) && |
722 | __stfle(&facility_list_extended, 1) > 0) { | 729 | __stfle(&facility_list_extended, 1) > 0) { |
723 | if ((facility_list_extended & (1ULL << (63 - 42))) | 730 | if ((facility_list_extended & (1ULL << (63 - 42))) |
724 | && (facility_list_extended & (1ULL << (63 - 44)))) | 731 | && (facility_list_extended & (1ULL << (63 - 44)))) |
725 | elf_hwcap |= 1UL << 6; | 732 | elf_hwcap |= 1UL << 6; |
726 | } | 733 | } |
727 | 734 | ||