linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Philippe Bergheaud <felix@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: David.Laight@ACULAB.COM, mrochs@linux.vnet.ibm.com,
	manoj@linux.vnet.ibm.com, ukrishn@linux.vnet.ibm.com,
	mpe@ellerman.id.au, imunsie@au1.ibm.com,
	fbarrat@linux.vnet.ibm.com, mikey@neuling.org,
	Philippe Bergheaud <felix@linux.vnet.ibm.com>
Subject: [PATCH v2] cxl: Use fixed width predefined types in data structure.
Date: Fri,  5 Aug 2016 14:02:00 +0200	[thread overview]
Message-ID: <1470398520-20463-1-git-send-email-felix@linux.vnet.ibm.com> (raw)

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

             reply	other threads:[~2016-08-05 12:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-05 12:02 Philippe Bergheaud [this message]
2016-08-08 14:59 ` [PATCH v2] cxl: Use fixed width predefined types in data structure Frederic Barrat
2016-08-09  0:24   ` Michael Ellerman
2016-08-09 11:26 ` [v2] " Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1470398520-20463-1-git-send-email-felix@linux.vnet.ibm.com \
    --to=felix@linux.vnet.ibm.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=fbarrat@linux.vnet.ibm.com \
    --cc=imunsie@au1.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=manoj@linux.vnet.ibm.com \
    --cc=mikey@neuling.org \
    --cc=mpe@ellerman.id.au \
    --cc=mrochs@linux.vnet.ibm.com \
    --cc=ukrishn@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).