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>
---
kernel/power/energy_model.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kernel/power/energy_model.c b/kernel/power/energy_model.c
index 6ed847046a2f..5764821faef3 100644
--- a/kernel/power/energy_model.c
+++ b/kernel/power/energy_model.c
@@ -352,6 +352,8 @@ int em_dev_update_perf_domain(struct device *dev,
em_table_free(old_table);
mutex_unlock(&em_pd_mutex);
+
+ em_notify_pd_update(pd);
return 0;
}
EXPORT_SYMBOL_GPL(em_dev_update_perf_domain);
@@ -675,6 +677,8 @@ int em_dev_register_perf_domain(struct device *dev, unsigned int nr_states,
list_add_tail(&dev->em_pd->node, &em_pd_list);
mutex_unlock(&em_pd_list_mutex);
+ em_notify_pd_create(dev->em_pd);
+
return ret;
}
EXPORT_SYMBOL_GPL(em_dev_register_perf_domain);
@@ -697,6 +701,8 @@ void em_dev_unregister_perf_domain(struct device *dev)
list_del_init(&dev->em_pd->node);
mutex_unlock(&em_pd_list_mutex);
+ em_notify_pd_delete(dev->em_pd);
+
/*
* The mutex separates all register/unregister requests and protects
* from potential clean-up/setup issues in the debugfs directories.
--
2.49.0