lkml.org 
[lkml]   [2022]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[patch V2 32/40] genirq/msi: Provide MSI_FLAG_PARENT_PM_DEV
    Date
    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>
    ---
    include/linux/msi.h | 2 ++
    kernel/irq/msi.c | 2 ++
    2 files changed, 4 insertions(+)

    --- a/include/linux/msi.h
    +++ b/include/linux/msi.h
    @@ -538,6 +538,8 @@ enum {
    MSI_FLAG_NOMASK_QUIRK = (1 << 7),
    /* Use dev->fwnode for MSI device domain creation */
    MSI_FLAG_USE_DEV_FWNODE = (1 << 8),
    + /* Set parent->dev into domain->pm_dev on device domain creation */
    + MSI_FLAG_PARENT_PM_DEV = (1 << 9),

    /* Mask for the generic functionality */
    MSI_GENERIC_FLAGS_MASK = GENMASK(15, 0),
    --- a/kernel/irq/msi.c
    +++ b/kernel/irq/msi.c
    @@ -884,6 +884,8 @@ static struct irq_domain *__msi_create_i
    if (!domain->name && info->chip)
    domain->name = info->chip->name;
    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;
    \
     
     \ /
      Last update: 2022-11-21 15:51    [W:3.345 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site