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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAD=FV=ULtdGkpRfmAZRbM0VQu6sJ37_bPBRHKFReK4X+jYjT_Q@mail.gmail.com>
Date:   Thu, 27 Sep 2018 08:21:03 -0700
From:   Doug Anderson <dianders@...gle.com>
To:     vbadigan@...eaurora.org
Cc:     Adrian Hunter <adrian.hunter@...el.com>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Asutosh Das <asutoshd@...eaurora.org>, riteshh@...eaurora.org,
        stummala@...eaurora.org, sayalil@...eaurora.org,
        Evan Green <evgreen@...omium.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] mmc: sdhci-msm: Re-initialize DLL if MCLK is gated dynamically

Hi,
On Thu, Sep 27, 2018 at 4:00 AM Veerabhadrarao Badiganti
<vbadigan@...eaurora.org> wrote:
>
> Hi Doug,
>
>
> On 9/26/2018 3:58 AM, Doug Anderson wrote:
> > Hi,
> >
> > On Tue, Sep 25, 2018 at 8:05 AM Veerabhadrarao Badiganti
> > <vbadigan@...eaurora.org> wrote:
> >> +       /*
> >> +        * Whenever core-clock is gated dynamically, it's needed to
> >> +        * re-initialize the DLL when the clock is ungated.
> >> +        */
> >> +       if (msm_host->restore_dll_cfg_needed && msm_host->clk_rate) {
> >> +               msm_host->restore_dll_cfg = true;
> >> +               mmc_retune_needed(host->mmc);
> > Using the boolean "restore_dll_cfg" to communicate like this seems
> > really fragile.  I have no basis in fact, but I worry that something
> > will happen in the meantime that really ought to invalidate the
> > "saved_tuning_phase" but the boolean will still be set.
> >
> > Is there a reason you can't just call msm_config_cm_dll_phase()
> > directly from sdhci_msm_runtime_resume()?  Perhaps after the
> > clk_bulk_prepare_enable() call below?
>
> I can do that.
>
> But we don't need to restore the clock phase for all speed modes since
> every mode
> doesn't use DLL. Only few speed modes (only SDR104 mode for SD card)
> would need to restore DLL setting. So I would need to do some extra checks
> for performing this operation for only required speed modes.
> And we should re-initialize the DLL first before programming the phase.
>
> I wanted to reuse the existing logic which does all these things. So did
> this way.

Personally I'd rather see the extra checks or even restore the DLL
settings some cases when it wasn't truly needed.

In theory, though, I'd expect that there's a hardware register
somewhere that says whether the DLL settings matter or not.  Can't you
just key off of that?  ...or if that register is also lost when the
clock turns off then whenever you change that register to turn the DLL
off then clear your saved phase?


-Doug

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ