From: Milton Miller <miltonm@bga.com>
To: Olof Johansson <olof@lixom.net>,
Luke Browning <lukebr@linux.vnet.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: ppcdev <linuxppc-dev@ozlabs.org>, cbe-oss-dev@ozlabs.org
Subject: Re: [PATCH] 64K page support for kexec
Date: Wed, 25 Apr 2007 00:48:56 -0500 [thread overview]
Message-ID: <aa977cbe20f2d5698c5846df7de21eda@bga.com> (raw)
In-Reply-To: <20070424230708.GA10401@lixom.net>
>
>
> > > > + /*
> > > > + * FIXME, this could be made more efficient by storing the type
> > > > + * of hash algorithm in mmu_psize_defs[]. The code below
> assumes
> > > > + * the number of bits in the va representing the offset in the
> > > > + * page is less than 23. This affects the hash algorithm that
> is
> > > > + * used. When 16G pages are supported, a new hash algorithm
> > > > + * needs to be provided. See POWER ISA Book III.
> > > > + *
> > > > + * The code below works for 16M, 64K, and 4K pages.
> > > > + */
> > >
> > > A BUG_ON() when other sizes are hit could be a good idea?
> >
> > a BUG_ON if the B bit is set would be useful too. (that is 1T segment
> > HPTE).
>
> Yep.
NNNNOOOOO!!!!
Do NOT add any BUG() is this code!
Look at the context:
(1) We are tearing down *ALL* mappings. That includes the
kernel linear mapping and the mapping of the kernel text.
(2) We are in real mode. There is no way back to virtural
mode. See (1).
(3) We hove put the new kernel in memory. There is no data
that was not a part of the static data or bss sections. There
are no per-cpu variables. Nothing with vmalloc. Nothing with
kmalloc. Nothing with alloc_pages.
(4) If this is the panic kernel case, we are allready crashed
and trying to get into a new envrionment to dump memory.
Intentionally failing that is the last thing you want to do.
(5) This hook is only used by kexec_sequence, called by
machine_kexec. At the beginning of that function there
is the comment "its too late to fail here."
Bottom line: Don't even think of causing any trap here, just
execute as best as you know how. You dohn't have any way to
tell the user you failed anyways.
milton
next prev parent reply other threads:[~2007-04-25 5:48 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-24 18:31 [PATCH] 64K page support for kexec Luke Browning
2007-04-24 19:43 ` Olof Johansson
2007-04-24 22:50 ` Benjamin Herrenschmidt
2007-04-24 23:07 ` Olof Johansson
2007-04-25 5:48 ` Milton Miller [this message]
2007-04-25 19:35 ` [PATCH v2] powerpc: " Luke Browning
2007-04-25 22:19 ` Benjamin Herrenschmidt
2007-04-26 15:28 ` Luke Browning
2007-04-27 4:36 ` [PATCH v3] " Milton Miller
2007-04-27 14:42 ` Luke Browning
2007-04-27 16:51 ` Milton Miller
2007-04-27 16:22 ` [PATCH v4] " Luke Browning
2007-04-27 16:59 ` Milton Miller
2007-04-27 17:30 ` Luke Browning
2007-04-27 18:23 ` Haren Myneni
2007-04-29 5:35 ` Milton Miller
2007-04-29 8:30 ` Paul Mackerras
2007-04-29 9:31 ` Benjamin Herrenschmidt
2007-04-29 13:27 ` Segher Boessenkool
2007-04-29 22:49 ` Benjamin Herrenschmidt
2007-04-26 7:15 ` [PATCH v2] " Olof Johansson
2007-04-24 22:48 ` [PATCH] " Benjamin Herrenschmidt
2007-04-25 13:06 ` Luke Browning
2007-04-25 22:11 ` Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2007-04-26 22:23 [PATCH v3] powerpc: " Luke Browning
2007-04-26 22:32 ` Olof Johansson
2007-05-02 14:19 ` [PATCH v4] " Luke Browning
2007-05-03 13:45 ` Arnd Bergmann
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=aa977cbe20f2d5698c5846df7de21eda@bga.com \
--to=miltonm@bga.com \
--cc=benh@kernel.crashing.org \
--cc=cbe-oss-dev@ozlabs.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=lukebr@linux.vnet.ibm.com \
--cc=olof@lixom.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).