• Ulf Hansson's avatar
    PM / Domains: Add support for CPU devices to genpd · eb594b73
    Ulf Hansson authored
    To enable a CPU device to be attached to a PM domain managed by genpd,
    make a few changes to it for convenience.
    
    To be able to quickly find out what CPUs are attached to a genpd,
    which typically becomes useful from a genpd governor as subsequent
    changes are about to show, add a cpumask to struct generic_pm_domain
    to be updated when a CPU device gets attached to the genpd containing
    that cpumask. Also, propagate the cpumask changes upwards in the
    domain hierarchy to the master PM domains. This way, the cpumask for
    a genpd hierarchically reflects all CPUs attached to the topology
    below it.
    
    Finally, make this an opt-in feature, to avoid having to manage CPUs
    and the cpumask for a genpd that don't need it. To that end, add
    a new genpd configuration bit, GENPD_FLAG_CPU_DOMAIN.
    Co-developed-by: default avatarLina Iyer <lina.iyer@linaro.org>
    Acked-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    [ rjw: Changelog ]
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    eb594b73
domain.c 75.7 KB