hypfs.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * Structures for hypfs interface
  4. *
  5. * Copyright IBM Corp. 2013
  6. *
  7. * Author: Martin Schwidefsky <schwidefsky@de.ibm.com>
  8. */
  9. #ifndef _ASM_HYPFS_H
  10. #define _ASM_HYPFS_H
  11. #include <linux/types.h>
  12. /*
  13. * IOCTL for binary interface /sys/kernel/debug/diag_304
  14. */
  15. struct hypfs_diag304 {
  16. __u32 args[2];
  17. __u64 data;
  18. __u64 rc;
  19. } __attribute__((packed));
  20. #define HYPFS_IOCTL_MAGIC 0x10
  21. #define HYPFS_DIAG304 \
  22. _IOWR(HYPFS_IOCTL_MAGIC, 0x20, struct hypfs_diag304)
  23. /*
  24. * Structures for binary interface /sys/kernel/debug/diag_0c
  25. */
  26. struct hypfs_diag0c_hdr {
  27. __u64 len; /* Length of diag0c buffer without header */
  28. __u16 version; /* Version of header */
  29. char reserved1[6]; /* Reserved */
  30. char tod_ext[16]; /* TOD clock for diag0c */
  31. __u64 count; /* Number of entries (CPUs) in diag0c array */
  32. char reserved2[24]; /* Reserved */
  33. };
  34. struct hypfs_diag0c_entry {
  35. char date[8]; /* MM/DD/YY in EBCDIC */
  36. char time[8]; /* HH:MM:SS in EBCDIC */
  37. __u64 virtcpu; /* Virtual time consumed by the virt CPU (us) */
  38. __u64 totalproc; /* Total of virtual and simulation time (us) */
  39. __u32 cpu; /* Linux logical CPU number */
  40. __u32 reserved; /* Align to 8 byte */
  41. };
  42. struct hypfs_diag0c_data {
  43. struct hypfs_diag0c_hdr hdr; /* 64 byte header */
  44. struct hypfs_diag0c_entry entry[]; /* diag0c entry array */
  45. };
  46. #endif