android_kernel_xiaomi_sm7250/include/asm-cris/arch-v10/page.h
Linus Torvalds 1da177e4c3 Linux-2.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!
2005-04-16 15:20:36 -07:00

32 lines
907 B
C

#ifndef _CRIS_ARCH_PAGE_H
#define _CRIS_ARCH_PAGE_H
#include <linux/config.h>
#ifdef __KERNEL__
/* This handles the memory map.. */
#ifdef CONFIG_CRIS_LOW_MAP
#define PAGE_OFFSET KSEG_6 /* kseg_6 is mapped to physical ram */
#else
#define PAGE_OFFSET KSEG_C /* kseg_c is mapped to physical ram */
#endif
/* macros to convert between really physical and virtual addresses
* by stripping a selected bit, we can convert between KSEG_x and 0x40000000 where
* the DRAM really resides
*/
#ifdef CONFIG_CRIS_LOW_MAP
/* we have DRAM virtually at 0x6 */
#define __pa(x) ((unsigned long)(x) & 0xdfffffff)
#define __va(x) ((void *)((unsigned long)(x) | 0x20000000))
#else
/* we have DRAM virtually at 0xc */
#define __pa(x) ((unsigned long)(x) & 0x7fffffff)
#define __va(x) ((void *)((unsigned long)(x) | 0x80000000))
#endif
#endif
#endif