u-boot-brain/arch/arm/cpu/armv8
Vignesh Raghavendra add4967124 arch: armv8: Provide a way to disable cache maintenance ops
On AM654 SoC(arm64) which is IO coherent and has L3 Cache, cache
maintenance operations being done to support non-coherent platforms
causes issues.

For example, here is how U-Boot prepares/handles a buffer to receive
data from a device (DMA Write). This may vary slightly depending on the
driver framework:

	Start DMA to write to destination buffer
	Wait for DMA to be done (dma_receive()/dma_memcpy())
	Invalidate destination buffer (invalidate_dcache_range())
	Read from destination buffer

The invalidate after the DMA is needed in order to read latest data from
memory that’s updated by DMA write. Also, in case random prefetch has
pulled in buffer data during the “wait for DMA” before the DMA has
written to it. This works well for non-coherent architectures.

In case of coherent architecture with L3 cache, DMA write would directly
update L3 cache contents (assuming cacheline is present in L3) without
updating the DDR memory. So invalidate after “wait for DMA” in above
sequence would discard latest data and read will cause stale data to be
fetched from DDR. Therefore invalidate after “wait for DMA” is not
always correct on coherent architecture.

Therefore, provide a Kconfig option to disable cache maintenance ops on
coherent architectures. This has added benefit of improving the
performance of DMA transfers as we no longer need to invalidate/flush
individual cache lines(especially for buffer thats several KBs in size).

In order to facilitate use of same Kconfig across different
architecture, I have added the symbol to top level arch/Kconfig file.
Patch currently disables cache maintenance ops for arm64 only.
flush_dcache_all() and invalidate_dcache_all() are exclusively used
during enabling/disabling dcache and hence are not disabled.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2019-05-05 08:48:50 -04:00
..
fsl-layerscape armv8: fsl-layerscape: fix SEC QI ICID setup 2019-03-03 22:01:09 +05:30
hisilicon SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
s32v234 SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
cache_v8.c arch: armv8: Provide a way to disable cache maintenance ops 2019-05-05 08:48:50 -04:00
cache.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
config.mk SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
cpu-dt.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
cpu.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
exception_level.c efi_loader: refactor switch to non-secure mode 2019-02-13 09:40:06 +01:00
exceptions.S armv8: Reduce exception handling code 2018-08-03 19:53:54 -04:00
fwcall.c arm: fix hvc call 2019-04-22 18:13:22 -04:00
generic_timer.c arm: timer: sunxi: add Allwinner timer erratum workaround 2018-07-03 22:00:00 +05:30
Kconfig armv8: Disable exception vectors in SPL by default 2019-03-22 12:15:03 -04:00
linux-kernel-image-header-vars.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
lowlevel_init.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Makefile ARMv8: Disable fwcall when PSCI is enabled 2019-04-22 18:13:21 -04:00
psci.S ARMv8: PSCI: Fix PSCI_TABLE relocation issue 2019-04-23 17:57:28 -04:00
sec_firmware_asm.S armv8: sec_firmware: change el2_to_aarch32 SMC ID 2018-12-06 14:37:19 -08:00
sec_firmware.c armv8: sec_firmware: return job ring status as true in TFABOOT 2018-12-06 14:37:19 -08:00
smccc-call.S arm: Leave smccc calls in .text when efi_loader=n 2019-02-13 09:40:06 +01:00
spin_table_v8.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spin_table.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
start.S rockchip: arm: use 'arch-rockchip' for common header 2019-05-01 00:00:05 +02:00
tlb.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
transition.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
u-boot-spl.lds linker: Modify linker scripts to be more generic 2019-01-26 22:55:53 -05:00
u-boot.lds ARMv8: Allow SiP service extensions on top of PSCI code 2019-04-22 18:13:21 -04:00