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] [day] [month] [year] [list]
Date:   Mon, 23 Dec 2019 19:04:31 -0800
From:   Stephen Boyd <sboyd@...nel.org>
To:     "Tanwar, Rahul" <rahul.tanwar@...ux.intel.com>,
        Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Andy Shevchenko <andriy.shevchenko@...el.com>,
        Michael Turquette <mturquette@...libre.com>,
        Rob Herring <robh+dt@...nel.org>,
        robhkernel.org@...le.fi.intel.com,
        Mark Rutland <mark.rutland@....com>,
        linux-clk <linux-clk@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        qi-ming.wu@...el.com, yixin.zhu@...ux.intel.com,
        cheol.yong.kim@...el.com, rahul.tanwar@...el.com
Subject: Re: [PATCH v1 1/2] clk: intel: Add CGU clock driver for a new SoC

Quoting Andy Shevchenko (2019-12-07 06:57:43)
> On Fri, Dec 6, 2019 at 7:06 AM Tanwar, Rahul
> <rahul.tanwar@...ux.intel.com> wrote:
> > On 2/9/2019 8:24 PM, Andy Shevchenko wrote:
> > >>
> > >>      div = val < 3 ? (val + 1) : (1 << ((val - 3) / 3));
> > > It's not complete, but I think you got the idea.
> > >
> > >> So, can we eliminate table?
> >
> > In the desperation to eliminate table, below is what i can come up with:
> >
> >         struct clk_div_table div_table[16];
> 
> But this is not an elimination, it's just a replacement from static to
> dynamically calculated one.
> 
> >         int i, j;
> >
> >         for (i = 0; i < 16; i++)
> >                 div_table[i].val = i;
> >
> >         for (i = 0, j=0; i < 16; i+=3, j++) {
> >                 div_table[i].div = (i == 0) ? (1 << j) : (1 << (j + 1));
> >                 if (i == 15)
> >                         break;
> >
> >                 div_table[i + 1].div = (i == 0) ? ((1 << j) + 1) :
> >                                         (1 << (j + 1)) + (1 << (j - 1));
> >                 div_table[i + 2].div = (3 << j);
> >         }
> >
> > To me, table still looks a better approach. Also, table is more extendable &
> > consistent w.r.t. clk framework & other referenced clk drivers.
> >
> > Whats your opinion ?
> 
> Whatever CCF maintainers is fine with.
> 

Table is fine. Or something that calculates is also fine. Is it going to
be extended in the future? If we're talking about a driver for hardware
I wonder if this is really going to change in the future.

Please resend so your binding can be reviewed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ