android_kernel_samsung_a7y1.../lib
Matthew Wilcox 06d2173e3d lib/string.c: add multibyte memset functions
Patch series "Multibyte memset variations", v4.

A relatively common idiom we're missing is a function to fill an area of
memory with a pattern which is larger than a single byte.  I first
noticed this with a zram patch which wanted to fill a page with an
'unsigned long' value.  There turn out to be quite a few places in the
kernel which can benefit from using an optimised function rather than a
loop; sometimes text size, sometimes speed, and sometimes both.  The
optimised PowerPC version (not included here) improves performance by
about 30% on POWER8 on just the raw memset_l().

Most of the extra lines of code come from the three testcases I added.

This patch (of 8):

memset16(), memset32() and memset64() are like memset(), but allow the
caller to fill the destination with a value larger than a single byte.
memset_l() and memset_p() allow the caller to use unsigned long and
pointer values respectively.

Link: http://lkml.kernel.org/r/20170720184539.31609-2-willy@infradead.org
Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: David Miller <davem@davemloft.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-08-19 11:34:40 +05:30
..
842
fonts
lz4
lzo
mpi
raid6 lib: raid6: fix awk build warnings 2020-04-07 13:07:01 +02:00
reed_solomon
xz
zlib_deflate
zlib_inflate
zstd
argv_split.c
asn1_decoder.c
assoc_array.c
atomic64_test.c
atomic64.c
audit.c
bcd.c
bch.c
bitmap.c bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free() 2020-04-07 13:45:09 +02:00
bitrev.c
bsearch.c
btree.c
bug.c
build_OID_registry
bust_spinlocks.c
check_signature.c
checksum.c
clz_ctz.c
clz_tab.c
cmdline.c
compat_audit.c
cordic.c
cpu_rmap.c
cpu-notifier-error-inject.c
cpumask.c
crc-ccitt.c
crc-itu-t.c
crc-t10dif.c
crc7.c
crc8.c
crc16.c
crc32.c
crc32defs.h
ctype.c
debug_info.c
debug_locks.c
debugobjects.c
dec_and_lock.c
decompress_bunzip2.c
decompress_inflate.c
decompress_unlz4.c
decompress_unlzma.c
decompress_unlzo.c
decompress_unxz.c
decompress.c
devres.c devres: allow const resource arguments 2020-04-07 13:42:28 +02:00
digsig.c
div64.c
dma-debug.c dma-debug: add a schedule point in debug_dma_dump_mappings() 2020-04-07 13:22:54 +02:00
dump_stack.c dump_stack: avoid the livelock of the dump_lock 2020-04-07 11:48:34 +02:00
dynamic_debug.c
dynamic_queue_limits.c
earlycpio.c
extable.c
fault-inject.c
fdt_empty_tree.c
fdt_ro.c
fdt_rw.c
fdt_strerror.c
fdt_sw.c
fdt_wip.c
fdt.c
find_bit.c
flex_array.c
flex_proportions.c
gcd.c
gen_crc32table.c
genalloc.c lib/genalloc.c: include vmalloc.h 2020-04-07 12:42:44 +02:00
glob.c
halfmd4.c
hexdump.c
hweight.c
idr.c
inflate.c
int_sqrt.c
interval_tree_test.c
interval_tree.c
iomap_copy.c
iomap.c
iommu-common.c
iommu-helper.c
ioremap.c
iov_iter.c
irq_regs.c
is_single_threaded.c
jedec_ddr_data.c
kasprintf.c
Kconfig
Kconfig.debug kmemleak: increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE default to 16K 2020-04-07 07:55:16 +02:00
Kconfig.kasan
Kconfig.kgdb
Kconfig.kmemcheck
kfifo.c Partially revert "kfifo: fix kfifo_alloc() and kfifo_init()" 2020-04-07 13:43:03 +02:00
klist.c
kobject_uevent.c
kobject.c kobject: Export kobject_get_unless_zero() 2020-04-07 13:29:27 +02:00
kstrtox.c
kstrtox.h
lcm.c
libcrc32c.c
list_debug.c
list_sort.c
llist.c
locking-selftest-hardirq.h
locking-selftest-mutex.h
locking-selftest-rlock-hardirq.h
locking-selftest-rlock-softirq.h
locking-selftest-rlock.h
locking-selftest-rsem.h
locking-selftest-softirq.h
locking-selftest-spin-hardirq.h
locking-selftest-spin-softirq.h
locking-selftest-spin.h
locking-selftest-wlock-hardirq.h
locking-selftest-wlock-softirq.h
locking-selftest-wlock.h
locking-selftest-wsem.h
locking-selftest.c
lockref.c
lru_cache.c
Makefile siphash: add cryptographically secure PRF 2020-04-06 21:32:41 +02:00
md5.c
memory-notifier-error-inject.c
memweight.c
net_utils.c
nlattr.c
nmi_backtrace.c
notifier-error-inject.c
notifier-error-inject.h
of-reconfig-notifier-error-inject.c
oid_registry.c
once.c
parser.c
pci_iomap.c
percpu_counter.c
percpu_ida.c
percpu_test.c
percpu-refcount.c
plist.c
pm-notifier-error-inject.c
proportions.c
radix-tree.c
random32.c
ratelimit.c
rational.c
rbtree_test.c
rbtree.c
reciprocal_div.c
rhashtable.c
scatterlist.c lib/scatterlist.c: adjust indentation in __sg_alloc_table 2020-04-07 13:57:21 +02:00
seq_buf.c
sg_split.c
sha1.c
show_mem.c
siphash.c siphash: implement HalfSipHash1-3 for hash tables 2020-04-06 21:32:43 +02:00
smp_processor_id.c
sort.c
stackdepot.c
stmp_device.c
string_helpers.c
string.c lib/string.c: add multibyte memset functions 2020-08-19 11:34:40 +05:30
strncpy_from_user.c
strnlen_user.c
swiotlb.c
syscall.c
test_bpf.c
test_firmware.c
test_kasan.c lib/test_kasan.c: fix memory leak in kmalloc_oob_krealloc_more() 2020-04-07 13:49:45 +02:00
test_module.c
test_printf.c
test_rhashtable.c
test_siphash.c siphash: implement HalfSipHash1-3 for hash tables 2020-04-06 21:32:43 +02:00
test_static_key_base.c
test_static_keys.c
test_user_copy.c
test-hexdump.c
test-kstrtox.c
test-string_helpers.c
textsearch.c
timerqueue.c
ts_bm.c
ts_fsm.c
ts_kmp.c
ucs2_string.c
usercopy.c
uuid.c
vsprintf.c
xxhash.c