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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHCN7xKBzRfByvdYBPS=uWF2QvECAOf5zGZE0-pxjJ6A2-d95g@mail.gmail.com>
Date:   Wed, 19 Aug 2020 07:21:07 -0500
From:   Adam Ford <aford173@...il.com>
To:     Tony Lindgren <tony@...mide.com>
Cc:     Linux-OMAP <linux-omap@...r.kernel.org>,
        Adam Ford-BE <aford@...conembedded.com>,
        Russell King <linux@...linux.org.uk>,
        Eduardo Valentin <edubezval@...il.com>,
        Keerthy <j-keerthy@...com>, Zhang Rui <rui.zhang@...el.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Amit Kucheria <amitk@...nel.org>,
        arm-soc <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-pm@...r.kernel.org
Subject: Re: [PATCH 1/2] thermal: ti-soc-thermal: Enable addition power management

On Tue, Aug 18, 2020 at 11:58 PM Tony Lindgren <tony@...mide.com> wrote:
>
> * Adam Ford <aford173@...il.com> [200818 15:46]:
> > @@ -1153,6 +1166,38 @@ static int ti_bandgap_suspend(struct device *dev)
> >       return err;
> >  }
> >
> > +static int bandgap_omap_cpu_notifier(struct notifier_block *nb,
> > +                               unsigned long cmd, void *v)
> > +{
> > +     struct ti_bandgap *bgp;
> > +
> > +     bgp = container_of(nb, struct ti_bandgap, nb);
> > +
> > +     spin_lock(&bgp->lock);
> > +     switch (cmd) {
> > +     case CPU_CLUSTER_PM_ENTER:
> > +             if (bgp->is_suspended)
> > +                     break;
> > +             ti_bandgap_save_ctxt(bgp);
> > +             ti_bandgap_power(bgp, false);
> > +             if (TI_BANDGAP_HAS(bgp, CLK_CTRL))
> > +                     clk_disable(bgp->fclock);
> > +             break;
> > +     case CPU_CLUSTER_PM_ENTER_FAILED:
> > +     case CPU_CLUSTER_PM_EXIT:
> > +             if (bgp->is_suspended)
> > +                     break;
> > +             if (TI_BANDGAP_HAS(bgp, CLK_CTRL))
> > +                     clk_enable(bgp->fclock);
> > +             ti_bandgap_power(bgp, true);
> > +             ti_bandgap_restore_ctxt(bgp);
> > +             break;
> > +     }
> > +     spin_unlock(&bgp->lock);
> > +
> > +     return NOTIFY_OK;
> > +}
>
> Hmm to me it looks like is_suspended is not used right now?
> I guess you want to set it in ti_bandgap_suspend() and clear
> it in ti_bandgap_resume()?
>
> Otherwise looks good to me, I can't test the power consumption
> right now though so you may want to check it to make sure
> device still hits off mode during idle.

I have a V2.  Do you want me to re-post 2/2 with V2 as no change, or
should I just submit this patch alone?

adam
>
> Regards,
>
> Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ