From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [RFC PATCH 6/6] char: fastrpc: Add support for compat ioctls Date: Fri, 30 Nov 2018 14:46:27 +0100 Message-ID: References: <20181130104657.14875-1-srinivas.kandagatla@linaro.org> <20181130104657.14875-7-srinivas.kandagatla@linaro.org> <2dbd06c5-d094-6d16-2983-131d3ae24c8d@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: <2dbd06c5-d094-6d16-2983-131d3ae24c8d@linaro.org> Sender: linux-kernel-owner@vger.kernel.org To: thierry.escande@linaro.org Cc: Srinivas Kandagatla , Rob Herring , gregkh , Mark Rutland , DTML , Linux Kernel Mailing List , Bjorn Andersson , linux-arm-msm@vger.kernel.org, bkumar@qti.qualcomm.com List-Id: devicetree@vger.kernel.org On Fri, Nov 30, 2018 at 2:20 PM Thierry Escande wrote: > On 30/11/2018 13:58, Arnd Bergmann wrote: > > On Fri, Nov 30, 2018 at 11:48 AM Srinivas Kandagatla > > wrote: > >> > >> From: Thierry Escande > >> > >> This patch adds support for compat ioctl from 32 bits userland to > >> Qualcomm fastrpc driver. > >> > >> Supported ioctls in this change are INIT, INVOKE, and ALLOC/FREE_DMA. > >> > >> Most of the work is derived from various downstream Qualcomm kernels. > >> Credits to various Qualcomm authors who have contributed to this code. > >> Specially Tharun Kumar Merugu > >> > >> Signed-off-by: Thierry Escande > >> Signed-off-by: Srinivas Kandagatla > > > > Can't you just define the native ioctls so that you don't need this. > > There are long time defined structures that are passed as argument to > these ioctls and their sizes vary between 32 and 64 bits userlands, so > the ioctl command values. Where? I don't see them in linux-4.19. > Unless I'm missing something here this also has the advantage not to be > compiled if CONFIG_COMPAT is not set. You can normally just set .compat_ioctl() to the same function as .unlocked_ioctl(), and get no overhead either way. Arnd