lkml.org 
[lkml]   [2017]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC][PATCHv5 07/13] printk: register syscore notifier
Date
On Wednesday, August 16, 2017 8:55:45 AM CEST Sergey Senozhatsky wrote:
> 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
>

OK then.

Thanks,
Rafel

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