Skip to contentSkip to conversation

linux: Fix backward compatibility in page table handling

PATCH New Jan Beulich 1 participant 1 message Feb 26, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux: Fix backward compatibility in page table handling

A 3.0.2 compatibility requirement slipped my attention before submitting the original page table handling changes.

include/asm-i386/mach-xen/asm/page.h +4 -0
Index: sle10sp1-2007-02-20/include/asm-i386/mach-xen/asm/page.h
===================================================================
@@ -139,7 +139,11 @@
 static inline unsigned long pgd_val(pgd_t x)
 {
 	unsigned long ret = x.pgd;
+#ifdef CONFIG_XEN_COMPAT_030002
+	if (ret) ret = machine_to_phys(ret) | _PAGE_PRESENT;
+#else
 	if (ret & _PAGE_PRESENT) ret = machine_to_phys(ret);
+#endif
 	return ret;
 }
 #define HPAGE_SHIFT	22