<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/kernel/irq/msi.c, branch v4.2.7</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>genirq: MSI: Constify irq_domain_ops</title>
<updated>2015-05-05T08:45:58+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>k.kozlowski.k@gmail.com</email>
</author>
<published>2015-04-27T12:54:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=01364028bdbb095dc6524986261fe1777ad04347'/>
<id>01364028bdbb095dc6524986261fe1777ad04347</id>
<content type='text'>
The irq_domain_ops are not modified. The irqdomain core code accepts
pointer to a const data.

Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski.k@gmail.com&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: Kukjin Kim &lt;kgene@kernel.org&gt;
Cc: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Cc: Lee Jones &lt;lee@kernel.org&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rpi-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Link: http://lkml.kernel.org/r/1430139264-4362-1-git-send-email-k.kozlowski.k@gmail.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The irq_domain_ops are not modified. The irqdomain core code accepts
pointer to a const data.

Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski.k@gmail.com&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: Kukjin Kim &lt;kgene@kernel.org&gt;
Cc: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Cc: Lee Jones &lt;lee@kernel.org&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rpi-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Link: http://lkml.kernel.org/r/1430139264-4362-1-git-send-email-k.kozlowski.k@gmail.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>genirq: MSI: Fix freeing of unallocated MSI</title>
<updated>2015-04-08T21:28:28+00:00</updated>
<author>
<name>Marc Zyngier</name>
<email>marc.zyngier@arm.com</email>
</author>
<published>2015-01-26T19:10:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fe0c52fc003bc046380e52fe6799c96d770770cc'/>
<id>fe0c52fc003bc046380e52fe6799c96d770770cc</id>
<content type='text'>
While debugging an unrelated issue with the GICv3 ITS driver, the
following trace triggered:

WARNING: CPU: 1 PID: 1 at kernel/irq/irqdomain.c:1121 irq_domain_free_irqs+0x160/0x17c()
NULL pointer, cannot free irq
Modules linked in:
CPU: 1 PID: 1 Comm: swapper/0 Tainted: G        W      3.19.0-rc6+ #3690
Hardware name: FVP Base (DT)
Call trace:
[&lt;ffffffc000089398&gt;] dump_backtrace+0x0/0x13c
[&lt;ffffffc0000894e4&gt;] show_stack+0x10/0x1c
[&lt;ffffffc00066d134&gt;] dump_stack+0x74/0x94
[&lt;ffffffc0000a92f8&gt;] warn_slowpath_common+0x9c/0xd4
[&lt;ffffffc0000a938c&gt;] warn_slowpath_fmt+0x5c/0x80
[&lt;ffffffc0000ee04c&gt;] irq_domain_free_irqs+0x15c/0x17c
[&lt;ffffffc0000ef918&gt;] msi_domain_free_irqs+0x58/0x74
[&lt;ffffffc000386f58&gt;] free_msi_irqs+0xb4/0x1c0

    // The msi_prepare callback fails here

[&lt;ffffffc0003872c0&gt;] pci_enable_msix+0x25c/0x3d4
[&lt;ffffffc00038746c&gt;] pci_enable_msix_range+0x34/0x80
[&lt;ffffffc0003924ac&gt;] vp_try_to_find_vqs+0xec/0x528
[&lt;ffffffc000392954&gt;] vp_find_vqs+0x6c/0xa8
[&lt;ffffffc0003ee2a8&gt;] init_vq+0x120/0x248
[&lt;ffffffc0003eefb0&gt;] virtblk_probe+0xb0/0x6bc
[&lt;ffffffc00038fc34&gt;] virtio_dev_probe+0x17c/0x214
[&lt;ffffffc0003d4a04&gt;] driver_probe_device+0x7c/0x23c
[&lt;ffffffc0003d4cb0&gt;] __driver_attach+0x98/0xa0
[&lt;ffffffc0003d2c60&gt;] bus_for_each_dev+0x60/0xb4
[&lt;ffffffc0003d455c&gt;] driver_attach+0x1c/0x28
[&lt;ffffffc0003d41b0&gt;] bus_add_driver+0x150/0x208
[&lt;ffffffc0003d54c0&gt;] driver_register+0x64/0x130
[&lt;ffffffc00038f9e8&gt;] register_virtio_driver+0x24/0x68
[&lt;ffffffc00091320c&gt;] init+0x70/0xac
[&lt;ffffffc0000828f0&gt;] do_one_initcall+0x94/0x1d0
[&lt;ffffffc0008e9b00&gt;] kernel_init_freeable+0x144/0x1e4
[&lt;ffffffc00066a434&gt;] kernel_init+0xc/0xd8
---[ end trace f9ee562a77cc7bae ]---

The ITS msi_prepare callback having failed, we end-up trying to
free MSIs that have never been allocated. Oddly enough, the kernel
is pretty upset about it.

It turns out that this behaviour was expected before the MSI domain
was introduced (and dealt with in arch_teardown_msi_irqs).

The obvious fix is to detect this early enough and bail out.

Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Reviewed-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Link: http://lkml.kernel.org/r/1422299419-6051-1-git-send-email-marc.zyngier@arm.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While debugging an unrelated issue with the GICv3 ITS driver, the
following trace triggered:

WARNING: CPU: 1 PID: 1 at kernel/irq/irqdomain.c:1121 irq_domain_free_irqs+0x160/0x17c()
NULL pointer, cannot free irq
Modules linked in:
CPU: 1 PID: 1 Comm: swapper/0 Tainted: G        W      3.19.0-rc6+ #3690
Hardware name: FVP Base (DT)
Call trace:
[&lt;ffffffc000089398&gt;] dump_backtrace+0x0/0x13c
[&lt;ffffffc0000894e4&gt;] show_stack+0x10/0x1c
[&lt;ffffffc00066d134&gt;] dump_stack+0x74/0x94
[&lt;ffffffc0000a92f8&gt;] warn_slowpath_common+0x9c/0xd4
[&lt;ffffffc0000a938c&gt;] warn_slowpath_fmt+0x5c/0x80
[&lt;ffffffc0000ee04c&gt;] irq_domain_free_irqs+0x15c/0x17c
[&lt;ffffffc0000ef918&gt;] msi_domain_free_irqs+0x58/0x74
[&lt;ffffffc000386f58&gt;] free_msi_irqs+0xb4/0x1c0

    // The msi_prepare callback fails here

[&lt;ffffffc0003872c0&gt;] pci_enable_msix+0x25c/0x3d4
[&lt;ffffffc00038746c&gt;] pci_enable_msix_range+0x34/0x80
[&lt;ffffffc0003924ac&gt;] vp_try_to_find_vqs+0xec/0x528
[&lt;ffffffc000392954&gt;] vp_find_vqs+0x6c/0xa8
[&lt;ffffffc0003ee2a8&gt;] init_vq+0x120/0x248
[&lt;ffffffc0003eefb0&gt;] virtblk_probe+0xb0/0x6bc
[&lt;ffffffc00038fc34&gt;] virtio_dev_probe+0x17c/0x214
[&lt;ffffffc0003d4a04&gt;] driver_probe_device+0x7c/0x23c
[&lt;ffffffc0003d4cb0&gt;] __driver_attach+0x98/0xa0
[&lt;ffffffc0003d2c60&gt;] bus_for_each_dev+0x60/0xb4
[&lt;ffffffc0003d455c&gt;] driver_attach+0x1c/0x28
[&lt;ffffffc0003d41b0&gt;] bus_add_driver+0x150/0x208
[&lt;ffffffc0003d54c0&gt;] driver_register+0x64/0x130
[&lt;ffffffc00038f9e8&gt;] register_virtio_driver+0x24/0x68
[&lt;ffffffc00091320c&gt;] init+0x70/0xac
[&lt;ffffffc0000828f0&gt;] do_one_initcall+0x94/0x1d0
[&lt;ffffffc0008e9b00&gt;] kernel_init_freeable+0x144/0x1e4
[&lt;ffffffc00066a434&gt;] kernel_init+0xc/0xd8
---[ end trace f9ee562a77cc7bae ]---

The ITS msi_prepare callback having failed, we end-up trying to
free MSIs that have never been allocated. Oddly enough, the kernel
is pretty upset about it.

It turns out that this behaviour was expected before the MSI domain
was introduced (and dealt with in arch_teardown_msi_irqs).

The obvious fix is to detect this early enough and bail out.

Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Reviewed-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Link: http://lkml.kernel.org/r/1422299419-6051-1-git-send-email-marc.zyngier@arm.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>genirq: Move irq_chip_write_msi_msg() helper to core</title>
<updated>2014-12-07T20:49:45+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2014-12-06T20:20:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=74faaf7aa64c76b60db0f5c994fd43a46be772ce'/>
<id>74faaf7aa64c76b60db0f5c994fd43a46be772ce</id>
<content type='text'>
No point to expose this to the world. The only legitimate user is the
core code.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No point to expose this to the world. The only legitimate user is the
core code.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCI/MSI: Move cached entry functions to irq core</title>
<updated>2014-11-23T12:01:47+00:00</updated>
<author>
<name>Jiang Liu</name>
<email>jiang.liu@linux.intel.com</email>
</author>
<published>2014-11-12T11:11:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=38b6a1cf3e4df0a3267c01fab699ab65d58690f4'/>
<id>38b6a1cf3e4df0a3267c01fab699ab65d58690f4</id>
<content type='text'>
Required to support non PCI based MSI.

[ tglx: Extracted from Jiangs patch series ]

Signed-off-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Required to support non PCI based MSI.

[ tglx: Extracted from Jiangs patch series ]

Signed-off-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>genirq: Provide default callbacks for msi_domain_ops</title>
<updated>2014-11-23T12:01:47+00:00</updated>
<author>
<name>Jiang Liu</name>
<email>jiang.liu@linux.intel.com</email>
</author>
<published>2014-11-15T14:24:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=aeeb59657c35da64068336c20068da237f41ab76'/>
<id>aeeb59657c35da64068336c20068da237f41ab76</id>
<content type='text'>
Extend struct msi_domain_info and provide default callbacks for
msi_domain_ops.

Signed-off-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Cc: Yijing Wang &lt;wangyijing@huawei.com&gt;
Cc: Yingjoe Chen &lt;yingjoe.chen@mediatek.com&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Alexander Gordeev &lt;agordeev@redhat.com&gt;
Link: http://lkml.kernel.org/r/1416061447-9472-8-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Extend struct msi_domain_info and provide default callbacks for
msi_domain_ops.

Signed-off-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Cc: Yijing Wang &lt;wangyijing@huawei.com&gt;
Cc: Yingjoe Chen &lt;yingjoe.chen@mediatek.com&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Alexander Gordeev &lt;agordeev@redhat.com&gt;
Link: http://lkml.kernel.org/r/1416061447-9472-8-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>genirq: Introduce msi_domain_alloc/free_irqs()</title>
<updated>2014-11-23T12:01:47+00:00</updated>
<author>
<name>Jiang Liu</name>
<email>jiang.liu@linux.intel.com</email>
</author>
<published>2014-11-15T14:24:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d9109698be6e7439e6082aa00d79d4556114739b'/>
<id>d9109698be6e7439e6082aa00d79d4556114739b</id>
<content type='text'>
Introduce msi_domain_{alloc|free}_irqs() to alloc/free interrupts
from generic MSI irqdomain.

Signed-off-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Cc: Yijing Wang &lt;wangyijing@huawei.com&gt;
Cc: Yingjoe Chen &lt;yingjoe.chen@mediatek.com&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Alexander Gordeev &lt;agordeev@redhat.com&gt;
Link: http://lkml.kernel.org/r/1416061447-9472-7-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce msi_domain_{alloc|free}_irqs() to alloc/free interrupts
from generic MSI irqdomain.

Signed-off-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Cc: Yijing Wang &lt;wangyijing@huawei.com&gt;
Cc: Yingjoe Chen &lt;yingjoe.chen@mediatek.com&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Alexander Gordeev &lt;agordeev@redhat.com&gt;
Link: http://lkml.kernel.org/r/1416061447-9472-7-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>genirq: Add generic msi irq domain support</title>
<updated>2014-11-23T12:01:47+00:00</updated>
<author>
<name>Jiang Liu</name>
<email>jiang.liu@linux.intel.com</email>
</author>
<published>2014-11-12T10:39:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f3cf8bb0d6c3c11ddedf01f02f856f2ae8c33aa4'/>
<id>f3cf8bb0d6c3c11ddedf01f02f856f2ae8c33aa4</id>
<content type='text'>
Implement the basic functions for MSI interrupt support with
hierarchical interrupt domains.

[ tglx: Extracted and combined from several patches ]

Signed-off-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Cc: Yingjoe Chen &lt;yingjoe.chen@mediatek.com&gt;
Cc: Yijing Wang &lt;wangyijing@huawei.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement the basic functions for MSI interrupt support with
hierarchical interrupt domains.

[ tglx: Extracted and combined from several patches ]

Signed-off-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Cc: Yingjoe Chen &lt;yingjoe.chen@mediatek.com&gt;
Cc: Yijing Wang &lt;wangyijing@huawei.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
