On 06.12.21 18:01, Anthony PERARD wrote:
There is no need to include current directory.
Signed-off-by: Anthony PERARD
Reviewed-by: Juergen Gross
Juergen
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature
On 06.12.21 18:01, Anthony PERARD wrote:
This include hasn't been useful since e567964a54 (tools: drop ia64
support).
Signed-off-by: Anthony PERARD
Reviewed-by: Juergen Gross
Juergen
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP
On Mon, Dec 06, 2021 at 11:27:59PM +0100, Thomas Gleixner wrote:
> Get rid of yet another irqdomain callback and let the core code return the
> already available information of how many descriptors could be allocated.
>
> Signed-off-by: Thomas Gleixner
> Tested-by: Juergen Gross
> Reviewed-by:
On Mon, Dec 06, 2021 at 11:28:00PM +0100, Thomas Gleixner wrote:
> The irqdomain code already returns the information. Move the loop to the
> legacy code.
>
> Signed-off-by: Thomas Gleixner
> Tested-by: Juergen Gross
> Reviewed-by: Jason Gunthorpe
Reviewed-by: Greg Kroah-Hartman
flight 167215 xen-4.13-testing real [real]
http://logs.test-lab.xenproject.org/osstest/logs/167215/
Failures :-/ but no regressions.
Tests which did not succeed, but are not blocking:
test-amd64-amd64-xl-qemuu-win7-amd64 19 guest-stopfail like 166345
On Mon, Dec 06, 2021 at 11:39:41PM +0100, Thomas Gleixner wrote:
> Use msi_get_vector() and handle the return value to be compatible.
>
> No functional change intended.
>
> Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
On Mon, Dec 06, 2021 at 11:39:25PM +0100, Thomas Gleixner wrote:
> Add a properties field which allows core code to store information for easy
> retrieval in order to replace MSI descriptor fiddling.
>
> Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
On Mon, Dec 06, 2021 at 11:39:26PM +0100, Thomas Gleixner wrote:
> Store the properties which are interesting for various places so the MSI
> descriptor fiddling can be removed.
>
> Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
On Mon, Dec 06, 2021 at 11:39:33PM +0100, Thomas Gleixner wrote:
> instead of fiddling with MSI descriptors.
>
> Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
On Mon, Dec 06, 2021 at 11:39:37PM +0100, Thomas Gleixner wrote:
> Set the domain info flag and remove the check.
>
> Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
On Mon, Dec 06, 2021 at 11:39:39PM +0100, Thomas Gleixner wrote:
> This allows drivers to retrieve the Linux interrupt number instead of
> fiddling with MSI descriptors.
>
> msi_get_virq() returns the Linux interrupt number or 0 in case that there
> is no entry for the given MSI index.
>
>
On 06.12.21 18:01, Anthony PERARD wrote:
This var was originally $(CFLAGS_$*.o), and probably was copied from
the generic %.o:%.c rules.
Nothing sets CFLAGS_libxl.o, so remove it.
Signed-off-by: Anthony PERARD
Reviewed-by: Juergen Gross
Juergen
OpenPGP_0xB0DE9DD628BF132F.asc
On Mon, Dec 06, 2021 at 11:27:57PM +0100, Thomas Gleixner wrote:
> No users outside of that file.
>
> Signed-off-by: Thomas Gleixner
> Tested-by: Juergen Gross
> Reviewed-by: Jason Gunthorpe
Reviewed-by: Greg Kroah-Hartman
On Mon, Dec 06, 2021 at 11:27:56PM +0100, Thomas Gleixner wrote:
> It's only required for PCI/MSI. So no point in having it in every struct
> device.
>
> Signed-off-by: Thomas Gleixner
Yes!!!
Reviewed-by: Greg Kroah-Hartman
On Mon, Dec 06, 2021 at 11:27:49PM +0100, Thomas Gleixner wrote:
> These functions are required even when CONFIG_PCI_MSI is not set. Move them
> to their own file.
>
> Signed-off-by: Thomas Gleixner
> Tested-by: Juergen Gross
> Reviewed-by: Jason Gunthorpe
Reviewed-by: Greg Kroah-Hartman
On 06.12.21 18:01, Anthony PERARD wrote:
comma, empty, space are already defined in "Config.mk".
Signed-off-by: Anthony PERARD
Reviewed-by: Juergen Gross
Juergen
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature
On Mon, Dec 06, 2021 at 11:27:52PM +0100, Thomas Gleixner wrote:
> Move the irqdomain specific code into it's own file.
>
> Signed-off-by: Thomas Gleixner
> Tested-by: Juergen Gross
> Reviewed-by: Jason Gunthorpe
Reviewed-by: Greg Kroah-Hartman
On Mon, Dec 06, 2021 at 11:27:51PM +0100, Thomas Gleixner wrote:
> Split out the non irqdomain code into its own file.
>
> Signed-off-by: Thomas Gleixner
> Tested-by: Juergen Gross
> Reviewed-by: Jason Gunthorpe
Reviewed-by: Greg Kroah-Hartman
On Mon, Dec 06, 2021 at 11:27:46PM +0100, Thomas Gleixner wrote:
> No need to walk the descriptors and check for each one whether the entries
> pointer function argument is NULL. Do it once.
>
> Signed-off-by: Thomas Gleixner
> Tested-by: Juergen Gross
> Reviewed-by: Jason Gunthorpe
On 06.12.21 18:01, Anthony PERARD wrote:
They are no more directory libs/*/include.
Signed-off-by: Anthony PERARD
Reviewed-by: Juergen Gross
Juergen
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature
On Mon, Dec 06, 2021 at 11:27:39PM +0100, Thomas Gleixner wrote:
> The unnamed struct sucks and is in the way of further cleanups. Stick the
> PCI related MSI data into a real data structure and cleanup all users.
>
> No functional change.
>
> Signed-off-by: Thomas Gleixner
> Tested-by: Juergen
On 06.12.21 18:01, Anthony PERARD wrote:
libxenutil doesn't include _paths.h so no need to generate it.
libxenctrl doesn't use macros from _paths.h so can be removed.
Fix libxenguest to include _paths.h properly instead of relying on
xc_private.h
Signed-off-by: Anthony PERARD
Reviewed-by:
On Mon, Dec 06, 2021 at 11:27:36PM +0100, Thomas Gleixner wrote:
> instead of fiddling with msi descriptors.
>
> Signed-off-by: Thomas Gleixner
> Tested-by: Juergen Gross
> Reviewed-by: Jason Gunthorpe
Reviewed-by: Greg Kroah-Hartman
On Mon, Dec 06, 2021 at 11:27:31PM +0100, Thomas Gleixner wrote:
> Remove the kobject.h include from msi.h as it's not required and add a
> sysfs.h include to the core code instead.
>
> Signed-off-by: Thomas Gleixner
> Tested-by: Juergen Gross
> Reviewed-by: Jason Gunthorpe
Reviewed-by: Greg
On Mon, Dec 06, 2021 at 11:27:28PM +0100, Thomas Gleixner wrote:
> No point in building unused code when CONFIG_SYSFS=n.
>
> Signed-off-by: Thomas Gleixner
> Tested-by: Juergen Gross
> Reviewed-by: Jason Gunthorpe
Reviewed-by: Greg Kroah-Hartman
Hello Thomas,
On 12/6/21 23:27, Thomas Gleixner wrote:
This code is broken since day one. ppc4xx_setup_msi_irqs() has the
following gems:
1) The handling of the result of msi_bitmap_alloc_hwirqs() is completely
broken:
When the result is greater than or equal 0 (bitmap
Hi Julien,
On 06.12.2021 17:40, Julien Grall wrote:
>
>
> On 06/12/2021 15:00, Michal Orzel wrote:
>> Hi Julien,
>
> Hi Michal,
>
>> On 06.12.2021 15:39, Julien Grall wrote:
>>> Hi Michal,
>>>
>>> On 06/12/2021 14:19, Michal Orzel wrote:
vtimer_update_irqs, vtimer_update_irq and
flight 167214 xen-4.12-testing real [real]
http://logs.test-lab.xenproject.org/osstest/logs/167214/
Failures :-/ but no regressions.
Tests which did not succeed, but are not blocking:
test-amd64-amd64-xl-qcow219 guest-localmigrate/x10 fail like 166313
flight 167210 xen-unstable real [real]
http://logs.test-lab.xenproject.org/osstest/logs/167210/
Failures :-/ but no regressions.
Tests which are failing intermittently (not blocking):
test-amd64-i386-xl-qemut-debianhvm-i386-xsm 12 debian-hvm-install fail in
167174 pass in 167210
flight 167220 xen-unstable-smoke real [real]
http://logs.test-lab.xenproject.org/osstest/logs/167220/
Failures :-/ but no regressions.
Tests which did not succeed, but are not blocking:
test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass
test-arm64-arm64-xl-xsm
The sysfs handling for MSI is a convoluted maze and it is in the way of
supporting dynamic expansion of the MSI-X vectors because it only supports
a one off bulk population/free of the sysfs entries.
Change it to do:
1) Creating an empty sysfs attribute group when msi_device_data is
Replace the about to vanish iterators and make use of the filtering. Take
the descriptor lock around the iterators.
Signed-off-by: Thomas Gleixner
---
drivers/pci/controller/pci-hyperv.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
---
Use the new iterator functions and add locking where required.
Signed-off-by: Thomas Gleixner
---
kernel/irq/msi.c | 23 ++-
1 file changed, 14 insertions(+), 9 deletions(-)
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -348,6 +348,7 @@
Replace the about to vanish iterators and make use of the filtering.
Signed-off-by: Thomas Gleixner
---
arch/powerpc/platforms/pasemi/msi.c |9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
--- a/arch/powerpc/platforms/pasemi/msi.c
+++ b/arch/powerpc/platforms/pasemi/msi.c
@@
The current linked list storage for MSI descriptors is suboptimal in
several ways:
1) Looking up a MSI desciptor requires a O(n) list walk in the worst case
2) The upcoming support of runtime expansion of MSI-X vectors would need
to do a full list walk to figure out whether a particular
Let the MSI irq domain code handle descriptor allocation and free.
Signed-off-by: Thomas Gleixner
---
drivers/bus/fsl-mc/fsl-mc-msi.c | 61 ++--
1 file changed, 4 insertions(+), 57 deletions(-)
--- a/drivers/bus/fsl-mc/fsl-mc-msi.c
+++
There is no real reason to do several loops over the MSI descriptors
instead of just doing one loop. In case of an error everything is undone
anyway so it does not matter whether it's a partial or a full rollback.
Signed-off-by: Thomas Gleixner
---
.clang-format |1
Replace the about to vanish iterators.
Signed-off-by: Thomas Gleixner
---
drivers/pci/xen-pcifront.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/pci/xen-pcifront.c
+++ b/drivers/pci/xen-pcifront.c
@@ -262,7 +262,7 @@ static int pci_frontend_enable_msix(stru
}
Replace the about to vanish iterators and make use of the filtering.
Signed-off-by: Thomas Gleixner
---
arch/powerpc/sysdev/fsl_msi.c |8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -125,17 +125,13 @@
Replace the about to vanish iterators, make use of the filtering and take
the descriptor lock around the iteration.
Signed-off-by: Thomas Gleixner
Reviewed-by: Logan Gunthorpe
Cc: Logan Gunthorpe
Cc: Jon Mason
Cc: Dave Jiang
Cc: Allen Hubbe
Cc: linux-...@googlegroups.com
---
Replace the about to vanish iterators and make use of the filtering.
Signed-off-by: Thomas Gleixner
---
arch/powerpc/platforms/cell/axon_msi.c |7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
--- a/arch/powerpc/platforms/cell/axon_msi.c
+++
The function has no users and is pointless now that the core frees the MSI
descriptors, which means potential users can just use msi_domain_free_irqs().
Signed-off-by: Thomas Gleixner
---
drivers/soc/ti/ti_sci_inta_msi.c |6 --
include/linux/soc/ti/ti_sci_inta_msi.h |1 -
2
Protect the allocation properly and use the core allocation and free
mechanism.
No functional change intended.
Signed-off-by: Thomas Gleixner
---
drivers/soc/ti/ti_sci_inta_msi.c | 71 +--
1 file changed, 25 insertions(+), 46 deletions(-)
---
Get rid of the old iterators, alloc/free functions and adjust the core code
accordingly.
Signed-off-by: Thomas Gleixner
---
include/linux/msi.h | 15 ---
kernel/irq/msi.c| 31 +++
2 files changed, 15 insertions(+), 31 deletions(-)
---
Signed-off-by: Thomas Gleixner
---
include/linux/msi.h | 14 ++
1 file changed, 14 insertions(+)
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -2,6 +2,20 @@
#ifndef LINUX_MSI_H
#define LINUX_MSI_H
+/*
+ * This header file contains MSI data structures and functions
Replace the about to vanish iterators and make use of the filtering.
Signed-off-by: Thomas Gleixner
---
arch/powerpc/sysdev/mpic_u3msi.c |9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
--- a/arch/powerpc/sysdev/mpic_u3msi.c
+++ b/arch/powerpc/sysdev/mpic_u3msi.c
@@ -104,17
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
---
drivers/base/platform-msi.c | 112 ++--
1 file changed, 48 insertions(+), 64
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
Replace the about to vanish iterators and make use of the filtering.
Signed-off-by: Thomas Gleixner
Tested-by: Niklas Schnelle
Acked-by: Niklas Schnelle
Cc: linux-s...@vger.kernel.org
Cc: Heiko Carstens
Cc: Christian Borntraeger
---
arch/s390/pci/pci_irq.c |6 ++
1 file changed, 2
Replace the about to vanish iterators and make use of the filtering.
Signed-off-by: Thomas Gleixner
---
arch/powerpc/platforms/4xx/hsta_msi.c |7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
--- a/arch/powerpc/platforms/4xx/hsta_msi.c
+++ b/arch/powerpc/platforms/4xx/hsta_msi.c
Replace the about to vanish iterators.
Signed-off-by: Thomas Gleixner
---
arch/x86/pci/xen.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -184,7 +184,7 @@ static int xen_setup_msi_irqs(struct pci
if (ret)
Use the new iterator functions which pave the way for dynamically extending
MSI-X vectors.
Signed-off-by: Thomas Gleixner
---
drivers/pci/msi/irqdomain.c |4 ++--
drivers/pci/msi/legacy.c| 19 ---
drivers/pci/msi/msi.c | 30 ++
3
Set the domain info flag which tells the core code to free the MSI
descriptors from msi_domain_free_irqs() and add an explicit call to the
core function into the legacy code.
Signed-off-by: Thomas Gleixner
---
drivers/pci/msi/irqdomain.c |3 ++-
drivers/pci/msi/legacy.c|1 +
Simplify the allocation of MSI descriptors by using msi_add_msi_desc()
which moves the storage handling to core code and prepares for dynamic
extension of the MSI-X vector space.
Signed-off-by: Thomas Gleixner
---
drivers/pci/msi/msi.c | 122 --
To prepare for dynamic extension of MSI-X vectors, protect the MSI
operations for MSI and MSI-X. This requires to move the invocation of
irq_create_affinity_masks() out of the descriptor lock section to avoid
reverse lock ordering vs. CPU hotplug lock as some callers of the PCI/MSI
allocation
Provide domain info flags which tell the core to allocate simple
descriptors or to free descriptors when the interrupts are freed and
implement the required functionality.
Signed-off-by: Thomas Gleixner
---
include/linux/msi.h | 17 +
kernel/irq/msi.c| 48
Provide msi_alloc_msi_desc() which takes a template MSI descriptor for
initializing a newly allocated descriptor. This allows to simplify various
usage sites of alloc_msi_entry() and moves the storage handling into the
core code.
For simple cases where only a linear vector space is required
In preparation for dynamic handling of MSI-X interrupts provide a new set
of MSI descriptor accessor functions and iterators. They are benefitial per
se as they allow to cleanup quite some code in various MSI domain
implementations.
Signed-off-by: Thomas Gleixner
---
include/linux/msi.h | 33
It's only required when MSI is in use.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
---
drivers/base/core.c|3 ---
include/linux/device.h |4
include/linux/msi.h|4 +++-
kernel/irq/msi.c |5 -
4 files changed, 7 insertions(+), 9
For upcoming runtime extensions of MSI-X interrupts it's required to
protect the MSI descriptor list. Add a mutex to struct msi_device_data and
provide lock/unlock functions.
Signed-off-by: Thomas Gleixner
---
include/linux/msi.h |5 +
kernel/irq/msi.c| 25
Usage sites which do allocations of the MSI descriptors before invoking
msi_domain_alloc_irqs() require to lock the MSI decriptors accross the
operation.
Provide entry points which can be called with the MSI mutex held and lock
the mutex in the existing entry points.
Signed-off-by: Thomas
This is the third part of [PCI]MSI refactoring which aims to provide the
ability of expanding MSI-X vectors after enabling MSI-X.
The first two parts of this work can be found here:
https://lore.kernel.org/r/20211206210147.872865...@linutronix.de
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
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
Allocate the MSI device data on first invocation of the allocation function.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
Cc: Stuart Yoder
Cc: Laurentiu Tudor
---
drivers/bus/fsl-mc/fsl-mc-msi.c | 14 --
1 file changed, 8
Create struct msi_device_data and add a pointer of that type to struct
dev_msi_info, which is part of struct device. Provide an allocator function
which can be invoked from the MSI interrupt allocation code pathes.
Add a properties field to the data structure as a first member so the
allocation
Replace open coded MSI descriptor chasing and use the proper accessor
functions instead.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
drivers/pci/msi/msi.c | 26 ++
1 file changed, 10 insertions(+), 16 deletions(-)
Just use the core function msi_get_virq().
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
drivers/dma/ti/k3-udma-private.c |6 ++
drivers/dma/ti/k3-udma.c | 10 --
drivers/soc/ti/k3-ringacc.c|
instead of fiddling with MSI descriptors.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
kernel/irq/msi.c | 17 ++---
1 file changed, 2 insertions(+), 15 deletions(-)
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -122,21
Add a properties field which allows core code to store information for easy
retrieval in order to replace MSI descriptor fiddling.
Signed-off-by: Thomas Gleixner
---
V2: Add a setter function to prepare for future changes
---
include/linux/msi.h | 17 +
kernel/irq/msi.c|
Storing a pointer to the MSI descriptor just to track the Linux interrupt
number is daft. Just store the interrupt number and be done with it.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
Cc: Stuart Yoder
---
drivers/bus/fsl-mc/dprc-driver.c
Store the properties which are interesting for various places so the MSI
descriptor fiddling can be removed.
Signed-off-by: Thomas Gleixner
---
V2: Use the setter function
---
drivers/pci/msi/msi.c |8
1 file changed, 8 insertions(+)
--- a/drivers/pci/msi/msi.c
+++
instead of fiddling with MSI descriptors.
Signed-off-by: Thomas Gleixner
---
V2: Invoke the function with the correct number of arguments - Andy
---
arch/powerpc/platforms/cell/axon_msi.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
Set the domain info flag and remove the check.
Signed-off-by: Thomas Gleixner
---
V2: Remove it completely - Cedric
---
arch/powerpc/platforms/pseries/msi.c | 33 -
1 file changed, 8 insertions(+), 25 deletions(-)
--- a/arch/powerpc/platforms/pseries/msi.c
+++
There is no reason to walk the MSI descriptors to retrieve the interrupt
number for a device. Use msi_get_virq() instead.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
Acked-by: Sinan Kaya
Cc: dmaeng...@vger.kernel.org
---
Allocate MSI device data on first use, i.e. when a PCI driver invokes one
of the PCI/MSI enablement functions.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
drivers/pci/msi/msi.c | 20 +++-
1 file changed, 15 insertions(+), 5
All non PCI/MSI usage variants have data structures in struct msi_desc with
only one member: xxx_index. PCI/MSI has a entry_nr member.
Add a common msi_index member to struct msi_desc so all implementations can
share it which allows further consolidation.
Signed-off-by: Thomas Gleixner
The usage of msi_desc::pci::entry_nr is confusing at best. It's the index
into the MSI[X] descriptor table.
Use msi_desc::msi_index which is shared between all MSI incarnations
instead of having a PCI specific storage for no value.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Use the common msi_index member and get rid of the pointless wrapper struct.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
drivers/irqchip/irq-ti-sci-inta.c |2 +-
drivers/soc/ti/ti_sci_inta_msi.c |6 +++---
include/linux/msi.h
Allocate the MSI device data on first invocation of the allocation function
for platform MSI private data.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
drivers/base/platform-msi.c |8 +++-
1 file changed, 7 insertions(+), 1
Let the core code fiddle with the MSI descriptor retrieval.
Signed-off-by: Thomas Gleixner
Tested-by: Robin Murphy
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 19 +++
1 file changed, 3 insertions(+), 16
This is the second part of [PCI]MSI refactoring which aims to provide the
ability of expanding MSI-X vectors after enabling MSI-X.
The first part of this work can be found here:
https://lore.kernel.org/r/20211206210147.872865...@linutronix.de
This second part has the following important
This allows drivers to retrieve the Linux interrupt number instead of
fiddling with MSI descriptors.
msi_get_virq() returns the Linux interrupt number or 0 in case that there
is no entry for the given MSI index.
Signed-off-by: Thomas Gleixner
---
V2: Simplify the implementation and let PCI deal
Add new allocation functions which can be activated by domain info
flags. They store the groups pointer in struct msi_device_data.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
include/linux/msi.h |4
kernel/irq/msi.c| 42
instead of fiddling with MSI descriptors.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
arch/x86/pci/xen.c |6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -399,9 +399,7 @@
instead of fiddling with MSI descriptors.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
arch/powerpc/platforms/pseries/msi.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/powerpc/platforms/pseries/msi.c
+++
Allocate the MSI device data on first invocation of the allocation function.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
Cc: Nishanth Menon
Cc: Tero Kristo
Cc: Santosh Shilimkar
Cc: linux-arm-ker...@lists.infradead.org
---
Use msi_get_vector() and handle the return value to be compatible.
No functional change intended.
Signed-off-by: Thomas Gleixner
---
V2: Handle the INTx case directly instead of trying to be overly smart - Marc
---
drivers/pci/msi/msi.c | 25 +
1 file changed, 5
Set the domain info flag and remove the local sysfs code.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
drivers/base/platform-msi.c | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
--- a/drivers/base/platform-msi.c
+++
Storing a pointer to the MSI descriptor just to keep track of the Linux
interrupt number is daft. Use msi_get_virq() instead.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
Cc: dmaeng...@vger.kernel.org
Cc: Vinod Koul
---
drivers/dma/mv_xor_v2.c |
No more users. Refactor the core code accordingly and move the global
interface under CONFIG_PCI_MSI_ARCH_FALLBACKS.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
include/linux/msi.h | 29 +++-
kernel/irq/msi.c|
Provide a domain info flag which makes the core code check for a contiguous
MSI-X index on allocation. That's simpler than checking it at some other
domain callback in architecture code.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
Use the common msi_index member and get rid of the pointless wrapper struct.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
Cc: linux-arm-ker...@lists.infradead.org
Cc: io...@lists.linux-foundation.org
Cc: dmaeng...@vger.kernel.org
---
No point in retrieving the MSI descriptors. Just query the Linux interrupt
number.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
drivers/mailbox/bcm-flexrm-mailbox.c |7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
---
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
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
Let the core code fiddle with the MSI descriptor retrieval.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
Cc: Mark Rutland
Cc: Will Deacon
Cc: linux-arm-ker...@lists.infradead.org
---
drivers/perf/arm_smmuv3_pmu.c |5 +
1 file changed, 1
Set the domain info flag which makes the core code handle sysfs groups and
put an explicit invocation into the legacy code.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
drivers/pci/msi/irqdomain.c |2 +-
drivers/pci/msi/legacy.c|6
instead of fiddling with MSI descriptors.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
arch/x86/kernel/apic/msi.c |5 +
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/arch/x86/kernel/apic/msi.c
+++ b/arch/x86/kernel/apic/msi.c
Use the common msi_index member and get rid of the pointless wrapper struct.
Signed-off-by: Thomas Gleixner
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jason Gunthorpe
---
drivers/bus/fsl-mc/fsl-mc-allocator.c |2 +-
drivers/bus/fsl-mc/fsl-mc-msi.c |6 +++---
On Mon, 6 Dec 2021, Julien Grall wrote:
> On 01/12/2021 08:41, Bertrand Marquis wrote:
> > Hi Ayan,
> >
> > > On 30 Nov 2021, at 19:13, Ayan Kumar Halder
> > > wrote:
> > >
> > > Hi Andre,
> > >
> > > Thanks for your comments. They are useful.
> > >
> > > On 30/11/2021 09:49, Andre Przywara
The only unconditional part of MSI data in struct device is the irqdomain
pointer. Everything else can be allocated on demand. Create a data
structure and move the irqdomain pointer into it. The other MSI specific
parts are going to be removed from struct device in later steps.
Signed-off-by:
1 - 100 of 300 matches
Mail list logo