aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorChristian Ehrhardt <ehrhardt@linux.vnet.ibm.com>2009-03-26 10:24:54 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-03-26 10:24:31 -0400
commit2ac3307f275c2a91af0417e16d2cfb95ae478661 (patch)
treecc6f6cc79327380d17ad5ebf590d6b1a3bc117cf /arch/s390
parentd0d3cdf4c27fa4ce241616da08138954e02890f7 (diff)
[S390] fix dfp elf hwcap/facility bit detection
The old dfp detection wanted to check bit 43 (dfp high performance), but due to a wrong calculation always used to check bit 42. Additionally the "userspace expectation" is, that the dfp capability bit is set is if facility bit 42 (decimal floating point facility available) and bit 44 (perform floating point operation facility avail). The patch fixes the bit calculation and extends the check to work like: elf hw cap dfp bit = facility bits 42 (dfp) & 44 (pfpo) available Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/setup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 580abb53ce83..18222ac4078f 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -713,13 +713,15 @@ static void __init setup_hwcaps(void)
713 * How many facility words are stored depends on the number of 713 * How many facility words are stored depends on the number of
714 * doublewords passed to the instruction. The additional facilites 714 * doublewords passed to the instruction. The additional facilites
715 * are: 715 * are:
716 * Bit 43: decimal floating point facility is installed 716 * Bit 42: decimal floating point facility is installed
717 * Bit 44: perform floating point operation facility is installed
717 * translated to: 718 * translated to:
718 * HWCAP_S390_DFP bit 6. 719 * HWCAP_S390_DFP bit 6.
719 */ 720 */
720 if ((elf_hwcap & (1UL << 2)) && 721 if ((elf_hwcap & (1UL << 2)) &&
721 __stfle(&facility_list_extended, 1) > 0) { 722 __stfle(&facility_list_extended, 1) > 0) {
722 if (facility_list_extended & (1ULL << (64 - 43))) 723 if ((facility_list_extended & (1ULL << (63 - 42)))
724 && (facility_list_extended & (1ULL << (63 - 44))))
723 elf_hwcap |= 1UL << 6; 725 elf_hwcap |= 1UL << 6;
724 } 726 }
725 727