From: Paul Mundt <lethal@linux-sh.org>
To: Rob Landley <rob@landley.net>
Cc: kernel list <linux-kernel@vger.kernel.org>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] 2.6.31 kernel built for sh4 doesn't boot under qemu-system-sh4.
Date: Mon, 28 Sep 2009 15:19:22 +0900 [thread overview]
Message-ID: <20090928061922.GA6668@linux-sh.org> (raw)
In-Reply-To: <200909280111.54976.rob@landley.net>
On Mon, Sep 28, 2009 at 01:11:54AM -0500, Rob Landley wrote:
> On Friday 25 September 2009 03:44:30 Paul Mundt wrote:
> > > >trapped io 0xc0000000 overrides mmio 0xb4001000
> > > >trapped io 0xc0001000 overrides mmio 0xb400080c
> >
> > Also, you do not want to be using trapped io with qemu, it is only there
> > to aid broken hardware, and degrades performance under emulation. Boot
> > with the "noiotrap" argument on the kernel command line, documented in
> > Documentation/kernel-parameters.txt.
>
> Is _that_ why it's so slow? Thanks.
>
Yes, you can see more about it here:
http://marc.info/?t=123850681600007&r=1&w=2
This isn't a problem for most platforms, but unfortunately it is for the
one that qemu has chosen to emulate. It would be nice if we had a way to
figure out if we were under emulation from the kernel side, then these
sorts of things can be tuned automatically.
> > > #
> > > # Timer and clock configuration
> > > #
> > > # CONFIG_SH_TIMER_TMU is not set
> > > CONFIG_SH_PCLK_FREQ=60000000
> > > CONFIG_SH_CLK_CPG=y
> > > CONFIG_SH_CLK_CPG_LEGACY=y
> > > # CONFIG_NO_HZ is not set
> > > # CONFIG_HIGH_RES_TIMERS is not set
> > > CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
> >
> > And here we can see that the TMU option is unset. Fix this up and
> > everything should be fine.
>
> Yup, that did it.
>
I suppose we should see about making it impossible to run in to this
situation in the future. I'll see if I can come up with something clever
in Kconfig to make sure at least one gets enabled. 'choice' semantics are
not sufficient, given that many platforms require multiple timers to be
enabled.
> > It's actually quite remarkable how far you
> > made it in the boot process without a timer interrupt.
>
> Tickless kernels, gotta love 'em. :)
>
You would have never made it past the delay loop calibration, except for
the fact that we don't use the timer for that, we calculate the value
directly from the clock framework, so there is no 'real' calibration.
prev parent reply other threads:[~2009-09-28 6:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-21 0:19 [Qemu-devel] 2.6.31 kernel built for sh4 doesn't boot under qemu-system-sh4 Rob Landley
2009-09-25 8:44 ` Paul Mundt
2009-09-28 6:11 ` Rob Landley
2009-09-28 6:19 ` Paul Mundt [this message]
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=20090928061922.GA6668@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=rob@landley.net \
/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).