Skip to content
Snippets Groups Projects
Commit 6fd596a1 authored by Paul Burton's avatar Paul Burton Committed by Daniel Schwierzeck
Browse files

MIPS: Fix map_physmem for cached mappings


map_physmem should return a pointer that can be used by the CPU to
access the given memory - on MIPS simply returning the physical address
as it does prior to this patch doesn't achieve that. Instead return a
pointer to the memory within (c)kseg0, which matches up consistently
with the (c)kseg1 pointer that uncached mappings return via ioremap.

Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
parent 7a3e0f74
No related branches found
No related tags found
No related merge requests found
......@@ -501,7 +501,7 @@ map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
if (flags == MAP_NOCACHE)
return ioremap(paddr, len);
return (void *)paddr;
return (void *)CKSEG0ADDR(paddr);
}
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment