2 * Implementation of s390 diagnose codes
4 * Copyright IBM Corp. 2007
5 * Author(s): Michael Holzheu <holzheu@de.ibm.com>
8 #include <linux/module.h>
12 * Diagnose 14: Input spool file manipulation
14 int diag14(unsigned long rx
, unsigned long ry1
, unsigned long subcode
)
16 register unsigned long _ry1
asm("2") = ry1
;
17 register unsigned long _ry2
asm("3") = subcode
;
30 : "=d" (rc
), "+d" (_ry2
)
31 : "d" (rx
), "d" (_ry1
)
36 EXPORT_SYMBOL(diag14
);
39 * Diagnose 210: Get information about a virtual device
41 int diag210(struct diag210
*addr
)
44 * diag 210 needs its data below the 2GB border, so we
45 * use a static data area to be sure
47 static struct diag210 diag210_tmp
;
48 static DEFINE_SPINLOCK(diag210_lock
);
52 spin_lock_irqsave(&diag210_lock
, flags
);
64 : "=&d" (ccode
) : "a" (&diag210_tmp
) : "cc", "memory");
73 : "=&d" (ccode
) : "a" (&diag210_tmp
) : "cc", "memory");
77 spin_unlock_irqrestore(&diag210_lock
, flags
);
81 EXPORT_SYMBOL(diag210
);