diff mbox

[01/10] s390/ioinst: fix IO_INT_WORD_ISC macro

Message ID 1434383829-26451-2-git-send-email-aurelien@aurel32.net
State New
Headers show

Commit Message

Aurelien Jarno June 15, 2015, 3:57 p.m. UTC
The I/O-Interruption Subclass field corresponds to bits 2 to 5 (BE
notation) of the Interruption-Identification Word. The value should
be shift by 27 instead of 24.

Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 target-s390x/ioinst.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christian Borntraeger June 15, 2015, 6:40 p.m. UTC | #1
Am 15.06.2015 um 17:57 schrieb Aurelien Jarno:
> The I/O-Interruption Subclass field corresponds to bits 2 to 5 (BE
> notation) of the Interruption-Identification Word. The value should
> be shift by 27 instead of 24.
> 
> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
> Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
> Cc: Alexander Graf <agraf@suse.de>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
>  target-s390x/ioinst.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target-s390x/ioinst.h b/target-s390x/ioinst.h
> index 203bdba..013cc91 100644
> --- a/target-s390x/ioinst.h
> +++ b/target-s390x/ioinst.h
> @@ -220,7 +220,7 @@ typedef struct IOIntCode {
>  #define IOINST_SCHID_SSID(_schid)  ((_schid & 0x00060000) >> 17)
>  #define IOINST_SCHID_NR(_schid)    (_schid & 0x0000ffff)
> 
> -#define IO_INT_WORD_ISC(_int_word) ((_int_word & 0x38000000) >> 24)
> +#define IO_INT_WORD_ISC(_int_word) ((_int_word & 0x38000000) >> 27)
>  #define ISC_TO_ISC_BITS(_isc)      ((0x80 >> _isc) << 24)
> 
>  #define IO_INT_WORD_AI 0x80000000
> 

Its Connys area of competence, but your change matches the KVM
implementation in the kernel

static u64 int_word_to_isc_bits(u32 int_word)
{
        u8 isc = (int_word & 0x38000000) >> 27;

        return (0x80 >> isc) << 24;
}

so

Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
diff mbox

Patch

diff --git a/target-s390x/ioinst.h b/target-s390x/ioinst.h
index 203bdba..013cc91 100644
--- a/target-s390x/ioinst.h
+++ b/target-s390x/ioinst.h
@@ -220,7 +220,7 @@  typedef struct IOIntCode {
 #define IOINST_SCHID_SSID(_schid)  ((_schid & 0x00060000) >> 17)
 #define IOINST_SCHID_NR(_schid)    (_schid & 0x0000ffff)
 
-#define IO_INT_WORD_ISC(_int_word) ((_int_word & 0x38000000) >> 24)
+#define IO_INT_WORD_ISC(_int_word) ((_int_word & 0x38000000) >> 27)
 #define ISC_TO_ISC_BITS(_isc)      ((0x80 >> _isc) << 24)
 
 #define IO_INT_WORD_AI 0x80000000