mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-28 16:56:26 +00:00
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>
This commit is contained in:
parent
c8ee610afe
commit
1918693ff1
@ -36,12 +36,13 @@
|
||||
#endif
|
||||
|
||||
ENTRY_CFI(memset)
|
||||
PREFETCHW_INSTR r0, 0 ; Prefetch the first write location
|
||||
mov.f 0, r2
|
||||
;;; if size is zero
|
||||
jz.d [blink]
|
||||
mov r3, r0 ; don't clobber ret val
|
||||
|
||||
PREFETCHW_INSTR r0, 0 ; Prefetch the first write location
|
||||
|
||||
;;; if length < 8
|
||||
brls.d.nt r2, 8, .Lsmallchunk
|
||||
mov.f lp_count,r2
|
||||
|
Loading…
Reference in New Issue
Block a user