Commit 4133d18b authored by David S. Miller's avatar David S. Miller

[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: default avatarDavid S. Miller <davem@davemloft.net>
parent 2a58fce2
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment