Message ID | 20200228054714.204424-1-arjunroy.kdev@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3,mm,1/2] mm: Define pte_index as macro for x86 | expand |
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 7e118660bbd9..d9925b10e326 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -828,7 +828,10 @@ static inline unsigned long pmd_index(unsigned long address) * * this function returns the index of the entry in the pte page which would * control the given virtual address + * + * Also define macro so we can test if pte_index is defined for arch. */ +#define pte_index pte_index static inline unsigned long pte_index(unsigned long address) { return (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);