All of lore.kernel.org
 help / color / mirror / Atom feed
* IRQ and FIQ disabling during sleep states.
@ 2012-07-11 12:30 Peter De Schrijver
  2012-07-12 16:05 ` Daniel Lezcano
  0 siblings, 1 reply; 4+ messages in thread
From: Peter De Schrijver @ 2012-07-11 12:30 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

I noticed several platforms exhibit different behaviour wrt disabling IRQ or
FIQ when entering a CPU idle state. Tegra for example disables both FIQ and
IRQ when entering CPU clockstop, but OMAP seems to only disable FIQs? Also
the generic cpuidle_wrap_enter() function, enables IRQs after return from
the idle state, but doesn't disable them.

Some questions:

1) I assume we need to disable IRQ/FIQ to not confuse the cpuidle code due to
   late interrupts?
2) What prevents us from unifying this?

Thanks,

Peter.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* IRQ and FIQ disabling during sleep states.
  2012-07-11 12:30 IRQ and FIQ disabling during sleep states Peter De Schrijver
@ 2012-07-12 16:05 ` Daniel Lezcano
  2012-07-18 16:19   ` Rob Lee
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Lezcano @ 2012-07-12 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/11/2012 02:30 PM, Peter De Schrijver wrote:
> Hi,
> 
> I noticed several platforms exhibit different behaviour wrt disabling IRQ or
> FIQ when entering a CPU idle state. Tegra for example disables both FIQ and
> IRQ when entering CPU clockstop, but OMAP seems to only disable FIQs? Also
> the generic cpuidle_wrap_enter() function, enables IRQs after return from
> the idle state, but doesn't disable them.
> 
> Some questions:
> 
> 1) I assume we need to disable IRQ/FIQ to not confuse the cpuidle code due to
>    late interrupts?
> 2) What prevents us from unifying this?


AFAIR, Rob Lee discussed about this point already. Maybe he has a
pointer to the discussion.



-- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 4+ messages in thread

* IRQ and FIQ disabling during sleep states.
  2012-07-12 16:05 ` Daniel Lezcano
@ 2012-07-18 16:19   ` Rob Lee
  2012-07-18 16:31     ` Shilimkar, Santosh
  0 siblings, 1 reply; 4+ messages in thread
From: Rob Lee @ 2012-07-18 16:19 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Peter and Daniel,

On Thu, Jul 12, 2012 at 11:05 AM, Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
> On 07/11/2012 02:30 PM, Peter De Schrijver wrote:
>> Hi,
>>
>> I noticed several platforms exhibit different behaviour wrt disabling IRQ or
>> FIQ when entering a CPU idle state. Tegra for example disables both FIQ and
>> IRQ when entering CPU clockstop, but OMAP seems to only disable FIQs? Also
>> the generic cpuidle_wrap_enter() function, enables IRQs after return from
>> the idle state, but doesn't disable them.
>>
>> Some questions:
>>
>> 1) I assume we need to disable IRQ/FIQ to not confuse the cpuidle code due to
>>    late interrupts?

Part of the a cpuidle irq and time keeping consolidation and cleanup
patch that went in a while back removed all the irq disable calls from
arm platform code as they are they are already disabled at the
arch/arm level in kernel/process.c before calling cpu_idle_call.  I
meant to remove these redundant platform calls for all ARM platforms
but it's possible I missed one for Tegra if its platform irq disable
still exists.

>> 2) What prevents us from unifying this?
It may be good to also disable the FIQ's at the same time as IRQ's in
arch/arm/kernel/process.c.  I had made some mention of also global
disabling FIQs in my initial RFC submission and you can see the
responses here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-December/076036.html
Given the response, I didn't pursue making any changes to FIQ
disabling.  But if would have suggested doing so at same location as
irq's are being disabled for ARM, perhaps it would have been better
received.  Now that many arm systems are using FIQs for handling
interrupts in the secure trust zone world, that may change things as
well.

Rob




>
>
> AFAIR, Rob Lee discussed about this point already. Maybe he has a
> pointer to the discussion.
>
>
>
> --
>  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
>
> Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
> <http://twitter.com/#!/linaroorg> Twitter |
> <http://www.linaro.org/linaro-blog/> Blog
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* IRQ and FIQ disabling during sleep states.
  2012-07-18 16:19   ` Rob Lee
@ 2012-07-18 16:31     ` Shilimkar, Santosh
  0 siblings, 0 replies; 4+ messages in thread
From: Shilimkar, Santosh @ 2012-07-18 16:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 18, 2012 at 9:49 PM, Rob Lee <rob.lee@linaro.org> wrote:
> Hello Peter and Daniel,
>
> On Thu, Jul 12, 2012 at 11:05 AM, Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:
>> On 07/11/2012 02:30 PM, Peter De Schrijver wrote:
>>> Hi,
>>>
>>> I noticed several platforms exhibit different behaviour wrt disabling IRQ or
>>> FIQ when entering a CPU idle state. Tegra for example disables both FIQ and
>>> IRQ when entering CPU clockstop, but OMAP seems to only disable FIQs? Also
>>> the generic cpuidle_wrap_enter() function, enables IRQs after return from
>>> the idle state, but doesn't disable them.
>>>
>>> Some questions:
>>>
>>> 1) I assume we need to disable IRQ/FIQ to not confuse the cpuidle code due to
>>>    late interrupts?
>
> Part of the a cpuidle irq and time keeping consolidation and cleanup
> patch that went in a while back removed all the irq disable calls from
> arm platform code as they are they are already disabled at the
> arch/arm level in kernel/process.c before calling cpu_idle_call.  I
> meant to remove these redundant platform calls for all ARM platforms
> but it's possible I missed one for Tegra if its platform irq disable
> still exists.
>
>>> 2) What prevents us from unifying this?
> It may be good to also disable the FIQ's at the same time as IRQ's in
> arch/arm/kernel/process.c.  I had made some mention of also global
> disabling FIQs in my initial RFC submission and you can see the
> responses here:
> http://lists.infradead.org/pipermail/linux-arm-kernel/2011-December/076036.html
> Given the response, I didn't pursue making any changes to FIQ
> disabling.  But if would have suggested doing so at same location as
> irq's are being disabled for ARM, perhaps it would have been better
> received.  Now that many arm systems are using FIQs for handling
> interrupts in the secure trust zone world, that may change things as
> well.
>
Actually the FIQ disable on OMAP is bogus and can be cleaned up.
When FIQ is really used, it is used in secure world and it has banked
register so the kernel FIQ disable doesn't help anyways.

Regards
Santosh

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-18 16:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-11 12:30 IRQ and FIQ disabling during sleep states Peter De Schrijver
2012-07-12 16:05 ` Daniel Lezcano
2012-07-18 16:19   ` Rob Lee
2012-07-18 16:31     ` Shilimkar, Santosh

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.