[PATCH 2/2] Convert PowerPC macro spin_event_timeout() to architecture independent macro

Timur Tabi timur at tabi.org
Wed Jul 31 19:44:58 EDT 2013


On Wed, Jul 31, 2013 at 2:16 AM, Stephen Boyd <sboyd at codeaurora.org> wrote:
>
> What do you do here if jiffies aren't incrementing (i.e
> interrupts are disabled). The time_before() check won't work
> there and it would be nice if we were able to use this in such
> situations. I think powerpc gets around this by reading the
> hardware timer directly?

I believe that jiffies is always a global variable.  It should behave
the same on PowerPC as on other architectures.

The answer to your question is that you should not use
spin_event_timeout() in interrupt context, because it yields.

(FYI, I'm the author of spin_event_timeout(), so please CC: me on all
changes to it)



More information about the linux-arm-kernel mailing list