Re: [PATCH 1/2] ARM: OMAP3: PM: remove superfluous calls to pwrdm_clear_all_prev_pwrst()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 31, 2012 at 5:44 AM, Kevin Hilman <khilman@xxxxxx> wrote:
> Paul Walmsley <paul@xxxxxxxxx> writes:
>
>> Remove some superfluous calls to pwrdm_clear_all_prev_pwrst().
>> pwrdm_pre_transition(), which appears a few lines after these calls,
>> invokes pwrdm_clear_all_prev_pwrst() on each powerdomain -- there's no
>> need to do it twice.
>
> It looks like these two for OMAP4 are surpurfluous since the immediately
> follow a call to pwrdm_pre_transition() as well.
>
> Santosh/Rajendra, please confirm/ack.
>
> Kevin
>
>
> diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
> index 1d5d010..bbabe1d 100644
> --- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
> +++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
> @@ -263,12 +263,10 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state)
>         * In MPUSS OSWR or device OFF, interrupt controller  contest is lost.
>         */
>        mpuss_clear_prev_logic_pwrst();
> -       pwrdm_clear_all_prev_pwrst(mpuss_pd);
>        if ((pwrdm_read_next_pwrst(mpuss_pd) == PWRDM_POWER_RET) &&
>                (pwrdm_read_logic_retst(mpuss_pd) == PWRDM_POWER_OFF))
>                save_state = 2;
>
> -       clear_cpu_prev_pwrst(cpu);
>        cpu_clear_prev_logic_pwrst(cpu);
>        set_cpu_next_pwrst(cpu, power_state);
>        set_cpu_wakeup_addr(cpu, virt_to_phys(omap4_cpu_resume));

The power domain pre-transition and post transition calls were kept
under the CONFIG_PM_DEBUG in the first few versions of the patches.
These pre and post
transition use to take lot of time once in while when measurement were
done and the only
useful thing they were doing was the counter updates. Later I removed
the PM_DEBUG as
per your suggestion.

As per Pauls comment they are optimised, so that should be good.

In this code the need is to clear only CPU and MPUPD, and hence they are
explicitly cleared since the pre/post transition calls can be moved to PM_DEBUG
in production kernels.

But as you stated in current mainline kernel they are superfluous since the
pre/post calls are not under PM debug. So I am ok either way

Regards
Santosh
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux