x86: clean up pte_exec
- Rename it to pte_exec() from pte_exec_kernel(). There is nothing kernel specific in there. - Move it into the common file because _PAGE_NX is 0 on !PAE and then pte_exec() will be always evaluate to true. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
@@ -19,14 +19,6 @@
|
||||
#define pud_bad(pud) 0
|
||||
#define pud_present(pud) 1
|
||||
|
||||
/*
|
||||
* All present pages with !NX bit are kernel-executable:
|
||||
*/
|
||||
static inline int pte_exec_kernel(pte_t pte)
|
||||
{
|
||||
return !(pte_val(pte) & _PAGE_NX);
|
||||
}
|
||||
|
||||
/* Rules for using set_pte: the pte being assigned *must* be
|
||||
* either not present or in a state where the hardware will
|
||||
* not attempt to update the pte. In places where this is
|
||||
|
Reference in New Issue
Block a user