Thread (27 messages) 27 messages, 3 authors, 2016-10-07

[PATCH 6/8] PM / Domains: Abstract genpd locking

From: Lina Iyer <hidden>
Date: 2016-10-06 15:56:50
Also in: linux-arm-msm, linux-pm

On Thu, Oct 06 2016 at 04:56 -0600, Ulf Hansson wrote:
On 5 October 2016 at 22:31, Lina Iyer [off-list ref] wrote:
quoted
Abstract genpd lock/unlock calls, in preparation for domain specific
locks added in the following patches.

Cc: Kevin Hilman <khilman@kernel.org>
Cc: Rafael J. Wysocki <redacted>
Signed-off-by: Lina Iyer <redacted>
Signed-off-by: Ulf Hansson <redacted>
---
 drivers/base/power/domain.c | 121 +++++++++++++++++++++++++++++---------------
 include/linux/pm_domain.h   |   5 +-
 2 files changed, 85 insertions(+), 41 deletions(-)
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 52fcdb2..82e6a33 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -39,6 +39,46 @@
 static LIST_HEAD(gpd_list);
 static DEFINE_MUTEX(gpd_list_lock);

+struct genpd_lock_fns {
May I suggest you to rename the struct to "genpd_lock_ops"?

I think "*_ops" is in general what we use in the kernel for callbacks
and functions pointers like these.
OK.

Thanks,
Lina
quoted
+       void (*lock)(struct generic_pm_domain *genpd);
+       void (*lock_nested)(struct generic_pm_domain *genpd, int depth);
+       int (*lock_interruptible)(struct generic_pm_domain *genpd);
+       void (*unlock)(struct generic_pm_domain *genpd);
+};
+
[...]

Otherwise this looks good to me!

Kind regards
Uffe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help