summaryrefslogtreecommitdiff
path: root/drivers/android
diff options
context:
space:
mode:
authorTao Huang <huangtao@rock-chips.com>2018-08-06 17:03:29 +0800
committerTao Huang <huangtao@rock-chips.com>2018-08-06 18:29:25 +0800
commit6b20cfbfee20b395eecad65b90100750021c6fbc (patch)
tree6ab95a7bbcc6ae368d77cd47ed78f3fbfc7fbab9 /drivers/android
parent97fd046dc230706a2e086bc201ce395b0bf16eb3 (diff)
Revert "UPSTREAM: ANDROID: binder: remove 32-bit binder interface."
This reverts commit 9ffd98e8155c716ae987491626544be016edd83c. Which breaks 32bit Android <9 Make ANDROID_BINDER_IPC_32BIT depends on ANDROID_VERSION. Change-Id: Ie599606ce998b27342471f31d1480d0a87135375 Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Diffstat (limited to 'drivers/android')
-rw-r--r--drivers/android/Kconfig13
-rw-r--r--drivers/android/binder.c4
2 files changed, 17 insertions, 0 deletions
diff --git a/drivers/android/Kconfig b/drivers/android/Kconfig
index 63ed9ceebf7b..7502ac3086c1 100644
--- a/drivers/android/Kconfig
+++ b/drivers/android/Kconfig
@@ -31,6 +31,19 @@ config ANDROID_BINDER_DEVICES
created. Each binder device has its own context manager, and is
therefore logically separated from the other devices.
+config ANDROID_BINDER_IPC_32BIT
+ bool
+ depends on !64BIT && ANDROID_BINDER_IPC
+ default y if ANDROID_VERSION < 0x09000000
+ ---help---
+ The Binder API has been changed to support both 32 and 64bit
+ applications in a mixed environment.
+
+ Enable this to support an old 32-bit Android user-space (v4.4 and
+ earlier).
+
+ Note that enabling this will break newer Android user-space.
+
config ANDROID_BINDER_IPC_SELFTEST
bool "Android Binder IPC Driver Selftest"
depends on ANDROID_BINDER_IPC
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index b0c9d3548123..d1dfbe34fa7c 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -71,6 +71,10 @@
#include <linux/security.h>
#include <linux/spinlock.h>
+#ifdef CONFIG_ANDROID_BINDER_IPC_32BIT
+#define BINDER_IPC_32BIT 1
+#endif
+
#include <uapi/linux/android/binder.h>
#include "binder_alloc.h"
#include "binder_trace.h"