From patchwork Thu Dec 19 22:40:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 22658 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 52D0A23FC4 for ; Thu, 19 Dec 2013 22:40:37 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id m1sf7276096oag.1 for ; Thu, 19 Dec 2013 14:40:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=sIP66+KnUSSH+VU9OSEZ+D5eN/1ZClI/TSrG7MmhxBg=; b=eRCXYUuLGlqBKSrtDnPAQ0abt/E68/AJ5Zq6KWGrEUSkrx3HquUj+pKGUrX7HFfhnI VpP52KThQ4jHIJ29WAaZy1n0iNcmmjAv84hYEhwwdCoWgzfXCBxbxZLQvGI0H/xza3VM 6y5wEaX+PiBqoJHGQ2EspR0E5pRyip0DhYkt4I/I2RGio00zG9M7BKVDxkCECI1ee068 A1ong9koSz3ggsqEligXAhprxaa/PaasVG+xSPJah4lpAdmz6DjGaOmdEwKsR/xADmr+ 3RB7XL4y9RgNjxZUBv06QKqnW8ywEUmC4TQG6kanxtUOgvu+wyBmyuhcclybvrTc8yWe lHmA== X-Gm-Message-State: ALoCoQkEuQi6DXTdgPyvWnGuOP9gTsd2qhd85oQvObPNJGxIixPxGEuMFIhemY6K3TS5TuYkTrxF X-Received: by 10.182.87.225 with SMTP id bb1mr1974901obb.16.1387492836899; Thu, 19 Dec 2013 14:40:36 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.94.81 with SMTP id da17ls526992qeb.22.gmail; Thu, 19 Dec 2013 14:40:36 -0800 (PST) X-Received: by 10.58.100.244 with SMTP id fb20mr2716158veb.6.1387492836767; Thu, 19 Dec 2013 14:40:36 -0800 (PST) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id a6si994517vdp.130.2013.12.19.14.40.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Dec 2013 14:40:36 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id jx11so1018308veb.6 for ; Thu, 19 Dec 2013 14:40:36 -0800 (PST) X-Received: by 10.52.171.79 with SMTP id as15mr2302758vdc.1.1387492836611; Thu, 19 Dec 2013 14:40:36 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp19123ved; Thu, 19 Dec 2013 14:40:36 -0800 (PST) X-Received: by 10.68.200.129 with SMTP id js1mr4662329pbc.14.1387492835332; Thu, 19 Dec 2013 14:40:35 -0800 (PST) Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com [209.85.192.177]) by mx.google.com with ESMTPS id sa6si3610212pbb.353.2013.12.19.14.40.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Dec 2013 14:40:35 -0800 (PST) Received-SPF: neutral (google.com: 209.85.192.177 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.192.177; Received: by mail-pd0-f177.google.com with SMTP id q10so1690772pdj.8 for ; Thu, 19 Dec 2013 14:40:34 -0800 (PST) X-Received: by 10.68.88.161 with SMTP id bh1mr4528302pbb.49.1387492834736; Thu, 19 Dec 2013 14:40:34 -0800 (PST) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id vh3sm9740307pbc.8.2013.12.19.14.40.33 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Dec 2013 14:40:34 -0800 (PST) From: John Stultz To: LKML Cc: John Stultz , Colin Cross , Greg KH , Android Kernel Team Subject: [PATCH] ion_test: Add compat_ioctl support Date: Thu, 19 Dec 2013 14:40:30 -0800 Message-Id: <1387492830-7988-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Prior to subitting this, Colin reworked the compat_ioctl support for the ion_test driver, moving the structure to be the same size on both 32 and 64 bit architectures. Two small things were left out. The compat_ioctl ptr assignment, and the fact that despite having uniform sized types in the structure, the structure pads out to different sizes on different arches. This patch resolves this issue by setting the write flag as a __u64, and adding the compat_ioctl ptr. While this does affect the ABI for 32bit users, its only the ABI for the ion_test driver, not ion itself. Cc: Colin Cross Cc: Greg KH Cc: Android Kernel Team Signed-off-by: John Stultz --- drivers/staging/android/ion/ion_test.c | 1 + drivers/staging/android/uapi/ion_test.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion_test.c b/drivers/staging/android/ion/ion_test.c index 3e20349..654acb5 100644 --- a/drivers/staging/android/ion/ion_test.c +++ b/drivers/staging/android/ion/ion_test.c @@ -231,6 +231,7 @@ static int ion_test_release(struct inode *inode, struct file *file) static const struct file_operations ion_test_fops = { .owner = THIS_MODULE, .unlocked_ioctl = ion_test_ioctl, + .compat_ioctl = ion_test_ioctl, .open = ion_test_open, .release = ion_test_release, }; diff --git a/drivers/staging/android/uapi/ion_test.h b/drivers/staging/android/uapi/ion_test.h index 614d1e3..f1727f5 100644 --- a/drivers/staging/android/uapi/ion_test.h +++ b/drivers/staging/android/uapi/ion_test.h @@ -31,7 +31,7 @@ struct ion_test_rw_data { __u64 ptr; __u64 offset; __u64 size; - int write; + __u64 write; }; #define ION_IOC_MAGIC 'I'