From 6b20cfbfee20b395eecad65b90100750021c6fbc Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Mon, 6 Aug 2018 17:03:29 +0800 Subject: [PATCH] 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 --- drivers/android/Kconfig | 13 +++++++++++++ drivers/android/binder.c | 4 ++++ 2 files changed, 17 insertions(+) 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 #include +#ifdef CONFIG_ANDROID_BINDER_IPC_32BIT +#define BINDER_IPC_32BIT 1 +#endif + #include #include "binder_alloc.h" #include "binder_trace.h"