summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorKe Qinghua <qinghua.ke@freescale.com>2014-05-30 13:21:20 +0800
committerKe Qinghua <qinghua.ke@freescale.com>2014-05-30 14:01:16 +0800
commit64b70876fa43a963871056648819e230e1dd74d8 (patch)
treebc65c546123f49fa2edc59c2d2200943d7452ee7 /kernel
parente2da859bbde855d9a53b8d361ed500bd85d71aac (diff)
parent803431de4e1be3133b63cdc4d85d326dcfb606ff (diff)
Merge remote-tracking branch 'remotes/google/android-3.10' into imx_3.10.y_android
Conflicts: arch/arm/common/Kconfig arch/arm/common/Makefile arch/arm/mm/mmu.c drivers/input/Kconfig drivers/input/Makefile drivers/input/evdev.c drivers/input/keyreset.c drivers/input/misc/gpio_event.c drivers/of/fdt.c drivers/staging/android/Kconfig drivers/staging/android/Makefile drivers/staging/android/ion/Kconfig drivers/staging/android/ion/Makefile drivers/staging/android/ion/ion.c drivers/usb/gadget/android.c drivers/usb/phy/Kconfig drivers/usb/phy/Makefile drivers/video/Kconfig drivers/video/adf/adf.c drivers/video/adf/adf_memblock.c include/linux/keyreset.h include/linux/mm_types.h include/linux/wakelock.h include/net/tcp.h include/uapi/linux/prctl.h include/video/adf_fbdev.h kernel/cpu.c kernel/futex.c kernel/power/Kconfig kernel/power/Makefile kernel/power/wakeup_reason.c kernel/sys.c net/ipv4/ping.c net/ipv4/sysctl_net_ipv4.c net/ipv6/ping.c net/ipv6/route.c net/netfilter/xt_IDLETIMER.c
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cpu.c1
-rw-r--r--kernel/power/wakeup_reason.c1
-rw-r--r--kernel/sys.c21
3 files changed, 23 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 6e995438287a..f2d0575f9a33 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -728,6 +728,7 @@ void init_cpu_online(const struct cpumask *src)
}
static ATOMIC_NOTIFIER_HEAD(idle_notifier);
+
void idle_notifier_register(struct notifier_block *n)
{
atomic_notifier_chain_register(&idle_notifier, n);
diff --git a/kernel/power/wakeup_reason.c b/kernel/power/wakeup_reason.c
index 188a6bfacf5a..e2cb498f43ea 100644
--- a/kernel/power/wakeup_reason.c
+++ b/kernel/power/wakeup_reason.c
@@ -53,6 +53,7 @@ static ssize_t reason_show(struct kobject *kobj, struct kobj_attribute *attr,
return buf_offset;
}
+
static struct kobj_attribute resume_reason = __ATTR(last_resume_reason, 0666,
reason_show, NULL);
diff --git a/kernel/sys.c b/kernel/sys.c
index 126b7c939d1f..b87a86036a75 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -45,6 +45,9 @@
#include <linux/mm.h>
#include <linux/mempolicy.h>
+#include <linux/sched.h>
+
+
#include <linux/compat.h>
#include <linux/syscalls.h>
#include <linux/kprobes.h>
@@ -2252,6 +2255,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
unsigned long, arg4, unsigned long, arg5)
{
struct task_struct *me = current;
+ struct task_struct *tsk;
unsigned char comm[sizeof(me->comm)];
long error;
@@ -2375,6 +2379,23 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
else
return -EINVAL;
break;
+ case PR_SET_TIMERSLACK_PID:
+ rcu_read_lock();
+ tsk = find_task_by_pid_ns((pid_t)arg3, &init_pid_ns);
+ if (tsk == NULL) {
+ rcu_read_unlock();
+ return -EINVAL;
+ }
+ get_task_struct(tsk);
+ rcu_read_unlock();
+ if (arg2 <= 0)
+ tsk->timer_slack_ns =
+ tsk->default_timer_slack_ns;
+ else
+ tsk->timer_slack_ns = arg2;
+ put_task_struct(tsk);
+ error = 0;
+ break;
default:
return -EINVAL;
}