From: Matt Fleming <matt@console-pimps.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 04/14] sh: Obliterate the P1 area macros
Date: Sun, 18 Oct 2009 15:31:04 +0000 [thread overview]
Message-ID: <20091018153104.GA6504@console-pimps.org> (raw)
In-Reply-To: <22db0c702ba4b19699c05c38c26a6061bd0bbf40.1254861984.git.matt@console-pimps.org>
On Thu, Oct 15, 2009 at 03:05:32PM +0900, Magnus Damm wrote:
> Hey Matt,
>
> [CC Morimoto-san]
>
> Thanks for your work on this!
>
Hi Magnus, no problem. Sorry I haven't replied more quickly, I've been
at ELC Europe this week.
> On Wed, Oct 7, 2009 at 6:22 AM, Matt Fleming <matt@console-pimps.org> wrote:
> > * Map an address to a certain privileged segment
> > diff --git a/arch/sh/kernel/machine_kexec.c b/arch/sh/kernel/machine_kexec.c
> > index 7ea2704..de7cf54 100644
> > --- a/arch/sh/kernel/machine_kexec.c
> > +++ b/arch/sh/kernel/machine_kexec.c
> > @@ -49,7 +49,7 @@ int machine_kexec_prepare(struct kimage *image)
> > /* older versions of kexec-tools are passing
> > * the zImage entry point as a virtual address.
> > */
> > - if (image->start != PHYSADDR(image->start))
> > + if (image->start != __pa(image->start))
> > return -EINVAL; /* upgrade your kexec-tools */
> >
> > return 0;
>
> This change unfortunately breaks kexec. The PHYSADDR() macro masks but
> __pa() subtracts so this breaks the physical address case.
>
> Do you have any idea how to keep the previous behaviour? Worst case we
> can just remove this check - it's been a while since I updated
> kexec-tools now.
>
Damn, sorry I missed this. Is image->start a virtual address? If so,
this check doesn't make sense when CONFIG_PMB is enabled because virtual
addresses do not have to be mapped to physical addresses 1:1.
If image->start is a physical address, I don't think it's ever true that
image->start = __pa(image->start) beacuse you can't apply __pa() to a
physical address and get the same address, e.g.
__pa(addr) != __pa(__pa(addr))
So, unless I'm mistaken this test can just be removed.
next prev parent reply other threads:[~2009-10-18 15:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-06 21:22 [PATCH 04/14] sh: Obliterate the P1 area macros Matt Fleming
2009-10-15 6:05 ` Magnus Damm
2009-10-18 15:31 ` Matt Fleming [this message]
2009-10-20 13:06 ` Magnus Damm
2009-10-20 13:15 ` Matt Fleming
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=20091018153104.GA6504@console-pimps.org \
--to=matt@console-pimps.org \
--cc=linux-sh@vger.kernel.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.