staging: vchiq_arm: Add compatibility wrappers for ioctls 71/158771/2 accepted/tizen/unified/20171106.073114 submit/tizen/20171103.092224
authorMichael Zoran <mzoran@crowfest.net>
Wed, 8 Mar 2017 03:23:35 +0000 (19:23 -0800)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 3 Nov 2017 05:37:06 +0000 (05:37 +0000)
commit4e22f82d4f3317054c806ea7c0fa91436cc59c54
treec59d077fd94b6e83bfc4dc0c0a25f4484507febb
parent0cae6a98dd3f46e6ae9358007c0514be0fa962b0
staging: vchiq_arm: Add compatibility wrappers for ioctls

This patch adds compatibility wrappers for the ioctls
exposed by vchiq/vc04_services.  The compat ioctls are
completely implemented on top of the native ioctls.  No
existing lines are modified.

While the ideal approach would be to cleanup the existing
code, this path is simplier and easier to review. While
it does have a small runtime performance penality vs
seperating the existing code into wrapper+worker functions,
the penality is small since only the metadata is copied
back onto the 32 bit user mode stack.

The on top of approach is the approach used by several
existing performance critical subsystems of Linux such
as the DRM 3D graphics subsystem.

Testing:

1. A 32 bit chroot was created on a RPI 3 and vchiq_test
was built for armhf.  The usual tests were run such as
vchiq_test -f 10 and vchiq_test -p.

2. This patch was copied onto the shipping version of
the Linux kernel used for the RPI and that kernel was
built for arm64. That kernel was used to boot Raspbian.
Many of the builtin features are now functional such
as the "hello_pi" examples, and minecraft_pi.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[lhs: cherry-pick from mainline commit 5569a1260933 to fix 32bit user issue]
Signed-off-by: Hackseung Lee <lhs@dignsys.com>
Change-Id: I7e1cb9db9c3e47bd72a3cccf57db6c9c92e8aa1e
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c