* [PATCH] ARM: tegra30: make the wait time of CPU power up to proportional to HZ
@ 2013-01-07 2:56 ` Joseph Lo
0 siblings, 0 replies; 6+ messages in thread
From: Joseph Lo @ 2013-01-07 2:56 UTC (permalink / raw)
To: Stephen Warren
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Joseph Lo
It would rather to use the API of time_to_jiffies than a constant number
of jiffies for the wait time of CPU power up.
Based on the work by:
Sang-Hun Lee <sanlee-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
arch/arm/mach-tegra/platsmp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
index 60daf9f..6867030 100644
--- a/arch/arm/mach-tegra/platsmp.c
+++ b/arch/arm/mach-tegra/platsmp.c
@@ -90,7 +90,7 @@ static int tegra30_power_up_cpu(unsigned int cpu)
* next time around.
*/
if (cpumask_test_cpu(cpu, &tegra_cpu_init_mask)) {
- timeout = jiffies + 5*HZ;
+ timeout = jiffies + msecs_to_jiffies(50);
do {
if (!tegra_powergate_is_powered(pwrgateid))
goto remove_clamps;
@@ -110,7 +110,7 @@ static int tegra30_power_up_cpu(unsigned int cpu)
return ret;
/* Wait for the power to come up. */
- timeout = jiffies + 10*HZ;
+ timeout = jiffies + msecs_to_jiffies(100);
while (tegra_powergate_is_powered(pwrgateid)) {
if (time_after(jiffies, timeout))
return -ETIMEDOUT;
--
1.8.0.3
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH] ARM: tegra30: make the wait time of CPU power up to proportional to HZ
@ 2013-01-07 2:56 ` Joseph Lo
0 siblings, 0 replies; 6+ messages in thread
From: Joseph Lo @ 2013-01-07 2:56 UTC (permalink / raw)
To: linux-arm-kernel
It would rather to use the API of time_to_jiffies than a constant number
of jiffies for the wait time of CPU power up.
Based on the work by:
Sang-Hun Lee <sanlee@nvidia.com>
Signed-off-by: Joseph Lo <josephl@nvidia.com>
---
arch/arm/mach-tegra/platsmp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
index 60daf9f..6867030 100644
--- a/arch/arm/mach-tegra/platsmp.c
+++ b/arch/arm/mach-tegra/platsmp.c
@@ -90,7 +90,7 @@ static int tegra30_power_up_cpu(unsigned int cpu)
* next time around.
*/
if (cpumask_test_cpu(cpu, &tegra_cpu_init_mask)) {
- timeout = jiffies + 5*HZ;
+ timeout = jiffies + msecs_to_jiffies(50);
do {
if (!tegra_powergate_is_powered(pwrgateid))
goto remove_clamps;
@@ -110,7 +110,7 @@ static int tegra30_power_up_cpu(unsigned int cpu)
return ret;
/* Wait for the power to come up. */
- timeout = jiffies + 10*HZ;
+ timeout = jiffies + msecs_to_jiffies(100);
while (tegra_powergate_is_powered(pwrgateid)) {
if (time_after(jiffies, timeout))
return -ETIMEDOUT;
--
1.8.0.3
^ permalink raw reply related [flat|nested] 6+ messages in thread[parent not found: <1357527374-31055-1-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] ARM: tegra30: make the wait time of CPU power up to proportional to HZ
2013-01-07 2:56 ` Joseph Lo
@ 2013-01-07 17:41 ` Stephen Warren
-1 siblings, 0 replies; 6+ messages in thread
From: Stephen Warren @ 2013-01-07 17:41 UTC (permalink / raw)
To: Joseph Lo
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On 01/06/2013 07:56 PM, Joseph Lo wrote:
> It would rather to use the API of time_to_jiffies than a constant number
> of jiffies for the wait time of CPU power up.
>
> Based on the work by:
> Sang-Hun Lee <sanlee-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Applied to Tegra's for-3.9/soc branch.
> diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
> - timeout = jiffies + 5*HZ;
> + timeout = jiffies + msecs_to_jiffies(50);
I did just want to confirm though; I think that changes the timeout from
5 seconds to 50mS and similarly for the other change. I assume that was
intended? The code certainly seemed to work just fine with this change
when I tested it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: tegra30: make the wait time of CPU power up to proportional to HZ
@ 2013-01-07 17:41 ` Stephen Warren
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Warren @ 2013-01-07 17:41 UTC (permalink / raw)
To: linux-arm-kernel
On 01/06/2013 07:56 PM, Joseph Lo wrote:
> It would rather to use the API of time_to_jiffies than a constant number
> of jiffies for the wait time of CPU power up.
>
> Based on the work by:
> Sang-Hun Lee <sanlee@nvidia.com>
Applied to Tegra's for-3.9/soc branch.
> diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
> - timeout = jiffies + 5*HZ;
> + timeout = jiffies + msecs_to_jiffies(50);
I did just want to confirm though; I think that changes the timeout from
5 seconds to 50mS and similarly for the other change. I assume that was
intended? The code certainly seemed to work just fine with this change
when I tested it.
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <50EB08E5.8080503-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>]
* Re: [PATCH] ARM: tegra30: make the wait time of CPU power up to proportional to HZ
2013-01-07 17:41 ` Stephen Warren
@ 2013-01-08 1:24 ` Joseph Lo
-1 siblings, 0 replies; 6+ messages in thread
From: Joseph Lo @ 2013-01-08 1:24 UTC (permalink / raw)
To: Stephen Warren
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
On Tue, 2013-01-08 at 01:41 +0800, Stephen Warren wrote:
> On 01/06/2013 07:56 PM, Joseph Lo wrote:
> > It would rather to use the API of time_to_jiffies than a constant number
> > of jiffies for the wait time of CPU power up.
> >
> > Based on the work by:
> > Sang-Hun Lee <sanlee-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> Applied to Tegra's for-3.9/soc branch.
>
> > diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
>
> > - timeout = jiffies + 5*HZ;
> > + timeout = jiffies + msecs_to_jiffies(50);
>
> I did just want to confirm though; I think that changes the timeout from
> 5 seconds to 50mS and similarly for the other change. I assume that was
> intended? The code certainly seemed to work just fine with this change
> when I tested it.
Yes, I also tested this patch with CPU hotplug stress test. The result
was good.
Thanks for confirming.
Joseph
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: tegra30: make the wait time of CPU power up to proportional to HZ
@ 2013-01-08 1:24 ` Joseph Lo
0 siblings, 0 replies; 6+ messages in thread
From: Joseph Lo @ 2013-01-08 1:24 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, 2013-01-08 at 01:41 +0800, Stephen Warren wrote:
> On 01/06/2013 07:56 PM, Joseph Lo wrote:
> > It would rather to use the API of time_to_jiffies than a constant number
> > of jiffies for the wait time of CPU power up.
> >
> > Based on the work by:
> > Sang-Hun Lee <sanlee@nvidia.com>
>
> Applied to Tegra's for-3.9/soc branch.
>
> > diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
>
> > - timeout = jiffies + 5*HZ;
> > + timeout = jiffies + msecs_to_jiffies(50);
>
> I did just want to confirm though; I think that changes the timeout from
> 5 seconds to 50mS and similarly for the other change. I assume that was
> intended? The code certainly seemed to work just fine with this change
> when I tested it.
Yes, I also tested this patch with CPU hotplug stress test. The result
was good.
Thanks for confirming.
Joseph
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-01-08 1:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-07 2:56 [PATCH] ARM: tegra30: make the wait time of CPU power up to proportional to HZ Joseph Lo
2013-01-07 2:56 ` Joseph Lo
[not found] ` <1357527374-31055-1-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-07 17:41 ` Stephen Warren
2013-01-07 17:41 ` Stephen Warren
[not found] ` <50EB08E5.8080503-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-08 1:24 ` Joseph Lo
2013-01-08 1:24 ` Joseph Lo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.