summaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/kmemcheck/pte.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-08-23 11:18:47 +0200
committerIngo Molnar <mingo@elte.hu>2009-08-23 11:18:47 +0200
commit8a517c514d5893602cf85c1b4c47afbbc04d2198 (patch)
treee7c40f68ef97bb2bdb4c366c0b45437bc049feb1 /arch/x86/mm/kmemcheck/pte.c
parentx86, cpu: cpu/proc.c display cache alignment and address sizes for 32 bit (diff)
parentLinux 2.6.31-rc7 (diff)
downloadlinux-8a517c514d5893602cf85c1b4c47afbbc04d2198.tar.xz
linux-8a517c514d5893602cf85c1b4c47afbbc04d2198.zip
Merge commit 'v2.6.31-rc7' into x86/cpu
Diffstat (limited to 'arch/x86/mm/kmemcheck/pte.c')
-rw-r--r--arch/x86/mm/kmemcheck/pte.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/x86/mm/kmemcheck/pte.c b/arch/x86/mm/kmemcheck/pte.c
new file mode 100644
index 000000000000..4ead26eeaf96
--- /dev/null
+++ b/arch/x86/mm/kmemcheck/pte.c
@@ -0,0 +1,22 @@
+#include <linux/mm.h>
+
+#include <asm/pgtable.h>
+
+#include "pte.h"
+
+pte_t *kmemcheck_pte_lookup(unsigned long address)
+{
+ pte_t *pte;
+ unsigned int level;
+
+ pte = lookup_address(address, &level);
+ if (!pte)
+ return NULL;
+ if (level != PG_LEVEL_4K)
+ return NULL;
+ if (!pte_hidden(*pte))
+ return NULL;
+
+ return pte;
+}
+