ia64/xen-unstable

view xen/include/asm-ia64/xenpage.h @ 6457:d34925e4144b

Stil more cleanup and moving to 2.6.13 base
author djm@kirby.fc.hp.com
date Thu Sep 01 11:09:27 2005 -0600 (2005-09-01)
parents
children d4d880fcef28
line source
1 #ifndef _ASM_IA64_XENPAGE_H
2 #define _ASM_IA64_XENPAGE_H
4 #ifdef CONFIG_DISCONTIGMEM
5 #error "xenpage.h: page macros need to be defined for CONFIG_DISCONTIGMEM"
6 #endif
8 #undef pfn_valid
9 #undef page_to_pfn
10 #undef pfn_to_page
11 # define pfn_valid(pfn) (0)
12 # define page_to_pfn(_page) ((unsigned long) ((_page) - frame_table))
13 # define pfn_to_page(_pfn) (frame_table + (_pfn))
15 #undef page_to_phys
16 #undef virt_to_page
17 #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
18 #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
20 #define page_to_virt(_page) phys_to_virt(page_to_phys(_page))
21 #define phys_to_page(kaddr) pfn_to_page(((kaddr) >> PAGE_SHIFT))
23 #ifndef __ASSEMBLY__
24 typedef union xen_va {
25 struct {
26 unsigned long off : 60;
27 unsigned long reg : 4;
28 } f;
29 unsigned long l;
30 void *p;
31 } xen_va;
32 #endif
34 #undef __pa
35 #undef __va
36 #define __pa(x) ({xen_va _v; _v.l = (long) (x); _v.f.reg = 0; _v.l;})
37 #define __va(x) ({xen_va _v; _v.l = (long) (x); _v.f.reg = -1; _v.p;})
39 #undef PAGE_OFFSET
40 #define PAGE_OFFSET __IA64_UL_CONST(0xf000000000000000)
42 #endif /* _ASM_IA64_XENPAGE_H */