android_kernel_samsung_msm8976/arch/arm/mm
Thomas Petazzoni 273bed2e5d ARM: 8799/1: mm: fix pci_ioremap_io() offset check
[ Upstream commit 3a58ac65e2d7969bcdf1b6acb70fa4d12a88e53e ]

IO_SPACE_LIMIT is the ending address of the PCI IO space, i.e
something like 0xfffff (and not 0x100000).

Therefore, when offset = 0xf0000 is passed as argument, this function
fails even though the offset + SZ_64K fits below the
IO_SPACE_LIMIT. This makes the last chunk of 64 KB of the I/O space
not usable as it cannot be mapped.

This patch fixes that by substracing 1 to offset + SZ_64K, so that we
compare the addrss of the last byte of the I/O space against
IO_SPACE_LIMIT instead of the address of the first byte of what is
after the I/O space.

Fixes: c279443709 ("ARM: Add fixed PCI i/o mapping")
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-07-27 21:52:37 +02:00
..
abort-ev4.S
abort-ev4t.S
abort-ev5t.S
abort-ev5tj.S
abort-ev6.S
abort-ev7.S
abort-lv4t.S
abort-macro.S
abort-nommu.S
alignment.c
cache-aurora-l2.h
cache-fa.S
cache-feroceon-l2.c
cache-l2x0.c
cache-tauros2.c
cache-v4.S
cache-v4wb.S
cache-v4wt.S
cache-v6.S
cache-v7.S
cache-xsc3l2.c
context.c arm: SMC call to flush branch predictor. 2019-07-27 21:50:37 +02:00
copypage-fa.c
copypage-feroceon.c
copypage-v4mc.c
copypage-v4wb.c
copypage-v4wt.c
copypage-v6.c
copypage-xsc3.c
copypage-xscale.c
dma-mapping.c This is the 3.10.94 stable release 2017-04-18 17:12:56 +02:00
dump.c
extable.c
fault-armv.c
fault.c arm: Invalidate icache on prefetch abort outside of user mapping on Cortex-A57/72. 2019-07-27 21:50:38 +02:00
fault.h
flush.c
fsr-2level.c arm: Invalidate BTB on prefetch abort outside of user mapping on Cortex A8, A9, A12 and A17. 2019-07-27 21:50:37 +02:00
fsr-3level.c arm: Invalidate BTB on prefetch abort outside of user mapping on Cortex A8, A9, A12 and A17. 2019-07-27 21:50:37 +02:00
highmem.c
hugetlbpage.c
idmap.c
init.c
iomap.c
ioremap.c ARM: 8799/1: mm: fix pci_ioremap_io() offset check 2019-07-27 21:52:37 +02:00
Kconfig
Makefile
mm.h
mmap.c mm: larger stack guard gap, between vmas 2017-07-11 00:00:39 +00:00
mmu.c
nommu.c
pabort-legacy.S
pabort-v6.S
pabort-v7.S
pgd.c
proc-arm7tdmi.S
proc-arm9tdmi.S
proc-arm720.S
proc-arm740.S
proc-arm920.S
proc-arm922.S
proc-arm925.S
proc-arm926.S
proc-arm940.S
proc-arm946.S
proc-arm1020.S
proc-arm1020e.S
proc-arm1022.S
proc-arm1026.S
proc-fa526.S
proc-feroceon.S
proc-macros.S
proc-mohawk.S
proc-sa110.S
proc-sa1100.S
proc-syms.c
proc-v6.S
proc-v7-2level.S arm: SMC call to flush branch predictor. 2019-07-27 21:50:37 +02:00
proc-v7-3level.S arm: SMC call to flush branch predictor. 2019-07-27 21:50:37 +02:00
proc-v7.S arm: SMC call to flush branch predictor. 2019-07-27 21:50:37 +02:00
proc-xsc3.S
proc-xscale.S
tcm.h
tlb-fa.S
tlb-v4.S
tlb-v4wb.S
tlb-v4wbi.S
tlb-v6.S
tlb-v7.S