From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ralf Baechle Subject: Re: [-next Nov 17] s390 build break(arch/s390/kernel/compat_wrapper.S) Date: Wed, 18 Nov 2009 15:49:36 +0100 Message-ID: <20091118144936.GB17146@linux-mips.org> References: <20091117195309.6cc3ead0.sfr@canb.auug.org.au> <4B0291BB.3090005@in.ibm.com> <20091117125201.GB5124@osiris.boeblingen.de.ibm.com> <1258465241.2876.29.camel@dhcp231-106.rdu.redhat.com> <20091117135525.GF5124@osiris.boeblingen.de.ibm.com> <1258471436.2876.34.camel@dhcp231-106.rdu.redhat.com> <20091118070418.GA4392@osiris.boeblingen.de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20091118070418.GA4392@osiris.boeblingen.de.ibm.com> Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org To: Heiko Carstens Cc: Eric Paris , Sachin Sant , linux-s390@vger.kernel.org, Stephen Rothwell , linux-next@vger.kernel.org, linux-mips@linux-mips.org, Andrew Morton , Martin Schwidefsky , linux-arch@vger.kernel.org List-Id: linux-arch.vger.kernel.org On Wed, Nov 18, 2009 at 08:04:18AM +0100, Heiko Carstens wrote: > Please note that other architectures (I think at least arm and powerpc) put > 64 bit values into even/odd register pairs and add padding if the first free > available register is an odd one. So any of the following interfaces should > work for all architectures: > > long sys_fanotify_mark(int fanotify_fd, unsigned int flags, > int fd, const char __user *pathname, > u32 mask_high, u32 mask_low); > > long sys_fanotify_mark(int fanotify_fd, unsigned int flags, > u64 mask, > int fd, const char __user *pathname); > > long sys_fanotify_mark(u64 mask, > int fanotify_fd, unsigned int flags, > int fd, const char __user *pathname); Correct - but the splitting is unnecessary pain for some platforms like 64-bit userland on 64-bit MIPS where the 64-bit argument would be passed in a single register so I have preference for the 2nd or 3rd suggestion. The 1st prototype has the advantage of avoiding the need for a compat wrapper which otherwise would look like: long compat_sys_fanotify_mark(int fanotify_fd, unsigned int flags, u32 a2, u32 a3, int fd, const char __user *pathname); { /* assuming 2nd suggested prototype from above */ return sys_fanotify_mark(fd, flags, merge64(a2, a3), fd, pathname); } I'd prefer to see the compat code carrying the burden. Ralf From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eddie.linux-mips.org ([78.24.191.182]:40262 "EHLO eddie.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757292AbZKROtw (ORCPT ); Wed, 18 Nov 2009 09:49:52 -0500 Received: from localhost.localdomain ([127.0.0.1]:37882 "EHLO h5.dl5rb.org.uk" rhost-flags-OK-OK-OK-FAIL) by ftp.linux-mips.org with ESMTP id S1493515AbZKROtz (ORCPT + 2 others); Wed, 18 Nov 2009 15:49:55 +0100 Date: Wed, 18 Nov 2009 15:49:36 +0100 From: Ralf Baechle Subject: Re: [-next Nov 17] s390 build break(arch/s390/kernel/compat_wrapper.S) Message-ID: <20091118144936.GB17146@linux-mips.org> References: <20091117195309.6cc3ead0.sfr@canb.auug.org.au> <4B0291BB.3090005@in.ibm.com> <20091117125201.GB5124@osiris.boeblingen.de.ibm.com> <1258465241.2876.29.camel@dhcp231-106.rdu.redhat.com> <20091117135525.GF5124@osiris.boeblingen.de.ibm.com> <1258471436.2876.34.camel@dhcp231-106.rdu.redhat.com> <20091118070418.GA4392@osiris.boeblingen.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091118070418.GA4392@osiris.boeblingen.de.ibm.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Heiko Carstens Cc: Eric Paris , Sachin Sant , linux-s390@vger.kernel.org, Stephen Rothwell , linux-next@vger.kernel.org, linux-mips@linux-mips.org, Andrew Morton , Martin Schwidefsky , linux-arch@vger.kernel.org Message-ID: <20091118144936.j0CjEFKx6PdiJoPJjTx6Q3hnZebLK1peKGxrXjVYDFw@z> On Wed, Nov 18, 2009 at 08:04:18AM +0100, Heiko Carstens wrote: > Please note that other architectures (I think at least arm and powerpc) put > 64 bit values into even/odd register pairs and add padding if the first free > available register is an odd one. So any of the following interfaces should > work for all architectures: > > long sys_fanotify_mark(int fanotify_fd, unsigned int flags, > int fd, const char __user *pathname, > u32 mask_high, u32 mask_low); > > long sys_fanotify_mark(int fanotify_fd, unsigned int flags, > u64 mask, > int fd, const char __user *pathname); > > long sys_fanotify_mark(u64 mask, > int fanotify_fd, unsigned int flags, > int fd, const char __user *pathname); Correct - but the splitting is unnecessary pain for some platforms like 64-bit userland on 64-bit MIPS where the 64-bit argument would be passed in a single register so I have preference for the 2nd or 3rd suggestion. The 1st prototype has the advantage of avoiding the need for a compat wrapper which otherwise would look like: long compat_sys_fanotify_mark(int fanotify_fd, unsigned int flags, u32 a2, u32 a3, int fd, const char __user *pathname); { /* assuming 2nd suggested prototype from above */ return sys_fanotify_mark(fd, flags, merge64(a2, a3), fd, pathname); } I'd prefer to see the compat code carrying the burden. Ralf