<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/pinctrl/intel, branch v4.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-09-16T13:47:51Z</updated>
<entry>
<title>genirq: Remove irq argument from irq flow handlers</title>
<updated>2015-09-16T13:47:51Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2015-09-14T08:42:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bd0b9ac405e1794d72533c3d487aa65b6b955a0c'/>
<id>urn:sha1:bd0b9ac405e1794d72533c3d487aa65b6b955a0c</id>
<content type='text'>
Most interrupt flow handlers do not use the irq argument. Those few
which use it can retrieve the irq number from the irq descriptor.

Remove the argument.

Search and replace was done with coccinelle and some extra helper
scripts around it. Thanks to Julia for her help!

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Cc: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>pinctrl: cherryview: Use raw_spinlock for locking</title>
<updated>2015-08-26T07:27:39Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2015-08-17T13:13:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=109fdf1572be86aaf681e69b30dc5ada90ce6f35'/>
<id>urn:sha1:109fdf1572be86aaf681e69b30dc5ada90ce6f35</id>
<content type='text'>
When running -rt kernel and an interrupt happens on a GPIO line controlled by
Intel Cherryview/Braswell pinctrl driver we get:

 BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:917
 in_atomic(): 1, irqs_disabled(): 1, pid: 0, name: swapper/0
 Preemption disabled at:[&lt;ffffffff81092e9f&gt;] cpu_startup_entry+0x17f/0x480

 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.1.5-rt5 #16
  ...
 Call Trace:
  &lt;IRQ&gt;  [&lt;ffffffff816283c6&gt;] dump_stack+0x4a/0x61
  [&lt;ffffffff81077e17&gt;] ___might_sleep+0xe7/0x170
  [&lt;ffffffff8162d6cf&gt;] rt_spin_lock+0x1f/0x50
  [&lt;ffffffff812e52ed&gt;] chv_gpio_irq_ack+0x3d/0xa0
  [&lt;ffffffff810a72f5&gt;] handle_edge_irq+0x75/0x180
  [&lt;ffffffff810a3457&gt;] generic_handle_irq+0x27/0x40
  [&lt;ffffffff812e57de&gt;] chv_gpio_irq_handler+0x7e/0x110
  [&lt;ffffffff810050aa&gt;] handle_irq+0xaa/0x190
  ...

This is because desc-&gt;lock is raw_spinlock and is held when chv_gpio_irq_ack()
is called by the genirq core. chv_gpio_irq_ack() in turn takes pctrl-&gt;lock
which in -rt is an rt-mutex causing might_sleep() rightfully to complain about
sleeping function called from invalid context.

In order to keep -rt happy but at the same time make sure that register
accesses get serialized, convert the driver to use raw_spinlock instead.

Suggested-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: baytrail: Use raw_spinlock for locking</title>
<updated>2015-08-26T07:25:33Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2015-08-17T13:03:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=78e1c896932df5b8bcdff7bf5417d8e72a4d0d6b'/>
<id>urn:sha1:78e1c896932df5b8bcdff7bf5417d8e72a4d0d6b</id>
<content type='text'>
The Intel Baytrail pinctrl driver implements irqchip callbacks which are
called with desc-&gt;lock raw_spinlock held. In mainline this is fine because
spinlock resolves to raw_spinlock. However, running the same code in -rt we
get:

 BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:917
 in_atomic(): 1, irqs_disabled(): 1, pid: 0, name: swapper/0
 Preemption disabled at:[&lt;ffffffff81092e9f&gt;] cpu_startup_entry+0x17f/0x480

 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.1.5-rt5 #13
  ...
 Call Trace:
  &lt;IRQ&gt;  [&lt;ffffffff816283c6&gt;] dump_stack+0x4a/0x61
  [&lt;ffffffff81077e17&gt;] ___might_sleep+0xe7/0x170
  [&lt;ffffffff8162d6cf&gt;] rt_spin_lock+0x1f/0x50
  [&lt;ffffffff812e3b88&gt;] byt_gpio_clear_triggering+0x38/0x60
  [&lt;ffffffff812e3bc1&gt;] byt_irq_mask+0x11/0x20
  [&lt;ffffffff810a7013&gt;] handle_level_irq+0x83/0x150
  [&lt;ffffffff810a3457&gt;] generic_handle_irq+0x27/0x40
  [&lt;ffffffff812e3a5f&gt;] byt_gpio_irq_handler+0x7f/0xc0
  [&lt;ffffffff810050aa&gt;] handle_irq+0xaa/0x190
  ...

This is because in -rt spinlocks are preemptible so taking the driver
private spinlock in irqchip callbacks causes might_sleep() to trigger.

In order to keep -rt happy but at the same time make sure that register
accesses get serialized, convert the driver to use raw_spinlock instead.

Also shorten the critical section a bit in few places.

Suggested-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: baytrail: Serialize all register access</title>
<updated>2015-08-13T12:26:14Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2015-08-04T12:03:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=39ce8150a079e3ae6ed9abf26d7918a558ef7c19'/>
<id>urn:sha1:39ce8150a079e3ae6ed9abf26d7918a558ef7c19</id>
<content type='text'>
There is a hardware issue in Intel Baytrail where concurrent GPIO register
access might result reads of 0xffffffff and writes might get dropped
completely.

Prevent this from happening by taking the serializing lock in all places
where it is possible that more than one thread might be accessing the
hardware concurrently.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: baytrail: Drop FSF mailing address</title>
<updated>2015-08-13T12:25:29Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2015-08-04T12:03:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5ab49db8e007c4479be1a682ea64d9b562aa4880'/>
<id>urn:sha1:5ab49db8e007c4479be1a682ea64d9b562aa4880</id>
<content type='text'>
The FSF address is already mentioned in the COPYING file. No need to
duplicate that information to individual files.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: cherryview: Serialize all register access</title>
<updated>2015-08-13T11:20:02Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2015-08-03T09:46:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4585b000ace6438d0b142746baab658056b223d9'/>
<id>urn:sha1:4585b000ace6438d0b142746baab658056b223d9</id>
<content type='text'>
There is a hardware issue in Intel Braswell/Cherryview where concurrent
GPIO register access might results reads of 0xffffffff and writes might get
dropped.

Prevent this from happening by taking the serializing lock for all places
where it is possible that more than one thread might be accessing the
hardware concurrently.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc</title>
<updated>2015-07-17T19:56:20Z</updated>
<author>
<name>Jiang Liu</name>
<email>jiang.liu@linux.intel.com</email>
</author>
<published>2015-06-04T04:13:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5663bb27dec1a2bfaf9d92e3685834b91a36a5a3'/>
<id>urn:sha1:5663bb27dec1a2bfaf9d92e3685834b91a36a5a3</id>
<content type='text'>
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Signed-off-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>pinctrl/intel: Use irq_set_handler_locked()</title>
<updated>2015-07-17T19:56:17Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2015-06-23T13:52:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc756bcd6aadbc59fa7142521729c8d38096ef9c'/>
<id>urn:sha1:fc756bcd6aadbc59fa7142521729c8d38096ef9c</id>
<content type='text'>
Use irq_set_handler_locked() as it avoids a redundant lookup of the
irq descriptor.

Search and replacement was done with coccinelle.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: linux-gpio@vger.kernel.org
</content>
</entry>
<entry>
<title>pinctrl/cherryview: Use irq_set_handler_locked()</title>
<updated>2015-07-17T19:56:17Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2015-06-23T13:52:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a4e3f7830fb742039c2c24535af931df3d6d2124'/>
<id>urn:sha1:a4e3f7830fb742039c2c24535af931df3d6d2124</id>
<content type='text'>
Use irq_set_handler_locked() as it avoids a redundant lookup of the
irq descriptor.

Search and replacement was done with coccinelle.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: linux-gpio@vger.kernel.org
</content>
</entry>
<entry>
<title>pinctrl/baytrail: Use irq_set_handler_locked()</title>
<updated>2015-07-17T19:56:16Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2015-06-23T13:52:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f3a085b4174e5806e2e6543323f9a70435ca0098'/>
<id>urn:sha1:f3a085b4174e5806e2e6543323f9a70435ca0098</id>
<content type='text'>
Use irq_set_handler_locked() as it avoids a redundant lookup of the
irq descriptor.

Search and replacement was done with coccinelle.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: linux-gpio@vger.kernel.org
</content>
</entry>
</feed>
