Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARCv2: memset: don't prefetch for len == 0 which happens a alot

This avoids potential "bleeding" when size == 0 as cache line would be
dirtied (and possibly fetched from other cores) and due to the same
reaons more optimal too.

Signed-off-by: Vineet Gupta <vgupta@kernel.org>

+2 -1
+2 -1
arch/arc/lib/memset-archs.S
··· 36 36 #endif 37 37 38 38 ENTRY_CFI(memset) 39 - PREFETCHW_INSTR r0, 0 ; Prefetch the first write location 40 39 mov.f 0, r2 41 40 ;;; if size is zero 42 41 jz.d [blink] 43 42 mov r3, r0 ; don't clobber ret val 43 + 44 + PREFETCHW_INSTR r0, 0 ; Prefetch the first write location 44 45 45 46 ;;; if length < 8 46 47 brls.d.nt r2, 8, .Lsmallchunk