From patchwork Tue Feb 21 13:21:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 94275 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp438738qgi; Tue, 21 Feb 2017 05:21:26 -0800 (PST) X-Received: by 10.55.86.134 with SMTP id k128mr23373478qkb.309.1487683286774; Tue, 21 Feb 2017 05:21:26 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id e19si15080347qte.109.2017.02.21.05.21.26; Tue, 21 Feb 2017 05:21:26 -0800 (PST) Received-SPF: pass (google.com: domain of linaro-mm-sig-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-mm-sig-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-mm-sig-bounces@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 5048962D9A; Tue, 21 Feb 2017 13:21:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 5B28060645; Tue, 21 Feb 2017 13:21:22 +0000 (UTC) X-Original-To: linaro-mm-sig@lists.linaro.org Delivered-To: linaro-mm-sig@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id CD1E062D96; Tue, 21 Feb 2017 13:21:19 +0000 (UTC) Received: from mailout3.w1.samsung.com (mailout3.w1.samsung.com [210.118.77.13]) by lists.linaro.org (Postfix) with ESMTPS id 9453F60645 for ; Tue, 21 Feb 2017 13:21:18 +0000 (UTC) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OLQ007LV7RGLC40@mailout3.w1.samsung.com> for linaro-mm-sig@lists.linaro.org; Tue, 21 Feb 2017 13:21:16 +0000 (GMT) Received: from eusmges1.samsung.com (unknown [203.254.199.239]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170221132115eucas1p1c92abbe3a2a7c9054e90f5c1a42671cd~lUA6g81p70723007230eucas1p1Z; Tue, 21 Feb 2017 13:21:15 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1.samsung.com (EUCPMTA) with SMTP id 7B.45.16908.ECE3CA85; Tue, 21 Feb 2017 13:21:18 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170221132114eucas1p2e527d5b5516494ba54aa91f48b3e227f~lUA527rE70314703147eucas1p2U; Tue, 21 Feb 2017 13:21:14 +0000 (GMT) X-AuditID: cbfec7ef-f79d26d00000420c-16-58ac3eceecc2 Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 24.4F.10233.0DE3CA85; Tue, 21 Feb 2017 13:21:20 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OLQ00L507R9OU50@eusync2.samsung.com>; Tue, 21 Feb 2017 13:21:14 +0000 (GMT) From: Marek Szyprowski To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Date: Tue, 21 Feb 2017 14:21:01 +0100 Message-id: <1487683261-2655-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+N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JaYUwrkGRmgAQfn APdgJX27BLeME+uuMRcsYKu4P3M+YwPjdNYuRk4OCQETid+3TzBD2GISF+6tZ+ti5OIQEljC KDFv1gcop4lJ4sb2VWwgVWwChhJdb7vAbBEBB4nTd2cxgxQxC1xklGjccpYdJCEsYCbxd9IK FhCbRUBVYtunDYwgNq+Au8SL3nWMEOvkJE4em8w6gZF7ASPDKkaR1NLi3PTcYiO94sTc4tK8 dL3k/NxNjMDw3Hbs55YdjF3vgg8xCnAwKvHw7vixKkKINbGsuDL3EKMEB7OSCO9bozURQrwp iZVVqUX58UWlOanFhxhNgZZPZJYSTc4Hxk5eSbyhiaG5paGRsYWFuZGRkjjv1A9XwoUE0hNL UrNTUwtSi2D6mDg4pRoYfXKzpi2Tsr74vCH/li2XdxM7/4+3qcLFzi5XmHbO3ba7Svn//NlP WW+arVOJnSw2PeyUQ9ZSzhNdGZuyLwp7GZrkzZ/qKLPZYSWvuyjjrr+31zBKTX63JmR+8q3f ZWbe5Q+FJ66ecWXazA3GCdNuv2FgTvB5c8I5a6ed2NtVDG+fnDjrHLXqghJLcUaioRZzUXEi AOvWCwBlAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170221132114eucas1p2e527d5b5516494ba54aa91f48b3e227f X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1B?= =?utf-8?b?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1BSam?= =?utf-8?q?sung_Electronics=1BSenior_Software_Engineer?= X-Sender-Code: =?utf-8?q?C10=1BEHQ=1BC10CD02CD027392?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170221132114eucas1p2e527d5b5516494ba54aa91f48b3e227f X-RootMTR: 20170221132114eucas1p2e527d5b5516494ba54aa91f48b3e227f References: Cc: linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org, Bartlomiej Zolnierkiewicz Subject: [Linaro-mm-sig] [PATCH] dma-buf: add support for compat ioctl X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "Unified memory management interest group." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-mm-sig-bounces@lists.linaro.org Sender: "Linaro-mm-sig" Add compat ioctl support to dma-buf. This lets one to use DMA_BUF_IOCTL_SYNC ioctl from 32bit application on 64bit kernel. Data structures for both 32 and 64bit modes are same, so there is no need for additional translation layer. Signed-off-by: Marek Szyprowski --- drivers/dma-buf/dma-buf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 718f832a5c71..0007b792827b 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -325,6 +325,9 @@ static long dma_buf_ioctl(struct file *file, .llseek = dma_buf_llseek, .poll = dma_buf_poll, .unlocked_ioctl = dma_buf_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = dma_buf_ioctl, +#endif }; /*