unsigned long ret = 0UL;
pmd_t *pmd;
pte_t *ptep, pte;
-
+ pud_t *pud;
+
if(!pgd_none(*pgd)){
- pmd = pmd_offset(pgd, adr);
+ pud = pud_offset(pgd, adr);
+ pmd = pmd_offset(pud, adr);
if(!pmd_none(*pmd)){
ptep = pte_offset_kernel(pmd, adr);
pte = *ptep;
#ifndef __COMPAT_ASM_PGTABLE_H_
#define __COMPAT_ASM_PGTABLE_H_
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
+#define pud_t pgd_t
+#define pud_offset(pgd, start) (pgd)
+#endif
+
#include_next <asm/pgtable.h>
#ifndef pte_offset_kernel