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: 9584603 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 83D61600CA for ; Tue, 21 Feb 2017 13:21:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A17128447 for ; Tue, 21 Feb 2017 13:21:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4EEA928696; Tue, 21 Feb 2017 13:21:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DFAB28447 for ; Tue, 21 Feb 2017 13:21:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752835AbdBUNVU (ORCPT ); Tue, 21 Feb 2017 08:21:20 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:8794 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752250AbdBUNVT (ORCPT ); Tue, 21 Feb 2017 08:21:19 -0500 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>; 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 Cc: Marek Szyprowski , Sumit Semwal , linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org, Bartlomiej Zolnierkiewicz Subject: [PATCH] dma-buf: add support for compat ioctl 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+NgFtrNIsWRmVeSWpSXmKPExsWy7djP87rn7NZEGCw4w22xccZ6VosrX9+z WXy58pDJ4vKuOWwWPRu2slqsPXKX3eLU3c/sDuwed67tYfO4332cyeP2v8fMHn1bVjF6fN4k F8AaxWWTkpqTWZZapG+XwJV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sYCbxd9IK 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?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRs=?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRtT?= =?UTF-8?B?YW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170221132114eucas1p2e527d5b5516494ba54aa91f48b3e227f X-RootMTR: 20170221132114eucas1p2e527d5b5516494ba54aa91f48b3e227f References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 }; /*