* [PATCH v2] cxl: Use fixed width predefined types in data structure.
@ 2016-08-05 12:02 Philippe Bergheaud
2016-08-08 14:59 ` Frederic Barrat
2016-08-09 11:26 ` [v2] " Michael Ellerman
0 siblings, 2 replies; 4+ messages in thread
From: Philippe Bergheaud @ 2016-08-05 12:02 UTC (permalink / raw)
To: linuxppc-dev
Cc: David.Laight, mrochs, manoj, ukrishn, mpe, imunsie, fbarrat,
mikey, Philippe Bergheaud
This patch fixes a regression introduced by commit b810253.
It substitutes the type __u8 to u8 in the uapi header cxl.h,
because the latter is not always 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.
This breaks the (young) API that has been merged in v4.8.
Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com>
---
Changes since v1:
Added an explanation for the proposed API change in the log.
Note:
As far as I know, cxlflash is the only known user of the API.
include/uapi/misc/cxl.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/uapi/misc/cxl.h b/include/uapi/misc/cxl.h
index cbae529..180d526 100644
--- a/include/uapi/misc/cxl.h
+++ b/include/uapi/misc/cxl.h
@@ -136,8 +136,8 @@ struct cxl_event_afu_driver_reserved {
*
* Of course the contents will be ABI, but that's up the AFU driver.
*/
- size_t data_size;
- u8 data[];
+ __u32 data_size;
+ __u8 data[];
};
struct cxl_event {
--
2.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] cxl: Use fixed width predefined types in data structure.
2016-08-05 12:02 [PATCH v2] cxl: Use fixed width predefined types in data structure Philippe Bergheaud
@ 2016-08-08 14:59 ` Frederic Barrat
2016-08-09 0:24 ` Michael Ellerman
2016-08-09 11:26 ` [v2] " Michael Ellerman
1 sibling, 1 reply; 4+ messages in thread
From: Frederic Barrat @ 2016-08-08 14:59 UTC (permalink / raw)
To: Philippe Bergheaud, linuxppc-dev
Cc: mikey, mrochs, manoj, ukrishn, imunsie, David.Laight
Le 05/08/2016 à 14:02, Philippe Bergheaud a écrit :
> This patch fixes a regression introduced by commit b810253.
>
> It substitutes the type __u8 to u8 in the uapi header cxl.h,
> because the latter is not always 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.
>
> This breaks the (young) API that has been merged in v4.8.
>
> Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com>
> ---
> Changes since v1:
> Added an explanation for the proposed API change in the log.
>
> Note:
> As far as I know, cxlflash is the only known user of the API.
Yes, ideally, we'd like to change the type of 'data_size' to something
smaller/constant and were expecting it's still doable since the API was
merged to 4.8 and the expected user (cxlflash) hasn't started using the
API yet.
Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Fred
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] cxl: Use fixed width predefined types in data structure.
2016-08-08 14:59 ` Frederic Barrat
@ 2016-08-09 0:24 ` Michael Ellerman
0 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2016-08-09 0:24 UTC (permalink / raw)
To: Frederic Barrat, Philippe Bergheaud, linuxppc-dev
Cc: mikey, mrochs, manoj, ukrishn, imunsie, David.Laight
Frederic Barrat <fbarrat@linux.vnet.ibm.com> writes:
> Le 05/08/2016 =C3=A0 14:02, Philippe Bergheaud a =C3=A9crit :
>> This patch fixes a regression introduced by commit b810253.
>>
>> It substitutes the type __u8 to u8 in the uapi header cxl.h,
>> because the latter is not always 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.
>>
>> This breaks the (young) API that has been merged in v4.8.
>>
>> Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com>
>> ---
>> Changes since v1:
>> Added an explanation for the proposed API change in the log.
>>
>> Note:
>> As far as I know, cxlflash is the only known user of the API.
>
>
> Yes, ideally, we'd like to change the type of 'data_size' to something=20
> smaller/constant and were expecting it's still doable since the API was=20
> merged to 4.8 and the expected user (cxlflash) hasn't started using the=20
> API yet.
Yep that's fine, it just needed to be mentioned in the change log.
We don't guarantee that an ABI merged in -rc1 doesn't change in -rc2.
But we do (in general) guarantee that an ABI in a released kernel (ie.
4.8 final), never changes.
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [v2] cxl: Use fixed width predefined types in data structure.
2016-08-05 12:02 [PATCH v2] cxl: Use fixed width predefined types in data structure Philippe Bergheaud
2016-08-08 14:59 ` Frederic Barrat
@ 2016-08-09 11:26 ` Michael Ellerman
1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2016-08-09 11:26 UTC (permalink / raw)
To: Philippe Bergheaud, linuxppc-dev
Cc: mikey, mrochs, fbarrat, manoj, ukrishn, imunsie,
Philippe Bergheaud, David.Laight
On Fri, 2016-05-08 at 12:02:00 UTC, Philippe Bergheaud wrote:
> This patch fixes a regression introduced by commit b810253.
>
> It substitutes the type __u8 to u8 in the uapi header cxl.h,
> because the latter is not always 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.
>
> This breaks the (young) API that has been merged in v4.8.
>
> Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/cbd74e1bc8129efb9908f130a8
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-08-09 11:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-05 12:02 [PATCH v2] cxl: Use fixed width predefined types in data structure Philippe Bergheaud
2016-08-08 14:59 ` Frederic Barrat
2016-08-09 0:24 ` Michael Ellerman
2016-08-09 11:26 ` [v2] " Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).