]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/base/power/opp/opp.h
Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-opp'
[linux.git] / drivers / base / power / opp / opp.h
index 586f36f94e28ca782a6aae151149413d85ba1d81..166eef99059955ca315126cc1f62a6f239e16616 100644 (file)
@@ -20,8 +20,7 @@
 #include <linux/list.h>
 #include <linux/limits.h>
 #include <linux/pm_opp.h>
-#include <linux/rculist.h>
-#include <linux/rcupdate.h>
+#include <linux/notifier.h>
 
 struct clk;
 struct regulator;
@@ -52,9 +51,6 @@ extern struct list_head opp_tables;
  * @node:      opp table node. The nodes are maintained throughout the lifetime
  *             of boot. It is expected only an optimal set of OPPs are
  *             added to the library by the SoC framework.
- *             RCU usage: opp table is traversed with RCU locks. node
- *             modification is possible realtime, hence the modifications
- *             are protected by the opp_table_lock for integrity.
  *             IMPORTANT: the opp nodes should be maintained in increasing
  *             order.
  * @kref:      for reference count of the OPP.
@@ -67,7 +63,6 @@ extern struct list_head opp_tables;
  * @clock_latency_ns: Latency (in nanoseconds) of switching to this OPP's
  *             frequency from any other OPP's frequency.
  * @opp_table: points back to the opp_table struct this opp belongs to
- * @rcu_head:  RCU callback head used for deferred freeing
  * @np:                OPP's device node.
  * @dentry:    debugfs dentry pointer (per opp)
  *
@@ -88,7 +83,6 @@ struct dev_pm_opp {
        unsigned long clock_latency_ns;
 
        struct opp_table *opp_table;
-       struct rcu_head rcu_head;
 
        struct device_node *np;
 
@@ -101,7 +95,6 @@ struct dev_pm_opp {
  * struct opp_device - devices managed by 'struct opp_table'
  * @node:      list node
  * @dev:       device to which the struct object belongs
- * @rcu_head:  RCU callback head used for deferred freeing
  * @dentry:    debugfs dentry pointer (per device)
  *
  * This is an internal data structure maintaining the devices that are managed
@@ -110,7 +103,6 @@ struct dev_pm_opp {
 struct opp_device {
        struct list_head node;
        const struct device *dev;
-       struct rcu_head rcu_head;
 
 #ifdef CONFIG_DEBUG_FS
        struct dentry *dentry;
@@ -128,10 +120,7 @@ enum opp_table_access {
  * @node:      table node - contains the devices with OPPs that
  *             have been registered. Nodes once added are not modified in this
  *             table.
- *             RCU usage: nodes are not modified in the table of opp_table,
- *             however addition is possible and is secured by opp_table_lock
- * @srcu_head: notifier head to notify the OPP availability changes.
- * @rcu_head:  RCU callback head used for deferred freeing
+ * @head:      notifier head to notify the OPP availability changes.
  * @dev_list:  list of devices that share these OPPs
  * @opp_list:  table of opps
  * @kref:      for reference count of the table.
@@ -156,16 +145,11 @@ enum opp_table_access {
  * This is an internal data structure maintaining the link to opps attached to
  * a device. This structure is not meant to be shared to users as it is
  * meant for book keeping and private to OPP library.
- *
- * Because the opp structures can be used from both rcu and srcu readers, we
- * need to wait for the grace period of both of them before freeing any
- * resources. And so we have used kfree_rcu() from within call_srcu() handlers.
  */
 struct opp_table {
        struct list_head node;
 
-       struct srcu_notifier_head srcu_head;
-       struct rcu_head rcu_head;
+       struct blocking_notifier_head head;
        struct list_head dev_list;
        struct list_head opp_list;
        struct kref kref;