lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 23 Oct 2021 15:07:12 +0800
From:   Chunfeng Yun <chunfeng.yun@...iatek.com>
To:     "Rafael J. Wysocki" <rafael@...nel.org>
CC:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Pavel Machek <pavel@....cz>, Len Brown <len.brown@...el.com>,
        Mathias Nyman <mathias.nyman@...el.com>,
        "Matthias Brugger" <matthias.bgg@...il.com>,
        Linux PM <linux-pm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:" 
        <linux-usb@...r.kernel.org>,
        "Linux ARM" <linux-arm-kernel@...ts.infradead.org>,
        "moderated list:ARM/Mediatek SoC..." 
        <linux-mediatek@...ts.infradead.org>,
        Eddie Hung <eddie.hung@...iatek.com>,
        Ikjoon Jang <ikjn@...omium.org>
Subject: Re: [PATCH v3 1/2] PM / wakeirq: support enabling wake-up irq after
 runtime_suspend called

On Sat, 2021-10-23 at 14:35 +0800, Chunfeng Yun wrote:
> On Tue, 2021-10-19 at 17:28 +0200, Rafael J. Wysocki wrote:
> > On Wed, Aug 11, 2021 at 5:05 AM Chunfeng Yun <
> > chunfeng.yun@...iatek.com> wrote:
> > > 
> > > When the dedicated wake-irq is level trigger, and it uses the
> > > consumer's sleep status as the wakeup source, that means if the
> > > consumer is not in sleep state, the wake-irq will be triggered
> > > when enable it; For this case, need enable the wake-irq after
> > > invoking the consumer's runtime_suspend() which make the consumer
> > > enter sleep state.
> > [...]
> 
> If want to make it static, should move it from wakeirq.c into
> runtime.c
> 
> > 
> > >  {
> > >         struct wake_irq *wirq = dev->power.wakeirq;
> > > 
> > >         if (!wirq || !(wirq->status & WAKE_IRQ_DEDICATED_MASK))
> > >                 return;
> > 
> > And I would just add the following line here:
> > 
> > if (cond_disable && (wirq->status &
> > WAKE_IRQ_DEDICATED_LATE_ENABLED))
> >         return;
> 
> This change doesn't cover the case (WAKE_IRQ_DEDICATED_LATE_ENABLED
> and
>  WAKE_IRQ_DEDICATED_MANAGED are both set 1):
> 
> -->rpm_suspend(): wirq->irq is enabled
> -->rpm_resume(): disable wirq->irq; (if change it, doesn't disable
> wirq->irq)
Seems I'm wrong, check again.

> 
> > 
> > > 
> > > -       if (wirq->status & WAKE_IRQ_DEDICATED_MANAGED)
> > > +       if (wirq->status & WAKE_IRQ_DEDICATED_MANAGED &&
> > > +           (skip_late_enabled_status ||
> > > +            !(wirq->status & WAKE_IRQ_DEDICATED_LATE_ENABLED)))
> > >                 disable_irq_nosync(wirq->irq);
> > >  }
> > > 
> > > +/**
> > > + * dev_pm_enable_wake_irq_complete - enable wake irq based on
> > > status
> > 

Powered by blists - more mailing lists