From owner-svn-src-head@freebsd.org Sat Jul 1 22:52:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D00CD9489E; Sat, 1 Jul 2017 22:52:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A68475999; Sat, 1 Jul 2017 22:52:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61MqIoK058349; Sat, 1 Jul 2017 22:52:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61MqIts058346; Sat, 1 Jul 2017 22:52:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707012252.v61MqIts058346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 1 Jul 2017 22:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320558 - head/sys/compat/freebsd32 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/compat/freebsd32 X-SVN-Commit-Revision: 320558 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 22:52:19 -0000 Author: kib Date: Sat Jul 1 22:52:17 2017 New Revision: 320558 URL: https://svnweb.freebsd.org/changeset/base/320558 Log: Port PowerPC kqueue(2) compat32 fix in r320500 to MIPS. All 32bit MIPS ABIs align uint64_t on 8-byte. Since struct kevent32 is defined using 32bit types to avoid extra alignment on amd64/i386, layout of the structure needs paddings on PowerPC and apparently MIPS. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D11434 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 Sat Jul 1 22:21:11 2017 (r320557) +++ head/sys/compat/freebsd32/freebsd32.h Sat Jul 1 22:52:17 2017 (r320558) @@ -141,12 +141,12 @@ struct kevent32 { short filter; /* filter for event */ u_short flags; u_int fflags; -#ifdef __powerpc__ +#ifndef __amd64__ uint32_t pad0; #endif int32_t data1, data2; uint32_t udata; /* opaque user data identifier */ -#ifdef __powerpc__ +#ifndef __amd64__ uint32_t pad1; #endif uint32_t ext64[8]; Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Sat Jul 1 22:21:11 2017 (r320557) +++ head/sys/compat/freebsd32/freebsd32_misc.c Sat Jul 1 22:52:17 2017 (r320558) @@ -119,10 +119,10 @@ CTASSERT(sizeof(struct statfs32) == 256); CTASSERT(sizeof(struct rusage32) == 72); #endif CTASSERT(sizeof(struct sigaltstack32) == 12); -#ifdef __powerpc__ -CTASSERT(sizeof(struct kevent32) == 64); -#else +#ifdef __amd64__ CTASSERT(sizeof(struct kevent32) == 56); +#else +CTASSERT(sizeof(struct kevent32) == 64); #endif CTASSERT(sizeof(struct iovec32) == 8); CTASSERT(sizeof(struct msghdr32) == 28);