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: <CAJOA=zNoj1nZ+zVURfhziqFem4F7_Y_B8s=Gp1Aptr0hgfj6Xw@mail.gmail.com>
Date:	Mon, 21 May 2012 11:05:57 -0700
From:	"Turquette, Mike" <mturquette@...com>
To:	Peter De Schrijver <pdeschrijver@...dia.com>
Cc:	Prashant Gaikwad <pgaikwad@...dia.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: Clock register in early init

On Mon, May 21, 2012 at 1:46 AM, Peter De Schrijver
<pdeschrijver@...dia.com> wrote:
>>
>> On OMAP I think the only "gotcha" is setting up the timer.  One
>> solution is to open code the register reads and the rate calculation
>> in the timer code.  That is ugly... but it works.
>>
>> > Which advantages do you see in dynamically allocating all this?
>> >
>>
>> There are many but I'll name a couple.  The most significant point is
>> that we can avoid exposing the definition of struct clk if we
>> dynamically allocate stuff.  One can use struct clk_hw_init to
>> statically initialize data, or instead rely on direct calls to
>> clk_register with a bunch of parameters.
>>
>
> Which means if you make a mistake in specifying parents for example, it will
> only fail at runtime, possibly before any console is active. With static
> initialization, this will fail at compiletime. Much easier to debug.
>

Is this really a problem?  Once you have good data it does not change.
 Debugging bad data when introducing a new chip is just a fact of
life.  Static versus dynamic is irrelevant here.

>> Another point is that copying the data at registration-time makes
>> __initdata possible.  I haven't done the math yet to see if this
>> really makes a difference.  However if we start doing single zImage's
>> with multiple different ARM SoCs then this could recover some pages.
>>
>
> On the other hand most clock structures are small, so there will be internal
> fragmentation. Also the arrays of parent clock pointers can be shared between
> different clocks. We have about 70 muxes in Tegra30 and 12 different parent
> arrays.
>

What is missing from struct clk_hw_init to do what your static arrays do today?

Thanks,
Mike

> Cheers,
>
> Peter.
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ