Skip to content

Commit e31736d

Browse files
committed
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
2 parents 1482e66 + e32ea12 commit e31736d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

arch/nios2/mm/ioremap.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,14 @@ void __iomem *ioremap(unsigned long phys_addr, unsigned long size)
138138
return NULL;
139139
}
140140

141+
/*
142+
* Map uncached objects in the low part of address space to
143+
* CONFIG_NIOS2_IO_REGION_BASE
144+
*/
145+
if (IS_MAPPABLE_UNCACHEABLE(phys_addr) &&
146+
IS_MAPPABLE_UNCACHEABLE(last_addr))
147+
return (void __iomem *)(CONFIG_NIOS2_IO_REGION_BASE + phys_addr);
148+
141149
/* Mappings have to be page-aligned */
142150
offset = phys_addr & ~PAGE_MASK;
143151
phys_addr &= PAGE_MASK;

0 commit comments

Comments
 (0)