FreeBSD/src f56c684lib/libc/riscv/string strchrnul.S Makefile.inc

libc: scalar strchrnul() in RISC-V assembly

Scalar implementation of strchrnul() in RISC-V assembly and changes to the
corresponding manpage.

Performance was benchmarked on a HiFive Unmatched (SiFive HF105-001) board
using: https://github.com/clausecker/strperf

os: FreeBSD
arch: riscv
        │ strchrnul_baseline │          strchrnul_scalar           │
        │       sec/op       │   sec/op     vs base                │
Short            680.2µ ± 5%   435.3µ ± 0%  -36.01% (p=0.000 n=20)
Mid              314.7µ ± 3%   221.4µ ± 0%  -29.63% (p=0.000 n=20)
Long             152.3µ ± 0%   138.5µ ± 0%   -9.08% (p=0.000 n=20)
geomean          319.5µ        237.2µ       -25.75%

        │ strchrnul_baseline │          strchrnul_scalar          │
        │       MiB/s        │   MiB/s     vs base                │

    [13 lines not shown]
DeltaFile
+116-0lib/libc/riscv/string/strchrnul.S
+1-0lib/libc/riscv/string/Makefile.inc
+117-02 files

FreeBSD/src b06836fshare/man/man7 simd.7

simd.7: add scalar strnlen() for RISC-V to manpage

MFC after:      1 month
MFC to:         stable/15
Approved by:    mhorne, markj (mentor)
Reviewed by:    fuz, Jari Sihvola <jsihv at gmx.com>
Sponsored by:   Google LLC (GSoC 2024)
Differential Revision:  https://reviews.freebsd.org/D46230

(cherry picked from commit 474a80d3ff8516df5c379fa7f8e563cecb032060)
DeltaFile
+1-1share/man/man7/simd.7
+1-11 files

FreeBSD/src bb2cbe8share/man/man7 simd.7

simd.7: add scalar memcpy() for RISC-V to manpage

MFC after:      1 month
MFC to:         stable/15
Approved by:    mhorne, markj (mentor)
Reviewed by:    fuz
Sponsored by:   Google LLC (GSoC 2024)
Differential Revision:  https://reviews.freebsd.org/D46139

(cherry picked from commit c80dfcb37261e5e8575d41801e64a39b7db6f4f8)
DeltaFile
+2-2share/man/man7/simd.7
+2-21 files

FreeBSD/src 3f0dda7lib/libc/riscv/string strnlen.S Makefile.inc

libc: scalar strnlen() in RISC-V assembly

Optimized implementation of strnlen() in RISC-V assembly

Performance was measured using strperf on a HiFive Unmatched (SiFive HF105-001) board.

os: FreeBSD
arch: riscv
        │ strnlen_baseline │           strnlen_scalar            │
        │      sec/op      │   sec/op     vs base                │
Short          787.0µ ± 0%   430.9µ ± 1%  -45.24% (p=0.000 n=20)
Mid            621.6µ ± 0%   195.1µ ± 1%  -68.61% (p=0.000 n=20)
Long           569.4µ ± 1%   100.6µ ± 0%  -82.34% (p=0.000 n=20)
geomean        653.1µ        203.7µ       -68.81%

        │ strnlen_baseline │            strnlen_scalar            │
        │      MiB/s       │    MiB/s     vs base                 │
Short           158.8 ± 0%    290.1 ± 1%   +82.62% (p=0.000 n=20)
Mid             201.1 ± 0%    640.6 ± 1%  +218.59% (p=0.000 n=20)

    [11 lines not shown]
DeltaFile
+143-0lib/libc/riscv/string/strnlen.S
+1-0lib/libc/riscv/string/Makefile.inc
+144-02 files

FreeBSD/src 1369056tools/build depend-cleanup.sh

depend-cleanup.sh: clean up after riscv64 enhanced string function patch set

This ensures an incremental build succeeds after import of
D47275, D46023, D45730, D45693, D46139, D46230, D46047, and D53248.

Approved by:    markj (mentor)
MFC after:      1 month
MFC to:         stable/15
Differential Revision:  https://reviews.freebsd.org/D53485

(cherry picked from commit d59e924d2969ce2c8bec0fc4500989865fbece75)
DeltaFile
+27-0tools/build/depend-cleanup.sh
+27-01 files

FreeBSD/src 65f6088share/man/man7 simd.7

simd.7: document bcopy() and bzero() as accelerated on riscv64

Event:          Google Summer of Code 2024
MFC after:      1 month
MFC to:         stable/15
Approved by:    markj (mentor)
Differential Revision:  https://reviews.freebsd.org/D53248

(cherry picked from commit d6870bb941fe235e0031f8bfb53fbd120ff859f9)
DeltaFile
+2-2share/man/man7/simd.7
+2-21 files

FreeBSD/src 4e63278share/man/man7 simd.7

simd.7: add scalar strchrnul() for RISC-V to manpage

index() and strchr() are implemented by calling strchrnul(), so they
also get to be marked as platform-specific.

MFC after:      1 month
MFC to:         stable/15
Approved by:    markj (mentor)
Reviewed by:    fuz
Sponsored by:   Google LLC (GSoC 2024)
Differential Revision:  https://reviews.freebsd.org/D46047

(cherry picked from commit 39fef5b9fa943f301776e0b0bf406cedd7c29af2)
DeltaFile
+4-4share/man/man7/simd.7
+4-41 files

FreeBSD/src be97631lib/libc/riscv/string bcopy.c bzero.c

libc/riscv64: implement bcopy() and bzero() through memcpy() and memset()

This picks up the accelerated string functions written by
strajabot@.

Event:          Google Summer of Code 2024
MFC after:      1 month
MFC to:         stable/15
See also:       79e01e7e643c9337d8d6046b6db7df674475a099
Approved by:    markj (mentor)
Differential Revision:  https://reviews.freebsd.org/D53248

(cherry picked from commit b5dbf3de561189140c73f915bd50c28ea69a1e19)
DeltaFile
+14-0lib/libc/riscv/string/bcopy.c
+14-0lib/libc/riscv/string/bzero.c
+2-0lib/libc/riscv/string/Makefile.inc
+30-03 files

FreeBSD/src 650ac47lib/libc/riscv/string strlen.S Makefile.inc

libc: scalar strlen() in RISC-V assembly

Includes a scalar implementation of strlen() for the RISC-V
architecture and changes to the corresponding manpage.

Performance was benchamarked using before and after:
https://github.com/clausecker/strperf

os: FreeBSD
arch: riscv
        │ strlen_baseline │             strlen_scalar              │
        │     sec/op      │   sec/op     vs base                   │
Short        541.2µ ± 17%   401.6µ ± 0%  -25.78% (p=0.000 n=21+20)
Mid          249.6µ ±  3%   191.9µ ± 0%  -23.13% (p=0.000 n=21+20)
Long         124.6µ ±  0%   110.7µ ± 0%  -11.13% (p=0.000 n=21+20)
geomean      256.3µ         204.3µ       -20.26%

        │ strlen_baseline │              strlen_scalar               │
        │       B/s       │      B/s       vs base                   │

    [13 lines not shown]
DeltaFile
+77-0lib/libc/riscv/string/strlen.S
+1-0lib/libc/riscv/string/Makefile.inc
+78-02 files

FreeBSD/src 62fa1d2share/man/man7 simd.7

simd.7: add scalar memset() for RISC-V to manpage

MFC after:      1 month
MFC to:         stable/15
Approved by:    mhorne, markj (mentor)
Reviewed by:    fuz
Sponsored by:   Google LLC (GSoC 2024)
Differential Revision:  https://reviews.freebsd.org/D45730

(cherry picked from commit 164156058e723c0d9b2bb68054543963f40f1159)
DeltaFile
+1-1share/man/man7/simd.7
+1-11 files

FreeBSD/src 09d15e9lib/libc/riscv/string strrchr.S, share/man/man7 simd.7

simd.7: add scalar strrchr() for RISC-V to manpage

MFC after:      1 month
MFC to:         stable/15
Approved by:    mhorne, markj (mentor)
Sponsored by:   Google LLC (GSoC 2024)
Differential Revision:  https://reviews.freebsd.org/D47275

(cherry picked from commit 63ff982b17ee398c7808be323d8fd37819a5863c)
DeltaFile
+9-6share/man/man7/simd.7
+3-0lib/libc/riscv/string/strrchr.S
+12-62 files

FreeBSD/src a86afcdlib/libc/riscv/string memcpy.S Makefile.inc

libc: scalar memcpy() in RISC-V assembly

Optimized assembly implementation of memcpy() for the RISC-V architecture.
The implementation has two paths:

 - An aligned path - (dst - src) % 8 = 0, runs faster
 - An unaligned path - (dst - src) % 8 != 0, runs slower

os: FreeBSD
arch: riscv
           │ memcpy_baseline │            memcpy_scalar            │
           │     sec/op      │   sec/op     vs base                │
64Align8         851.6µ ± 1%   488.9µ ± 1%  -42.59% (p=0.000 n=12)
4kAlign8         681.5µ ± 1%   255.1µ ± 2%  -62.57% (p=0.000 n=12)
256kAlign8       273.0µ ± 2%   230.7µ ± 2%  -15.50% (p=0.000 n=12)
16mAlign8        98.07m ± 0%   95.29m ± 0%   -2.84% (p=0.000 n=12)
64UAlign         887.5µ ± 1%   531.6µ ± 1%  -40.10% (p=0.000 n=12)
4kUAlign         725.6µ ± 1%   262.2µ ± 1%  -63.87% (p=0.000 n=12)
256kUAlign       844.1µ ± 2%   322.8µ ± 0%  -61.76% (p=0.000 n=12)

    [23 lines not shown]
DeltaFile
+217-0lib/libc/riscv/string/memcpy.S
+1-0lib/libc/riscv/string/Makefile.inc
+218-02 files

FreeBSD/src 514677blib/libc/riscv/string memchr.S Makefile.inc

libc: scalar memchr() in RISC-V assembly

Added an optimized memchr() implementation in RISC-V assembly and updated
the relevant manpage.

        │ memchr_baseline │            memchr_scalar            │
        │     sec/op      │   sec/op     vs base                │
Short         636.6µ ± 1%   495.9µ ± 1%  -22.10% (p=0.000 n=20)
Mid           279.7µ ± 1%   224.1µ ± 1%  -19.87% (p=0.000 n=20)
Long          138.8µ ± 0%   124.9µ ± 0%  -10.00% (p=0.000 n=20)
geomean       291.3µ        240.3µ       -17.48%

        │ memchr_baseline │            memchr_scalar             │
        │       B/s       │     B/s       vs base                │
Short        187.3Mi ± 1%   240.4Mi ± 1%  +28.37% (p=0.000 n=20)
Mid          426.2Mi ± 1%   531.9Mi ± 1%  +24.79% (p=0.000 n=20)
Long         859.0Mi ± 0%   954.4Mi ± 0%  +11.11% (p=0.000 n=20)
geomean      409.3Mi        496.0Mi       +21.19%


    [8 lines not shown]
DeltaFile
+188-0lib/libc/riscv/string/memchr.S
+1-0lib/libc/riscv/string/Makefile.inc
+189-02 files

FreeBSD/src 2d205cdlib/libc/riscv/string memset.S Makefile.inc

libc: scalar memset() in RISC-V assembly

Adds scalar implementation of memset for RISC-V
and updates the relevant manpage

os: FreeBSD
arch: riscv
        │ ./results/memset/memset_baseline │   ./results/memset/memset_scalar    │
        │              sec/op              │   sec/op     vs base                │
40                             527.5µ ± 1%   479.4µ ± 1%   -9.12% (p=0.000 n=20)
168                            254.5µ ± 1%   216.7µ ± 1%  -14.86% (p=0.000 n=20)
2k                             169.5µ ± 1%   128.4µ ± 0%  -24.24% (p=0.000 n=20)
256k                           161.2µ ± 1%   118.6µ ± 1%  -26.42% (p=0.000 n=20)
16m                            56.58m ± 0%   53.91m ± 0%   -4.72% (p=0.000 n=20)
geomean                        730.2µ        611.2µ       -16.29%

        │ ./results/memset/memset_baseline │    ./results/memset/memset_scalar     │
        │               B/s                │      B/s       vs base                │
40                            452.0Mi ± 1%    497.3Mi ± 1%  +10.04% (p=0.000 n=20)

    [14 lines not shown]
DeltaFile
+95-0lib/libc/riscv/string/memset.S
+1-0lib/libc/riscv/string/Makefile.inc
+96-02 files

FreeBSD/src 6eed64cshare/man/man7 simd.7

simd.7: add scalar strlen() for RISC-V to manpage

MFC after:      1 month
MFC to:         stable/15
Approved by:    mhorne, markj (mentor)
Reviewed by:    fuz
Sponsored by:   Google LLC (GSoC 2024)
Differential Revision:  https://reviews.freebsd.org/D45693

(cherry picked from commit 07b1d5a37741f5d4de69117a03ef757edff29032)
DeltaFile
+1-1share/man/man7/simd.7
+1-11 files

FreeBSD/src 8c9581ashare/man/man7 simd.7

simd.7: add scalar memchr() for RISC-V to manpage

MFC after:      1 month
MFC to:         stable/15
Approved by:    mhorne, markj (mentor)
Sponsored by:   Google LLC (GSoC 2024)
Differential Revision:  https://reviews.freebsd.org/D46023

(cherry picked from commit d2c23f5953a823e01f0c6418b0f98c119f145e20)
DeltaFile
+1-1share/man/man7/simd.7
+1-11 files

FreeBSD/src 8a02704lib/libc/riscv/string strrchr.S Makefile.inc

libc: scalar strrchr() in RISC-V assembly

Implements strrchr in RISC-V assembly, leading to the following
improvements (performance measured on SiFive HF105-001)

os: FreeBSD
arch: riscv
        │ strrchr_baseline │             strrchr_scalar             │
        │      sec/op      │   sec/op     vs base                   │
Short          837.2µ ± 1%   574.6µ ± 1%  -31.37% (p=0.000 n=20+21)
Mid            639.7µ ± 0%   269.7µ ± 0%  -57.84% (p=0.000 n=20+21)
Long           589.1µ ± 0%   176.7µ ± 0%  -70.01% (p=0.000 n=20+21)
geomean        680.8µ        301.4µ       -55.73%

        │ strrchr_baseline │             strrchr_scalar             │
        │      MiB/s       │   MiB/s     vs base                    │
Short           149.3 ± 1%   217.6 ± 1%   +45.71% (p=0.000 n=20+21)
Mid             195.4 ± 0%   463.6 ± 0%  +137.22% (p=0.000 n=20+21)
Long            212.2 ± 0%   707.4 ± 0%  +233.40% (p=0.000 n=20+21)

    [9 lines not shown]
DeltaFile
+124-0lib/libc/riscv/string/strrchr.S
+2-0lib/libc/riscv/string/Makefile.inc
+126-02 files

FreeBSD/src 02b72b1sys/arm/arm debug_monitor.c

arm: Remove unused variable in dbg_arch_supported

Removed unused dbg_didr which had been used prior to f42421307b11 to
detect qemu unsupported debugger. I'm unsure how this slipped through my
testing.

Fixes: f42421307b11
Sponsored by: Netflix
DeltaFile
+1-3sys/arm/arm/debug_monitor.c
+1-31 files

FreeBSD/src 57c0a33lib/libsys/arm __vdso_gettc.c

libsys: remove armv6 hack

Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
DeltaFile
+2-6lib/libsys/arm/__vdso_gettc.c
+2-61 files

FreeBSD/src f3607f5lib/clang llvm.build.mk

clang: remove armv6 comment

Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
DeltaFile
+2-2lib/clang/llvm.build.mk
+2-21 files

FreeBSD/src 53da093lib/libc/arm/gen arm_drain_writebuf.2

libc: remove ARMv5/6 from man page

Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
DeltaFile
+1-4lib/libc/arm/gen/arm_drain_writebuf.2
+1-41 files

FreeBSD/src 3387a1bsys/arm/arm machdep_boot.c

sys: update comment for removal of armv6

Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
DeltaFile
+1-1sys/arm/arm/machdep_boot.c
+1-11 files

FreeBSD/src f424213sys/arm/arm debug_monitor.c

sys: remove armv6/6.1 support from debug monitor

Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
DeltaFile
+0-30sys/arm/arm/debug_monitor.c
+0-301 files

FreeBSD/src 42d704bsys/arm/include vmparam.h param.h

sys: remove comment for armv5/6

Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
DeltaFile
+1-4sys/arm/include/vmparam.h
+0-2sys/arm/include/param.h
+1-62 files

FreeBSD/src 96265d5release Makefile.mirrors

release: match comment for if statement

Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
DeltaFile
+1-1release/Makefile.mirrors
+1-11 files

FreeBSD/src 37c650btools/build/options WITH_LIBSOFT

tools: remove WITH_LIBSOFT option

This is only used for armv6, which as been removed since FreeBSD 15.

Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
DeltaFile
+0-2tools/build/options/WITH_LIBSOFT
+0-21 files

FreeBSD/src 8d338f9usr.bin/beep beep.1 beep.c

beep: Sort usage and man page options

Sort usage and man page options, mention possible minimum and maximum
values, fix punctuation marks, and cleanup the man page.

PR:             291092
Reviewed by:    pauamma_gundo.com, christos
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53827

(cherry picked from commit 55d98b024f25403f60efe04f90a391014b6bc388)
DeltaFile
+29-26usr.bin/beep/beep.1
+11-10usr.bin/beep/beep.c
+40-362 files

FreeBSD/src 4c10ec9usr.bin/beep beep.1 beep.c

beep: Sort usage and man page options

Sort usage and man page options, mention possible minimum and maximum
values, fix punctuation marks, and cleanup the man page.

PR:             291092
Reviewed by:    pauamma_gundo.com, christos
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53827

(cherry picked from commit 55d98b024f25403f60efe04f90a391014b6bc388)
DeltaFile
+29-26usr.bin/beep/beep.1
+11-10usr.bin/beep/beep.c
+40-362 files

FreeBSD/src 6bda365usr.bin/beep beep.1 beep.c

beep: Sort usage and man page options

Sort usage and man page options, mention possible minimum and maximum
values, fix punctuation marks, and cleanup the man page.

PR:             291092
Reviewed by:    pauamma_gundo.com, christos
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53827

(cherry picked from commit 55d98b024f25403f60efe04f90a391014b6bc388)
DeltaFile
+29-26usr.bin/beep/beep.1
+11-10usr.bin/beep/beep.c
+40-362 files

FreeBSD/src 3d91a74etc/mtree BSD.lib32.dist BSD.usr.dist

mtree: Keep mtree files indented with spaces

The mtree tool indents directory entries with 4 spaces.

Reviewed by:    imp
Fixes:          9cab9fde5eda ("virtual_oss: Port to base")
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D53979
DeltaFile
+2-2etc/mtree/BSD.lib32.dist
+2-2etc/mtree/BSD.usr.dist
+4-42 files