Skip to content

Commit

Permalink
sh: Try PMB mapping based on physical address, not mapping size
Browse files Browse the repository at this point in the history
We should favour PMB mappings when the physical address cannot be
reached with 29-bits.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Matt Fleming authored and Paul Mundt committed Oct 9, 2009
1 parent fc2bdef commit 2bea7ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/mm/ioremap_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
*
* PMB entries are all pre-faulted.
*/
if (unlikely(size >= 0x1000000)) {
if (unlikely(phys_addr >= P1SEG)) {
unsigned long mapped = pmb_remap(addr, phys_addr, size, flags);

if (likely(mapped)) {
Expand Down

0 comments on commit 2bea7ea

Please sign in to comment.