Rev 251 | Rev 349 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 251 | Rev 289 | ||
---|---|---|---|
Line 36... | Line 36... | ||
36 | #endif |
36 | #endif |
37 | 37 | ||
38 | #define PAGE_SIZE FRAME_SIZE |
38 | #define PAGE_SIZE FRAME_SIZE |
39 | 39 | ||
40 | #ifndef __ASM__ |
40 | #ifndef __ASM__ |
41 | # define KA2PA(x) (((__address) (x)) + 0x80000000) |
41 | # define KA2PA(x) (((__address) (x)) - 0xffffffff80000000) |
42 | # define PA2KA(x) (((__address) (x)) - 0x80000000) |
42 | # define PA2KA(x) (((__address) (x)) + 0xffffffff80000000) |
43 | #else |
43 | #else |
44 | # define KA2PA(x) ((x) + 0x80000000) |
44 | # define KA2PA(x) ((x) - 0xffffffff80000000) |
45 | # define PA2KA(x) ((x) - 0x80000000) |
45 | # define PA2KA(x) ((x) + 0xffffffff80000000) |
46 | #endif |
46 | #endif |
47 | 47 | ||
48 | #define PTL0_INDEX_ARCH(vaddr) (((vaddr)>>39)&0x1ff) |
48 | #define PTL0_INDEX_ARCH(vaddr) (((vaddr)>>39)&0x1ff) |
49 | #define PTL1_INDEX_ARCH(vaddr) (((vaddr)>>30)&0x1ff) |
49 | #define PTL1_INDEX_ARCH(vaddr) (((vaddr)>>30)&0x1ff) |
50 | #define PTL2_INDEX_ARCH(vaddr) (((vaddr)>>21)&0x1ff) |
50 | #define PTL2_INDEX_ARCH(vaddr) (((vaddr)>>21)&0x1ff) |