diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-12-13 15:05:00 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-12-13 15:05:00 -0800 |
commit | e31736d9fae841e8a1612f263136454af10f476a (patch) | |
tree | 004450d33e01f2f477f70a03247729a42a8fad86 | |
parent | 1482e664fe353775c48d3f9d3e5059b9853d4d99 (diff) | |
parent | e32ea127d81c12882f39c2783d78634597ff21a2 (diff) | |
download | linux-rpi-e31736d9fae841e8a1612f263136454af10f476a.tar.gz linux-rpi-e31736d9fae841e8a1612f263136454af10f476a.tar.bz2 linux-rpi-e31736d9fae841e8a1612f263136454af10f476a.zip |
Merge tag 'nios2-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2
Pull nios2 fix from Ley Foon Tan:
"Fix nios2 ioremap regression"
* tag 'nios2-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
nios2: Fix ioremap
-rw-r--r-- | arch/nios2/mm/ioremap.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/nios2/mm/ioremap.c b/arch/nios2/mm/ioremap.c index b56af759dcdf..819bdfcc2e71 100644 --- a/arch/nios2/mm/ioremap.c +++ b/arch/nios2/mm/ioremap.c @@ -138,6 +138,14 @@ void __iomem *ioremap(unsigned long phys_addr, unsigned long size) return NULL; } + /* + * Map uncached objects in the low part of address space to + * CONFIG_NIOS2_IO_REGION_BASE + */ + if (IS_MAPPABLE_UNCACHEABLE(phys_addr) && + IS_MAPPABLE_UNCACHEABLE(last_addr)) + return (void __iomem *)(CONFIG_NIOS2_IO_REGION_BASE + phys_addr); + /* Mappings have to be page-aligned */ offset = phys_addr & ~PAGE_MASK; phys_addr &= PAGE_MASK; |