linux_dsm_epyc7002/arch/arc/lib
Eugeniy Paltsev f8a15f9766 ARCv2: lib: memcpy: fix doing prefetchw outside of buffer
ARCv2 optimized memcpy uses PREFETCHW instruction for prefetching the
next cache line but doesn't ensure that the line is not past the end of
the buffer. PRETECHW changes the line ownership and marks it dirty,
which can cause data corruption if this area is used for DMA IO.

Fix the issue by avoiding the PREFETCHW. This leads to performance
degradation but it is OK as we'll introduce new memcpy implementation
optimized for unaligned memory access using.

We also cut off all PREFETCH instructions at they are quite useless
here:
 * we call PREFETCH right before LOAD instruction call.
 * we copy 16 or 32 bytes of data (depending on CONFIG_ARC_HAS_LL64)
   in a main logical loop. so we call PREFETCH 4 times (or 2 times)
   for each L1 cache line (in case of 64B L1 cache Line which is
   default case). Obviously this is not optimal.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2019-02-21 11:03:16 -08:00
..
Makefile ARCv2: optimised string/mem lib routines 2015-06-22 14:06:56 +05:30
memcmp.S ARC: dw2 unwind: enable cfi pseudo ops in string lib 2016-09-30 14:48:22 -07:00
memcpy-700.S ARC: dw2 unwind: enable cfi pseudo ops in string lib 2016-09-30 14:48:22 -07:00
memcpy-archs.S ARCv2: lib: memcpy: fix doing prefetchw outside of buffer 2019-02-21 11:03:16 -08:00
memset-archs.S ARCv2: lib: memeset: fix doing prefetchw outside of buffer 2019-01-17 16:24:39 -08:00
memset.S ARC: dw2 unwind: enable cfi pseudo ops in string lib 2016-09-30 14:48:22 -07:00
strchr-700.S ARC: dw2 unwind: enable cfi pseudo ops in string lib 2016-09-30 14:48:22 -07:00
strcmp-archs.S ARC: dw2 unwind: enable cfi pseudo ops in string lib 2016-09-30 14:48:22 -07:00
strcmp.S ARC: dw2 unwind: enable cfi pseudo ops in string lib 2016-09-30 14:48:22 -07:00
strcpy-700.S ARC: dw2 unwind: enable cfi pseudo ops in string lib 2016-09-30 14:48:22 -07:00
strlen.S ARC: dw2 unwind: enable cfi pseudo ops in string lib 2016-09-30 14:48:22 -07:00