From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ralf Baechle <ralf@linux-mips.org>,
David Daney <ddaney@caviumnetworks.com>,
Anoop P A <anoop.pa@gmail.com>,
linux-mips@linux-mips.org, LKML <linux-kernel@vger.kernel.org>,
linux-arch@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] Introduce mips_late_time_init
Date: Thu, 09 Dec 2010 09:45:46 +1100 [thread overview]
Message-ID: <1291848346.16694.205.camel@pasglop> (raw)
In-Reply-To: <alpine.LFD.2.00.1012082217230.2653@localhost6.localdomain6>
On Wed, 2010-12-08 at 22:21 +0100, Thomas Gleixner wrote:
> On Wed, 8 Dec 2010, Ralf Baechle wrote:
> > Running everything from late_time_init() instead allows the use of kmalloc.
> > X86 has the same issue with requiring kmalloc in time_init which is why
> > they had moved everything to late_time_init.
>
> It's more ioremap, but yeah.
>
> > So the real question is, why can't we just move the call of time_init()
> > in setup_kernel() to where late_time_init() is getting called from for
> > all architectures, does anything rely on it getting called early?
>
> That's a good question and I asked it myself already. I can't see a
> real reason why something would need it early. Definitely worth to
> try.
Well, I can see some reasons at least...
On ppc at least, we calibrate the timebase/decrementer in time_init, so
things like udelay etc... are going to be unreliable until we've done
that, which could be a problem if done too late due to sensitive HW
accessors that might rely on these.
So we'd probably need to move that to a different (early) arch callback
if time_init is moved.
Also, still on server PPC, you can't really disable the decrementer
(only delay it). So if interrupts are enabled, we will eventually get
timer ones.
So we'd have to be careful about keeping some state, knowing that the
stuff isn't initialized yet and just set the decrementer to fire again
as late as possible, until it's properly configured.
Besides, we can use kmalloc that early nowadays, can't we ? That's what
the gfp_allowed_mask is all about ...
Cheers,
Ben.
next prev parent reply other threads:[~2010-12-08 22:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1291623812.31822.6.camel@paanoop1-desktop>
[not found] ` <4CFD2095.9040404@caviumnetworks.com>
2010-12-08 20:37 ` [PATCH] Introduce mips_late_time_init Ralf Baechle
2010-12-08 21:21 ` Thomas Gleixner
2010-12-08 22:45 ` Benjamin Herrenschmidt [this message]
2010-12-10 17:21 ` Paul Mundt
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=1291848346.16694.205.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=akpm@linux-foundation.org \
--cc=anoop.pa@gmail.com \
--cc=ddaney@caviumnetworks.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).