2 * s390 diagnose functions
4 * Copyright IBM Corp. 2007
5 * Author(s): Michael Holzheu <holzheu@de.ibm.com>
8 #ifndef _ASM_S390_DIAG_H
9 #define _ASM_S390_DIAG_H
11 #include <linux/percpu.h>
36 void diag_stat_inc(enum diag_stat_enum nr
);
37 void diag_stat_inc_norecursion(enum diag_stat_enum nr
);
40 * Diagnose 10: Release page range
42 static inline void diag10_range(unsigned long start_pfn
, unsigned long num_pfn
)
44 unsigned long start_addr
, end_addr
;
46 start_addr
= start_pfn
<< PAGE_SHIFT
;
47 end_addr
= (start_pfn
+ num_pfn
- 1) << PAGE_SHIFT
;
49 diag_stat_inc(DIAG_STAT_X010
);
51 "0: diag %0,%1,0x10\n"
55 : : "a" (start_addr
), "a" (end_addr
));
59 * Diagnose 14: Input spool file manipulation
61 extern int diag14(unsigned long rx
, unsigned long ry1
, unsigned long subcode
);
64 * Diagnose 210: Get information about a virtual device
67 u16 vrdcdvno
; /* device number (input) */
68 u16 vrdclen
; /* data block length (input) */
69 u8 vrdcvcla
; /* virtual device class (output) */
70 u8 vrdcvtyp
; /* virtual device type (output) */
71 u8 vrdcvsta
; /* virtual device status (output) */
72 u8 vrdcvfla
; /* virtual device flags (output) */
73 u8 vrdcrccl
; /* real device class (output) */
74 u8 vrdccrty
; /* real device type (output) */
75 u8 vrdccrmd
; /* real device model (output) */
76 u8 vrdccrft
; /* real device feature (output) */
77 } __attribute__((packed
, aligned(4)));
79 extern int diag210(struct diag210
*addr
);
81 #endif /* _ASM_S390_DIAG_H */