From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH] drm/tegra: Remove gratuitous pad field Date: Wed, 9 Apr 2014 15:11:29 +0200 Message-ID: <20140409131127.GA24799@ulmo> References: <1397047180-21164-1-git-send-email-thierry.reding@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1401324920==" Return-path: Received: from mail-bk0-f50.google.com (mail-bk0-f50.google.com [209.85.214.50]) by gabe.freedesktop.org (Postfix) with ESMTP id 0B2C66E01F for ; Wed, 9 Apr 2014 06:12:24 -0700 (PDT) Received: by mail-bk0-f50.google.com with SMTP id w10so2233602bkz.37 for ; Wed, 09 Apr 2014 06:12:24 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter Cc: Terje =?utf-8?Q?Bergstr=C3=B6m?= , dri-devel List-Id: dri-devel@lists.freedesktop.org --===============1401324920== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 09, 2014 at 02:44:42PM +0200, Daniel Vetter wrote: > cc: stable to make sure that even once you release userspace you won't > get angry bug reports? Yes, good point. I was just pondering whether doing that would be smart or not. But I came to the same conclusion. Thierry > -Daniel >=20 > On Wed, Apr 9, 2014 at 2:39 PM, Thierry Reding = wrote: > > From: Thierry Reding > > > > The version of the drm_tegra_submit structure that was merged all the > > way back in 3.10 contains a pad field that was originally intended to > > properly pad the following __u64 field. Unfortunately it seems like a > > different field was dropped during review that caused this padding to > > become unnecessary, but the pad field wasn't removed at that time. > > > > One possible side-effect of this is that since the __u64 following the > > pad is now no longer properly aligned, the compiler may (or may not) > > introduce padding itself, which results in no predictable ABI. > > > > Rectify this by removing the pad field so that all fields are again > > naturally aligned. Technically this is breaking existing userspace ABI, > > but given that there aren't any (released) userspace drivers that make > > use of this yet, the fallout should be minimal. > > > > Signed-off-by: Thierry Reding > > --- > > include/uapi/drm/tegra_drm.h | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/include/uapi/drm/tegra_drm.h b/include/uapi/drm/tegra_drm.h > > index b042b48495d9..b75482112428 100644 > > --- a/include/uapi/drm/tegra_drm.h > > +++ b/include/uapi/drm/tegra_drm.h > > @@ -120,7 +120,6 @@ struct drm_tegra_submit { > > __u32 num_waitchks; > > __u32 waitchk_mask; > > __u32 timeout; > > - __u32 pad; > > __u64 syncpts; > > __u64 cmdbufs; > > __u64 relocs; > > -- > > 1.9.1 > > > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/dri-devel >=20 >=20 >=20 > --=20 > Daniel Vetter > Software Engineer, Intel Corporation > +41 (0) 79 365 57 48 - http://blog.ffwll.ch --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJTRUb/AAoJEN0jrNd/PrOhTW8P/i2FMRLBAcMP9hBVfikPxSag C2ybW7g382RMNcVif43GP1hnTUm5QNMiVuwBNqwJYGPypCtfuE/+2mOxEDkvjx2b jqs5LeuLvK/lmvWIMdQJRQeOmSq6gki6OIzvWj+VhqBwhfE9h64mgjGtxIcfE/aj OT9Ag7JZ0SKGQyIWShxTf+HAw3BIOrQai7jL5wuIEGKYwSNv9mvMsZLZOd9AF91V EI66YcDjgu5TwFqLFz2XQfdyLYXuX+qNJmPzjgBcnyPhS/D0GWEggmL6mV3dr7MF bYQOj+ZGEGzHwHlZ6aZW43aoSj+p5flB9Iq9DnuWRRjR5L9xMYs9K75cVgUgtgBJ LZiOo8nEKuYEaxMebTjbwamsVzvwfK1xZPxiizI7XPf5QKCvZtnSzlCHYcgDU1it Szr5K3pZOBWHW8K2NQ3tNTm6+aKM2ooHz+cinl9q1OpvynzwJsgKvZzU1TLdEjvm LXGe4Mg4xri3mtCMMaZmxTYFQvyJz95sBtiPgXy2jGtuKtT4hF1V6pK0Szgsd6Sh 3flYctqyoXpwVBMaT2uI4YuajoSzAFlFXweXnfylaiJOnGMUM0RQPZ3ZdsqesTKN uaxkluixsvtP9qINmDrNiSFP5q8xeCC/unej5dPcCXaePpNVp4paUYLG0I8WlnWm ZcpNwYdk9X0h6h5a1apg =VT24 -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU-- --===============1401324920== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1401324920==--