diff options
author | Serban Constantinescu <serban.constantinescu@arm.com> | 2013-03-05 15:27:38 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-06 08:49:43 +0800 |
commit | e9f5b8145af9a0ee34e98cf01dcd3afb87225538 (patch) | |
tree | 0456aafcbdd576a443d6dcec4a529d92ef7587fa /drivers/staging/android/ashmem.h | |
parent | 5db5a20a50cfd078c78b13a988f237cca81aedc5 (diff) |
staging: android: ashmem: Add support for 32bit ashmem calls in a 64bit kernel
Android's shared memory subsystem, Ashmem, does not support calls from a
32bit userspace in a 64 bit kernel. This patch adds support for syscalls
coming from a 32bit userspace in a 64bit kernel.
The patch has been successfully tested on ARMv8 AEM(64bit
platform model) and Versatile Express A9(32bit platform).
v2: Fix missing compat.h include.
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
Acked-by: Arve Hjønnevåg <arve@android.com>
Acked-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android/ashmem.h')
-rw-r--r-- | drivers/staging/android/ashmem.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/staging/android/ashmem.h b/drivers/staging/android/ashmem.h index 1976b10ef93e..8dc0f0d3adf3 100644 --- a/drivers/staging/android/ashmem.h +++ b/drivers/staging/android/ashmem.h @@ -14,6 +14,7 @@ #include <linux/limits.h> #include <linux/ioctl.h> +#include <linux/compat.h> #define ASHMEM_NAME_LEN 256 @@ -45,4 +46,10 @@ struct ashmem_pin { #define ASHMEM_GET_PIN_STATUS _IO(__ASHMEMIOC, 9) #define ASHMEM_PURGE_ALL_CACHES _IO(__ASHMEMIOC, 10) +/* support of 32bit userspace on 64bit platforms */ +#ifdef CONFIG_COMPAT +#define COMPAT_ASHMEM_SET_SIZE _IOW(__ASHMEMIOC, 3, compat_size_t) +#define COMPAT_ASHMEM_SET_PROT_MASK _IOW(__ASHMEMIOC, 5, unsigned int) +#endif + #endif /* _LINUX_ASHMEM_H */ |