/*1* s390 diagnose functions2*3* Copyright IBM Corp. 20074* Author(s): Michael Holzheu <[email protected]>5*/67#ifndef _ASM_S390_DIAG_H8#define _ASM_S390_DIAG_H910/*11* Diagnose 10: Release page range12*/13static inline void diag10_range(unsigned long start_pfn, unsigned long num_pfn)14{15unsigned long start_addr, end_addr;1617start_addr = start_pfn << PAGE_SHIFT;18end_addr = (start_pfn + num_pfn - 1) << PAGE_SHIFT;1920asm volatile(21"0: diag %0,%1,0x10\n"22"1:\n"23EX_TABLE(0b, 1b)24EX_TABLE(1b, 1b)25: : "a" (start_addr), "a" (end_addr));26}2728/*29* Diagnose 14: Input spool file manipulation30*/31extern int diag14(unsigned long rx, unsigned long ry1, unsigned long subcode);3233/*34* Diagnose 210: Get information about a virtual device35*/36struct diag210 {37u16 vrdcdvno; /* device number (input) */38u16 vrdclen; /* data block length (input) */39u8 vrdcvcla; /* virtual device class (output) */40u8 vrdcvtyp; /* virtual device type (output) */41u8 vrdcvsta; /* virtual device status (output) */42u8 vrdcvfla; /* virtual device flags (output) */43u8 vrdcrccl; /* real device class (output) */44u8 vrdccrty; /* real device type (output) */45u8 vrdccrmd; /* real device model (output) */46u8 vrdccrft; /* real device feature (output) */47} __attribute__((packed, aligned(4)));4849extern int diag210(struct diag210 *addr);5051#endif /* _ASM_S390_DIAG_H */525354