Skip to content

Commit a1b17c9

Browse files
multics69rafaeljw
authored andcommitted
PM: EM: Notify an event when the performance domain changes
Send an event to userspace when a performance domain is created or deleted, or its energy model is updated. Signed-off-by: Changwoo Min <changwoo@igalia.com> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Link: https://patch.msgid.link/20251020220914.320832-11-changwoo@igalia.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent b95a0c0 commit a1b17c9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

kernel/power/energy_model.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ int em_dev_update_perf_domain(struct device *dev,
352352
em_table_free(old_table);
353353

354354
mutex_unlock(&em_pd_mutex);
355+
356+
em_notify_pd_updated(pd);
355357
return 0;
356358
}
357359
EXPORT_SYMBOL_GPL(em_dev_update_perf_domain);
@@ -696,6 +698,7 @@ int em_dev_register_pd_no_update(struct device *dev, unsigned int nr_states,
696698
list_add_tail(&dev->em_pd->node, &em_pd_list);
697699
mutex_unlock(&em_pd_list_mutex);
698700

701+
em_notify_pd_created(dev->em_pd);
699702
return ret;
700703
}
701704
EXPORT_SYMBOL_GPL(em_dev_register_pd_no_update);
@@ -718,6 +721,8 @@ void em_dev_unregister_perf_domain(struct device *dev)
718721
list_del_init(&dev->em_pd->node);
719722
mutex_unlock(&em_pd_list_mutex);
720723

724+
em_notify_pd_deleted(dev->em_pd);
725+
721726
/*
722727
* The mutex separates all register/unregister requests and protects
723728
* from potential clean-up/setup issues in the debugfs directories.

0 commit comments

Comments
 (0)