lkml.org 
[lkml]   [2017]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCHv5 07/13] printk: register syscore notifier
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

\
 
 \ /
  Last update: 2017-08-16 08:56    [W:0.116 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site