x86: return the page table level in lookup_address()

based on this patch from Andi Kleen:

|  Subject: CPA: Return the page table level in lookup_address()
|  From: Andi Kleen <ak@suse.de>
|
|  Needed for the next change.
|
|  And change all the callers.

and ported it to x86.git.

Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Ingo Molnar
2008-01-30 13:33:43 +01:00
parent a5a5dc3179
commit f0646e43ac
7 changed files with 22 additions and 11 deletions

View File

@ -535,11 +535,12 @@ int __init set_kernel_exec(unsigned long vaddr, int enable)
{
pte_t *pte;
int ret = 1;
int level;
if (!nx_enabled)
goto out;
pte = lookup_address(vaddr);
pte = lookup_address(vaddr, &level);
BUG_ON(!pte);
if (!pte_exec(*pte))