sh: Try PMB mapping based on physical address, not mapping size

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>
This commit is contained in:
Matt Fleming 2009-10-06 21:22:27 +00:00 коммит произвёл Paul Mundt
Родитель fc2bdefdde
Коммит 2bea7ea7d5
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -83,7 +83,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
* *
* PMB entries are all pre-faulted. * 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); unsigned long mapped = pmb_remap(addr, phys_addr, size, flags);
if (likely(mapped)) { if (likely(mapped)) {