diff options
author | Krzysztof Adamski <k@japko.eu> | 2016-02-08 12:38:44 +0100 |
---|---|---|
committer | Krzysztof Adamski (Sony Mobile) <krzysztof.adamski@sonymobile.com> | 2016-02-22 10:44:27 +0000 |
commit | 22adcc80b26809fe7b2e751c8f2c1bb17a9b05ed (patch) | |
tree | 263e6444df492a30b420b38f808a6f0c8aee2a47 | |
parent | f764284d014691ddd97f0e0092cadde7492fa4a0 (diff) | |
download | bcm-22adcc80b26809fe7b2e751c8f2c1bb17a9b05ed.tar.gz |
Pin irq thread of em718x to CPU1android-wear-6.0.1_r0.5
CPU1 tends to have less load than CPU0 and we would like to prevent this
thread from preempting other threads as much as possible.
Issue: KIONE-3413
Change-Id: I415ee85b6451a8abd72583cbb2f202af2407864e
-rw-r--r-- | drivers/input/misc/em718x.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/input/misc/em718x.c b/drivers/input/misc/em718x.c index b30f146bf7e..754f8a5ce86 100644 --- a/drivers/input/misc/em718x.c +++ b/drivers/input/misc/em718x.c @@ -13,6 +13,7 @@ #include <linux/gpio.h> #include <linux/i2c.h> #include <linux/interrupt.h> +#include <linux/irq.h> #include <linux/kernel.h> #include <linux/ktime.h> #include <linux/miscdevice.h> @@ -1659,6 +1660,8 @@ static irqreturn_t em718x_irq_handler(int irq, void *handle) struct hub_all_data data; bool one_read; + set_cpus_allowed_ptr(current, cpumask_of(1)); + mutex_lock(&em718x->lock); em718x->irq_time = ktime_to_ns(ktime_get_boottime()); @@ -2272,6 +2275,7 @@ static int em718x_probe(struct i2c_client *client, int rc; struct em718x *em718x; struct device *dev = &client->dev; + struct irq_desc *desc; int i; rc = i2c_check_functionality(client->adapter, I2C_FUNC_I2C); @@ -2385,6 +2389,10 @@ static int em718x_probe(struct i2c_client *client, em718x->irq); goto exit_misc; } + + desc = irq_to_desc(em718x->irq); + set_cpus_allowed_ptr(desc->action->thread, cpumask_of(1)); + device_init_wakeup(dev, 1); dev_info(dev, "init finished with no errors, make reset to load FW\n"); |