Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jun 2017 16:12:57 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320500 - head/sys/compat/freebsd32
Message-ID:  <201706301612.v5UGCv0e096190@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Fri Jun 30 16:12:57 2017
New Revision: 320500
URL: https://svnweb.freebsd.org/changeset/base/320500

Log:
  Amend the layout of kevent32 on powerpc where uint64_t has 8-byte
  alignment.
  
  Reported,tested and assertion updates by:	andreast
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/compat/freebsd32/freebsd32.h
  head/sys/compat/freebsd32/freebsd32_misc.c

Modified: head/sys/compat/freebsd32/freebsd32.h
==============================================================================
--- head/sys/compat/freebsd32/freebsd32.h	Fri Jun 30 16:10:21 2017	(r320499)
+++ head/sys/compat/freebsd32/freebsd32.h	Fri Jun 30 16:12:57 2017	(r320500)
@@ -141,8 +141,14 @@ struct kevent32 {
 	short		filter;		/* filter for event */
 	u_short		flags;
 	u_int		fflags;
+#ifdef __powerpc__
+	uint32_t	pad0;
+#endif
 	int32_t		data1, data2;
 	uint32_t	udata;		/* opaque user data identifier */
+#ifdef __powerpc__
+	uint32_t	pad1;
+#endif
 	uint32_t	ext64[8];
 };
 

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_misc.c	Fri Jun 30 16:10:21 2017	(r320499)
+++ head/sys/compat/freebsd32/freebsd32_misc.c	Fri Jun 30 16:12:57 2017	(r320500)
@@ -119,7 +119,11 @@ CTASSERT(sizeof(struct statfs32) == 256);
 CTASSERT(sizeof(struct rusage32) == 72);
 #endif
 CTASSERT(sizeof(struct sigaltstack32) == 12);
+#ifdef __powerpc__
+CTASSERT(sizeof(struct kevent32) == 64);
+#else
 CTASSERT(sizeof(struct kevent32) == 56);
+#endif
 CTASSERT(sizeof(struct iovec32) == 8);
 CTASSERT(sizeof(struct msghdr32) == 28);
 #ifdef __amd64__



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706301612.v5UGCv0e096190>