On Fri, 27 Jun 2014 16:32:46 +0200 Petr Mládek <pmla...@suse.cz> wrote:
> > +/* > > + * It is not safe to call printk() directly from NMI handlers. > > + * It may be fine if the NMI detected a lock up and we have no choice > > + * but to do so, but doing a NMI on all other CPUs to get a back trace > > + * can be done with a sysrq-l. We don't want that to lock up, which > > + * can happen if the NMI interrupts a printk in progress. > > + * > > + * Instead, we redirect the vprintk() to this nmi_vprintk() that writes > > + * the content into a per cpu seq_buf buffer. Then when the NMIs are > > + * all done, we can safely dump the contents of the seq_buf to a printk() > > + * from a non NMI context. > > + */ > > I would move this comment above #define NMI_BUF_SIZE > It should be on top because it helps to understand many other tricks that are > used above. > I have no problem with moving it. This started out as a simple comment and then I just got carried away ;-) -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/