[PATCH] powerpc: check_and_cede_processor never cedes
    Benjamin Herrenschmidt 
    benh at kernel.crashing.org
       
    Thu Jun 28 08:51:19 EST 2012
    
    
  
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.
    
    
More information about the Linuxppc-dev
mailing list