mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
[S390] dasd: Work around gcc bug.
gcc incorrectly removes initialization of register 0 in dasd diag inline assembly. Use different register to work around this compiler bug. Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
This commit is contained in:
parent
e0f2e3a06b
commit
04439694ea
@ -65,7 +65,7 @@ static const u8 DASD_DIAG_CMS1[] = { 0xc3, 0xd4, 0xe2, 0xf1 };/* EBCDIC CMS1 */
|
|||||||
* resulting condition code and DIAG return code. */
|
* 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 reg0 asm ("0") = (unsigned long) iob;
|
register unsigned long reg2 asm ("2") = (unsigned long) iob;
|
||||||
typedef union {
|
typedef union {
|
||||||
struct dasd_diag_init_io init_io;
|
struct dasd_diag_init_io init_io;
|
||||||
struct dasd_diag_rw_io rw_io;
|
struct dasd_diag_rw_io rw_io;
|
||||||
@ -74,15 +74,15 @@ static inline int dia250(void *iob, int cmd)
|
|||||||
|
|
||||||
rc = 3;
|
rc = 3;
|
||||||
asm volatile(
|
asm volatile(
|
||||||
" diag 0,%2,0x250\n"
|
" diag 2,%2,0x250\n"
|
||||||
"0: ipm %0\n"
|
"0: ipm %0\n"
|
||||||
" srl %0,28\n"
|
" srl %0,28\n"
|
||||||
" or %0,1\n"
|
" or %0,3\n"
|
||||||
"1:\n"
|
"1:\n"
|
||||||
EX_TABLE(0b,1b)
|
EX_TABLE(0b,1b)
|
||||||
: "+d" (rc), "=m" (*(addr_type *) iob)
|
: "+d" (rc), "=m" (*(addr_type *) iob)
|
||||||
: "d" (cmd), "d" (reg0), "m" (*(addr_type *) iob)
|
: "d" (cmd), "d" (reg2), "m" (*(addr_type *) iob)
|
||||||
: "1", "cc");
|
: "3", "cc");
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user