]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/blob - rt-patches/0243-i2c-omap-drop-the-lock-hard-irq-context.patch
Fix memguard and related syscalls
[hercules2020/nv-tegra/linux-4.4.git] / rt-patches / 0243-i2c-omap-drop-the-lock-hard-irq-context.patch
1 From 3d3633b39814f19a0c8a16b315a31f4b98782c83 Mon Sep 17 00:00:00 2001
2 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
3 Date: Thu, 21 Mar 2013 11:35:49 +0100
4 Subject: [PATCH 243/366] i2c/omap: drop the lock hard irq context
5
6 The lock is taken while reading two registers. On RT the first lock is
7 taken in hard irq where it might sleep and in the threaded irq.
8 The threaded irq runs in oneshot mode so the hard irq does not run until
9 the thread the completes so there is no reason to grab the lock.
10
11 Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
12 ---
13  drivers/i2c/busses/i2c-omap.c | 5 +----
14  1 file changed, 1 insertion(+), 4 deletions(-)
15
16 diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
17 index 08d26ba..46b89dd 100644
18 --- a/drivers/i2c/busses/i2c-omap.c
19 +++ b/drivers/i2c/busses/i2c-omap.c
20 @@ -995,15 +995,12 @@ omap_i2c_isr(int irq, void *dev_id)
21         u16 mask;
22         u16 stat;
23  
24 -       spin_lock(&omap->lock);
25 -       mask = omap_i2c_read_reg(omap, OMAP_I2C_IE_REG);
26         stat = omap_i2c_read_reg(omap, OMAP_I2C_STAT_REG);
27 +       mask = omap_i2c_read_reg(omap, OMAP_I2C_IE_REG);
28  
29         if (stat & mask)
30                 ret = IRQ_WAKE_THREAD;
31  
32 -       spin_unlock(&omap->lock);
33 -
34         return ret;
35  }
36  
37 -- 
38 1.9.1
39