On Tue, 2017-05-16 at 14:56 +0530, Aneesh Kumar K.V wrote: > > +static inline bool __hard_irqs_disabled(void) > +{ > + unsigned long flags = mfmsr(); > + return (flags & MSR_EE) == 0; > +} > +
Reading the MSR has a cost. Can't we rely on paca->irq_happened being non-0 ? (If you are paranoid, add a test of msr as well and warn if there's a mismatch ...) Cheers, Ben.