From e89d9fc608d3c8a1cf21174a713d2ff7e88e7e00 Mon Sep 17 00:00:00 2001 From: JP Abgrall Date: Fri, 22 Nov 2013 17:29:57 -0800 Subject: [PATCH 1/6] android: configs: require TCPMSS, remove SCHED_TRACER and TIMER_STATS TCPMSS is required for the Android Vpn service to correctly handle the MTU on tun/ppp devices. Bug: 11579326 We don't really need SCHED_TRACER and the TIMER_STATS. Change-Id: I10c5767a6324a496713752d4fe9eff361dc8e06a (cherry picked from commit 23f01e8e81f3c53985958fa291b39c84293ad047) --- android/configs/android-base.cfg | 1 + android/configs/android-recommended.cfg | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/android/configs/android-base.cfg b/android/configs/android-base.cfg index 25162024f889..a9597658ef14 100644 --- a/android/configs/android-base.cfg +++ b/android/configs/android-base.cfg @@ -85,6 +85,7 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=y CONFIG_NETFILTER_XT_TARGET_MARK=y CONFIG_NETFILTER_XT_TARGET_NFLOG=y CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y +CONFIG_NETFILTER_XT_TARGET_TCPMSS=y CONFIG_NETFILTER_XT_TARGET_TPROXY=y CONFIG_NETFILTER_XT_TARGET_TRACE=y CONFIG_NET_CLS_ACT=y diff --git a/android/configs/android-recommended.cfg b/android/configs/android-recommended.cfg index b0120f678cc4..1bd9f6f4b959 100644 --- a/android/configs/android-recommended.cfg +++ b/android/configs/android-recommended.cfg @@ -95,7 +95,6 @@ CONFIG_PM_RUNTIME=y CONFIG_PM_WAKELOCKS_LIMIT=0 CONFIG_POWER_SUPPLY=y CONFIG_SCHEDSTATS=y -CONFIG_SCHED_TRACER=y CONFIG_SMARTJOYPLUS_FF=y CONFIG_SND=y CONFIG_SOUND=y @@ -106,7 +105,6 @@ CONFIG_TABLET_USB_GTCO=y CONFIG_TABLET_USB_HANWANG=y CONFIG_TABLET_USB_KBTAB=y CONFIG_TABLET_USB_WACOM=y -CONFIG_TIMER_STATS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y CONFIG_UHID=y From a8694287f5cbd0585ac653924a4459d3f1aa5b29 Mon Sep 17 00:00:00 2001 From: Greg Hackmann Date: Fri, 13 Dec 2013 13:02:31 -0800 Subject: [PATCH 2/6] timerfd: support CLOCK_BOOTTIME clock Add CLOCK_BOOTTIME support to timerfd Change-Id: I14dee6d1104f15a05f463a632268ac4564753faf Signed-off-by: Greg Hackmann --- fs/timerfd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/timerfd.c b/fs/timerfd.c index 929312180dd0..0013142c0475 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c @@ -317,6 +317,7 @@ SYSCALL_DEFINE2(timerfd_create, int, clockid, int, flags) (clockid != CLOCK_MONOTONIC && clockid != CLOCK_REALTIME && clockid != CLOCK_REALTIME_ALARM && + clockid != CLOCK_BOOTTIME && clockid != CLOCK_BOOTTIME_ALARM)) return -EINVAL; From f2b94c52648fa1bb7cba053ab0f4a85e066485a1 Mon Sep 17 00:00:00 2001 From: John Stultz Date: Sat, 14 Dec 2013 12:06:45 -0800 Subject: [PATCH 3/6] ion: Don't allow building ION as a module. ION doesn't export the proper symbols for it to be a module. This causes build issues when ION is configured as a module. Since Andorid kernels rarely use modules (I think recent policy requires no modules?), go ahead and set the ION config to a bool from the tristate option. If folks decide ION as a module is important, we will have to go through and export the various needed symbols. Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman --- drivers/staging/android/ion/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/Kconfig b/drivers/staging/android/ion/Kconfig index a342d96ee4f0..b95281eef2aa 100644 --- a/drivers/staging/android/ion/Kconfig +++ b/drivers/staging/android/ion/Kconfig @@ -1,5 +1,5 @@ menuconfig ION - tristate "Ion Memory Manager" + bool "Ion Memory Manager" select GENERIC_ALLOCATOR select DMA_SHARED_BUFFER ---help--- From 8d9bc1404990afcc1fa73f1412f2b653fc3ecd31 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 16 Dec 2013 16:33:00 -0800 Subject: [PATCH 4/6] ion: remove ion_user_handle_t from ion_test.h ion_test.h should not define ion_user_handle_t, and defining it causes a warning: In file included from drivers/staging/android/ion/ion_test.c:31: drivers/staging/android/ion/../uapi/ion_test.h:23: error: redefinition of typedef 'ion_user_handle_t' drivers/staging/android/ion/../uapi/ion.h:23: note: previous declaration of 'ion_user_handle_t' was here Change-Id: I541897745a5ff128790a7e51b23f3034f5d3d6d9 Reported-by: Andrew Morton Signed-off-by: Colin Cross --- drivers/staging/android/uapi/ion_test.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/android/uapi/ion_test.h b/drivers/staging/android/uapi/ion_test.h index 352379a02690..614d1e36f72c 100644 --- a/drivers/staging/android/uapi/ion_test.h +++ b/drivers/staging/android/uapi/ion_test.h @@ -20,8 +20,6 @@ #include #include -typedef int ion_user_handle_t; - /** * struct ion_test_rw_data - metadata passed to the kernel to read handle * @ptr: a pointer to an area at least as large as size From e513299f8dc0a79e6e3f5ee79615426edaf086b9 Mon Sep 17 00:00:00 2001 From: John Stultz Date: Thu, 12 Dec 2013 19:09:47 -0800 Subject: [PATCH 5/6] ion: Fix build warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add #include to fix the following warning seen with gcc 4.7.3: In file included from drivers/staging/android/ion/ion_heap.c:26:0: drivers/staging/android/ion/ion_priv.h:358:21: warning: ‘struct device’ declared inside parameter list [enabled by default] drivers/staging/android/ion/ion_priv.h:358:21: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] Change-Id: Icc249b32d877a5b76b1669c99bef2b05d9e322da Signed-off-by: John Stultz --- drivers/staging/android/ion/ion_priv.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/android/ion/ion_priv.h b/drivers/staging/android/ion/ion_priv.h index 19691c0d24c7..ac625b115057 100644 --- a/drivers/staging/android/ion/ion_priv.h +++ b/drivers/staging/android/ion/ion_priv.h @@ -17,6 +17,7 @@ #ifndef _ION_PRIV_H #define _ION_PRIV_H +#include #include #include #include From a1eabac6e216f8ecee7668ad4468990e465392ba Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Fri, 4 Oct 2013 10:59:57 -0700 Subject: [PATCH 6/6] gpiolib: safer implementation of desc_to_gpio() The current implementation of desc_to_gpio() relies on the chip pointer to be set to a valid value in order to compute the GPIO number. This was done in the hope that we can get rid of the gpio_desc global array, but this is not happening anytime soon. This patch reimplements desc_to_gpio() in a fashion similar to that of gpio_to_desc(). As a result, desc_to_gpio(gpio_to_desc(gpio)) == gpio is now always true. This allows to call desc_to_gpio() on non-initialized descriptors as some error-handling code currently does. Signed-off-by: Alexandre Courbot Reported-by: Dr. H. Nikolaus Schaller Signed-off-by: Linus Walleij --- drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index c2534d62911c..4aff349386d8 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -136,7 +136,7 @@ static struct gpio_desc *gpio_to_desc(unsigned gpio) */ static int desc_to_gpio(const struct gpio_desc *desc) { - return desc->chip->base + gpio_chip_hwgpio(desc); + return desc - &gpio_desc[0]; }