All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Rajendra Nayak <rnayak@ti.com>
Cc: paul@pwsan.com, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, phaber@broadcom.com,
	Mike Turquette <mturquette@linaro.org>
Subject: Re: [PATCH 2/2] ARM: OMAP2+: clocks: Pass static parent pointers to common clock core
Date: Fri, 15 Mar 2013 09:20:50 -0700	[thread overview]
Message-ID: <20130315162049.GB9370@atomide.com> (raw)
In-Reply-To: <514313B6.4050905@ti.com>

* Rajendra Nayak <rnayak@ti.com> [130315 05:31]:
> On Thursday 14 March 2013 10:36 PM, Tony Lindgren wrote:
> > * Rajendra Nayak <rnayak@ti.com> [130314 05:44]:
> >> OMAP clock inits happen quite early, even before the slab is available.
> >> As part of the clock init, the common clock core tries to cache parent
> >> pointers (if not passed by the caller registering the clock) which
> >> fails in case of OMAP since the slab isn't initied.
> >> Without CONFIG_DEBUG_SLAB enabled, this just results in the common clock core
> >> retrying the caching attempt at some point later.
> >> However with CONFIG_DEBUG_SLAB enabled this results in a BUG() as reported
> >> in the link below by Tony..
> >> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg85932.html
> >>
> >> Fix this by passing static parent pointers to the common clock core
> >> while registering clocks.
> > 
> > I wonder if we could easily fix this by initializing only some of the
> > clocks that early?
> 
> We actually don't need any clocks that early (I mean even before slab init)
> We only need them before timer init.

Yes and only the timer clocks at that point. The others could be initialized
later on so we get console error messages without having to turn on DEBUG_LL
and earlyprintk.
 
> This isn't something specific to OMAP so I started looking at what others
> in drivers/clk seem to do.
> 
> I found imx, spear, mvebu all do their clk inits within .init_time callbacks.
> tegra seems to even do it within .init_irq callback.
> 
> Either one would work for us too :)

Well I suggest init_irq as that's when we need the first clocks for timer.

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: OMAP2+: clocks: Pass static parent pointers to common clock core
Date: Fri, 15 Mar 2013 09:20:50 -0700	[thread overview]
Message-ID: <20130315162049.GB9370@atomide.com> (raw)
In-Reply-To: <514313B6.4050905@ti.com>

* Rajendra Nayak <rnayak@ti.com> [130315 05:31]:
> On Thursday 14 March 2013 10:36 PM, Tony Lindgren wrote:
> > * Rajendra Nayak <rnayak@ti.com> [130314 05:44]:
> >> OMAP clock inits happen quite early, even before the slab is available.
> >> As part of the clock init, the common clock core tries to cache parent
> >> pointers (if not passed by the caller registering the clock) which
> >> fails in case of OMAP since the slab isn't initied.
> >> Without CONFIG_DEBUG_SLAB enabled, this just results in the common clock core
> >> retrying the caching attempt at some point later.
> >> However with CONFIG_DEBUG_SLAB enabled this results in a BUG() as reported
> >> in the link below by Tony..
> >> http://www.mail-archive.com/linux-omap at vger.kernel.org/msg85932.html
> >>
> >> Fix this by passing static parent pointers to the common clock core
> >> while registering clocks.
> > 
> > I wonder if we could easily fix this by initializing only some of the
> > clocks that early?
> 
> We actually don't need any clocks that early (I mean even before slab init)
> We only need them before timer init.

Yes and only the timer clocks at that point. The others could be initialized
later on so we get console error messages without having to turn on DEBUG_LL
and earlyprintk.
 
> This isn't something specific to OMAP so I started looking at what others
> in drivers/clk seem to do.
> 
> I found imx, spear, mvebu all do their clk inits within .init_time callbacks.
> tegra seems to even do it within .init_irq callback.
> 
> Either one would work for us too :)

Well I suggest init_irq as that's when we need the first clocks for timer.

Regards,

Tony

  reply	other threads:[~2013-03-15 16:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-14 12:36 [PATCH 0/2] Fix crash on OMAP with CONFIG_DEBUG_SLAB Rajendra Nayak
2013-03-14 12:36 ` Rajendra Nayak
2013-03-14 12:36 ` [PATCH 2/2] ARM: OMAP2+: clocks: Pass static parent pointers to common clock core Rajendra Nayak
2013-03-14 12:36   ` Rajendra Nayak
2013-03-14 17:06   ` Tony Lindgren
2013-03-14 17:06     ` Tony Lindgren
2013-03-15 12:27     ` Rajendra Nayak
2013-03-15 12:27       ` Rajendra Nayak
2013-03-15 16:20       ` Tony Lindgren [this message]
2013-03-15 16:20         ` Tony Lindgren
2013-03-18  8:20         ` Rajendra Nayak
2013-03-18  8:20           ` Rajendra Nayak
2013-03-18 16:37           ` Tony Lindgren
2013-03-18 16:37             ` Tony Lindgren
2013-03-19  1:23             ` Mike Turquette
2013-03-19  1:23               ` Mike Turquette
2013-03-19  5:16               ` Rajendra Nayak
2013-03-19  5:16                 ` Rajendra Nayak
2013-03-14 12:45 ` [PATCH 0/2] Fix crash on OMAP with CONFIG_DEBUG_SLAB Rajendra Nayak
2013-03-14 12:45   ` Rajendra Nayak

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=20130315162049.GB9370@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=paul@pwsan.com \
    --cc=phaber@broadcom.com \
    --cc=rnayak@ti.com \
    /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.