Skip to content

Commit ac81e94

Browse files
committed
genirq/msi: Extend msi_parent_ops
Supporting per device MSI domains on ARM64, RISC-V and the zoo of interrupt mechanisms needs a bit more information than what the initial x86 implementation provides. Add the following fields: - required_flags: The flags which a parent domain requires to be set - bus_select_token: The bus token of the parent domain for select() - bus_select_mask: A bitmask of supported child domain bus types This allows to provide library functions which can be shared between various interrupt chip implementations and avoids replicating mostly similar code all over the place. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Anup Patel <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent de1ff30 commit ac81e94

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/linux/msi.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,13 +572,21 @@ enum {
572572
* struct msi_parent_ops - MSI parent domain callbacks and configuration info
573573
*
574574
* @supported_flags: Required: The supported MSI flags of the parent domain
575+
* @required_flags: Optional: The required MSI flags of the parent MSI domain
576+
* @bus_select_token: Optional: The bus token of the real parent domain for
577+
* irq_domain::select()
578+
* @bus_select_mask: Optional: A mask of supported BUS_DOMAINs for
579+
* irq_domain::select()
575580
* @prefix: Optional: Prefix for the domain and chip name
576581
* @init_dev_msi_info: Required: Callback for MSI parent domains to setup parent
577582
* domain specific domain flags, domain ops and interrupt chip
578583
* callbacks when a per device domain is created.
579584
*/
580585
struct msi_parent_ops {
581586
u32 supported_flags;
587+
u32 required_flags;
588+
u32 bus_select_token;
589+
u32 bus_select_mask;
582590
const char *prefix;
583591
bool (*init_dev_msi_info)(struct device *dev, struct irq_domain *domain,
584592
struct irq_domain *msi_parent_domain,

0 commit comments

Comments
 (0)