u-boot/test/cmd
Tom Rini 233fda6af6 Merge patch series "Uthreads"
Jerome Forissier <jerome.forissier@linaro.org> says:

This series introduces threads and uses them to improve the performance
of the USB bus scanning code and to implement background jobs in the
shell via two new commands: 'spawn' and 'wait'.

The threading framework is called 'uthread' and is inspired from the
barebox threads [2]. setjmp() and longjmp() are used to save and
restore contexts, as well as a non-standard extension called initjmp().
This new function is added in several patches, one for each
architecture that supports HAVE_SETJMP. A new symbol is defined:
HAVE_INITJMP. Two tests, one for initjmp() and one for the uthread
scheduling, are added to the lib suite.

After introducing threads and making schedule() and udelay() a thread
re-scheduling point, the USB stack initialization is modified to benefit
from concurrency when UTHREAD is enabled, where uthreads are used in
usb_init() to initialize and scan multiple busses at the same time.
The code was tested on arm64 and arm QEMU with 4 simulated XHCI buses
and some devices. On this platform the USB scan takes 2.2 s instead of
5.6 s. Tested on i.MX93 EVK with two USB hubs, one ethernet adapter and
one webcam on each, "usb start" takes 2.4 s instead of 4.6 s.

Finally, the spawn and wait commands are introduced, allowing the use of
threads from the shell. Tested on the i.MX93 EVK with a spinning HDD
connected to USB1 and the network connected to ENET1. The USB plus DHCP
init sequence "spawn usb start; spawn dhcp; wait" takes 4.5 seconds
instead of 8 seconds for "usb start; dhcp".

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=446674
[2] https://github.com/barebox/barebox/blob/master/common/bthread.c

Link: https://lore.kernel.org/r/20250418141114.2056981-1-jerome.forissier@linaro.org
2025-04-23 13:21:39 -06:00
..
addrmap.c test: Drop suites.h 2025-02-11 20:12:36 -06:00
armffa.c test: Rename UTF_CONSOLE_REC to UTF_CONSOLE 2024-08-26 18:51:49 -06:00
bdinfo.c test: Drop suites.h 2025-02-11 20:12:36 -06:00
command.c test: run some test commands only if HUSH_PARSER is enabled 2025-04-22 12:26:41 -06:00
coreboot.c x86: coreboot: Allow building an expo for editing CMOS config 2024-11-03 21:27:12 -06:00
cpuid.c x86: Add a cpuid command 2024-10-18 14:10:21 -06:00
exit.c test: Drop suites.h 2025-02-11 20:12:36 -06:00
fdt.c test: Drop suites.h 2025-02-11 20:12:36 -06:00
font.c test: Drop suites.h 2025-02-11 20:12:36 -06:00
hash.c test: cmd/hash: check return value of ut_check_console_line 2024-11-18 19:10:56 -06:00
history.c test: Rename UTF_CONSOLE_REC to UTF_CONSOLE 2024-08-26 18:51:49 -06:00
loadm.c test: Drop suites.h 2025-02-11 20:12:36 -06:00
Makefile test: cmd: add test for spawn and wait commands 2025-04-23 13:19:44 -06:00
mbr.c test: Drop suites.h 2025-02-11 20:12:36 -06:00
mem_copy.c test: Drop the _test suffix on linker lists 2025-01-24 14:34:40 -06:00
mem_search.c test: Drop the _test suffix on linker lists 2025-01-24 14:34:40 -06:00
meminfo.c meminfo: Show the lmb records 2024-10-25 14:22:24 -06:00
msr.c x86: Add msr command 2024-10-18 14:10:21 -06:00
pci_mps.c test: Drop suites.h 2025-02-11 20:12:36 -06:00
pinmux.c Merge patch series "Tidy up console recording in tests" 2024-08-26 18:52:18 -06:00
pwm.c test: cmd: Drop unnecessary console_record_reset_enable() 2024-08-26 18:51:49 -06:00
rw.c test: cmd: Drop unnecessary console_record_reset_enable() 2024-08-26 18:51:49 -06:00
seama.c test: Drop suites.h 2025-02-11 20:12:36 -06:00
setexpr.c test: Drop suites.h 2025-02-11 20:12:36 -06:00
spawn.c test: cmd: add test for spawn and wait commands 2025-04-23 13:19:44 -06:00
temperature.c test: cmd: Drop unnecessary console_record_reset_enable() 2024-08-26 18:51:49 -06:00
test_echo.c test: Tidy up checking for console end 2024-08-26 18:51:49 -06:00
test_pause.c test: Tidy up checking for console end 2024-08-26 18:51:49 -06:00
wget.c test/cmd/wget.c: Fix loadaddr rewrite 2025-01-27 12:46:44 -06:00