From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754512AbbDJULx (ORCPT ); Fri, 10 Apr 2015 16:11:53 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:51985 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752538AbbDJULv (ORCPT ); Fri, 10 Apr 2015 16:11:51 -0400 From: Arnd Bergmann To: Sebastian Reichel Cc: Kai Vehmanen , Aaro Koskinen , Pavel Machek , linux-kernel@vger.kernel.org Subject: Re: [RFC, PATCH] HSI: cmt_speech: fix timestamp interface Date: Fri, 10 Apr 2015 22:11:43 +0200 Message-ID: <2731231.Ic3nBHVb1n@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20150410133609.GA8029@earth> References: <49891497.PNlYVWnWxN@wuerfel> <20150410133609.GA8029@earth> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:wqqxn30EZ9z6bXlm3SdNhBoW3iwRFaqOerOHwYW9DIMVvvCbsTg cNmx4dDeAS6mgPOyK1ko/CEi2xjrsJ12PbO0iDQkrKHHxJyn3yVA1U+oiYWeE4+oAh7JGdK P7/kVVgwK9cdyoDttkvgIUzU/di/TWcn3W2HIFDWDrD/4i8/Jqfs9Duou2XMiHq2hap2X3K wOR/DsablWRPWOfOkgJdg== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 10 April 2015 15:36:10 Sebastian Reichel wrote: > > > - The layout is incompatible between 32-bit and 64-bit user > > space, because of the size differences in 'struct timespec'. > > This means that the driver can not work when used with 32-bit > > user space on a 64-bit kernel. > > > > - As there are plans to change 32-bit user space to use > > a 64-bit time_t type in the future, it will also be > > incompatible with new 32-bit user space. > > > > As the driver is not yet widely used, now would be a good time > > to change it to just use a 64-bit nanosecond value, which also > > happens to be more efficient. In order to make the layout > > non-ambiguous, we have to also add extra padding so the 64-bit > > value is naturally aligned. > > > > The change requires the respective update to user space tools > > using it. If that is for some reason not possible any more, > > another solution would be to replace the timespec structure > > with two __u32 values to avoid incompatibilities later. > > > > Signed-off-by: Arnd Bergmann > > I think updating to two __u32 values is the better solution here. > While the driver is new in the mainline kernel it has been used > for multiple years downstream in the Maemo/MeeGo/Mer communities > and I would prefer to keep userspace compatibility. Ok. You still need to update that userspace to the new ABI in order to support compiling on 64-bit machines and on future arm32 with 64-bit time_t, but existing binaries will continue to run. Can you (or someone on Cc) prepare a patch for this? Arnd