diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2024-01-27 21:47:41 +0530 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-02-15 17:55:41 +0100 |
commit | 9bbe13a5d414a7f8208dba64b54d2b6e4f7086bd (patch) | |
tree | 0f276d9ba7b3a8cdb606a82601fe30f7d3b63a52 /kernel/irq | |
parent | e49312fe09df36cc4eae0cd6e1b08b563a91e1bc (diff) |
genirq/msi: Provide MSI_FLAG_PARENT_PM_DEV
Some platform-MSI implementations require that power management is
redirected to the underlying interrupt chip device. To make this work
with per device MSI domains provide a new feature flag and let the
core code handle the setup of dev->pm_dev when set during device MSI
domain creation.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240127161753.114685-14-apatel@ventanamicro.com
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/msi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index 07e9daaf0657..f90952ebc494 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -845,8 +845,11 @@ static struct irq_domain *__msi_create_irq_domain(struct fwnode_handle *fwnode, domain = irq_domain_create_hierarchy(parent, flags | IRQ_DOMAIN_FLAG_MSI, 0, fwnode, &msi_domain_ops, info); - if (domain) + if (domain) { irq_domain_update_bus_token(domain, info->bus_token); + if (info->flags & MSI_FLAG_PARENT_PM_DEV) + domain->pm_dev = parent->pm_dev; + } return domain; } |