PM / Domains: Remove some code and APIs to simplify genpd
Subsystems (8)
cover PM / Domains: Remove some code and APIs to simplify genpd
Some parts in the generic power domain seems just too generic. Simplify the code by removing it, which also happens to include two APIs.
For the SOC specific patch for shmobile, I am seeking an ack since it needs to go together with the rest of patches.
Ulf Hansson (4):
ARM: shmobile: Ignore callbacks for subsys generic_pm_domain_data PM / Domains: Ignore callbacks for subsys generic_pm_domain_data PM / Domains: Remove the pm_genpd_add|remove_callbacks APIs PM / Domains: Remove system PM callbacks from gpd_dev_ops
arch/arm/mach-shmobile/pm-rmobile.c | 38 +---- drivers/base/power/domain.c | 285 +---------------------------------- include/linux/pm_domain.h | 28 ---- 3 files changed, 11 insertions(+), 340 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/4 ARM: shmobile: Ignore callbacks for subsys generic_pm_domain_data
There are no active users of these callbacks, thus there are no benefit of trying to invoke them.
---
I am seeking ack from the SOC maintainers since this needs to go with the other patches in this patchset on the PM core.
--- arch/arm/mach-shmobile/pm-rmobile.c | 38 +++-------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-)
arch/arm/mach-shmobile/pm-rmobile.c +3 -35
@@ -99,39 +99,7 @@ static int rmobile_pd_power_up(struct generic_pm_domain *genpd)static bool rmobile_pd_active_wakeup (struct device *dev) { -bool (*active_wakeup)(struct device *dev); - - active_wakeup =dev_gpd_data (dev)->ops.active_wakeup; -return active_wakeup ?active_wakeup (dev) : true; -} - -static int rmobile_pd_stop_dev (struct device *dev) -{ -int (*stop)(struct device *dev); - - stop =dev_gpd_data (dev)->ops.stop; -if (stop) { -int ret =stop (dev); -if (ret) -return ret; - } -return pm_clk_suspend (dev); -} - -static int rmobile_pd_start_dev (struct device *dev) -{ -int (*start)(struct device *dev); -int ret; - - ret =pm_clk_resume (dev); -if (ret) -return ret; - - start =dev_gpd_data (dev)->ops.start; -if (start) - ret =start (dev); - -return ret; +return true; }static void rmobile_init_pm_domain (struct rmobile_pm_domain *rmobile_pd)
@@ -140,8 +108,8 @@ static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd)struct dev_power_governor *gov = rmobile_pd->gov;pm_genpd_init (genpd, gov ? : &simple_qos_governor, false); - genpd->dev_ops.stop = rmobile_pd_stop_dev; - genpd->dev_ops.start = rmobile_pd_start_dev; + genpd->dev_ops.stop = pm_clk_suspend; + genpd->dev_ops.start = pm_clk_resume; genpd->dev_ops.active_wakeup = rmobile_pd_active_wakeup; genpd->dev_irq_safe = true; genpd->power_off = rmobile_pd_power_down;
Signature · 1 line
1.7.9.5
PATCH 1/4 ARM: shmobile: Ignore callbacks for subsys generic_pm_domain_data
Quoted 10 lines · Ulf Hansson
There are no active users of these callbacks, thus there are no benefit of trying to invoke them.
Cc Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>Signed-off-by Ulf Hansson <[email protected]>---
I am seeking ack from the SOC maintainers since this needs to go with the other patches in this patchset on the PM core.
In order to reduce the possibility of conflicts I would prefer to take this patch through my tree.
Quoted 69 lines
--- arch/arm/mach-shmobile/pm-rmobile.c | 38 +++-------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-)arch/arm/mach-shmobile/pm-rmobile.c +3
-35@@ -99,39 +99,7 @@ static int rmobile_pd_power_up(struct generic_pm_domain *genpd)static bool rmobile_pd_active_wakeup (struct device *dev) { -bool (*active_wakeup)(struct device *dev); - - active_wakeup =dev_gpd_data (dev)->ops.active_wakeup; -return active_wakeup ?active_wakeup (dev) : true; -} - -static int rmobile_pd_stop_dev (struct device *dev) -{ -int (*stop)(struct device *dev); - - stop =dev_gpd_data (dev)->ops.stop; -if (stop) { -int ret =stop (dev); -if (ret) -return ret; - } -return pm_clk_suspend (dev); -} - -static int rmobile_pd_start_dev (struct device *dev) -{ -int (*start)(struct device *dev); -int ret; - - ret =pm_clk_resume (dev); -if (ret) -return ret; - - start =dev_gpd_data (dev)->ops.start; -if (start) - ret =start (dev); - -return ret; +return true; }static void rmobile_init_pm_domain (struct rmobile_pm_domain *rmobile_pd)@@ -140,8 +108,8 @@ static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd)struct dev_power_governor *gov = rmobile_pd->gov;pm_genpd_init (genpd, gov ? : &simple_qos_governor, false); - genpd->dev_ops.stop = rmobile_pd_stop_dev; - genpd->dev_ops.start = rmobile_pd_start_dev; + genpd->dev_ops.stop = pm_clk_suspend; + genpd->dev_ops.start = pm_clk_resume; genpd->dev_ops.active_wakeup = rmobile_pd_active_wakeup; genpd->dev_irq_safe = true; genpd->power_off = rmobile_pd_power_down;Signature · 7 lines
1.7.9.5 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/4 ARM: shmobile: Ignore callbacks for subsys generic_pm_domain_data
Quoted 9 lines · Simon Horman
Quoted 8 lines · Ulf Hansson
There are no active users of these callbacks, thus there are no benefit of trying to invoke them.
Cc Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>Signed-off-by Ulf Hansson <[email protected]>---
Quoted 5 lines
Quoted 2 lines
I am seeking ack from the SOC maintainers since this needs to go with the other patches in this patchset on the PM core.
In order to reduce the possibility of conflicts I would prefer to take this patch through my tree.
Okay, go ahead!
Kind regards
Ulf Hansson
Quoted 70 lines
Quoted 70 lines
--- arch/arm/mach-shmobile/pm-rmobile.c | 38 +++-------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-)arch/arm/mach-shmobile/pm-rmobile.c +3
-36@@ -99,39 +99,7 @@ static int rmobile_pd_power_up(struct generic_pm_domain *genpd)static bool rmobile_pd_active_wakeup (struct device *dev) { -bool (*active_wakeup)(struct device *dev); - - active_wakeup =dev_gpd_data (dev)->ops.active_wakeup; -return active_wakeup ?active_wakeup (dev) : true; -} - -static int rmobile_pd_stop_dev (struct device *dev) -{ -int (*stop)(struct device *dev); - - stop =dev_gpd_data (dev)->ops.stop; -if (stop) { -int ret =stop (dev); -if (ret) -return ret; - } -return pm_clk_suspend (dev); -} - -static int rmobile_pd_start_dev (struct device *dev) -{ -int (*start)(struct device *dev); -int ret; - - ret =pm_clk_resume (dev); -if (ret) -return ret; - - start =dev_gpd_data (dev)->ops.start; -if (start) - ret =start (dev); - -return ret; +return true; }static void rmobile_init_pm_domain (struct rmobile_pm_domain *rmobile_pd)@@ -140,8 +108,8 @@ static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd)struct dev_power_governor *gov = rmobile_pd->gov;pm_genpd_init (genpd, gov ? : &simple_qos_governor, false); - genpd->dev_ops.stop = rmobile_pd_stop_dev; - genpd->dev_ops.start = rmobile_pd_start_dev; + genpd->dev_ops.stop = pm_clk_suspend; + genpd->dev_ops.start = pm_clk_resume; genpd->dev_ops.active_wakeup = rmobile_pd_active_wakeup; genpd->dev_irq_safe = true; genpd->power_off = rmobile_pd_power_down; --1.7.9.5
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/4 ARM: shmobile: Ignore callbacks for subsys generic_pm_domain_data
Quoted 10 lines · Ulf Hansson
Quoted 9 lines · Simon Horman
Quoted 8 lines · Ulf Hansson
There are no active users of these callbacks, thus there are no benefit of trying to invoke them.
Cc Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>Signed-off-by Ulf Hansson <[email protected]>---
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I am seeking ack from the SOC maintainers since this needs to go with the other patches in this patchset on the PM core.
In order to reduce the possibility of conflicts I would prefer to take this patch through my tree.
Okay, go ahead!
Hi Simon,
Just wanted to know, if you decided to queue this patch in your tree. Or were there anything else you needed me to fix here?
Quoted 73 lines
Kind regards
Ulf HanssonQuoted 70 lines
Quoted 70 lines
--- arch/arm/mach-shmobile/pm-rmobile.c | 38 +++-------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-)arch/arm/mach-shmobile/pm-rmobile.c +3
-36@@ -99,39 +99,7 @@ static int rmobile_pd_power_up(struct generic_pm_domain *genpd)static bool rmobile_pd_active_wakeup (struct device *dev) { -bool (*active_wakeup)(struct device *dev); - - active_wakeup =dev_gpd_data (dev)->ops.active_wakeup; -return active_wakeup ?active_wakeup (dev) : true; -} - -static int rmobile_pd_stop_dev (struct device *dev) -{ -int (*stop)(struct device *dev); - - stop =dev_gpd_data (dev)->ops.stop; -if (stop) { -int ret =stop (dev); -if (ret) -return ret; - } -return pm_clk_suspend (dev); -} - -static int rmobile_pd_start_dev (struct device *dev) -{ -int (*start)(struct device *dev); -int ret; - - ret =pm_clk_resume (dev); -if (ret) -return ret; - - start =dev_gpd_data (dev)->ops.start; -if (start) - ret =start (dev); - -return ret; +return true; }static void rmobile_init_pm_domain (struct rmobile_pm_domain *rmobile_pd)@@ -140,8 +108,8 @@ static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd)struct dev_power_governor *gov = rmobile_pd->gov;pm_genpd_init (genpd, gov ? : &simple_qos_governor, false); - genpd->dev_ops.stop = rmobile_pd_stop_dev; - genpd->dev_ops.start = rmobile_pd_start_dev; + genpd->dev_ops.stop = pm_clk_suspend; + genpd->dev_ops.start = pm_clk_resume; genpd->dev_ops.active_wakeup = rmobile_pd_active_wakeup; genpd->dev_irq_safe = true; genpd->power_off = rmobile_pd_power_down; --1.7.9.5
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/4 ARM: shmobile: Ignore callbacks for subsys generic_pm_domain_data
Quoted 17 lines · Ulf Hansson
Quoted 16 lines · Ulf Hansson
Quoted 14 lines · Simon Horman
Quoted 10 lines · Ulf Hansson
There are no active users of these callbacks, thus there are no benefit of trying to invoke them.
Cc Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>Signed-off-by Ulf Hansson <[email protected]>---
I am seeking ack from the SOC maintainers since this needs to go with the other patches in this patchset on the PM core.
In order to reduce the possibility of conflicts I would prefer to take this patch through my tree.
Quoted 7 lines
Quoted 2 lines
Okay, go ahead!
Hi Simon,
Just wanted to know, if you decided to queue this patch in your tree. Or were there anything else you needed me to fix here?
Sorry for dropping the ball. I will queue-up this patch.
Quoted 75 lines
Quoted 74 lines
Kind regards
Ulf HanssonQuoted 70 lines
Quoted 70 lines
--- arch/arm/mach-shmobile/pm-rmobile.c | 38 +++-------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-)arch/arm/mach-shmobile/pm-rmobile.c +3
-36@@ -99,39 +99,7 @@ static int rmobile_pd_power_up(struct generic_pm_domain *genpd)static bool rmobile_pd_active_wakeup (struct device *dev) { -bool (*active_wakeup)(struct device *dev); - - active_wakeup =dev_gpd_data (dev)->ops.active_wakeup; -return active_wakeup ?active_wakeup (dev) : true; -} - -static int rmobile_pd_stop_dev (struct device *dev) -{ -int (*stop)(struct device *dev); - - stop =dev_gpd_data (dev)->ops.stop; -if (stop) { -int ret =stop (dev); -if (ret) -return ret; - } -return pm_clk_suspend (dev); -} - -static int rmobile_pd_start_dev (struct device *dev) -{ -int (*start)(struct device *dev); -int ret; - - ret =pm_clk_resume (dev); -if (ret) -return ret; - - start =dev_gpd_data (dev)->ops.start; -if (start) - ret =start (dev); - -return ret; +return true; }static void rmobile_init_pm_domain (struct rmobile_pm_domain *rmobile_pd)@@ -140,8 +108,8 @@ static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd)struct dev_power_governor *gov = rmobile_pd->gov;pm_genpd_init (genpd, gov ? : &simple_qos_governor, false); - genpd->dev_ops.stop = rmobile_pd_stop_dev; - genpd->dev_ops.start = rmobile_pd_start_dev; + genpd->dev_ops.stop = pm_clk_suspend; + genpd->dev_ops.start = pm_clk_resume; genpd->dev_ops.active_wakeup = rmobile_pd_active_wakeup; genpd->dev_irq_safe = true; genpd->power_off = rmobile_pd_power_down; --1.7.9.5
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/4 ARM: shmobile: Ignore callbacks for subsys generic_pm_domain_data
Quoted 21 lines · Simon Horman
Quoted 20 lines · Ulf Hansson
Quoted 18 lines · Ulf Hansson
Quoted 9 lines · Simon Horman
Quoted 8 lines · Ulf Hansson
There are no active users of these callbacks, thus there are no benefit of trying to invoke them.
Cc Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>Signed-off-by Ulf Hansson <[email protected]>---
Quoted 5 lines
Quoted 2 lines
I am seeking ack from the SOC maintainers since this needs to go with the other patches in this patchset on the PM core.
In order to reduce the possibility of conflicts I would prefer to take this patch through my tree.
Okay, go ahead!
Quoted 6 lines
Quoted 4 lines
Hi Simon,
Just wanted to know, if you decided to queue this patch in your tree. Or were there anything else you needed me to fix here?
Sorry for dropping the ball. I will queue-up this patch.
OK
Ulf, since the rest of the series depends on this one (or at least that's how it looks to me), would you mind resending it when this one gets into the Linus' tree?
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
PATCH 1/4 ARM: shmobile: Ignore callbacks for subsys generic_pm_domain_data
Quoted 27 lines · Rafael J. Wysocki
Quoted 26 lines · Simon Horman
Quoted 24 lines · Ulf Hansson
Quoted 10 lines · Ulf Hansson
Quoted 9 lines · Simon Horman
Quoted 8 lines · Ulf Hansson
There are no active users of these callbacks, thus there are no benefit of trying to invoke them.
Cc Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>Signed-off-by Ulf Hansson <[email protected]>---
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I am seeking ack from the SOC maintainers since this needs to go with the other patches in this patchset on the PM core.
In order to reduce the possibility of conflicts I would prefer to take this patch through my tree.
Okay, go ahead!
Hi Simon,
Just wanted to know, if you decided to queue this patch in your tree. Or were there anything else you needed me to fix here?
Quoted 7 lines
Quoted 1 line
Sorry for dropping the ball. I will queue-up this patch.
OK
Ulf, since the rest of the series depends on this one (or at least that's how it looks to me), would you mind resending it when this one gets into the Linus' tree?
Well, I would prefer if we could go ahead with the rest of the patches somehow for 3.16, but I guess it will be hard if Simon picks up this patch!?
Simon,
I guess the reason for your concern were about conflicts, but the file this patch touch has actually not been modified since Sep 2012. So, maybe we could go through Rafaels tree anyway?
I have a bunch of other patches for genpd which I plan to send once the first part of clean up patches were merged. Those are likely material for 3.17 though.
Kind regards
Ulf Hansson
Quoted 4 lines
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
PATCH 1/4 ARM: shmobile: Ignore callbacks for subsys generic_pm_domain_data
Quoted 36 lines · Ulf Hansson
Quoted 27 lines · Rafael J. Wysocki
Quoted 26 lines · Simon Horman
Quoted 24 lines · Ulf Hansson
Quoted 10 lines · Ulf Hansson
Quoted 9 lines · Simon Horman
Quoted 8 lines · Ulf Hansson
There are no active users of these callbacks, thus there are no benefit of trying to invoke them.
Cc Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>Signed-off-by Ulf Hansson <[email protected]>---
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I am seeking ack from the SOC maintainers since this needs to go with the other patches in this patchset on the PM core.
In order to reduce the possibility of conflicts I would prefer to take this patch through my tree.
Okay, go ahead!
Hi Simon,
Just wanted to know, if you decided to queue this patch in your tree. Or were there anything else you needed me to fix here?
Quoted 7 lines
Quoted 1 line
Sorry for dropping the ball. I will queue-up this patch.
OK
Ulf, since the rest of the series depends on this one (or at least that's how it looks to me), would you mind resending it when this one gets into the Linus' tree?
Quoted 8 lines
Well, I would prefer if we could go ahead with the rest of the patches somehow for 3.16, but I guess it will be hard if Simon picks up this patch!?
Simon,
I guess the reason for your concern were about conflicts, but the file this patch touch has actually not been modified since Sep 2012. So, maybe we could go through Rafaels tree anyway?
Yes, my primary concern was conflicts.
But as you point out that seems unlikely.
I have already picked up the patch but the pull request I sent to the ARM SoC maintainers has not been pulled. And regardless it won't appear in Linus's tree via that route until v3.16-rc1.
Perhaps a good way forwards would be for Rafael to also apply the patch with my Ack. I could also revert the version applied to my tree if that is of any help.
Quoted 12 lines
I have a bunch of other patches for genpd which I plan to send once the first part of clean up patches were merged. Those are likely material for 3.17 though.
Kind regards
Ulf HanssonQuoted 4 lines
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
PATCH 1/4 ARM: shmobile: Ignore callbacks for subsys generic_pm_domain_data
Quoted 49 lines · Simon Horman
Quoted 36 lines · Ulf Hansson
Quoted 27 lines · Rafael J. Wysocki
Quoted 26 lines · Simon Horman
Quoted 24 lines · Ulf Hansson
Quoted 10 lines · Ulf Hansson
Quoted 9 lines · Simon Horman
Quoted 8 lines · Ulf Hansson
There are no active users of these callbacks, thus there are no benefit of trying to invoke them.
Cc Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>Signed-off-by Ulf Hansson <[email protected]>---
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I am seeking ack from the SOC maintainers since this needs to go with the other patches in this patchset on the PM core.
In order to reduce the possibility of conflicts I would prefer to take this patch through my tree.
Okay, go ahead!
Hi Simon,
Just wanted to know, if you decided to queue this patch in your tree. Or were there anything else you needed me to fix here?
Quoted 7 lines
Quoted 1 line
Sorry for dropping the ball. I will queue-up this patch.
OK
Ulf, since the rest of the series depends on this one (or at least that's how it looks to me), would you mind resending it when this one gets into the Linus' tree?
Quoted 8 lines
Well, I would prefer if we could go ahead with the rest of the patches somehow for 3.16, but I guess it will be hard if Simon picks up this patch!?
Simon,
I guess the reason for your concern were about conflicts, but the file this patch touch has actually not been modified since Sep 2012. So, maybe we could go through Rafaels tree anyway?Yes, my primary concern was conflicts.
But as you point out that seems unlikely.
Quoted 6 lines
I have already picked up the patch but the pull request I sent to the ARM SoC maintainers has not been pulled. And regardless it won't appear in Linus's tree via that route until v3.16-rc1.
Perhaps a good way forwards would be for Rafael to also apply the patch with my Ack.
Not really. No duplicate patches with different changelogs coming from different trees. Please!
Quoted 4 lines
I could also revert the version applied to my tree if that is of any help.
Acked-by Simon Horman <[email protected]>
Ulf, can you please do as I said?
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
PATCH 1/4 ARM: shmobile: Ignore callbacks for subsys generic_pm_domain_data
Quoted 60 lines · Rafael J. Wysocki
Quoted 49 lines · Simon Horman
Quoted 36 lines · Ulf Hansson
Quoted 27 lines · Rafael J. Wysocki
Quoted 26 lines · Simon Horman
Quoted 24 lines · Ulf Hansson
Quoted 10 lines · Ulf Hansson
Quoted 9 lines · Simon Horman
Quoted 8 lines · Ulf Hansson
There are no active users of these callbacks, thus there are no benefit of trying to invoke them.
Cc Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>Signed-off-by Ulf Hansson <[email protected]>---
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I am seeking ack from the SOC maintainers since this needs to go with the other patches in this patchset on the PM core.
In order to reduce the possibility of conflicts I would prefer to take this patch through my tree.
Okay, go ahead!
Hi Simon,
Just wanted to know, if you decided to queue this patch in your tree. Or were there anything else you needed me to fix here?
Quoted 7 lines
Quoted 1 line
Sorry for dropping the ball. I will queue-up this patch.
OK
Ulf, since the rest of the series depends on this one (or at least that's how it looks to me), would you mind resending it when this one gets into the Linus' tree?
Quoted 8 lines
Well, I would prefer if we could go ahead with the rest of the patches somehow for 3.16, but I guess it will be hard if Simon picks up this patch!?
Simon,
I guess the reason for your concern were about conflicts, but the file this patch touch has actually not been modified since Sep 2012. So, maybe we could go through Rafaels tree anyway?Yes, my primary concern was conflicts.
But as you point out that seems unlikely.Quoted 6 lines
I have already picked up the patch but the pull request I sent to the ARM SoC maintainers has not been pulled. And regardless it won't appear in Linus's tree via that route until v3.16-rc1.
Perhaps a good way forwards would be for Rafael to also apply the patch with my Ack.
Not really. No duplicate patches with different changelogs coming from different trees. Please!
Quoted 6 lines
Quoted 4 lines
I could also revert the version applied to my tree if that is of any help.
Acked-by Simon Horman <[email protected]>Ulf, can you please do as I said?
Okay! It seems like I have no choice. :-)
Does that mean you were happy with the rest from this patchset?
Additionally, I intend to post some more patches for the PM domain soon. Thus I will need to fold in these patches to any other upcoming patchset. Thought it could be good to know.
Kind regards
Ulf Hansson
Quoted 5 lines
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
PATCH 1/4 ARM: shmobile: Ignore callbacks for subsys generic_pm_domain_data
Quoted 64 lines · Ulf Hansson
Quoted 63 lines · Rafael J. Wysocki
Quoted 49 lines · Simon Horman
Quoted 36 lines · Ulf Hansson
Quoted 27 lines · Rafael J. Wysocki
Quoted 26 lines · Simon Horman
Quoted 24 lines · Ulf Hansson
Quoted 10 lines · Ulf Hansson
Quoted 9 lines · Simon Horman
Quoted 8 lines · Ulf Hansson
There are no active users of these callbacks, thus there are no benefit of trying to invoke them.
Cc Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>Signed-off-by Ulf Hansson <[email protected]>---
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I am seeking ack from the SOC maintainers since this needs to go with the other patches in this patchset on the PM core.
In order to reduce the possibility of conflicts I would prefer to take this patch through my tree.
Okay, go ahead!
Hi Simon,
Just wanted to know, if you decided to queue this patch in your tree. Or were there anything else you needed me to fix here?
Quoted 7 lines
Quoted 1 line
Sorry for dropping the ball. I will queue-up this patch.
OK
Ulf, since the rest of the series depends on this one (or at least that's how it looks to me), would you mind resending it when this one gets into the Linus' tree?
Quoted 8 lines
Well, I would prefer if we could go ahead with the rest of the patches somehow for 3.16, but I guess it will be hard if Simon picks up this patch!?
Simon,
I guess the reason for your concern were about conflicts, but the file this patch touch has actually not been modified since Sep 2012. So, maybe we could go through Rafaels tree anyway?Yes, my primary concern was conflicts.
But as you point out that seems unlikely.Quoted 6 lines
I have already picked up the patch but the pull request I sent to the ARM SoC maintainers has not been pulled. And regardless it won't appear in Linus's tree via that route until v3.16-rc1.
Perhaps a good way forwards would be for Rafael to also apply the patch with my Ack.
Not really. No duplicate patches with different changelogs coming from different trees. Please!
Quoted 3 lines
I could also revert the version applied to my tree if that is of any help.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Acked-by Simon Horman <[email protected]>Ulf, can you please do as I said?
Okay! It seems like I have no choice. :-)
Does that mean you were happy with the rest from this patchset?
Yes, those changes are fine by me.
Quoted 3 lines
Additionally, I intend to post some more patches for the PM domain soon. Thus I will need to fold in these patches to any other upcoming patchset. Thought it could be good to know.
OK, thanks!
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
PATCH 2/4 PM / Domains: Ignore callbacks for subsys generic_pm_domain_data
In reply to Ulf HanssonIn a step of simplifying the generic power domain let's move away from using these callbacks.
--- drivers/base/power/domain.c | 131 +++---------------------------------------- 1 file changed, 8 insertions(+), 123 deletions(-)
drivers/base/power/domain.c +8 -123
@@ -29,10 +29,6 @@ __routine = genpd->dev_ops.callback; \if (__routine) { \ __ret =__routine (dev); \ - }else { \ - __routine =dev_gpd_data (dev)->ops.callback; \ -if (__routine) \ - __ret =__routine (dev); \ } \ __ret; \ })
@@ -1968,10 +1964,6 @@ static int pm_genpd_default_save_state(struct device *dev) {int (*cb)(struct device *__dev); - cb =dev_gpd_data (dev)->ops.save_state; -if (cb) -return cb (dev); -if (dev->type && dev->type->pm) cb = dev->type->pm->runtime_suspend;else if (dev->class && dev->class->pm)
@@ -1995,10 +1987,6 @@ static int pm_genpd_default_restore_state(struct device *dev) {int (*cb)(struct device *__dev); - cb =dev_gpd_data (dev)->ops.restore_state; -if (cb) -return cb (dev); -if (dev->type && dev->type->pm) cb = dev->type->pm->runtime_resume;else if (dev->class && dev->class->pm)
@@ -2014,109 +2002,6 @@ static int pm_genpd_default_restore_state(struct device *dev)return cb ?cb (dev) :0 ; } -#ifdef CONFIG_PM_SLEEP - -/** -* pm_genpd_default_suspend - Default "device suspend" for PM domians. -* @dev: Device to handle. -*/ -static int pm_genpd_default_suspend (struct device *dev) -{ -int (*cb)(struct device *__dev) =dev_gpd_data (dev)->ops.suspend; - -return cb ?cb (dev) :pm_generic_suspend (dev); -} - -/** -* pm_genpd_default_suspend_late - Default "late device suspend" for PM domians. -* @dev: Device to handle. -*/ -static int pm_genpd_default_suspend_late (struct device *dev) -{ -int (*cb)(struct device *__dev) =dev_gpd_data (dev)->ops.suspend_late; - -return cb ?cb (dev) :pm_generic_suspend_late (dev); -} - -/** -* pm_genpd_default_resume_early - Default "early device resume" for PM domians. -* @dev: Device to handle. -*/ -static int pm_genpd_default_resume_early (struct device *dev) -{ -int (*cb)(struct device *__dev) =dev_gpd_data (dev)->ops.resume_early; - -return cb ?cb (dev) :pm_generic_resume_early (dev); -} - -/** -* pm_genpd_default_resume - Default "device resume" for PM domians. -* @dev: Device to handle. -*/ -static int pm_genpd_default_resume (struct device *dev) -{ -int (*cb)(struct device *__dev) =dev_gpd_data (dev)->ops.resume; - -return cb ?cb (dev) :pm_generic_resume (dev); -} - -/** -* pm_genpd_default_freeze - Default "device freeze" for PM domians. -* @dev: Device to handle. -*/ -static int pm_genpd_default_freeze (struct device *dev) -{ -int (*cb)(struct device *__dev) =dev_gpd_data (dev)->ops.freeze; - -return cb ?cb (dev) :pm_generic_freeze (dev); -} - -/** -* pm_genpd_default_freeze_late - Default "late device freeze" for PM domians. -* @dev: Device to handle. -*/ -static int pm_genpd_default_freeze_late (struct device *dev) -{ -int (*cb)(struct device *__dev) =dev_gpd_data (dev)->ops.freeze_late; - -return cb ?cb (dev) :pm_generic_freeze_late (dev); -} - -/** -* pm_genpd_default_thaw_early - Default "early device thaw" for PM domians. -* @dev: Device to handle. -*/ -static int pm_genpd_default_thaw_early (struct device *dev) -{ -int (*cb)(struct device *__dev) =dev_gpd_data (dev)->ops.thaw_early; - -return cb ?cb (dev) :pm_generic_thaw_early (dev); -} - -/** -* pm_genpd_default_thaw - Default "device thaw" for PM domians. -* @dev: Device to handle. -*/ -static int pm_genpd_default_thaw (struct device *dev) -{ -int (*cb)(struct device *__dev) =dev_gpd_data (dev)->ops.thaw; - -return cb ?cb (dev) :pm_generic_thaw (dev); -} - -#else /* !CONFIG_PM_SLEEP */ - -#define pm_genpd_default_suspend NULL -#define pm_genpd_default_suspend_late NULL -#define pm_genpd_default_resume_early NULL -#define pm_genpd_default_resume NULL -#define pm_genpd_default_freeze NULL -#define pm_genpd_default_freeze_late NULL -#define pm_genpd_default_thaw_early NULL -#define pm_genpd_default_thaw NULL - -#endif /* !CONFIG_PM_SLEEP */ -/** * pm_genpd_init - Initialize a generic I/O PM domain object. * @genpd: PM domain object to initialize.
@@ -2168,14 +2053,14 @@ void pm_genpd_init(struct generic_pm_domain *genpd, genpd->domain.ops.complete = pm_genpd_complete; genpd->dev_ops.save_state = pm_genpd_default_save_state; genpd->dev_ops.restore_state = pm_genpd_default_restore_state; - genpd->dev_ops.suspend = pm_genpd_default_suspend; - genpd->dev_ops.suspend_late = pm_genpd_default_suspend_late; - genpd->dev_ops.resume_early = pm_genpd_default_resume_early; - genpd->dev_ops.resume = pm_genpd_default_resume; - genpd->dev_ops.freeze = pm_genpd_default_freeze; - genpd->dev_ops.freeze_late = pm_genpd_default_freeze_late; - genpd->dev_ops.thaw_early = pm_genpd_default_thaw_early; - genpd->dev_ops.thaw = pm_genpd_default_thaw; + genpd->dev_ops.suspend = pm_generic_suspend; + genpd->dev_ops.suspend_late = pm_generic_suspend_late; + genpd->dev_ops.resume_early = pm_generic_resume_early; + genpd->dev_ops.resume = pm_generic_resume; + genpd->dev_ops.freeze = pm_generic_freeze; + genpd->dev_ops.freeze_late = pm_generic_freeze_late; + genpd->dev_ops.thaw_early = pm_generic_thaw_early; + genpd->dev_ops.thaw = pm_generic_thaw;mutex_lock (&gpd_list_lock);list_add (&genpd->gpd_list_node, &gpd_list);mutex_unlock (&gpd_list_lock);
Signature · 1 line
1.7.9.5
PATCH 3/4 PM / Domains: Remove the pm_genpd_add|remove_callbacks APIs
In reply to Ulf HanssonThere are no users of these APIs. To simplify the generic power domain let's remove them.
--- drivers/base/power/domain.c | 106 ------------------------------------------- include/linux/pm_domain.h | 20 -------- 2 files changed, 126 deletions(-)
drivers/base/power/domain.c +0 -106
@@ -1731,112 +1731,6 @@ int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd, }/** -* pm_genpd_add_callbacks - Add PM domain callbacks to a given device. -* @dev: Device to add the callbacks to. -* @ops: Set of callbacks to add. -* @td: Timing data to add to the device along with the callbacks (optional). -* -* Every call to this routine should be balanced with a call to -* __pm_genpd_remove_callbacks() and they must not be nested. -*/ -int pm_genpd_add_callbacks (struct device *dev,struct gpd_dev_ops *ops, -struct gpd_timing_data *td) -{ -struct generic_pm_domain_data *gpd_data_new, *gpd_data =NULL ; -int ret =0 ; - -if (!(dev && ops)) -return -EINVAL ; - - gpd_data_new =__pm_genpd_alloc_dev_data (dev); -if (!gpd_data_new) -return -ENOMEM ; - -pm_runtime_disable (dev); -device_pm_lock (); - - ret =dev_pm_get_subsys_data (dev); -if (ret) - goto out; - -spin_lock_irq (&dev->power.lock); - -if (dev->power.subsys_data->domain_data) { - gpd_data =to_gpd_data (dev->power.subsys_data->domain_data); - }else { - gpd_data = gpd_data_new; - dev->power.subsys_data->domain_data = &gpd_data->base; - } - gpd_data->refcount++; - gpd_data->ops = *ops; -if (td) - gpd_data->td = *td; - -spin_unlock_irq (&dev->power.lock); - - out: -device_pm_unlock (); -pm_runtime_enable (dev); - -if (gpd_data != gpd_data_new) -__pm_genpd_free_dev_data (dev, gpd_data_new); - -return ret; -} -EXPORT_SYMBOL_GPL (pm_genpd_add_callbacks); - -/** -* __pm_genpd_remove_callbacks - Remove PM domain callbacks from a given device. -* @dev: Device to remove the callbacks from. -* @clear_td: If set, clear the device's timing data too. -* -* This routine can only be called after pm_genpd_add_callbacks(). -*/ -int __pm_genpd_remove_callbacks (struct device *dev,bool clear_td) -{ -struct generic_pm_domain_data *gpd_data =NULL ; -bool remove = false; -int ret =0 ; - -if (!(dev && dev->power.subsys_data)) -return -EINVAL ; - -pm_runtime_disable (dev); -device_pm_lock (); - -spin_lock_irq (&dev->power.lock); - -if (dev->power.subsys_data->domain_data) { - gpd_data =to_gpd_data (dev->power.subsys_data->domain_data); - gpd_data->ops = (struct gpd_dev_ops ){NULL }; -if (clear_td) - gpd_data->td = (struct gpd_timing_data ){0 }; - -if (--gpd_data->refcount ==0 ) { - dev->power.subsys_data->domain_data =NULL ; - remove = true; - } - }else { - ret = -EINVAL ; - } - -spin_unlock_irq (&dev->power.lock); - -device_pm_unlock (); -pm_runtime_enable (dev); - -if (ret) -return ret; - -dev_pm_put_subsys_data (dev); -if (remove) -__pm_genpd_free_dev_data (dev, gpd_data); - -return 0 ; -} -EXPORT_SYMBOL_GPL (__pm_genpd_remove_callbacks); - -/** * pm_genpd_attach_cpuidle - Connect the given PM domain with cpuidle. * @genpd: PM domain to be connected with cpuidle. * @state: cpuidle state this domain can disable/enable.
include/linux/pm_domain.h +0 -20
@@ -108,7 +108,6 @@ struct gpd_timing_data {struct generic_pm_domain_data {struct pm_domain_data base; -struct gpd_dev_ops ops;struct gpd_timing_data td;struct notifier_block nb;struct mutex lock;
@@ -151,10 +150,6 @@ extern int pm_genpd_add_subdomain_names(const char *master_name, const char *subdomain_name);extern int pm_genpd_remove_subdomain (struct generic_pm_domain *genpd,struct generic_pm_domain *target); -extern int pm_genpd_add_callbacks (struct device *dev, -struct gpd_dev_ops *ops, -struct gpd_timing_data *td); -extern int __pm_genpd_remove_callbacks (struct device *dev,bool clear_td);extern int pm_genpd_attach_cpuidle (struct generic_pm_domain *genpd,int state);extern int pm_genpd_name_attach_cpuidle (const char *name,int state);extern int pm_genpd_detach_cpuidle (struct generic_pm_domain *genpd);
@@ -217,16 +212,6 @@ static inline int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd, {return -ENOSYS ; } -static inline int pm_genpd_add_callbacks (struct device *dev, -struct gpd_dev_ops *ops, -struct gpd_timing_data *td) -{ -return -ENOSYS ; -} -static inline int __pm_genpd_remove_callbacks (struct device *dev,bool clear_td) -{ -return -ENOSYS ; -}static inline int pm_genpd_attach_cpuidle (struct generic_pm_domain *genpd,int st) {return -ENOSYS ;
@@ -281,11 +266,6 @@ static inline int pm_genpd_name_add_device(const char *domain_name,return __pm_genpd_name_add_device (domain_name, dev,NULL ); } -static inline int pm_genpd_remove_callbacks (struct device *dev) -{ -return __pm_genpd_remove_callbacks (dev, true); -} -#ifdef CONFIG_PM_GENERIC_DOMAINS_RUNTIME extern void genpd_queue_power_off_work (struct generic_pm_domain *genpd);extern void pm_genpd_poweroff_unused (void );
Signature · 1 line
1.7.9.5
PATCH 4/4 PM / Domains: Remove system PM callbacks from gpd_dev_ops
In reply to Ulf HanssonThere no users of these callbacks, let's simplify the generic power domain by removing them.
--- drivers/base/power/domain.c | 64 ++++++------------------------------------- include/linux/pm_domain.h | 8 ------ 2 files changed, 8 insertions(+), 64 deletions(-)
drivers/base/power/domain.c +8 -56
@@ -761,46 +761,6 @@ static bool genpd_dev_active_wakeup(struct generic_pm_domain *genpd,return GENPD_DEV_CALLBACK (genpd, bool, active_wakeup, dev); } -static int genpd_suspend_dev (struct generic_pm_domain *genpd,struct device *dev) -{ -return GENPD_DEV_CALLBACK (genpd, int, suspend, dev); -} - -static int genpd_suspend_late (struct generic_pm_domain *genpd,struct device *dev) -{ -return GENPD_DEV_CALLBACK (genpd, int, suspend_late, dev); -} - -static int genpd_resume_early (struct generic_pm_domain *genpd,struct device *dev) -{ -return GENPD_DEV_CALLBACK (genpd, int, resume_early, dev); -} - -static int genpd_resume_dev (struct generic_pm_domain *genpd,struct device *dev) -{ -return GENPD_DEV_CALLBACK (genpd, int, resume, dev); -} - -static int genpd_freeze_dev (struct generic_pm_domain *genpd,struct device *dev) -{ -return GENPD_DEV_CALLBACK (genpd, int, freeze, dev); -} - -static int genpd_freeze_late (struct generic_pm_domain *genpd,struct device *dev) -{ -return GENPD_DEV_CALLBACK (genpd, int, freeze_late, dev); -} - -static int genpd_thaw_early (struct generic_pm_domain *genpd,struct device *dev) -{ -return GENPD_DEV_CALLBACK (genpd, int, thaw_early, dev); -} - -static int genpd_thaw_dev (struct generic_pm_domain *genpd,struct device *dev) -{ -return GENPD_DEV_CALLBACK (genpd, int, thaw, dev); -} -/** * pm_genpd_sync_poweroff - Synchronously power off a PM domain and its masters. * @genpd: PM domain to power off, if possible.
@@ -982,7 +942,7 @@ static int pm_genpd_suspend(struct device *dev)if (IS_ERR (genpd))return -EINVAL ; -return genpd->suspend_power_off ?0 :genpd_suspend_dev (genpd, dev); +return genpd->suspend_power_off ?0 :pm_generic_suspend (dev); }/**
@@ -1003,7 +963,7 @@ static int pm_genpd_suspend_late(struct device *dev)if (IS_ERR (genpd))return -EINVAL ; -return genpd->suspend_power_off ?0 :genpd_suspend_late (genpd, dev); +return genpd->suspend_power_off ?0 :pm_generic_suspend_late (dev); }/**
@@ -1090,7 +1050,7 @@ static int pm_genpd_resume_early(struct device *dev)if (IS_ERR (genpd))return -EINVAL ; -return genpd->suspend_power_off ?0 :genpd_resume_early (genpd, dev); +return genpd->suspend_power_off ?0 :pm_generic_resume_early (dev); }/**
@@ -1111,7 +1071,7 @@ static int pm_genpd_resume(struct device *dev)if (IS_ERR (genpd))return -EINVAL ; -return genpd->suspend_power_off ?0 :genpd_resume_dev (genpd, dev); +return genpd->suspend_power_off ?0 :pm_generic_resume (dev); }/**
@@ -1132,7 +1092,7 @@ static int pm_genpd_freeze(struct device *dev)if (IS_ERR (genpd))return -EINVAL ; -return genpd->suspend_power_off ?0 :genpd_freeze_dev (genpd, dev); +return genpd->suspend_power_off ?0 :pm_generic_freeze (dev); }/**
@@ -1154,7 +1114,7 @@ static int pm_genpd_freeze_late(struct device *dev)if (IS_ERR (genpd))return -EINVAL ; -return genpd->suspend_power_off ?0 :genpd_freeze_late (genpd, dev); +return genpd->suspend_power_off ?0 :pm_generic_freeze_late (dev); }/**
@@ -1218,7 +1178,7 @@ static int pm_genpd_thaw_early(struct device *dev)if (IS_ERR (genpd))return -EINVAL ; -return genpd->suspend_power_off ?0 :genpd_thaw_early (genpd, dev); +return genpd->suspend_power_off ?0 :pm_generic_thaw_early (dev); }/**
@@ -1239,7 +1199,7 @@ static int pm_genpd_thaw(struct device *dev)if (IS_ERR (genpd))return -EINVAL ; -return genpd->suspend_power_off ?0 :genpd_thaw_dev (genpd, dev); +return genpd->suspend_power_off ?0 :pm_generic_thaw (dev); }/**
@@ -1947,14 +1907,6 @@ void pm_genpd_init(struct generic_pm_domain *genpd, genpd->domain.ops.complete = pm_genpd_complete; genpd->dev_ops.save_state = pm_genpd_default_save_state; genpd->dev_ops.restore_state = pm_genpd_default_restore_state; - genpd->dev_ops.suspend = pm_generic_suspend; - genpd->dev_ops.suspend_late = pm_generic_suspend_late; - genpd->dev_ops.resume_early = pm_generic_resume_early; - genpd->dev_ops.resume = pm_generic_resume; - genpd->dev_ops.freeze = pm_generic_freeze; - genpd->dev_ops.freeze_late = pm_generic_freeze_late; - genpd->dev_ops.thaw_early = pm_generic_thaw_early; - genpd->dev_ops.thaw = pm_generic_thaw;mutex_lock (&gpd_list_lock);list_add (&genpd->gpd_list_node, &gpd_list);mutex_unlock (&gpd_list_lock);
include/linux/pm_domain.h +0 -8
@@ -35,14 +35,6 @@ struct gpd_dev_ops {int (*stop)(struct device *dev);int (*save_state)(struct device *dev);int (*restore_state)(struct device *dev); -int (*suspend)(struct device *dev); -int (*suspend_late)(struct device *dev); -int (*resume_early)(struct device *dev); -int (*resume)(struct device *dev); -int (*freeze)(struct device *dev); -int (*freeze_late)(struct device *dev); -int (*thaw_early)(struct device *dev); -int (*thaw)(struct device *dev);bool (*active_wakeup)(struct device *dev); };
Signature · 1 line
1.7.9.5