Hello. ddaney@xxxxxxxxxxxxxxxxxx wrote:
Before marking pmd_val as invalid_pte_table, factor in existing value for pmd_val.
I didn't get it -- this function doesn't mark anything.
Signed-off-by: Paul Gortmaker <Paul.Gortmaker@xxxxxxxxxxxxx> Signed-off-by: David Daney <ddaney@xxxxxxxxxxxxxxxxxx>
diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h index 943515f..bb93bd5 100644 --- a/arch/mips/include/asm/pgtable-64.h +++ b/arch/mips/include/asm/pgtable-64.h @@ -129,7 +129,12 @@ extern pmd_t empty_bad_pmd_table[PTRS_PER_PMD]; */ static inline int pmd_none(pmd_t pmd) { +#ifdef CONFIG_CPU_CAVIUM_OCTEON + return (pmd_val(pmd) == (unsigned long) invalid_pte_table) || + (!pmd_val(pmd));
Unneeded parens around !pmd_val(pmd) -- ! operator is higher priority than any of && and ||.
WBR, Sergei