]>
git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blob - arch/s390/include/asm/diag.h
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/if_ether.h>
12 #include <linux/percpu.h>
38 void diag_stat_inc(enum diag_stat_enum nr
);
39 void diag_stat_inc_norecursion(enum diag_stat_enum nr
);
42 * Diagnose 10: Release page range
44 static inline void diag10_range(unsigned long start_pfn
, unsigned long num_pfn
)
46 unsigned long start_addr
, end_addr
;
48 start_addr
= start_pfn
<< PAGE_SHIFT
;
49 end_addr
= (start_pfn
+ num_pfn
- 1) << PAGE_SHIFT
;
51 diag_stat_inc(DIAG_STAT_X010
);
53 "0: diag %0,%1,0x10\n"
57 : : "a" (start_addr
), "a" (end_addr
));
61 * Diagnose 14: Input spool file manipulation
63 extern int diag14(unsigned long rx
, unsigned long ry1
, unsigned long subcode
);
66 * Diagnose 210: Get information about a virtual device
69 u16 vrdcdvno
; /* device number (input) */
70 u16 vrdclen
; /* data block length (input) */
71 u8 vrdcvcla
; /* virtual device class (output) */
72 u8 vrdcvtyp
; /* virtual device type (output) */
73 u8 vrdcvsta
; /* virtual device status (output) */
74 u8 vrdcvfla
; /* virtual device flags (output) */
75 u8 vrdcrccl
; /* real device class (output) */
76 u8 vrdccrty
; /* real device type (output) */
77 u8 vrdccrmd
; /* real device model (output) */
78 u8 vrdccrft
; /* real device feature (output) */
79 } __attribute__((packed
, aligned(4)));
81 extern int diag210(struct diag210
*addr
);
83 /* bit is set in flags, when physical cpu info is included in diag 204 data */
84 #define DIAG204_LPAR_PHYS_FLG 0x80
85 #define DIAG204_LPAR_NAME_LEN 8 /* lpar name len in diag 204 data */
86 #define DIAG204_CPU_NAME_LEN 16 /* type name len of cpus in diag224 name table */
88 /* diag 204 subcodes */
90 DIAG204_SUBC_STIB4
= 4,
92 DIAG204_SUBC_STIB6
= 6,
93 DIAG204_SUBC_STIB7
= 7
96 /* The two available diag 204 data formats */
98 DIAG204_INFO_SIMPLE
= 0,
99 DIAG204_INFO_EXT
= 0x00010000
102 enum diag204_cpu_flags
{
103 DIAG204_CPU_ONLINE
= 0x20,
104 DIAG204_CPU_CAPPED
= 0x40,
107 struct diag204_info_blk_hdr
{
116 struct diag204_x_info_blk_hdr
{
127 struct diag204_part_hdr
{
131 char part_name
[DIAG204_LPAR_NAME_LEN
];
134 struct diag204_x_part_hdr
{
140 char part_name
[DIAG204_LPAR_NAME_LEN
];
151 char hardware_group_name
[8];
155 struct diag204_cpu_info
{
165 struct diag204_x_cpu_info
{
182 __u32 group_cpu_type_cap
;
186 struct diag204_phys_hdr
{
193 struct diag204_x_phys_hdr
{
201 struct diag204_phys_cpu
{
210 struct diag204_x_phys_cpu
{
220 struct diag204_x_part_block
{
221 struct diag204_x_part_hdr hdr
;
222 struct diag204_x_cpu_info cpus
[];
225 struct diag204_x_phys_block
{
226 struct diag204_x_phys_hdr hdr
;
227 struct diag204_x_phys_cpu cpus
[];
231 DIAG26C_MAC_SERVICES
= 0x00000030
234 enum diag26c_version
{
235 DIAG26C_VERSION2
= 0x00000002 /* z/VM 5.4.0 */
238 #define DIAG26C_GET_MAC 0x0000
239 struct diag26c_mac_req
{
247 struct diag26c_mac_resp
{
253 int diag204(unsigned long subcode
, unsigned long size
, void *addr
);
254 int diag224(void *ptr
);
255 int diag26c(void *req
, void *resp
, enum diag26c_sc subcode
);
256 #endif /* _ASM_S390_DIAG_H */