Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.davemloft.net>2005-02-11 19:14:59 -0800
committerDavid S. Miller <davem@nuts.davemloft.net>2005-02-11 19:14:59 -0800
commit4133d18b792157b5ba7a70a66ce8b715dfffac09 (patch)
tree894116630ce0eb6ab398425bf9b487e4da2e1f2c
parent2a58fce260bd9354e4a367cb96fae88a6d1aa30a (diff)
[SPARC]: Do not BUG() in srmmu_pte_pfn().
For device memory, just return a value that will never cause pte_pfn() to return true. Noticed by Tom Callaway. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc/mm/srmmu.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index 71e3f2678e73..533946c574c7 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -133,11 +133,12 @@ static struct bit_map srmmu_nocache_map;
static unsigned long srmmu_pte_pfn(pte_t pte)
{
if (srmmu_device_memory(pte_val(pte))) {
- /* XXX Anton obviously had something in mind when he did this.
- * But what?
+ /* Just return something that will cause
+ * pfn_valid() to return false. This makes
+ * copy_one_pte() to just directly copy to
+ * PTE over.
*/
- /* return (struct page *)~0; */
- BUG();
+ return ~0UL;
}
return (pte_val(pte) & SRMMU_PTE_PMASK) >> (PAGE_SHIFT-4);
}