Update to 3.4-final.
[linux-flexiantxendom0-3.2.10.git] / arch / x86 / include / mach-xen / asm / maddr_64.h
1 #ifndef _X86_64_MADDR_H
2 #define _X86_64_MADDR_H
3
4 static inline paddr_t pte_phys_to_machine(paddr_t phys)
5 {
6         maddr_t machine;
7         machine = pfn_to_mfn((phys & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT);
8         machine = (machine << PAGE_SHIFT) | (phys & ~PHYSICAL_PAGE_MASK);
9         return machine;
10 }
11
12 static inline paddr_t pte_machine_to_phys(maddr_t machine)
13 {
14         paddr_t phys;
15         phys = mfn_to_pfn((machine & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT);
16         phys = (phys << PAGE_SHIFT) | (machine & ~PHYSICAL_PAGE_MASK);
17         return phys;
18 }
19
20 #endif /* _X86_64_MADDR_H */
21