<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/base/platform-msi.c, branch v4.19.77</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.77</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.77'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-01-09T16:38:42+00:00</updated>
<entry>
<title>platform-msi: Free descriptors in platform_msi_domain_free()</title>
<updated>2019-01-09T16:38:42+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2018-10-11T09:12:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6c56e89e4ebe916990de1dcec0f568948755eca4'/>
<id>urn:sha1:6c56e89e4ebe916990de1dcec0f568948755eca4</id>
<content type='text'>
commit 81b1e6e6a8590a19257e37a1633bec098d499c57 upstream.

Since the addition of platform MSI support, there were two helpers
supposed to allocate/free IRQs for a device:

    platform_msi_domain_alloc_irqs()
    platform_msi_domain_free_irqs()

In these helpers, IRQ descriptors are allocated in the "alloc" routine
while they are freed in the "free" one.

Later, two other helpers have been added to handle IRQ domains on top
of MSI domains:

    platform_msi_domain_alloc()
    platform_msi_domain_free()

Seen from the outside, the logic is pretty close with the former
helpers and people used it with the same logic as before: a
platform_msi_domain_alloc() call should be balanced with a
platform_msi_domain_free() call. While this is probably what was
intended to do, the platform_msi_domain_free() does not remove/free
the IRQ descriptor(s) created/inserted in
platform_msi_domain_alloc().

One effect of such situation is that removing a module that requested
an IRQ will let one orphaned IRQ descriptor (with an allocated MSI
entry) in the device descriptors list. Next time the module will be
inserted back, one will observe that the allocation will happen twice
in the MSI domain, one time for the remaining descriptor, one time for
the new one. It also has the side effect to quickly overshoot the
maximum number of allocated MSI and then prevent any module requesting
an interrupt in the same domain to be inserted anymore.

This situation has been met with loops of insertion/removal of the
mvpp2.ko module (requesting 15 MSIs each time).

Fixes: 552c494a7666 ("platform-msi: Allow creation of a MSI-based stacked irq domain")
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>genirq/msi: Limit level-triggered MSI to platform devices</title>
<updated>2018-05-13T13:58:59+00:00</updated>
<author>
<name>Marc Zyngier</name>
<email>marc.zyngier@arm.com</email>
</author>
<published>2018-05-08T12:14:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6988e0e0d28328467e218f59589b2770675a9ebd'/>
<id>urn:sha1:6988e0e0d28328467e218f59589b2770675a9ebd</id>
<content type='text'>
Nobody would be insane enough to try and use level triggered
MSIs on PCI, but let's make sure it doesn't happen. Also,
let's mandate that the irqchip backing the platform MSI domain
is providing the IRQCHIP_SUPPORTS_LEVEL_MSI flag.

Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Rob Herring &lt;robh@kernel.org&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Cc: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@bootlin.com&gt;
Cc: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lkml.kernel.org/r/20180508121438.11301-3-marc.zyngier@arm.com

</content>
</entry>
<entry>
<title>driver core: Remove redundant license text</title>
<updated>2017-12-07T17:36:44+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-07T16:30:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=328257099077e8affd438c179d8a938948de2e7f'/>
<id>urn:sha1:328257099077e8affd438c179d8a938948de2e7f</id>
<content type='text'>
Now that the SPDX tag is in all driver core files, that identifies the
license in a specific and legally-defined manner.  So the extra GPL text
wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Cc: "Luis R. Rodriguez" &lt;mcgrof@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: add SPDX identifiers to all driver core files</title>
<updated>2017-12-07T17:36:43+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-07T16:30:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=989d42e85dc2f6823f39b8e9d080fd04bae0645d'/>
<id>urn:sha1:989d42e85dc2f6823f39b8e9d080fd04bae0645d</id>
<content type='text'>
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the driver core files files with the correct SPDX license
identifier based on the license text in the file itself.  The SPDX
identifier is a legally binding shorthand, which can be used instead of
the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Cc: "Luis R. Rodriguez" &lt;mcgrof@kernel.org&gt;
Cc: William Breathitt Gray &lt;vilhelm.gray@gmail.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>irqchip/MSI: Use irq_domain_update_bus_token instead of an open coded access</title>
<updated>2017-06-22T16:29:17+00:00</updated>
<author>
<name>Marc Zyngier</name>
<email>marc.zyngier@arm.com</email>
</author>
<published>2017-06-22T10:42:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=96f0d93a487e13233c95397aa3ecaf9cc8ff04bf'/>
<id>urn:sha1:96f0d93a487e13233c95397aa3ecaf9cc8ff04bf</id>
<content type='text'>
Now that we have irq_domain_update_bus_token(), switch everyone over
to it. The debugfs code thanks you for your continued support.

Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>platform-msi: Make platform_msi_create_device_domain() ACPI aware</title>
<updated>2017-04-07T09:52:19+00:00</updated>
<author>
<name>Hanjun Guo</name>
<email>hanjun.guo@linaro.org</email>
</author>
<published>2017-03-07T12:40:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6943acf67311e888445998bdac7ac8f766612158'/>
<id>urn:sha1:6943acf67311e888445998bdac7ac8f766612158</id>
<content type='text'>
The irqdomain creation that is carried out in:

platform_msi_create_device_domain()

relies on the fwnode_handle interrupt controller token to associate the
interrupt controller with a specific irqdomain. Current code relies on
the OF layer to retrieve a fwnode_handle for the device representing the
interrupt controller from its device-&gt;of_node pointer.  This makes
platform_msi_create_device_domain() DT specific whilst it really is not
because after the merge of commit f94277af03ea ("of/platform: Initialise
dev-&gt;fwnode appropriately") the fwnode_handle can easily be retrieved
from the dev-&gt;fwnode pointer in a firmware agnostic way.

Update platform_msi_create_device_domain() to retrieve the interrupt
controller fwnode_handle from the dev-&gt;fwnode pointer so that it can
be used seamlessly in ACPI and DT systems.

Signed-off-by: Hanjun Guo &lt;hanjun.guo@linaro.org&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Tested-by: Ming Lei &lt;ming.lei@canonical.com&gt;
Tested-by: Wei Xu &lt;xuwei5@hisilicon.com&gt;
Cc: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
</content>
</entry>
<entry>
<title>irq/platform-msi: Fix comment about maximal MSIs</title>
<updated>2017-01-17T08:53:14+00:00</updated>
<author>
<name>Matthias Brugger</name>
<email>mbrugger@suse.com</email>
</author>
<published>2017-01-16T18:48:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=788d23930a9724fc85cdf9999521a867d8748019'/>
<id>urn:sha1:788d23930a9724fc85cdf9999521a867d8748019</id>
<content type='text'>
Commit aff5e06b0dda ("irq/platform-MSI: Increase the maximum MSIs the MSI
framework can support") increased the maximum MSIs to 2048.

Fix the comment to reflect that.

Signed-off-by: Matthias Brugger &lt;mbrugger@suse.com&gt;
Cc: gregkh@linuxfoundation.org
Cc: majun258@huawei.com
Link: http://lkml.kernel.org/r/1484592500-15400-1-git-send-email-mbrugger@suse.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
<entry>
<title>genirq/msi: Add cpumask allocation to alloc_msi_entry</title>
<updated>2016-09-14T20:11:08+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2016-09-14T14:18:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=28f4b04143c56135b1ca742fc64b664ed04de6a4'/>
<id>urn:sha1:28f4b04143c56135b1ca742fc64b664ed04de6a4</id>
<content type='text'>
For irq spreading want to store affinity masks in the msi_entry. Add the
infrastructure for it.

We allocate an array of cpumasks with an array size of the number of used
vectors in the entry, so we can hand in the information per linux interrupt
later.

As we hand in the number of used vectors, we assign them right
away. Convert all the call sites.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: axboe@fb.com
Cc: keith.busch@intel.com
Cc: agordeev@redhat.com
Cc: linux-block@vger.kernel.org
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Link: http://lkml.kernel.org/r/1473862739-15032-2-git-send-email-hch@lst.de

</content>
</entry>
<entry>
<title>base: Export platform_msi_domain_[alloc,free]_irqs</title>
<updated>2016-01-26T15:33:25+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2016-01-26T13:52:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bb1a793125d9cc61f2d1cff92fe3927fec45d528'/>
<id>urn:sha1:bb1a793125d9cc61f2d1cff92fe3927fec45d528</id>
<content type='text'>
The new function platform_msi_domain_{alloc,free}_irqs are meant to be
used in platform drivers, which can be built as modules. Therefore, it
makes sense to export them to be used from kernel modules.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Acked-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Frank Rowand &lt;frowand.list@gmail.com&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Link: http://lkml.kernel.org/r/1453816347-32720-4-git-send-email-marc.zyngier@arm.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>irq/platform-MSI: Increase the maximum MSIs the MSI framework can support</title>
<updated>2015-12-29T10:58:53+00:00</updated>
<author>
<name>MaJun</name>
<email>majun258@huawei.com</email>
</author>
<published>2015-12-22T02:47:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aff5e06b0dda7704ff2fa45162cfc4dde316a6f1'/>
<id>urn:sha1:aff5e06b0dda7704ff2fa45162cfc4dde316a6f1</id>
<content type='text'>
The current MSI framework can only support 256 platform MSIs. But on Hisilicon
platform, some network related devices has about 500 wired interrupts.

To support these devices and align with MSI-X increase the maximum to 2048
devices.

Signed-off-by: Ma Jun &lt;majun258@huawei.com&gt;
Cc: &lt;Catalin.Marinas@arm.com&gt;
Cc: &lt;linux-arm-kernel@lists.infradead.org&gt;
Cc: &lt;Will.Deacon@arm.com&gt;
Cc: &lt;mark.rutland@arm.com&gt;
Cc: &lt;marc.zyngier@arm.com&gt;
Cc: &lt;jason@lakedaemon.net&gt;
Cc: &lt;lizefan@huawei.com&gt;
Cc: &lt;huxinwei@huawei.com&gt;
Cc: &lt;dingtianhong@huawei.com&gt;
Cc: &lt;liguozhu@hisilicon.com&gt;
Cc: &lt;guohanjun@huawei.com&gt;
Link: http://lkml.kernel.org/r/1450752442-9392-1-git-send-email-majun258@huawei.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
</feed>
