<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/irq, branch v4.2</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.2</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-08-19T22:25:25Z</updated>
<entry>
<title>genirq: Introduce irq_chip_set_type_parent() helper</title>
<updated>2015-08-19T22:25:25Z</updated>
<author>
<name>Grygorii Strashko</name>
<email>grygorii.strashko@ti.com</email>
</author>
<published>2015-08-14T12:20:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b7560de198222994374c1340a389f12d5efb244a'/>
<id>urn:sha1:b7560de198222994374c1340a389f12d5efb244a</id>
<content type='text'>
This helper is required for irq chips which do not implement a
irq_set_type callback and need to call down the irq domain hierarchy
for the actual trigger type change.

This helper is required to fix further wreckage caused by the
conversion of TI OMAP to hierarchical irq domains and therefor tagged
for stable.

[ tglx: Massaged changelog ]

Signed-off-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Cc: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Cc: &lt;linux@arm.linux.org.uk&gt;
Cc: &lt;nsekhar@ti.com&gt;
Cc: &lt;jason@lakedaemon.net&gt;
Cc: &lt;balbi@ti.com&gt;
Cc: &lt;linux-arm-kernel@lists.infradead.org&gt;
Cc: &lt;tony@atomide.com&gt;
Cc: &lt;marc.zyngier@arm.com&gt;
Cc: stable@vger.kernel.org # 4.1
Link: http://lkml.kernel.org/r/1439554830-19502-3-git-send-email-grygorii.strashko@ti.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>genirq: Don't return ENOSYS in irq_chip_retrigger_hierarchy</title>
<updated>2015-08-19T22:25:25Z</updated>
<author>
<name>Grygorii Strashko</name>
<email>grygorii.strashko@ti.com</email>
</author>
<published>2015-08-14T12:20:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6d4affea7d5aa5ca5ff4c3e5fbf3ee16801cc527'/>
<id>urn:sha1:6d4affea7d5aa5ca5ff4c3e5fbf3ee16801cc527</id>
<content type='text'>
irq_chip_retrigger_hierarchy() returns -ENOSYS if it was not able to
find at least one .irq_retrigger() callback implemented in the IRQ
domain hierarchy.

That's wrong, because check_irq_resend() expects a 0 return value from
the callback in case that the hardware assisted resend was not
possible. If the return value is non zero the core code assumes
hardware resend success and the software resend is not invoked.

This results in lost interrupts on platforms where none of the parent
irq chips in the hierarchy implements the retrigger callback.

This is observable on TI OMAP, where the hierarchy is:

 ARM GIC &lt;- OMAP wakeupgen &lt;- TI Crossbar

Return 0 instead so the software resend mechanism gets invoked.

[ tglx: Massaged changelog ]

Fixes: 85f08c17de26 ('genirq: Introduce helper functions...')
Signed-off-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Reviewed-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Reviewed-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Cc: &lt;linux@arm.linux.org.uk&gt;
Cc: &lt;nsekhar@ti.com&gt;
Cc: &lt;jason@lakedaemon.net&gt;
Cc: &lt;balbi@ti.com&gt;
Cc: &lt;linux-arm-kernel@lists.infradead.org&gt;
Cc: &lt;tony@atomide.com&gt;
Cc: stable@vger.kernel.org # 4.1
Link: http://lkml.kernel.org/r/1439554830-19502-2-git-send-email-grygorii.strashko@ti.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>genirq: Prevent resend to interrupts marked IRQ_NESTED_THREAD</title>
<updated>2015-07-17T09:29:34Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2015-07-16T12:10:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=75a06189fc508a2acf470b0b12710362ffb2c4b1'/>
<id>urn:sha1:75a06189fc508a2acf470b0b12710362ffb2c4b1</id>
<content type='text'>
The resend mechanism happily calls the interrupt handler of interrupts
which are marked IRQ_NESTED_THREAD from softirq context. This can
result in crashes because the interrupt handler is not the proper way
to invoke the device handlers. They must be invoked via
handle_nested_irq.

Prevent the resend even if the interrupt has no valid parent irq
set. Its better to have a lost interrupt than a crashing machine.

Reported-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>hotplug: Prevent alloc/free of irq descriptors during cpu up/down</title>
<updated>2015-07-08T09:32:25Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2015-07-05T17:12:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a899418167264c7bac574b1a0f1b2c26c5b0995a'/>
<id>urn:sha1:a899418167264c7bac574b1a0f1b2c26c5b0995a</id>
<content type='text'>
When a cpu goes up some architectures (e.g. x86) have to walk the irq
space to set up the vector space for the cpu. While this needs extra
protection at the architecture level we can avoid a few race
conditions by preventing the concurrent allocation/free of irq
descriptors and the associated data.

When a cpu goes down it moves the interrupts which are targeted to
this cpu away by reassigning the affinities. While this happens
interrupts can be allocated and freed, which opens a can of race
conditions in the code which reassignes the affinities because
interrupt descriptors might be freed underneath.

Example:

CPU1				CPU2
cpu_up/down
 irq_desc = irq_to_desc(irq);
				remove_from_radix_tree(desc);
 raw_spin_lock(&amp;desc-&gt;lock);
				free(desc);

We could protect the irq descriptors with RCU, but that would require
a full tree change of all accesses to interrupt descriptors. But
fortunately these kind of race conditions are rather limited to a few
things like cpu hotplug. The normal setup/teardown is very well
serialized. So the simpler and obvious solution is:

Prevent allocation and freeing of interrupt descriptors accross cpu
hotplug.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: xiao jin &lt;jin.xiao@intel.com&gt;
Cc: Joerg Roedel &lt;jroedel@suse.de&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Cc: Yanmin Zhang &lt;yanmin_zhang@linux.intel.com&gt;
Link: http://lkml.kernel.org/r/20150705171102.063519515@linutronix.de
</content>
</entry>
<entry>
<title>Merge branch 'irq/for-x86' into irq/core</title>
<updated>2015-06-20T17:14:31Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2015-06-20T17:14:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f05218651be1ac6a6088e226bd7350fb6c154414'/>
<id>urn:sha1:f05218651be1ac6a6088e226bd7350fb6c154414</id>
<content type='text'>
Get the infrastructure patches which are required for x86/apic into core
</content>
</entry>
<entry>
<title>genirq: Remove bogus restriction in irq_move_mask_irq()</title>
<updated>2015-06-20T17:05:14Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2015-06-20T10:05:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a614a610ac9b28f195d790d25be72d26f345c53a'/>
<id>urn:sha1:a614a610ac9b28f195d790d25be72d26f345c53a</id>
<content type='text'>
If an interrupt is marked with the no balancing flag, we still allow
setting the affinity for such an interrupt from the kernel itself, but
for interrupts which move the affinity from interrupt context via
irq_move_mask_irq() this runs into a check for the no balancing flag,
which in turn ends up with an endless storm of stack dumps because the
move pending flag is not reset.

Allow the move for interrupts which have the no balancing flag set and
clear the move pending bit before checking for interrupts with the per
cpu flag set.

Reported-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1506201002570.4107@nanos
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>irq: Add irq_set_chained_handler_and_data()</title>
<updated>2015-06-18T12:03:08Z</updated>
<author>
<name>Russell King</name>
<email>rmk+kernel@arm.linux.org.uk</email>
</author>
<published>2015-06-16T22:06:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3b0f95be143bea1aa47beb20134ef82e4e4068dc'/>
<id>urn:sha1:3b0f95be143bea1aa47beb20134ef82e4e4068dc</id>
<content type='text'>
Driver authors seem to get the ordering of irq_set_chained_handler()
and irq_set_handler_data() wrong - ordering the former before the
latter.  This opens a race window where, if there is an interrupt
pending, the handler will be called between these two calls,
potentially resulting in an oops.

Provide a single interface to set both of these together, especially
as that's commonly what is required.

Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Cc: Alexandre Courbot &lt;gnurou@gmail.com&gt;
Cc: Hans Ulli Kroll &lt;ulli.kroll@googlemail.com&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: Lee Jones &lt;lee.jones@linaro.org&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/E1Z4yzs-0002Rw-4B@rmk-PC.arm.linux.org.uk
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>genirq: Introduce helper function irq_data_get_node()</title>
<updated>2015-06-12T14:54:21Z</updated>
<author>
<name>Jiang Liu</name>
<email>jiang.liu@linux.intel.com</email>
</author>
<published>2015-06-01T08:05:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6783011b48096b9a0c239d0f7645f93070b6eefd'/>
<id>urn:sha1:6783011b48096b9a0c239d0f7645f93070b6eefd</id>
<content type='text'>
Introduce helper function irq_data_get_node() and variants thereof to
hide struct irq_data implementation details.

Convert the core code to use them.

Signed-off-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Yinghai Lu &lt;yinghai@kernel.org&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: Kevin Cernekee &lt;cernekee@gmail.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: http://lkml.kernel.org/r/1433145945-789-5-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>genirq: Introduce struct irq_common_data to host shared irq data</title>
<updated>2015-06-12T14:54:21Z</updated>
<author>
<name>Jiang Liu</name>
<email>jiang.liu@linux.intel.com</email>
</author>
<published>2015-06-01T08:05:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0d0b4c866bcce647f40d73efe5e90aeeb079050a'/>
<id>urn:sha1:0d0b4c866bcce647f40d73efe5e90aeeb079050a</id>
<content type='text'>
With the introduction of hierarchy irqdomain, struct irq_data becomes
per-chip instead of per-irq and there may be multiple irq_datas
associated with the same irq. Some per-irq data stored in struct
irq_data now may get duplicated into multiple irq_datas, and causes
inconsistent view.

So introduce struct irq_common_data to host per-irq common data and to
achieve consistent view among irq_chips.

Signed-off-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Yinghai Lu &lt;yinghai@kernel.org&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: Kevin Cernekee &lt;cernekee@gmail.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Link: http://lkml.kernel.org/r/1433145945-789-4-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>genirq: Prevent crash in irq_move_irq()</title>
<updated>2015-06-12T14:54:21Z</updated>
<author>
<name>Jiang Liu</name>
<email>jiang.liu@linux.intel.com</email>
</author>
<published>2015-06-01T08:05:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=77ed42f18edd486e9994ccd1f174076309a6343f'/>
<id>urn:sha1:77ed42f18edd486e9994ccd1f174076309a6343f</id>
<content type='text'>
The functions irq_move_irq() and irq_move_masked_irq() expect that the
caller passes the top-level irq_data to them when hierarchical
irqdomains are enabled. But that's not true when called from
apic_ack_edge(), which results in a null pointer dereference by
idata-&gt;chip-&gt;irq_mask(idata).

Instead of fixing callers to passing top-level irq_data, we rather
change irq_move_irq()/irq_move_masked_irq() to accept any irq_data.

Signed-off-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Yinghai Lu &lt;yinghai@kernel.org&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Link: http://lkml.kernel.org/r/1433145945-789-3-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
</feed>
