<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/base/platform-msi.c, branch v6.6.131</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-03-02T17:09:44+00:00</updated>
<entry>
<title>genirq/msi, platform-msi: Ensure that MSI descriptors are unreferenced</title>
<updated>2023-03-02T17:09:44+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2023-03-01T21:07:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0fb7fb713461e44b12e72c292bf90ee300f40710'/>
<id>urn:sha1:0fb7fb713461e44b12e72c292bf90ee300f40710</id>
<content type='text'>
Miquel reported a warning in the MSI core which is triggered when
interrupts are freed via platform_msi_device_domain_free().

This code got reworked to use core functions for freeing the MSI
descriptors, but nothing took care to clear the msi_desc-&gt;irq entry, which
then triggers the warning in msi_free_msi_desc() which uses desc-&gt;irq to
validate that the descriptor has been torn down. The same issue exists in
msi_domain_populate_irqs().

Up to the point that msi_free_msi_descs() grew a warning for this case,
this went un-noticed.

Provide the counterpart of msi_domain_populate_irqs() and invoke it in
platform_msi_device_domain_free() before freeing the interrupts and MSI
descriptors and also in the error path of msi_domain_populate_irqs().

Fixes: 2f2940d16823 ("genirq/msi: Remove filter from msi_free_descs_free_range()")
Reported-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/87mt4wkwnv.ffs@tglx
</content>
</entry>
<entry>
<title>platform-msi: Switch to the domain id aware MSI interfaces</title>
<updated>2022-12-05T18:21:00+00:00</updated>
<author>
<name>Ahmed S. Darwish</name>
<email>darwi@linutronix.de</email>
</author>
<published>2022-11-24T23:24:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b330ff9f0b03d6107ee941240ef63cc95374ff3d'/>
<id>urn:sha1:b330ff9f0b03d6107ee941240ef63cc95374ff3d</id>
<content type='text'>
Switch to the new domain id aware interfaces to phase out the previous
ones. No functional change.

Signed-off-by: Ahmed S. Darwish &lt;darwi@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Kevin Tian &lt;kevin.tian@intel.com&gt;
Acked-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20221124230314.513924920@linutronix.de

</content>
</entry>
<entry>
<title>genirq/msi: Remove filter from msi_free_descs_free_range()</title>
<updated>2022-11-17T14:15:18+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2022-11-11T13:54:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f2940d168236a92df524a1bd99fc7b0325918b5'/>
<id>urn:sha1:2f2940d168236a92df524a1bd99fc7b0325918b5</id>
<content type='text'>
When a range of descriptors is freed then all of them are not associated to
a linux interrupt. Remove the filter and add a warning to the free function.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Ashok Raj &lt;ashok.raj@intel.com&gt;
Reviewed-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Link: https://lore.kernel.org/r/20221111122013.888850936@linutronix.de

</content>
</entry>
<entry>
<title>platform-msi: Export symbol platform_msi_create_irq_domain()</title>
<updated>2022-09-28T13:21:05+00:00</updated>
<author>
<name>Frank Li</name>
<email>Frank.Li@nxp.com</email>
</author>
<published>2022-09-22T16:12:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aecd1de3b1438cc4ead086a025fb49a3a896d615'/>
<id>urn:sha1:aecd1de3b1438cc4ead086a025fb49a3a896d615</id>
<content type='text'>
Allow irqchip drivers using platform MSI to be built as modules.

Signed-off-by: Frank Li &lt;Frank.Li@nxp.com&gt;
[maz: rewrote commit message]
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20220922161246.20586-2-Frank.Li@nxp.com
</content>
</entry>
<entry>
<title>platform-msi: Simplify platform device MSI code</title>
<updated>2021-12-16T21:22:19+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2021-12-06T22:51:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a80713fea3d12344e1da18f9113c74cdb3c463f1'/>
<id>urn:sha1:a80713fea3d12344e1da18f9113c74cdb3c463f1</id>
<content type='text'>
The allocation code is overly complex. It tries to have the MSI index space
packed, which is not working when an interrupt is freed. There is no
requirement for this. The only requirement is that the MSI index is unique.

Move the MSI descriptor allocation into msi_domain_populate_irqs() and use
the Linux interrupt number as MSI index which fulfils the unique
requirement.

This requires to lock the MSI descriptors which makes the lock order
reverse to the regular MSI alloc/free functions vs. the domain
mutex. Assign a seperate lockdep class for these MSI device domains.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Nishanth Menon &lt;nm@ti.com&gt;
Reviewed-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Link: https://lore.kernel.org/r/20211206210748.956731741@linutronix.de

</content>
</entry>
<entry>
<title>platform-msi: Let core code handle MSI descriptors</title>
<updated>2021-12-16T21:22:19+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2021-12-06T22:51:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=653b50c5f96918238e0b51e783b291f6e9e692f9'/>
<id>urn:sha1:653b50c5f96918238e0b51e783b291f6e9e692f9</id>
<content type='text'>
Use the core functionality for platform MSI interrupt domains. The platform
device MSI interrupt domains will be converted in a later step.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Nishanth Menon &lt;nm@ti.com&gt;
Reviewed-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Link: https://lore.kernel.org/r/20211206210748.903173257@linutronix.de

</content>
</entry>
<entry>
<title>platform-msi: Use msi_desc::msi_index</title>
<updated>2021-12-16T21:16:40+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2021-12-10T22:19:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dba27c7fa36f468e7eb29b216879f8c33bf0955d'/>
<id>urn:sha1:dba27c7fa36f468e7eb29b216879f8c33bf0955d</id>
<content type='text'>
Use the common msi_index member and get rid of the pointless wrapper struct.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Nishanth Menon &lt;nm@ti.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Link: https://lore.kernel.org/r/20211210221814.413638645@linutronix.de

</content>
</entry>
<entry>
<title>platform-msi: Store platform private data pointer in msi_device_data</title>
<updated>2021-12-16T21:16:39+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2021-12-10T22:19:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fc22e7dbcdb3e06a3d3ce05fc91c6a2345411f9b'/>
<id>urn:sha1:fc22e7dbcdb3e06a3d3ce05fc91c6a2345411f9b</id>
<content type='text'>
Storing the platform private data in a MSI descriptor is sloppy at
best. The data belongs to the device and not to the descriptor.
Add a pointer to struct msi_device_data and store the pointer there.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Nishanth Menon &lt;nm@ti.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Link: https://lore.kernel.org/r/20211210221814.287680528@linutronix.de

</content>
</entry>
<entry>
<title>platform-msi: Rename functions and clarify comments</title>
<updated>2021-12-16T21:16:39+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2021-12-10T22:19:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9835cec6d557b0bff3d48bd91cd0484aba59386c'/>
<id>urn:sha1:9835cec6d557b0bff3d48bd91cd0484aba59386c</id>
<content type='text'>
It's hard to distinguish what platform_msi_domain_alloc() and
platform_msi_domain_alloc_irqs() are about. Make the distinction more
explicit and add comments which explain the use cases properly.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Nishanth Menon &lt;nm@ti.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Link: https://lore.kernel.org/r/20211210221814.228706214@linutronix.de

</content>
</entry>
<entry>
<title>platform-msi: Let the core code handle sysfs groups</title>
<updated>2021-12-16T21:16:39+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2021-12-10T22:19:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=25ce693ef7ea766c10d2f3e5da373ca25af09196'/>
<id>urn:sha1:25ce693ef7ea766c10d2f3e5da373ca25af09196</id>
<content type='text'>
Set the domain info flag and remove the local sysfs code.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Nishanth Menon &lt;nm@ti.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Link: https://lore.kernel.org/r/20211210221814.109408832@linutronix.de

</content>
</entry>
</feed>
