diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-08-23 11:18:47 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-23 11:18:47 +0200 |
commit | 8a517c514d5893602cf85c1b4c47afbbc04d2198 (patch) | |
tree | e7c40f68ef97bb2bdb4c366c0b45437bc049feb1 /arch/x86/mm/kmemcheck/pte.c | |
parent | c64b04fe6e0cb7c78e01751a44ef56cf20344e87 (diff) | |
parent | 422bef879e84104fee6dc68ded0e371dbeb5f88e (diff) |
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.c | 22 |
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 00000000000..4ead26eeaf9 --- /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; +} + |