diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-cris/arch-v10/page.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/asm-cris/arch-v10/page.h')
-rw-r--r-- | include/asm-cris/arch-v10/page.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/asm-cris/arch-v10/page.h b/include/asm-cris/arch-v10/page.h new file mode 100644 index 000000000000..407e6e68f49e --- /dev/null +++ b/include/asm-cris/arch-v10/page.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #ifndef _CRIS_ARCH_PAGE_H | ||
2 | #define _CRIS_ARCH_PAGE_H | ||
3 | |||
4 | #include <linux/config.h> | ||
5 | |||
6 | #ifdef __KERNEL__ | ||
7 | |||
8 | /* This handles the memory map.. */ | ||
9 | #ifdef CONFIG_CRIS_LOW_MAP | ||
10 | #define PAGE_OFFSET KSEG_6 /* kseg_6 is mapped to physical ram */ | ||
11 | #else | ||
12 | #define PAGE_OFFSET KSEG_C /* kseg_c is mapped to physical ram */ | ||
13 | #endif | ||
14 | |||
15 | /* macros to convert between really physical and virtual addresses | ||
16 | * by stripping a selected bit, we can convert between KSEG_x and 0x40000000 where | ||
17 | * the DRAM really resides | ||
18 | */ | ||
19 | |||
20 | #ifdef CONFIG_CRIS_LOW_MAP | ||
21 | /* we have DRAM virtually at 0x6 */ | ||
22 | #define __pa(x) ((unsigned long)(x) & 0xdfffffff) | ||
23 | #define __va(x) ((void *)((unsigned long)(x) | 0x20000000)) | ||
24 | #else | ||
25 | /* we have DRAM virtually at 0xc */ | ||
26 | #define __pa(x) ((unsigned long)(x) & 0x7fffffff) | ||
27 | #define __va(x) ((void *)((unsigned long)(x) | 0x80000000)) | ||
28 | #endif | ||
29 | |||
30 | #endif | ||
31 | #endif | ||