| To: | linux-mips@linux-mips.org |
|---|---|
| Subject: | [PATCH 36/37] Cavium OCTEON: pmd_none - use pmd_val() in pmd_val(). |
| From: | ddaney@caviumnetworks.com |
| Date: | Thu, 23 Oct 2008 17:57:00 -0700 |
| Cc: | David Daney <ddaney@caviumnetworks.com>, Paul Gortmaker <Paul.Gortmaker@windriver.com> |
| In-reply-to: | <1224809821-5532-1-git-send-email-ddaney@caviumnetworks.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <1224809821-5532-1-git-send-email-ddaney@caviumnetworks.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
From: David Daney <ddaney@caviumnetworks.com>
Before marking pmd_val as invalid_pte_table, factor in existing value
for pmd_val.
Signed-off-by: Paul Gortmaker <Paul.Gortmaker@windriver.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
arch/mips/include/asm/pgtable-64.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
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));
+#else
return pmd_val(pmd) == (unsigned long) invalid_pte_table;
+#endif
}
#define pmd_bad(pmd) (pmd_val(pmd) & ~PAGE_MASK)
--
1.5.5.1
|
| Previous by Date: | [PATCH 32/37] Allow port type to specify bugs that are not probed for., ddaney |
|---|---|
| Next by Date: | [PATCH 31/37] Allow port type to be specified when calling serial8250_register_port., ddaney |
| Previous by Thread: | [PATCH 32/37] Allow port type to specify bugs that are not probed for., ddaney |
| Next by Thread: | Re: [PATCH 36/37] Cavium OCTEON: pmd_none - use pmd_val() in pmd_val()., Paul Gortmaker |
| Indexes: | [Date] [Thread] [Top] [All Lists] |