]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - arch/s390/kernel/diag.c
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 10: Release pages
14 void diag10(unsigned long addr
)
16 if (addr
>= 0x7ff00000)
30 EXPORT_SYMBOL(diag10
);
33 * Diagnose 14: Input spool file manipulation
35 int diag14(unsigned long rx
, unsigned long ry1
, unsigned long subcode
)
37 register unsigned long _ry1
asm("2") = ry1
;
38 register unsigned long _ry2
asm("3") = subcode
;
51 : "=d" (rc
), "+d" (_ry2
)
52 : "d" (rx
), "d" (_ry1
)
57 EXPORT_SYMBOL(diag14
);
60 * Diagnose 210: Get information about a virtual device
62 int diag210(struct diag210
*addr
)
65 * diag 210 needs its data below the 2GB border, so we
66 * use a static data area to be sure
68 static struct diag210 diag210_tmp
;
69 static DEFINE_SPINLOCK(diag210_lock
);
73 spin_lock_irqsave(&diag210_lock
, flags
);
85 : "=&d" (ccode
) : "a" (&diag210_tmp
) : "cc", "memory");
94 : "=&d" (ccode
) : "a" (&diag210_tmp
) : "cc", "memory");
98 spin_unlock_irqrestore(&diag210_lock
, flags
);
102 EXPORT_SYMBOL(diag210
);