[PATCH v1 3/3] ARM: tegra: cpuidle driver for tegra

Bedia, Vaibhav vaibhav.bedia at ti.com
Fri Jan 27 01:59:03 EST 2012


On Thu, Jan 26, 2012 at 21:52:03, Peter De Schrijver wrote:
[...]
> +static int tegra_idle_enter_lp3(struct cpuidle_device *dev,
> +	struct cpuidle_driver *drv, int index)
> +{
> +	ktime_t enter, exit;
> +	s64 us;
> +
> +	local_irq_disable();
> +	local_fiq_disable();
> +
> +	enter = ktime_get();
> +
> +	tegra_cpu_wfi();
> +
> +	exit = ktime_sub(ktime_get(), enter);
> +	us = ktime_to_us(exit);
> +
> +	local_fiq_enable();
> +	local_irq_enable();
> +
> +	dev->last_residency = us;
> +
> +	return index;
> +}

You can probably drop local_irq_disable() and local_irq_enable().



More information about the linux-arm-kernel mailing list