blob: 150a0d93c16ea0c7f417f0f0b66a0c4f1114e748 [file] [log] [blame]
Christopher Ferris82d75042015-01-26 10:57:07 -08001/****************************************************************************
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 _UAPI_MISC_CXL_H
20#define _UAPI_MISC_CXL_H
21#include <linux/types.h>
22#include <linux/ioctl.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24struct cxl_ioctl_start_work {
Tao Baod7db5942015-01-28 10:07:51 -080025 __u64 flags;
26 __u64 work_element_descriptor;
27 __u64 amr;
Christopher Ferris82d75042015-01-26 10:57:07 -080028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080029 __s16 num_interrupts;
30 __s16 reserved1;
31 __s32 reserved2;
32 __u64 reserved3;
Christopher Ferris82d75042015-01-26 10:57:07 -080033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080034 __u64 reserved4;
35 __u64 reserved5;
36 __u64 reserved6;
Christopher Ferris82d75042015-01-26 10:57:07 -080037};
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#define CXL_START_WORK_AMR 0x0000000000000001ULL
40#define CXL_START_WORK_NUM_IRQS 0x0000000000000002ULL
Tao Baod7db5942015-01-28 10:07:51 -080041#define CXL_START_WORK_ALL (CXL_START_WORK_AMR | CXL_START_WORK_NUM_IRQS)
Christopher Ferris82d75042015-01-26 10:57:07 -080042#define CXL_MAGIC 0xCA
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define CXL_IOCTL_START_WORK _IOW(CXL_MAGIC, 0x00, struct cxl_ioctl_start_work)
45#define CXL_IOCTL_GET_PROCESS_ELEMENT _IOR(CXL_MAGIC, 0x01, __u32)
46#define CXL_READ_MIN_SIZE 0x1000
47enum cxl_event_type {
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080049 CXL_EVENT_RESERVED = 0,
50 CXL_EVENT_AFU_INTERRUPT = 1,
51 CXL_EVENT_DATA_STORAGE = 2,
52 CXL_EVENT_AFU_ERROR = 3,
Christopher Ferris82d75042015-01-26 10:57:07 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54};
55struct cxl_event_header {
Tao Baod7db5942015-01-28 10:07:51 -080056 __u16 type;
57 __u16 size;
Christopher Ferris82d75042015-01-26 10:57:07 -080058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080059 __u16 process_element;
60 __u16 reserved1;
Christopher Ferris82d75042015-01-26 10:57:07 -080061};
62struct cxl_event_afu_interrupt {
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080064 __u16 flags;
65 __u16 irq;
66 __u32 reserved1;
Christopher Ferris82d75042015-01-26 10:57:07 -080067};
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69struct cxl_event_data_storage {
Tao Baod7db5942015-01-28 10:07:51 -080070 __u16 flags;
71 __u16 reserved1;
72 __u32 reserved2;
Christopher Ferris82d75042015-01-26 10:57:07 -080073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074 __u64 addr;
75 __u64 dsisr;
76 __u64 reserved3;
Christopher Ferris82d75042015-01-26 10:57:07 -080077};
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79struct cxl_event_afu_error {
Tao Baod7db5942015-01-28 10:07:51 -080080 __u16 flags;
81 __u16 reserved1;
82 __u32 reserved2;
Christopher Ferris82d75042015-01-26 10:57:07 -080083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080084 __u64 error;
Christopher Ferris82d75042015-01-26 10:57:07 -080085};
86struct cxl_event {
Tao Baod7db5942015-01-28 10:07:51 -080087 struct cxl_event_header header;
Christopher Ferris82d75042015-01-26 10:57:07 -080088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080089 union {
90 struct cxl_event_afu_interrupt irq;
91 struct cxl_event_data_storage fault;
92 struct cxl_event_afu_error afu_error;
Christopher Ferris82d75042015-01-26 10:57:07 -080093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080094 };
Christopher Ferris82d75042015-01-26 10:57:07 -080095};
96#endif