On (08/15/17 13:56), Rafael J. Wysocki wrote:
[..]
> > +static int printk_syscore_suspend(void)
> > +{
> > +   printk_emergency_begin();
> > +   return 0;
> > +}
> 
> Somebody looking at suspend/resume code paths only will be wondering why
> you need this, because we should be in the emergency mode already when
> it is called.
> 
> It would be good to add a comment about the kexec context here.

ok, will add.

> > +static void printk_syscore_resume(void)
> > +{
> > +   printk_emergency_end();
> > +}
> 
> This will turn the emergency mode off during resume before the notifier
> added by the previous patch AFAICS.  Is this intentional?

emergency modes can nest. so it's OK to have

        printk_emergency_begin()   +1   // on
          printk_emergency_begin()   +1
          printk_emergency_end()     -1
        printk_emergency_end()     -1   // off

or did I misunderstand your question?

        -ss

Reply via email to