Skip to content

Commit cbd74e1

Browse files
Philippe Bergheaudmpe
authored andcommitted
cxl: Use fixed width predefined types in data structure.
This patch fixes a regression introduced by commit b810253 ("cxl: Add mechanism for delivering AFU driver specific events"). It changes the type u8 to __u8 in the uapi header cxl.h, because the former is a kernel internal type, and may not be defined in userland build environments, in particular when cross-compiling libcxl on x86_64 linux machines (RHEL6.7 and Ubuntu 16.04). This patch also changes the size of the field data_size, and makes it constant, to support 32-bit userland applications running on big-endian ppc64 kernels transparently. mpe: This is an ABI change, however the ABI was only added during the 4.8 merge window so has never been part of a released kernel - therefore we give ourselves permission to change it. Fixes: b810253 ("cxl: Add mechanism for delivering AFU driver specific events") Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com> Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 546c440 commit cbd74e1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎include/uapi/misc/cxl.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ struct cxl_event_afu_driver_reserved {
136136
*
137137
* Of course the contents will be ABI, but that's up the AFU driver.
138138
*/
139-
size_t data_size;
140-
u8 data[];
139+
__u32 data_size;
140+
__u8 data[];
141141
};
142142

143143
struct cxl_event {

0 commit comments

Comments
 (0)