Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/misc
File: cxl.h
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* Copyright 2014 IBM Corp.
[2] Fix | Delete
*
[3] Fix | Delete
* This program is free software; you can redistribute it and/or
[4] Fix | Delete
* modify it under the terms of the GNU General Public License
[5] Fix | Delete
* as published by the Free Software Foundation; either version
[6] Fix | Delete
* 2 of the License, or (at your option) any later version.
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
#ifndef _MISC_CXL_H
[10] Fix | Delete
#define _MISC_CXL_H
[11] Fix | Delete
[12] Fix | Delete
#include <linux/types.h>
[13] Fix | Delete
#include <linux/ioctl.h>
[14] Fix | Delete
[15] Fix | Delete
[16] Fix | Delete
struct cxl_ioctl_start_work {
[17] Fix | Delete
__u64 flags;
[18] Fix | Delete
__u64 work_element_descriptor;
[19] Fix | Delete
__u64 amr;
[20] Fix | Delete
__s16 num_interrupts;
[21] Fix | Delete
__u16 tid;
[22] Fix | Delete
__s32 reserved1;
[23] Fix | Delete
__u64 reserved2;
[24] Fix | Delete
__u64 reserved3;
[25] Fix | Delete
__u64 reserved4;
[26] Fix | Delete
__u64 reserved5;
[27] Fix | Delete
};
[28] Fix | Delete
[29] Fix | Delete
#define CXL_START_WORK_AMR 0x0000000000000001ULL
[30] Fix | Delete
#define CXL_START_WORK_NUM_IRQS 0x0000000000000002ULL
[31] Fix | Delete
#define CXL_START_WORK_ERR_FF 0x0000000000000004ULL
[32] Fix | Delete
#define CXL_START_WORK_TID 0x0000000000000008ULL
[33] Fix | Delete
#define CXL_START_WORK_ALL (CXL_START_WORK_AMR |\
[34] Fix | Delete
CXL_START_WORK_NUM_IRQS |\
[35] Fix | Delete
CXL_START_WORK_ERR_FF |\
[36] Fix | Delete
CXL_START_WORK_TID)
[37] Fix | Delete
[38] Fix | Delete
[39] Fix | Delete
/* Possible modes that an afu can be in */
[40] Fix | Delete
#define CXL_MODE_DEDICATED 0x1
[41] Fix | Delete
#define CXL_MODE_DIRECTED 0x2
[42] Fix | Delete
[43] Fix | Delete
/* possible flags for the cxl_afu_id flags field */
[44] Fix | Delete
#define CXL_AFUID_FLAG_SLAVE 0x1 /* In directed-mode afu is in slave mode */
[45] Fix | Delete
[46] Fix | Delete
struct cxl_afu_id {
[47] Fix | Delete
__u64 flags; /* One of CXL_AFUID_FLAG_X */
[48] Fix | Delete
__u32 card_id;
[49] Fix | Delete
__u32 afu_offset;
[50] Fix | Delete
__u32 afu_mode; /* one of the CXL_MODE_X */
[51] Fix | Delete
__u32 reserved1;
[52] Fix | Delete
__u64 reserved2;
[53] Fix | Delete
__u64 reserved3;
[54] Fix | Delete
__u64 reserved4;
[55] Fix | Delete
__u64 reserved5;
[56] Fix | Delete
__u64 reserved6;
[57] Fix | Delete
};
[58] Fix | Delete
[59] Fix | Delete
/* base adapter image header is included in the image */
[60] Fix | Delete
#define CXL_AI_NEED_HEADER 0x0000000000000001ULL
[61] Fix | Delete
#define CXL_AI_ALL CXL_AI_NEED_HEADER
[62] Fix | Delete
[63] Fix | Delete
#define CXL_AI_HEADER_SIZE 128
[64] Fix | Delete
#define CXL_AI_BUFFER_SIZE 4096
[65] Fix | Delete
#define CXL_AI_MAX_ENTRIES 256
[66] Fix | Delete
#define CXL_AI_MAX_CHUNK_SIZE (CXL_AI_BUFFER_SIZE * CXL_AI_MAX_ENTRIES)
[67] Fix | Delete
[68] Fix | Delete
struct cxl_adapter_image {
[69] Fix | Delete
__u64 flags;
[70] Fix | Delete
__u64 data;
[71] Fix | Delete
__u64 len_data;
[72] Fix | Delete
__u64 len_image;
[73] Fix | Delete
__u64 reserved1;
[74] Fix | Delete
__u64 reserved2;
[75] Fix | Delete
__u64 reserved3;
[76] Fix | Delete
__u64 reserved4;
[77] Fix | Delete
};
[78] Fix | Delete
[79] Fix | Delete
/* ioctl numbers */
[80] Fix | Delete
#define CXL_MAGIC 0xCA
[81] Fix | Delete
/* AFU devices */
[82] Fix | Delete
#define CXL_IOCTL_START_WORK _IOW(CXL_MAGIC, 0x00, struct cxl_ioctl_start_work)
[83] Fix | Delete
#define CXL_IOCTL_GET_PROCESS_ELEMENT _IOR(CXL_MAGIC, 0x01, __u32)
[84] Fix | Delete
#define CXL_IOCTL_GET_AFU_ID _IOR(CXL_MAGIC, 0x02, struct cxl_afu_id)
[85] Fix | Delete
/* adapter devices */
[86] Fix | Delete
#define CXL_IOCTL_DOWNLOAD_IMAGE _IOW(CXL_MAGIC, 0x0A, struct cxl_adapter_image)
[87] Fix | Delete
#define CXL_IOCTL_VALIDATE_IMAGE _IOW(CXL_MAGIC, 0x0B, struct cxl_adapter_image)
[88] Fix | Delete
[89] Fix | Delete
#define CXL_READ_MIN_SIZE 0x1000 /* 4K */
[90] Fix | Delete
[91] Fix | Delete
/* Events from read() */
[92] Fix | Delete
enum cxl_event_type {
[93] Fix | Delete
CXL_EVENT_RESERVED = 0,
[94] Fix | Delete
CXL_EVENT_AFU_INTERRUPT = 1,
[95] Fix | Delete
CXL_EVENT_DATA_STORAGE = 2,
[96] Fix | Delete
CXL_EVENT_AFU_ERROR = 3,
[97] Fix | Delete
CXL_EVENT_AFU_DRIVER = 4,
[98] Fix | Delete
};
[99] Fix | Delete
[100] Fix | Delete
struct cxl_event_header {
[101] Fix | Delete
__u16 type;
[102] Fix | Delete
__u16 size;
[103] Fix | Delete
__u16 process_element;
[104] Fix | Delete
__u16 reserved1;
[105] Fix | Delete
};
[106] Fix | Delete
[107] Fix | Delete
struct cxl_event_afu_interrupt {
[108] Fix | Delete
__u16 flags;
[109] Fix | Delete
__u16 irq; /* Raised AFU interrupt number */
[110] Fix | Delete
__u32 reserved1;
[111] Fix | Delete
};
[112] Fix | Delete
[113] Fix | Delete
struct cxl_event_data_storage {
[114] Fix | Delete
__u16 flags;
[115] Fix | Delete
__u16 reserved1;
[116] Fix | Delete
__u32 reserved2;
[117] Fix | Delete
__u64 addr;
[118] Fix | Delete
__u64 dsisr;
[119] Fix | Delete
__u64 reserved3;
[120] Fix | Delete
};
[121] Fix | Delete
[122] Fix | Delete
struct cxl_event_afu_error {
[123] Fix | Delete
__u16 flags;
[124] Fix | Delete
__u16 reserved1;
[125] Fix | Delete
__u32 reserved2;
[126] Fix | Delete
__u64 error;
[127] Fix | Delete
};
[128] Fix | Delete
[129] Fix | Delete
struct cxl_event_afu_driver_reserved {
[130] Fix | Delete
/*
[131] Fix | Delete
* Defines the buffer passed to the cxl driver by the AFU driver.
[132] Fix | Delete
*
[133] Fix | Delete
* This is not ABI since the event header.size passed to the user for
[134] Fix | Delete
* existing events is set in the read call to sizeof(cxl_event_header)
[135] Fix | Delete
* + sizeof(whatever event is being dispatched) and the user is already
[136] Fix | Delete
* required to use a 4K buffer on the read call.
[137] Fix | Delete
*
[138] Fix | Delete
* Of course the contents will be ABI, but that's up the AFU driver.
[139] Fix | Delete
*/
[140] Fix | Delete
__u32 data_size;
[141] Fix | Delete
__u8 data[];
[142] Fix | Delete
};
[143] Fix | Delete
[144] Fix | Delete
struct cxl_event {
[145] Fix | Delete
struct cxl_event_header header;
[146] Fix | Delete
union {
[147] Fix | Delete
struct cxl_event_afu_interrupt irq;
[148] Fix | Delete
struct cxl_event_data_storage fault;
[149] Fix | Delete
struct cxl_event_afu_error afu_error;
[150] Fix | Delete
struct cxl_event_afu_driver_reserved afu_driver_event;
[151] Fix | Delete
};
[152] Fix | Delete
};
[153] Fix | Delete
[154] Fix | Delete
#endif /* _MISC_CXL_H */
[155] Fix | Delete
[156] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function