Skip to content

Commit

Permalink
Merge tag 'nios2-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/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
  • Loading branch information
Linus Torvalds committed Dec 13, 2019
2 parents 1482e66 + e32ea12 commit e31736d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/nios2/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e31736d

Please sign in to comment.