u-boot-brain/arch/arc/include/asm
Eugeniy Paltsev 41cada4d24 ARC: ARCv2: Cache: Fixed operation without IOC
Previous SLC management implementation is broken. Seems like it was
never sufficiently tested probably because most of the time IOC was used
instead (i.e. no manual cache operations were done).

Now if we disable IOC in U-boot we'll get a lot of errors while using
DMA-enabled peripherals.

This time we fix it by substitution of broken per-line SLC operations
region operations as it is done in the Linux kernel (we took it from
v4.14 which is the latest stable as of today).

Among other things this implementation might be a bit faster because
instead of iteration over each and every cache line we're taking care
about entire region in one go.

Main changes:
 * Replaced __slc_line_op (per line operations) by __slc_rgn_op
   (region operations).

 * Reworked __slc_entire_op to get rid of __after_slc_op and
   __before_slc_op functions.
   Note flush fix (flush only instead of flush-n-inv when OP_FLUSH is
   used, see [1] for more details) is already incorporated here.

 * Added SLC invalidation to invalidate_icache_all().

 * Added (start >= end) check to invalidate_dcache_range() and
   flush_dcache_range() as some buggy drivers pass region start == end.

 * Added read-out of MMU BCR so we may know if PAE40 exists in HW and then
   act on a particular AUX regs accordingly.

[1] http://lists.infradead.org/pipermail/linux-snps-arc/2018-January/003357.html

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2018-01-19 17:59:34 +03:00
..
arcregs.h ARC: ARCv2: Cache: Fixed operation without IOC 2018-01-19 17:59:34 +03:00
bitops.h arc: Use the generic bitops headers 2015-11-05 10:52:29 -05:00
byteorder.h arc: add architecture header files 2014-02-07 08:14:32 -05:00
cache.h arc: cache - accommodate different L1 cache line lengths 2016-02-20 11:19:53 +03:00
config.h Convert CONFIG_ARCH_EARLY_INIT_R to Kconfig 2017-01-25 16:43:48 -05:00
global_data.h arc: make global_data.h usable in assembly files 2016-07-04 11:43:41 +03:00
gpio.h ARC: add asm/gpio.h to fix compilation error with CONFIG_CMD_GPIO 2017-12-10 21:13:05 +03:00
io.h arc: Use asm-generic/io.h 2017-10-02 21:52:20 -04:00
linkage.h use ASM_NL instead of '; ' for assembler new line character in the macro 2015-03-05 20:49:43 -05:00
posix_types.h arc: Fix printf size_t format related warnings (again...) 2014-08-26 17:41:58 +04:00
processor.h arc: add empty asm/processor.h to satisfy compilation of USB code 2015-11-18 00:39:22 +03:00
ptrace.h arc: add architecture header files 2014-02-07 08:14:32 -05:00
sections.h arc: No need in sections defined in sources with newer tools 2016-08-05 12:50:25 +03:00
string.h arc: add architecture header files 2014-02-07 08:14:32 -05:00
types.h arc: add architecture header files 2014-02-07 08:14:32 -05:00
u-boot-arc.h arc: clean-up init procedure 2015-04-03 09:47:49 +03:00
u-boot.h arc: Make u-boot-arc.h a private header 2017-06-05 11:02:31 -04:00
unaligned.h arc: add architecture header files 2014-02-07 08:14:32 -05:00