diag.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * s390 diagnose functions
  3. *
  4. * Copyright IBM Corp. 2007
  5. * Author(s): Michael Holzheu <holzheu@de.ibm.com>
  6. */
  7. #ifndef _ASM_S390_DIAG_H
  8. #define _ASM_S390_DIAG_H
  9. /*
  10. * Diagnose 10: Release page range
  11. */
  12. static inline void diag10_range(unsigned long start_pfn, unsigned long num_pfn)
  13. {
  14. unsigned long start_addr, end_addr;
  15. start_addr = start_pfn << PAGE_SHIFT;
  16. end_addr = (start_pfn + num_pfn - 1) << PAGE_SHIFT;
  17. asm volatile(
  18. "0: diag %0,%1,0x10\n"
  19. "1:\n"
  20. EX_TABLE(0b, 1b)
  21. EX_TABLE(1b, 1b)
  22. : : "a" (start_addr), "a" (end_addr));
  23. }
  24. /*
  25. * Diagnose 14: Input spool file manipulation
  26. */
  27. extern int diag14(unsigned long rx, unsigned long ry1, unsigned long subcode);
  28. /*
  29. * Diagnose 210: Get information about a virtual device
  30. */
  31. struct diag210 {
  32. u16 vrdcdvno; /* device number (input) */
  33. u16 vrdclen; /* data block length (input) */
  34. u8 vrdcvcla; /* virtual device class (output) */
  35. u8 vrdcvtyp; /* virtual device type (output) */
  36. u8 vrdcvsta; /* virtual device status (output) */
  37. u8 vrdcvfla; /* virtual device flags (output) */
  38. u8 vrdcrccl; /* real device class (output) */
  39. u8 vrdccrty; /* real device type (output) */
  40. u8 vrdccrmd; /* real device model (output) */
  41. u8 vrdccrft; /* real device feature (output) */
  42. } __attribute__((packed, aligned(4)));
  43. extern int diag210(struct diag210 *addr);
  44. #endif /* _ASM_S390_DIAG_H */