On Thu, 2012-06-28 at 08:45 +1000, Anton Blanchard wrote:
>       hard_irq_disable();
> -     if (get_paca()->irq_happened == 0)
> +     if (get_paca()->irq_happened == PACA_IRQ_HARD_DIS)
>               cede_processor();

I'd rather add a helper, something like lazy_irq_pending()
and hide the actual check for the bits in irq_happened, in
case we change the scheme again.

Something like:

static inline bool lazy_irq_pending(void)
{
        return !!(get_paca()->irq_happened & ~PACA_IRQ_HARD_DIS);
}

Cheers,
Ben.


_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to