1
0
Fork 0
alistair23-linux/arch/nios2
Guenter Roeck e32ea127d8 nios2: Fix ioremap
Commit 5ace77e0b4 ("nios2: remove __ioremap") removed the following code,
with the argument that cacheflag is always 0 and the expression would
therefore always be false.

	if (IS_MAPPABLE_UNCACHEABLE(phys_addr) &&
	    IS_MAPPABLE_UNCACHEABLE(last_addr) &&
	    !(cacheflag & _PAGE_CACHED))
		return (void __iomem *)(CONFIG_NIOS2_IO_REGION_BASE + phys_addr);

This did not take the "!" in the expression into account. Result is that
nios2 images no longer boot. Restoring the removed code fixes the problem.

Fixes: 5ace77e0b4 ("nios2: remove __ioremap")
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
2019-12-12 16:34:33 +08:00
..
boot treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
configs sysctl: Remove the sysctl system call 2019-11-26 13:03:56 -06:00
include nios2: remove __iounmap 2019-11-11 21:18:19 +01:00
kernel vmlinux.lds.h: Replace RW_DATA_SECTION with RW_DATA 2019-11-04 15:57:41 +01:00
lib treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
mm nios2: Fix ioremap 2019-12-12 16:34:33 +08:00
platform treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Kconfig nios2: use the generic uncached segment support in dma-direct 2019-06-25 14:28:06 +02:00
Kconfig.debug nios2: remove pointless second entry for CONFIG_TRACE_IRQFLAGS_SUPPORT 2019-07-04 11:32:09 +08:00
Makefile kbuild: consolidate Devicetree dtb build rules 2018-10-02 09:23:21 -05:00