Patch "s390/dasd: fix diag 0x250 inline assembly" has been added to the 4.4-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
s390/dasd: fix diag 0x250 inline assembly
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
s390-dasd-fix-diag-0x250-inline-assembly.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
ce0c12b633846a47e103842149a5bac2e5d261ecMon Sep 17 00:00:00 2001
From: Heiko Carstens <[email protected]>
Date: Tue, 1 Mar 2016 12:58:06 +0100
Subject: s390/dasd: fix diag 0x250 inline assembly
From: Heiko Carstens <[email protected]>
commit ce0c12b633846a47e103842149a5bac2e5d261ec upstream.
git commit 1ec2772e0c3c ("s390/diag: add a statistic for diagnose calls") added function calls to gather diagnose statistics.
In case of the dasd diag driver the function call was added between a register asm statement which initialized register r2 and the inline assembly itself. The function call clobbers the contents of register r2 and therefore the diag 0x250 call behaves in a more or less random way.
Fix this by extracting the function call into a separate function like we do everywhere else.
--- drivers/s390/block/dasd_diag.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/s390/block/dasd_diag.c +7 -2
@@ -67,7 +67,7 @@ static const u8 DASD_DIAG_CMS1[] = { 0xc* and function code cmd. * In case of an exception return 3. Otherwise return result of bitwise OR of * resulting condition code and DIAG return code. */ -static inline int dia250 (void *iob,int cmd) +static inline int __dia250 (void *iob,int cmd) { register unsigned long reg2 asm ("2") = (unsigned long) iob; typedef union {
@@ -77,7 +77,6 @@ static inline int dia250(void *iob, intint rc; rc =3 ; -diag_stat_inc (DIAG_STAT_X250 ); asmvolatile (" diag 2,%2,0x250\n" "0: ipm %0\n"
@@ -91,6 +90,12 @@ static inline int dia250(void *iob, intreturn rc; } +static inline int dia250 (void *iob,int cmd) +{ +diag_stat_inc (DIAG_STAT_X250 ); +return __dia250 (iob, cmd); +} +/* Initialize block I/O to DIAG device using the specified blocksize and * block offset. On success, return zero and set end_block to contain the * number of blocks on the device minus the specified offset. Return non-zero
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/s390-mm-four-page-table-levels-vs.-fork.patch queue-4.4/s390-dasd-fix-diag-0x250-inline-assembly.patch