All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thiemo Seufer <ths@networkno.de>
To: Franck Bui-Huu <vagabon.xyz@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: [PATCH] setup.c: introduce __pa_symbol() and get ride of CPHYSADDR()
Date: Fri, 6 Oct 2006 18:21:53 +0100	[thread overview]
Message-ID: <20061006172153.GB4456@networkno.de> (raw)
In-Reply-To: <45265BF0.8080103@innova-card.com>

Franck Bui-Huu wrote:
> From: Franck Bui-Huu <fbuihuu@gmail.com>
> 
> This patch introduces __pa_symbol() macro which should be used to
> calculate the physical address of kernel symbols. We should fix any
> linker issues in this macro, if any, but more importantly
> __pa_symbol() uses __pa() to do the real conversion.
> 
> One resulting thing is that we can see that most of CPHYSADDR() uses
> weren't needed.
> 
> It also rely on RELOC_HIDE() to avoid any compiler's oddities when
> doing arithmetics on symbols.
> 
> Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
> ---
>  arch/mips/kernel/setup.c |   17 ++++++++++-------
>  include/asm-mips/page.h  |    1 +
>  2 files changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
> index fdbb508..cccccd5 100644
> --- a/arch/mips/kernel/setup.c
> +++ b/arch/mips/kernel/setup.c
> @@ -204,12 +204,12 @@ static void __init finalize_initrd(void)
>  		printk(KERN_INFO "Initrd not found or empty");
>  		goto disable;
>  	}
> -	if (CPHYSADDR(initrd_end) > PFN_PHYS(max_low_pfn)) {
> +	if (__pa(initrd_end) > PFN_PHYS(max_low_pfn)) {

ISTR this failed on O2, where kernel+initrd are loaded into KSEG0 but the
PAGE_OFFSET is for XKPHYS.


Thiemo

  reply	other threads:[~2006-10-06 17:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-06 13:36 [PATCH] setup.c: introduce __pa_symbol() and get ride of CPHYSADDR() Franck Bui-Huu
2006-10-06 17:21 ` Thiemo Seufer [this message]
2006-10-09 11:58   ` Franck Bui-Huu
2006-10-09 13:21     ` Thiemo Seufer
2006-10-09 14:25       ` Franck Bui-Huu
2006-10-09 14:58         ` Thiemo Seufer
2006-10-09 15:30           ` Franck Bui-Huu
2006-10-09 15:51           ` Atsushi Nemoto
2006-10-09 16:59             ` Thiemo Seufer
2006-10-10  8:49               ` Atsushi Nemoto
2006-10-10 13:49                 ` Franck Bui-Huu
2006-10-10 14:19                   ` Atsushi Nemoto
2006-10-10 15:01                     ` Franck Bui-Huu
2006-10-10 15:29                       ` Atsushi Nemoto
2006-10-10 16:04                         ` Franck Bui-Huu
2006-10-10 16:16                           ` Franck Bui-Huu
2006-10-10 21:51                           ` Ralf Baechle
2006-10-11  3:11                             ` Atsushi Nemoto
2006-10-11  9:37                             ` Franck Bui-Huu

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=20061006172153.GB4456@networkno.de \
    --to=ths@networkno.de \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=vagabon.xyz@gmail.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.