[PATCH v2] sh: Take into account the base of System RAM in virt_to_phys()

Simon Horman horms at verge.net.au
Wed Oct 12 18:42:46 EDT 2011


On Wed, Oct 12, 2011 at 05:24:23PM +0900, Magnus Damm wrote:
> On Mon, Oct 3, 2011 at 10:05 AM, Simon Horman <horms at verge.net.au> wrote:
> > Previously virt_to_phys() assumed that physical memory always started
> > at address 0. This is not always the case.
> >
> > Tested on an sh7757lcr (32bit system) whose only System RAM region is
> > 40000000-4effffff and an ecovec24 (29bit system).
> >
> > Signed-off-by: Simon Horman <horms at verge.net.au>
> >
> > ---
> >  kexec/arch/sh/kexec-sh.c |   45 ++++++++++++++++++++++++++++++++++++++++++++-
> >  1 files changed, 44 insertions(+), 1 deletions(-)
> >
> > v2
> > * Only use the base of System RAM as an offset into physical memory
> >  if 32bit addressing is in use.
> 
> This version looks much better, thanks!

I thought so too. But after pushing it I realised the parsing logic in
is_32bit() is flawed. I will send an update.



More information about the kexec mailing list