diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2022-11-25 00:26:21 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2022-12-05 22:22:34 +0100 |
commit | 612ad43330d98f800f3784d68e7d8ab66d17a512 (patch) | |
tree | e2f1205ff58dc5ba4e2fc377e9b79336064f9d0c /net/mptcp | |
parent | b834e3c08fc6c4460c2bce6575cba4705f6301e3 (diff) | |
download | linux-612ad43330d98f800f3784d68e7d8ab66d17a512.tar.gz linux-612ad43330d98f800f3784d68e7d8ab66d17a512.tar.bz2 linux-612ad43330d98f800f3784d68e7d8ab66d17a512.zip |
PCI/MSI: Split MSI-X descriptor setup
The upcoming mechanism to allocate MSI-X vectors after enabling MSI-X needs
to share some of the MSI-X descriptor setup.
The regular descriptor setup on enable has the following code flow:
1) Allocate descriptor
2) Setup descriptor with PCI specific data
3) Insert descriptor
4) Allocate interrupts which in turn scans the inserted
descriptors
This cannot be easily changed because the PCI/MSI code needs to handle the
legacy architecture specific allocation model and the irq domain model
where quite some domains have the assumption that the above flow is how it
works.
Ideally the code flow should look like this:
1) Invoke allocation at the MSI core
2) MSI core allocates descriptor
3) MSI core calls back into the irq domain which fills in
the domain specific parts
This could be done for underlying parent MSI domains which support
post-enable allocation/free but that would create significantly different
code pathes for MSI/MSI-X enable.
Though for dynamic allocation which wants to share the allocation code with
the upcoming PCI/IMS support it's the right thing to do.
Split the MSI-X descriptor setup into the preallocation part which just sets
the index and fills in the horrible hack of virtual IRQs and the real PCI
specific MSI-X setup part which solely depends on the index in the
descriptor. This allows to provide a common dynamic allocation interface at
the MSI core level for both PCI/MSI-X and PCI/IMS.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221124232326.616292598@linutronix.de
Diffstat (limited to 'net/mptcp')
0 files changed, 0 insertions, 0 deletions