[Top] [All Lists]

Re: [PATCH 36/37] Cavium OCTEON: pmd_none - use pmd_val() in pmd_val().

To: Paul Gortmaker <>
Subject: Re: [PATCH 36/37] Cavium OCTEON: pmd_none - use pmd_val() in pmd_val().
From: David Daney <>
Date: Fri, 24 Oct 2008 08:55:47 -0700
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <>
User-agent: Thunderbird (X11/20080723)
Paul Gortmaker wrote: wrote:
From: David Daney <>

Before marking pmd_val as invalid_pte_table, factor in existing value
for pmd_val.

Signed-off-by: Paul Gortmaker <>
Signed-off-by: David Daney <>
 arch/mips/include/asm/pgtable-64.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Hi David,

I think you missed my feedback on this patch -- you should be the primary
S.O.B. on this, and at a minimum, it needs a better description of just why this is required (if it actually is) on Cavium CPUs, but not on other boards.

Indeed, it was a screw-up on my part. I hope to be able to remove this entire patch in the near future.

David Daney


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)
+    return (pmd_val(pmd) == (unsigned long) invalid_pte_table) ||
+                (!pmd_val(pmd));
     return pmd_val(pmd) == (unsigned long) invalid_pte_table;
#define pmd_bad(pmd) (pmd_val(pmd) & ~PAGE_MASK)

<Prev in Thread] Current Thread [Next in Thread>