diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-04-26 15:54:48 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-04-26 15:54:48 +0900 |
commit | 35f6cd4a06432034665a1499ca4b022437423aac (patch) | |
tree | ea565196d6db2ed80780639701fc0b74748bf90c /arch/sh/include/asm/page.h | |
parent | 5bac942db3d2c4738df04104240d65a5d1eaec6a (diff) | |
parent | 035ca59fe8399a67b56511bd5b28130f0c4874a0 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/mfleming/sh-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/mfleming/sh-2.6:
sh: Use correct mask when comparing PMB DATA array values
sh: Do not try merging two 128MB PMB mappings
sh: Fix zImage load address when CONFIG_32BIT=y
sh: Fix address to decompress at when CONFIG_32BIT=y
sh: Assembly friendly __pa and __va definitions
Diffstat (limited to 'arch/sh/include/asm/page.h')
-rw-r--r-- | arch/sh/include/asm/page.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/sh/include/asm/page.h b/arch/sh/include/asm/page.h index d71feb35930..0152c040f6c 100644 --- a/arch/sh/include/asm/page.h +++ b/arch/sh/include/asm/page.h @@ -128,13 +128,18 @@ typedef struct page *pgtable_t; * added or subtracted as required. */ #ifdef CONFIG_PMB -#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET+__MEMORY_START) -#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET-__MEMORY_START)) +#define ___pa(x) ((x)-PAGE_OFFSET+__MEMORY_START) +#define ___va(x) ((x)+PAGE_OFFSET-__MEMORY_START) #else -#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) -#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) +#define ___pa(x) ((x)-PAGE_OFFSET) +#define ___va(x) ((x)+PAGE_OFFSET) #endif +#ifndef __ASSEMBLY__ +#define __pa(x) ___pa((unsigned long)x) +#define __va(x) (void *)___va((unsigned long)x) +#endif /* !__ASSEMBLY__ */ + #ifdef CONFIG_UNCACHED_MAPPING #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + uncached_start) #define CAC_ADDR(addr) ((addr) - uncached_start + PAGE_OFFSET) |