|
|
|
|
|
|
|
|
|
|
xen-changelog
# HG changeset patch
# User smh22@xxxxxxxxxxxxxxxxxxxx
# Node ID d47c61f72572f5afda181cc74ffa6711d236fc7d
# Parent e59f045986205ca5ce4b95e47ed4440e9ab47e67
# Parent 0daaf1e5ca363f1c23fac69210dc992800b889a4
merge
diff -r e59f04598620 -r d47c61f72572
linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h Sun Aug 14
20:34:13 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h Sun Aug 14
20:34:41 2005
@@ -63,15 +63,20 @@
extern unsigned int *phys_to_machine_mapping;
#define pfn_to_mfn(_pfn) ((unsigned long)(phys_to_machine_mapping[(_pfn)]))
#define mfn_to_pfn(_mfn) ((unsigned long)(machine_to_phys_mapping[(_mfn)]))
-static inline unsigned long phys_to_machine(unsigned long phys)
-{
- unsigned long machine = pfn_to_mfn(phys >> PAGE_SHIFT);
+#ifdef CONFIG_X86_PAE
+typedef unsigned long long physaddr_t;
+#else
+typedef unsigned long physaddr_t;
+#endif
+static inline physaddr_t phys_to_machine(physaddr_t phys)
+{
+ physaddr_t machine = pfn_to_mfn(phys >> PAGE_SHIFT);
machine = (machine << PAGE_SHIFT) | (phys & ~PAGE_MASK);
return machine;
}
-static inline unsigned long machine_to_phys(unsigned long machine)
-{
- unsigned long phys = mfn_to_pfn(machine >> PAGE_SHIFT);
+static inline physaddr_t machine_to_phys(physaddr_t machine)
+{
+ physaddr_t phys = mfn_to_pfn(machine >> PAGE_SHIFT);
phys = (phys << PAGE_SHIFT) | (machine & ~PAGE_MASK);
return phys;
}
@@ -86,8 +91,9 @@
typedef struct { unsigned long long pmd; } pmd_t;
typedef struct { unsigned long long pgd; } pgd_t;
typedef struct { unsigned long long pgprot; } pgprot_t;
-#define __pte(x) ({ unsigned long long _x = (x); \
- (((_x)&1) ? ((pte_t) {phys_to_machine(_x)}) : ((pte_t) {(_x)})); })
+#define __pte(x) ({ unsigned long long _x = (x); \
+ if (_x & 1) _x = phys_to_machine(_x); \
+ ((pte_t) {(unsigned long)(_x), (unsigned long)(_x>>32)}); })
#define __pgd(x) ({ unsigned long long _x = (x); \
(((_x)&1) ? ((pgd_t) {phys_to_machine(_x)}) : ((pgd_t) {(_x)})); })
#define __pmd(x) ({ unsigned long long _x = (x); \
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-changelog] Merge, Xen patchbot -unstable
- [Xen-changelog] merge, Xen patchbot -unstable
- [Xen-changelog] merge, Xen patchbot -unstable
- [Xen-changelog] merge, Xen patchbot -unstable
- [Xen-changelog] merge, Xen patchbot -unstable
- [Xen-changelog] merge, Xen patchbot -unstable
- [Xen-changelog] merge, Xen patchbot -unstable
- [Xen-changelog] merge, Xen patchbot -unstable
- [Xen-changelog] merge, Xen patchbot -unstable
- [Xen-changelog] merge, Xen patchbot -unstable
- [Xen-changelog] merge,
Xen patchbot -unstable <=
- [Xen-changelog] merge, Xen patchbot -unstable
- [Xen-changelog] merge, Xen patchbot -unstable
- [Xen-changelog] merge, Xen patchbot -unstable
- [Xen-changelog] merge, Xen patchbot -unstable
- [Xen-changelog] merge, Xen patchbot -unstable
- [Xen-changelog] merge, Xen patchbot -unstable
- [Xen-changelog] Merge, Xen patchbot -unstable
|
|
|
|
|