Re: [PATCH] powerpc: Make hard_irq_disable() do the right thing vs. irq tracing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2013-05-07 at 15:15 +0800, tiejun.chen wrote:
> Could we simplify this as follows:
> 
> +#define hard_irq_disable()     do {                    \
> +       __hard_irq_disable();                           \
> +       if (get_paca()->soft_enabled) {                 \
> +               trace_hardirqs_off();                   \
> +               get_paca()->soft_enabled = 0;           \
> +       }                                               \
> +       get_paca()->irq_happened |= PACA_IRQ_HARD_DIS;  \
> +} while(0)

I'd rather not. When lockdep is not enabled trace_hardirqs_off() is a
nop and thus we have no conditional at all which is arguably better...

Cheers,
Ben.


--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux