Re: [PATCH 6/8] OMAP: omap_device: use read_persistent_clock() instead of getnstimeofday()

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

 



Hi, 

On Tue, 17 Nov 2009, Kevin Hilman wrote:

> During suspend and resume, when omap_device deactivation and
> activation is happening, the timekeeping subsystem has likely already
> been suspended.  Thus getnstimeofday() will fail and trigger a WARN().
> 
> Use read_persistent_clock() instead of getnstimeofday() to avoid this.

Thanks, will queue in fixes series.

- Paul

> 
> Signed-off-by: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx>
> ---
>  arch/arm/plat-omap/omap_device.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
> index 6a8b0ce..f6cdf1a 100644
> --- a/arch/arm/plat-omap/omap_device.c
> +++ b/arch/arm/plat-omap/omap_device.c
> @@ -134,12 +134,12 @@ static int _omap_device_activate(struct omap_device *od, u8 ignore_lat)
>  		    (od->dev_wakeup_lat <= od->_dev_wakeup_lat_limit))
>  			break;
>  
> -		getnstimeofday(&a);
> +		read_persistent_clock(&a);
>  
>  		/* XXX check return code */
>  		odpl->activate_func(od);
>  
> -		getnstimeofday(&b);
> +		read_persistent_clock(&b);
>  
>  		c = timespec_sub(b, a);
>  		act_lat = timespec_to_ns(&c) * NSEC_PER_USEC;
> @@ -190,12 +190,12 @@ static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat)
>  		     od->_dev_wakeup_lat_limit))
>  			break;
>  
> -		getnstimeofday(&a);
> +		read_persistent_clock(&a);
>  
>  		/* XXX check return code */
>  		odpl->deactivate_func(od);
>  
> -		getnstimeofday(&b);
> +		read_persistent_clock(&b);
>  
>  		c = timespec_sub(b, a);
>  		deact_lat = timespec_to_ns(&c) * NSEC_PER_USEC;
> -- 
> 1.6.5.1
> 
> --
> 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
> 


- Paul
--
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