All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave@linux.vnet.ibm.com>
To: Suzuki Poulose <suzuki@in.ibm.com>
Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>,
	linux ppc dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: Defintion of kernstart_addr
Date: Wed, 05 Oct 2011 09:51:58 -0700	[thread overview]
Message-ID: <1317833518.7842.92.camel@nimitz> (raw)
In-Reply-To: <4E8C525F.4090000@in.ibm.com>

On Wed, 2011-10-05 at 18:19 +0530, Suzuki Poulose wrote:
> #define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) -
>                                                 PHYSICAL_START + KERNELBASE)
> 
> where,
>         PHYSICAL_START is #define'd to kernstart_addr variable, updated at boot 

Where kernstart_addr is the physical address of where we loaded the
kernel.  But, this has the side-effect of also shifting the kernel's
identity mapping (the 1:1 virtual-to-physical map) up by that amount.

I'm unconvinced that this movement of the identity mapping is necessary.

Even if it is, Suzuki mentions:

> #define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) - 
>                                                 PHYSICAL_START + KERNELBASE)
> where:
>  PHYSICAL_START is kernstart_addr - a variable updated at runtime.
>  KERNELBASE     is the compile time Virtual base address of kernel.
> 
> This won't work for us, as the kernstart_addr may change at runtime, even
> though the mapping doesn't change.

That seems to tell me that PHYSICAL_START and kernstart_addr shouldn't
be the same variable.  We should break them apart so that we can move
the kernel's starting physical address without changing the virt/phys
mapping.

Which, I'm fearing, was what Suzuki's first patch did, and I failed to
grok it.

-- Dave

      reply	other threads:[~2011-10-05 16:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-05 12:49 Defintion of kernstart_addr Suzuki Poulose
2011-10-05 16:51 ` Dave Hansen [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=1317833518.7842.92.camel@nimitz \
    --to=dave@linux.vnet.ibm.com \
    --cc=jwboyer@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=suzuki@in.ibm.com \
    /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.