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
;
26 : "=d" (rc
), "+d" (_ry2
)
27 : "d" (rx
), "d" (_ry1
)
32 EXPORT_SYMBOL(diag14
);
35 * Diagnose 210: Get information about a virtual device
37 int diag210(struct diag210
*addr
)
40 * diag 210 needs its data below the 2GB border, so we
41 * use a static data area to be sure
43 static struct diag210 diag210_tmp
;
44 static DEFINE_SPINLOCK(diag210_lock
);
48 spin_lock_irqsave(&diag210_lock
, flags
);
59 : "=&d" (ccode
) : "a" (&diag210_tmp
) : "cc", "memory");
62 spin_unlock_irqrestore(&diag210_lock
, flags
);
66 EXPORT_SYMBOL(diag210
);