Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _CXLFLASH_IOCTL_H |
| 20 | #define _CXLFLASH_IOCTL_H |
| 21 | #include <linux/types.h> |
| 22 | #define DK_CXLFLASH_VERSION_0 0 |
| 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 24 | struct dk_cxlflash_hdr { |
| 25 | __u16 version; |
| 26 | __u16 rsvd[3]; |
| 27 | __u64 flags; |
| 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 29 | __u64 return_flags; |
| 30 | }; |
| 31 | #define DK_CXLFLASH_ATTACH_REUSE_CONTEXT 0x8000000000000000ULL |
| 32 | struct dk_cxlflash_attach { |
| 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 34 | struct dk_cxlflash_hdr hdr; |
| 35 | __u64 num_interrupts; |
| 36 | __u64 context_id; |
| 37 | __u64 mmio_size; |
| 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 39 | __u64 block_size; |
| 40 | __u64 adap_fd; |
| 41 | __u64 last_lba; |
| 42 | __u64 max_xfer; |
| 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 44 | __u64 reserved[8]; |
| 45 | }; |
| 46 | struct dk_cxlflash_detach { |
| 47 | struct dk_cxlflash_hdr hdr; |
| 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 49 | __u64 context_id; |
| 50 | __u64 reserved[8]; |
| 51 | }; |
| 52 | struct dk_cxlflash_udirect { |
| 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 54 | struct dk_cxlflash_hdr hdr; |
| 55 | __u64 context_id; |
| 56 | __u64 rsrc_handle; |
| 57 | __u64 last_lba; |
| 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 59 | __u64 reserved[8]; |
| 60 | }; |
| 61 | #define DK_CXLFLASH_UVIRTUAL_NEED_WRITE_SAME 0x8000000000000000ULL |
| 62 | struct dk_cxlflash_uvirtual { |
| 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 64 | struct dk_cxlflash_hdr hdr; |
| 65 | __u64 context_id; |
| 66 | __u64 lun_size; |
| 67 | __u64 rsrc_handle; |
| 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 69 | __u64 last_lba; |
| 70 | __u64 reserved[8]; |
| 71 | }; |
| 72 | struct dk_cxlflash_release { |
| 73 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 74 | struct dk_cxlflash_hdr hdr; |
| 75 | __u64 context_id; |
| 76 | __u64 rsrc_handle; |
| 77 | __u64 reserved[8]; |
| 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 79 | }; |
| 80 | struct dk_cxlflash_resize { |
| 81 | struct dk_cxlflash_hdr hdr; |
| 82 | __u64 context_id; |
| 83 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 84 | __u64 rsrc_handle; |
| 85 | __u64 req_size; |
| 86 | __u64 last_lba; |
| 87 | __u64 reserved[8]; |
| 88 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 89 | }; |
| 90 | struct dk_cxlflash_clone { |
| 91 | struct dk_cxlflash_hdr hdr; |
| 92 | __u64 context_id_src; |
| 93 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 94 | __u64 context_id_dst; |
| 95 | __u64 adap_fd_src; |
| 96 | __u64 reserved[8]; |
| 97 | }; |
| 98 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 99 | #define DK_CXLFLASH_VERIFY_SENSE_LEN 18 |
| 100 | #define DK_CXLFLASH_VERIFY_HINT_SENSE 0x8000000000000000ULL |
| 101 | struct dk_cxlflash_verify { |
| 102 | struct dk_cxlflash_hdr hdr; |
| 103 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 104 | __u64 context_id; |
| 105 | __u64 rsrc_handle; |
| 106 | __u64 hint; |
| 107 | __u64 last_lba; |
| 108 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 109 | __u8 sense_data[DK_CXLFLASH_VERIFY_SENSE_LEN]; |
| 110 | __u8 pad[6]; |
| 111 | __u64 reserved[8]; |
| 112 | }; |
| 113 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 114 | #define DK_CXLFLASH_RECOVER_AFU_CONTEXT_RESET 0x8000000000000000ULL |
| 115 | struct dk_cxlflash_recover_afu { |
| 116 | struct dk_cxlflash_hdr hdr; |
| 117 | __u64 reason; |
| 118 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 119 | __u64 context_id; |
| 120 | __u64 mmio_size; |
| 121 | __u64 adap_fd; |
| 122 | __u64 reserved[8]; |
| 123 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 124 | }; |
| 125 | #define DK_CXLFLASH_MANAGE_LUN_WWID_LEN 16 |
| 126 | #define DK_CXLFLASH_MANAGE_LUN_ENABLE_SUPERPIPE 0x8000000000000000ULL |
| 127 | #define DK_CXLFLASH_MANAGE_LUN_DISABLE_SUPERPIPE 0x4000000000000000ULL |
| 128 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 129 | #define DK_CXLFLASH_MANAGE_LUN_ALL_PORTS_ACCESSIBLE 0x2000000000000000ULL |
| 130 | struct dk_cxlflash_manage_lun { |
| 131 | struct dk_cxlflash_hdr hdr; |
| 132 | __u8 wwid[DK_CXLFLASH_MANAGE_LUN_WWID_LEN]; |
| 133 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 134 | __u64 reserved[8]; |
| 135 | }; |
| 136 | union cxlflash_ioctls { |
| 137 | struct dk_cxlflash_attach attach; |
| 138 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 139 | struct dk_cxlflash_detach detach; |
| 140 | struct dk_cxlflash_udirect udirect; |
| 141 | struct dk_cxlflash_uvirtual uvirtual; |
| 142 | struct dk_cxlflash_release release; |
| 143 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 144 | struct dk_cxlflash_resize resize; |
| 145 | struct dk_cxlflash_clone clone; |
| 146 | struct dk_cxlflash_verify verify; |
| 147 | struct dk_cxlflash_recover_afu recover_afu; |
| 148 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 149 | struct dk_cxlflash_manage_lun manage_lun; |
| 150 | }; |
| 151 | #define MAX_CXLFLASH_IOCTL_SZ (sizeof(union cxlflash_ioctls)) |
| 152 | #define CXL_MAGIC 0xCA |
| 153 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 154 | #define CXL_IOWR(_n,_s) _IOWR(CXL_MAGIC, _n, struct _s) |
| 155 | #define DK_CXLFLASH_ATTACH CXL_IOWR(0x80, dk_cxlflash_attach) |
| 156 | #define DK_CXLFLASH_USER_DIRECT CXL_IOWR(0x81, dk_cxlflash_udirect) |
| 157 | #define DK_CXLFLASH_RELEASE CXL_IOWR(0x82, dk_cxlflash_release) |
| 158 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 159 | #define DK_CXLFLASH_DETACH CXL_IOWR(0x83, dk_cxlflash_detach) |
| 160 | #define DK_CXLFLASH_VERIFY CXL_IOWR(0x84, dk_cxlflash_verify) |
| 161 | #define DK_CXLFLASH_RECOVER_AFU CXL_IOWR(0x85, dk_cxlflash_recover_afu) |
| 162 | #define DK_CXLFLASH_MANAGE_LUN CXL_IOWR(0x86, dk_cxlflash_manage_lun) |
| 163 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 164 | #define DK_CXLFLASH_USER_VIRTUAL CXL_IOWR(0x87, dk_cxlflash_uvirtual) |
| 165 | #define DK_CXLFLASH_VLUN_RESIZE CXL_IOWR(0x88, dk_cxlflash_resize) |
| 166 | #define DK_CXLFLASH_VLUN_CLONE CXL_IOWR(0x89, dk_cxlflash_clone) |
| 167 | #endif |
| 168 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |