| To: | ralf@linux-mips.org |
|---|---|
| Subject: | [PATCH 4/7] Introduce __pa_symbol() |
| From: | Franck Bui-Huu <vagabon.xyz@gmail.com> |
| Date: | Thu, 19 Oct 2006 13:20:02 +0200 |
| Cc: | anemo@mba.ocn.ne.jp, ths@networkno.de, linux-mips@linux-mips.org, Franck Bui-Huu <fbuihuu@gmail.com> |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:to:cc:subject:date:message-id:x-mailer:in-reply-to:references:from; b=AYkah2C5lJ3GdtH1xwHYtltBBma7VfCoRTD4FG6OnuxO2CblOihsigaEwup9QfQu5TjPInsV9FNuavrrffljCOGrJPhstWt0ByIe9Fa3wpCSVzFwt3qYH7ly+BayWVlDlqITlrf+3DUOfMjOlY5hU4MQak25qZGBvNeOFoPCD5Q= |
| In-reply-to: | <11612568052624-git-send-email-fbuihuu@gmail.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <11612568052624-git-send-email-fbuihuu@gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
This patch introduces __pa_symbol() macro which should be used to calculate the physical address of kernel symbols. It also relies on RELOC_HIDE() to avoid any compiler's oddities when doing arithmetics on symbols. Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> --- include/asm-mips/page.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h index 119daee..5c4284b 100644 --- a/include/asm-mips/page.h +++ b/include/asm-mips/page.h @@ -139,6 +139,7 @@ #else #define __pa_page_offset(x) PAGE_OFFSET #endif #define __pa(x) ((unsigned long)(x) - __pa_page_offset(x)) +#define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x),0)) #define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET)) #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) -- 1.4.2.3 |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #4], Franck Bui-Huu |
|---|---|
| Next by Date: | [PATCH 3/7] setup.c: get ride of CPHYSADDR(), Franck Bui-Huu |
| Previous by Thread: | [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #4], Franck Bui-Huu |
| Next by Thread: | [PATCH 3/7] setup.c: get ride of CPHYSADDR(), Franck Bui-Huu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |