File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change 8
8
#define _UAPI_CXL_FEATURES_H_
9
9
10
10
#include <linux/types.h>
11
- #ifndef __KERNEL__
12
- #include <uuid/uuid.h>
13
- #else
11
+
12
+ typedef unsigned char __uapi_uuid_t [16 ];
13
+
14
+ #ifdef __KERNEL__
14
15
#include <linux/uuid.h>
16
+ /*
17
+ * Note, __uapi_uuid_t is 1-byte aligned on modern compilers and 4-byte
18
+ * aligned on others. Ensure that __uapi_uuid_t in a struct is placed at
19
+ * a 4-byte aligned offset, or the structure is packed, to ensure
20
+ * consistent padding.
21
+ */
22
+ static_assert (sizeof (__uapi_uuid_t ) == sizeof (uuid_t ));
23
+ #define __uapi_uuid_t uuid_t
15
24
#endif
16
25
17
26
/*
@@ -60,7 +69,7 @@ struct cxl_mbox_get_sup_feats_in {
60
69
* Get Supported Features Supported Feature Entry
61
70
*/
62
71
struct cxl_feat_entry {
63
- uuid_t uuid ;
72
+ __uapi_uuid_t uuid ;
64
73
__le16 id ;
65
74
__le16 get_feat_size ;
66
75
__le16 set_feat_size ;
@@ -110,7 +119,7 @@ struct cxl_mbox_get_sup_feats_out {
110
119
* CXL spec r3.2 section 8.2.9.6.2 Table 8-99
111
120
*/
112
121
struct cxl_mbox_get_feat_in {
113
- uuid_t uuid ;
122
+ __uapi_uuid_t uuid ;
114
123
__le16 offset ;
115
124
__le16 count ;
116
125
__u8 selection ;
@@ -143,7 +152,7 @@ enum cxl_get_feat_selection {
143
152
*/
144
153
struct cxl_mbox_set_feat_in {
145
154
__struct_group (cxl_mbox_set_feat_hdr , hdr , /* no attrs */ ,
146
- uuid_t uuid ;
155
+ __uapi_uuid_t uuid ;
147
156
__le32 flags ;
148
157
__le16 offset ;
149
158
__u8 version ;
You can’t perform that action at this time.
0 commit comments