Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3740035imu; Fri, 30 Nov 2018 05:23:24 -0800 (PST) X-Google-Smtp-Source: AFSGD/V6wFWML2HL2imj55ZSpXqK2e6bYNDJY/KUPULuTXx6Z3NOg2Kp/NLm1o0hEpz8qAcQJVjB X-Received: by 2002:a63:f047:: with SMTP id s7mr4810968pgj.441.1543584204737; Fri, 30 Nov 2018 05:23:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543584204; cv=none; d=google.com; s=arc-20160816; b=qWMUOnuXjHcQNsZiA8rkIEt9CqWQuZKb6tXe9D/skjniZy6givfDw9rWfKkST1DL7e CyjDf1FtvVw1HSan9J4+QzRoGe5doFt/FL2/EJoEe6Zt5DAj1AsESPv2sfuxMUhmkOCA yEKEDXfR/GDIYl7JokgnWt+hjoiCGIH41nmaE6n5aHHSIpjpXc4Mt1rU3Q8/8cIoTap8 ISmJoa9mQGThxU1CJvC8bOLnnH+nvBe8xUf1rb0A3oDPR1OexEpsxws+g3AyPj2DIbB0 Q+7w4+25v9xODIHVV4Wf48o2Oef0MM3NTLwpLIZQQTPN+xqQUrV+Y5Dg4ktXWIvVm7uz xOog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=hii4n1E6S/MF9SivjoI8WUmkMeANsv0F7OC+UYYEM00=; b=QCGUcorwHwHLWGshEbqja7xE41ZLtfSaArqM0+fimsZWqpxn0mvjBHcQBAHapGhmQp 8VSm4wBSPjVsVa3sIqbHSI4hD1Hr4/c3/uWr9fxkCB7S+wYZi5dPRXZaWej0pzCLmCNP OrFEIerihxh2he1DSp3XP1Kw/vN6nem6X5knfgN9XDQ6TALZJYfktMq5k2Zbk8AcaQLV 6cyCFKdQHXE5S5rdzYCq735TXk4uOAyA5MWIjQfYkcbyNEqBbBvKnwsSFYF4z7ARqIWk CXb3bYNjgvwVfIUOvJ6AjKNvGPU30mWdlfEK1pQZ+xlsay3ljLCboEoJ9eOS0eH6mcO8 nidQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="SHRNoSP/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f11si5325488plt.133.2018.11.30.05.23.10; Fri, 30 Nov 2018 05:23:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="SHRNoSP/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726989AbeLAAaR (ORCPT + 99 others); Fri, 30 Nov 2018 19:30:17 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:36616 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726070AbeLAAaR (ORCPT ); Fri, 30 Nov 2018 19:30:17 -0500 Received: by mail-wr1-f68.google.com with SMTP id u3so5271029wrs.3 for ; Fri, 30 Nov 2018 05:20:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=hii4n1E6S/MF9SivjoI8WUmkMeANsv0F7OC+UYYEM00=; b=SHRNoSP/ZGeICILnyHd+3j9nnwOfRsb9VHSqLUlXpUEpt8d+2EcTQXX111un46V5us OzfJMDspDZKry22bIEltdVa9Lcl/dyIER8H4DHGkWlzTmCBboVdS8uJ7VEIDqeY/BrEi cds0w9yPhwb68+nMWokw4kp0WcyFwdFGoP8pg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hii4n1E6S/MF9SivjoI8WUmkMeANsv0F7OC+UYYEM00=; b=JPS4rFupnNKfUwyWcNj7z5C01Ey1nPUJyxO1lJ65rQSZyunTZwj9J1m0qMSa8BKvhQ NmK2QTFRsW4+RsB7JJNTPn7swh6dRKVDvqlSMpBDhJWb22OE0DVopPfRObdlTGc6onQE OWE147zuytH6bIUDDHQp3rFv8tUsnRfMEpE0+3csc+MwpjOV43HN0AabVEiUkptAAONQ 0HUO0KBIvD2zTB7kDB0ojTpDXIOU9ou5WXifLab3TfUpdM7hrWp7osC7MHz7wbj4TKHs oWWmzqrcyxp0b283SswJSQAgDpXywc1m1cO0+3e4qhdVHAyXA5DkfCgJ6s6hPzeX/Q5X Lm1w== X-Gm-Message-State: AA+aEWa0/J7VSgXF/tNeeFsstuONQqy+Eet3lr0YVvHJ7nCn85ms3nTV uRJNG7OfP2AdpgK3ZiN7RU+ZVw== X-Received: by 2002:a05:6000:100f:: with SMTP id a15mr5145011wrx.298.1543584058606; Fri, 30 Nov 2018 05:20:58 -0800 (PST) Received: from ?IPv6:2a01:e35:8a7e:4790:488f:ca49:e154:1ce0? ([2a01:e35:8a7e:4790:488f:ca49:e154:1ce0]) by smtp.gmail.com with ESMTPSA id q3sm4281843wrn.84.2018.11.30.05.20.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 05:20:57 -0800 (PST) Subject: Re: [RFC PATCH 6/6] char: fastrpc: Add support for compat ioctls To: Arnd Bergmann , Srinivas Kandagatla Cc: Rob Herring , gregkh , Mark Rutland , DTML , Linux Kernel Mailing List , Bjorn Andersson , linux-arm-msm@vger.kernel.org, bkumar@qti.qualcomm.com References: <20181130104657.14875-1-srinivas.kandagatla@linaro.org> <20181130104657.14875-7-srinivas.kandagatla@linaro.org> From: Thierry Escande Message-ID: <2dbd06c5-d094-6d16-2983-131d3ae24c8d@linaro.org> Date: Fri, 30 Nov 2018 14:20:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, 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. Unless I'm missing something here this also has the advantage not to be compiled if CONFIG_COMPAT is not set. Regards, Thierry