All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Turquette, Mike" <mturquette@ti.com>
To: Rob Herring <robherring2@gmail.com>
Cc: Chris Ball <cjb@laptop.org>, Mitch Bradley <wmb@laptop.org>,
	Arnd Bergmann <arnd@arndb.de>,
	devicetree-discuss@lists.ozlabs.org, sboyd@codeaurora.org,
	linux-kernel@vger.kernel.org,
	Grant Likely <grant.likely@secretlab.ca>,
	skannan@codeaurora.org, Olof Johansson <olof@lixom.net>,
	shawn.guo@linaro.org, s.hauer@pengutronix.de,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 0/4] DT clock bindings
Date: Mon, 2 Jul 2012 18:30:22 -0700	[thread overview]
Message-ID: <CAJOA=zNFZyOXrv8cpJJYhSyR6kvHr3awDvCwR689XyOKWYCMig@mail.gmail.com> (raw)
In-Reply-To: <4FEB0273.9050707@gmail.com>

On Wed, Jun 27, 2012 at 5:54 AM, Rob Herring <robherring2@gmail.com> wrote:
> On 06/21/2012 12:54 PM, Mike Turquette wrote:
>> On 20120621-10:00, Rob Herring wrote:
>>> On 06/21/2012 02:27 AM, Chris Ball wrote:
>>>>
>>>> 2) Use alloc_bootmem() instead of kzalloc() in of_clk_add_provider(),
>>>>    because we need to set up clocks during .init_early on ARM (which
>>>>    happens pre-slab) so that they are available for platform init.
>>>
>>> This depends on 1 as the common clock code would have the same issue.
>>> Generally, the first place clocks are needed is the timer init. At that
>>> point, you can call kzalloc. This is where all the clock init used to be
>>> done until init_early was added and some platforms have moved their
>>> clock init. I don't think there was really ever much reason to move it
>>> other than to make the timer init function only deal with timer setup.
>>>
>>
>> Hi Rob,
>>
>> Just FYI I've been looking at using alloc_bootmem in the common clk code
>> as a way to get rid of the static initialization stuff (which only
>> existed due to very early initialization of timers).
>
> The slab is up at the time timers are initialized. The only real problem
> is mixing clock init into the timer init functions and clk init in
> init_early is cleaner in that regard.
>

Hi Rob,

I'm afraid I don't follow you when you say "slab is up at the time
timers are initialized".  On some platforms I believe that timer
initialization takes place before slab is ready (.early_init).

>> The suggested change above to of_clk_add_provider would jive well with
>> my change to the common clk code.
>
> Are you planning this for 3.6? If not, then this can be addressed at the
> time the clk framework supports bootmem.
>
> I'm not so sure more users of bootmem are desired. There seems to be
> some effort/desire to remove it:
>
> http://lists.linux-foundation.org/pipermail/ksummit-2012-discuss/2012-June/000562.html
> https://lkml.org/lkml/2012/3/13/586
> http://lists.infradead.org/pipermail/linux-arm-kernel/2011-December/074886.html

So after looking at those mails it seems using memblock_alloc would be
a better alternative.  Did I get that right?

Thanks,
Mike

>
> Rob

WARNING: multiple messages have this Message-ID (diff)
From: mturquette@ti.com (Turquette, Mike)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 0/4] DT clock bindings
Date: Mon, 2 Jul 2012 18:30:22 -0700	[thread overview]
Message-ID: <CAJOA=zNFZyOXrv8cpJJYhSyR6kvHr3awDvCwR689XyOKWYCMig@mail.gmail.com> (raw)
In-Reply-To: <4FEB0273.9050707@gmail.com>

On Wed, Jun 27, 2012 at 5:54 AM, Rob Herring <robherring2@gmail.com> wrote:
> On 06/21/2012 12:54 PM, Mike Turquette wrote:
>> On 20120621-10:00, Rob Herring wrote:
>>> On 06/21/2012 02:27 AM, Chris Ball wrote:
>>>>
>>>> 2) Use alloc_bootmem() instead of kzalloc() in of_clk_add_provider(),
>>>> ? ?because we need to set up clocks during .init_early on ARM (which
>>>> ? ?happens pre-slab) so that they are available for platform init.
>>>
>>> This depends on 1 as the common clock code would have the same issue.
>>> Generally, the first place clocks are needed is the timer init. At that
>>> point, you can call kzalloc. This is where all the clock init used to be
>>> done until init_early was added and some platforms have moved their
>>> clock init. I don't think there was really ever much reason to move it
>>> other than to make the timer init function only deal with timer setup.
>>>
>>
>> Hi Rob,
>>
>> Just FYI I've been looking at using alloc_bootmem in the common clk code
>> as a way to get rid of the static initialization stuff (which only
>> existed due to very early initialization of timers).
>
> The slab is up at the time timers are initialized. The only real problem
> is mixing clock init into the timer init functions and clk init in
> init_early is cleaner in that regard.
>

Hi Rob,

I'm afraid I don't follow you when you say "slab is up at the time
timers are initialized".  On some platforms I believe that timer
initialization takes place before slab is ready (.early_init).

>> The suggested change above to of_clk_add_provider would jive well with
>> my change to the common clk code.
>
> Are you planning this for 3.6? If not, then this can be addressed at the
> time the clk framework supports bootmem.
>
> I'm not so sure more users of bootmem are desired. There seems to be
> some effort/desire to remove it:
>
> http://lists.linux-foundation.org/pipermail/ksummit-2012-discuss/2012-June/000562.html
> https://lkml.org/lkml/2012/3/13/586
> http://lists.infradead.org/pipermail/linux-arm-kernel/2011-December/074886.html

So after looking at those mails it seems using memblock_alloc would be
a better alternative.  Did I get that right?

Thanks,
Mike

>
> Rob

  reply	other threads:[~2012-07-03  1:30 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-12 14:41 [PATCH v3 0/4] DT clock bindings Rob Herring
2012-06-12 14:41 ` Rob Herring
2012-06-12 14:41 ` [PATCH v3 1/4] clk: add DT clock binding support Rob Herring
2012-06-12 14:41   ` Rob Herring
2012-06-15  3:17   ` Shawn Guo
2012-06-15  3:17     ` Shawn Guo
2012-06-15  3:17     ` Shawn Guo
2012-06-15  4:32     ` Rob Herring
2012-06-15  4:32       ` Rob Herring
2012-07-01 22:13   ` [PATCH v6] " Rob Herring
2012-07-01 22:13     ` Rob Herring
2012-07-01 22:13     ` Rob Herring
2012-06-12 14:41 ` [PATCH v3 2/4] clk: add DT fixed-clock " Rob Herring
2012-06-12 14:41   ` Rob Herring
2012-06-12 14:41 ` [PATCH v3 3/4] dt: add clock binding doc to primecell bindings Rob Herring
2012-06-12 14:41   ` Rob Herring
2012-06-22 13:55   ` Ben Dooks
2012-06-22 14:23     ` Russell King - ARM Linux
2012-06-12 14:41 ` [PATCH v3 4/4] clk: add highbank clock support Rob Herring
2012-06-12 14:41   ` Rob Herring
2012-06-12 15:47 ` [PATCH v3 0/4] DT clock bindings Mike Turquette
2012-06-12 15:47   ` Mike Turquette
2012-06-12 16:23   ` Rob Herring
2012-06-12 16:23     ` Rob Herring
2012-06-14  8:49     ` Shawn Guo
2012-06-14  8:49       ` Shawn Guo
2012-06-14  8:49       ` Shawn Guo
2012-06-13 15:26 ` Peter De Schrijver
2012-06-13 15:26   ` Peter De Schrijver
2012-06-13 15:26   ` Peter De Schrijver
2012-06-13 18:09   ` Rob Herring
2012-06-13 18:09     ` Rob Herring
2012-06-13 18:09     ` Rob Herring
2012-06-15  8:39 ` Shawn Guo
2012-06-15  8:39   ` Shawn Guo
2012-06-15  8:39   ` Shawn Guo
2012-06-15 15:40   ` Stephen Warren
2012-06-15 15:40     ` Stephen Warren
2012-06-15 21:07   ` Rob Herring
2012-06-15 21:07     ` Rob Herring
2012-06-15 21:07     ` Rob Herring
2012-06-21  7:27 ` Chris Ball
2012-06-21  7:27   ` Chris Ball
2012-06-21  7:30   ` [PATCH 01/02] clk: Refactor of_clk_* into a new clk-of.c Chris Ball
2012-06-21  7:30     ` Chris Ball
2012-06-21  7:32   ` [PATCH 02/02] clk: clk-of: Use alloc_bootmem() instead of kzalloc() Chris Ball
2012-06-21  7:32     ` Chris Ball
2012-06-21 12:18     ` Paul Mundt
2012-06-21 12:18       ` Paul Mundt
2012-06-21 15:00   ` [PATCH v3 0/4] DT clock bindings Rob Herring
2012-06-21 15:00     ` Rob Herring
2012-06-21 17:54     ` Mike Turquette
2012-06-21 17:54       ` Mike Turquette
2012-06-27 12:54       ` Rob Herring
2012-06-27 12:54         ` Rob Herring
2012-07-03  1:30         ` Turquette, Mike [this message]
2012-07-03  1:30           ` Turquette, Mike
2012-07-03  2:37           ` Rob Herring
2012-07-03  2:37             ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJOA=zNFZyOXrv8cpJJYhSyR6kvHr3awDvCwR689XyOKWYCMig@mail.gmail.com' \
    --to=mturquette@ti.com \
    --cc=arnd@arndb.de \
    --cc=cjb@laptop.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=robherring2@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sboyd@codeaurora.org \
    --cc=shawn.guo@linaro.org \
    --cc=skannan@codeaurora.org \
    --cc=wmb@laptop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.