diff options
Diffstat (limited to 'arch/sh/include/asm/io.h')
-rw-r--r-- | arch/sh/include/asm/io.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index b237d525d592..34ba197880dd 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h | |||
@@ -322,7 +322,15 @@ __ioremap_29bit(phys_addr_t offset, unsigned long size, pgprot_t prot) | |||
322 | * mapping must be done by the PMB or by using page tables. | 322 | * mapping must be done by the PMB or by using page tables. |
323 | */ | 323 | */ |
324 | if (likely(PXSEG(offset) < P3SEG && PXSEG(last_addr) < P3SEG)) { | 324 | if (likely(PXSEG(offset) < P3SEG && PXSEG(last_addr) < P3SEG)) { |
325 | if (unlikely(pgprot_val(prot) & _PAGE_CACHABLE)) | 325 | u64 flags = pgprot_val(prot); |
326 | |||
327 | /* | ||
328 | * Anything using the legacy PTEA space attributes needs | ||
329 | * to be kicked down to page table mappings. | ||
330 | */ | ||
331 | if (unlikely(flags & _PAGE_PCC_MASK)) | ||
332 | return NULL; | ||
333 | if (unlikely(flags & _PAGE_CACHABLE)) | ||
326 | return (void __iomem *)P1SEGADDR(offset); | 334 | return (void __iomem *)P1SEGADDR(offset); |
327 | 335 | ||
328 | return (void __iomem *)P2SEGADDR(offset); | 336 | return (void __iomem *)P2SEGADDR(offset); |