PM / Domains: Use power.sybsys_data to reduce overhead
Currently pm_genpd_runtime_resume() has to walk the list of devices from the device's PM domain to find the corresponding device list object containing the need_restore field to check if the driver's .runtime_resume() callback should be executed for the device. This is suboptimal and can be simplified by using power.sybsys_data to store device information used by the generic PM domains code. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
This commit is contained in:
@@ -421,12 +421,21 @@ enum rpm_request {
|
||||
|
||||
struct wakeup_source;
|
||||
|
||||
struct pm_domain_data {
|
||||
struct list_head list_node;
|
||||
struct device *dev;
|
||||
bool need_restore;
|
||||
};
|
||||
|
||||
struct pm_subsys_data {
|
||||
spinlock_t lock;
|
||||
unsigned int refcount;
|
||||
#ifdef CONFIG_PM_CLK
|
||||
struct list_head clock_list;
|
||||
#endif
|
||||
#ifdef CONFIG_PM_GENERIC_DOMAINS
|
||||
struct pm_domain_data domain_data;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct dev_pm_info {
|
||||
|
Reference in New Issue
Block a user