[PATCH 04/13] m68k: asm/ptrace.h: include linux/types.h

2024-10-03 Thread Rasmus Villemoes
including the proper header. Signed-off-by: Rasmus Villemoes --- arch/m68k/include/asm/ptrace.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/m68k/include/asm/ptrace.h b/arch/m68k/include/asm/ptrace.h index d419824806c..5decf73a1d1 100644 --- a/arch/m68k/include/asm/ptrace.h +++ b/arch

[PATCH 03/13] led: include cyclic.h in led_sw_blink.c

2024-10-03 Thread Rasmus Villemoes
This makes use of the cyclic API but relies on implicitly getting the appropriate declarations through some nested include. Include the cyclic.h header directly. Signed-off-by: Rasmus Villemoes --- drivers/led/led_sw_blink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/led

[PATCH 13/13] global_data.h: remove unnecesary include of cyclic.h

2024-10-03 Thread Rasmus Villemoes
Nothing in cyclic.h is needed to define struct global_data, so do not include that header. If any .c file relies on getting cyclic.h through asm/global_data.h, it needs to include it itself. Signed-off-by: Rasmus Villemoes --- include/asm-generic/global_data.h | 1 - 1 file changed, 1 deletion

[PATCH 11/13] ddr: altera: include u-boot/schedule.h

2024-10-03 Thread Rasmus Villemoes
These TUs currently rely on getting a declaration of schedule() through some nested include. Include the proper header directly. Signed-off-by: Rasmus Villemoes --- drivers/ddr/altera/sdram_n5x.c | 1 + drivers/ddr/altera/sdram_soc64.c | 1 + 2 files changed, 2 insertions(+) diff --git a

[PATCH 12/13] boot: cedit: include u-boot/schedule.h

2024-10-03 Thread Rasmus Villemoes
This TU currently relies on getting a declaration of schedule() through some nested include. Include the proper header directly. Signed-off-by: Rasmus Villemoes --- boot/cedit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/boot/cedit.c b/boot/cedit.c index c29a2be14ce..ff0efda3a7b 100644

Re: [PATCH] watchdog: gpio_wdt: add support for stoppable devices

2024-10-22 Thread Rasmus Villemoes
On Tue, Oct 22 2024, Stefan Roese wrote: > Hi Rasmus, > > On 10/2/24 21:23, Rasmus Villemoes wrote: > > While running a CI build, I'm seeing some sandbox failures, most likely > related to this change here: > > https://dev.azure.com/sr0718/u-boot/_build/results?bui

Re: [PATCH] imx: hab: fix size of IVT+CSF blob tacked on to u-boot.itb

2024-10-25 Thread Rasmus Villemoes
On Thu, Oct 24 2024, Marek Vasut wrote: > On 10/24/24 2:27 PM, Rasmus Villemoes wrote: >> Loading flash.bin using uuu fails when flash.bin does not have the >> right size. >> When flash.bin is loaded from some storage medium (sd card/emmc), >> SPL >> just loa

[PATCH] imx: hab: fix size of IVT+CSF blob tacked on to u-boot.itb

2024-10-24 Thread Rasmus Villemoes
st be a total of CONFIG_CSF_SIZE. This is exactly the same fix as 89f19f45d650, except that this time around I don't know how to cleanly get CONFIG_CSF_SIZE. Fixes: bc6beae7c55f (binman: Add nxp_imx8mcst etype for i.MX8M flash.bin signing) Signed-off-by: Rasmus Villemoes --- Heiko, can yo

Re: [PATCH] imx8m: set sane default value for SPL_LOAD_FIT_ADDRESS

2024-10-24 Thread Rasmus Villemoes
On Thu, Oct 24 2024, Marek Vasut wrote: > On 10/24/24 12:01 PM, Rasmus Villemoes wrote: >> I enabled IMX_HAB on an imx8mp board, but even though I knew about the >> implementation, I forgot that I had to provide a sane value for >> SPL_LOAD_FIT_ADDRESS. The help text for IM

Re: [PATCH v4 1/2] binman: nxp_imx8mcst: read certificates from input path

2024-10-30 Thread Rasmus Villemoes
On Wed, Oct 30 2024, Brian Ruley wrote: > Right now, it is unclear where the certificates (and private keys) are > read from if environment variables are unset, and providing complete > paths in the device tree is not ideal. Naturally, it makes sense > to be able to decide where binman should loo

[PATCH 1/3] cmd/nvedit.c: teach 'env default' to optionally keep runtime variables

2024-10-30 Thread Rasmus Villemoes
default env and thus being deleted. With -k, there's no warning, and var1 is kept as-is. Signed-off-by: Rasmus Villemoes --- cmd/nvedit.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 392f90f8698..1f259801293 100644 --- a/cm

[PATCH 2/3] test: env: check that non-mentioned variables to "env default" are preserved

2024-10-30 Thread Rasmus Villemoes
Instead of testing the same expected behaviour for both non_default_varX, test that when var1 is not in the default env but is mentioned in the "env default" cmdline, it is removed, while var2 is untouched. Signed-off-by: Rasmus Villemoes --- test/env/cmd_ut_env.c | 7 +++ 1 file

[PATCH 3/3] test: env: add some test cases for new "env default -k" flag

2024-10-30 Thread Rasmus Villemoes
). Signed-off-by: Rasmus Villemoes --- test/env/cmd_ut_env.c | 40 1 file changed, 40 insertions(+) diff --git a/test/env/cmd_ut_env.c b/test/env/cmd_ut_env.c index e1dd1a14cb0..9f16a978f2a 100644 --- a/test/env/cmd_ut_env.c +++ b/test/env/cmd_ut_env.c @@ -31,6

[PATCH 0/3] teach 'env default' to optionally keep runtime variables

2024-10-30 Thread Rasmus Villemoes
the hashtab code already supports a flag that does exactly what I need, and exposing that is (morally) a one-liner. Rasmus Villemoes (3): cmd/nvedit.c: teach 'env default' to optionally keep runtime variables test: env: check that non-mentioned variables to "env default" are

Re: [PATCH] imx8m: set sane default value for SPL_LOAD_FIT_ADDRESS

2024-10-25 Thread Rasmus Villemoes
On Thu, Oct 24 2024, Marek Vasut wrote: > On 10/24/24 5:20 PM, Tom Rini wrote: >> On Thu, Oct 24, 2024 at 04:06:03PM +0200, Marek Vasut wrote: >>> On 10/24/24 3:18 PM, Rasmus Villemoes wrote: >>>> On Thu, Oct 24 2024, Marek Vasut wrote: >>>> >>

Re: [PATCH] imx: hab: fix size of IVT+CSF blob tacked on to u-boot.itb

2024-10-27 Thread Rasmus Villemoes
On Fri, Oct 25 2024, Marek Vasut wrote: > On 10/25/24 9:10 AM, Rasmus Villemoes wrote: >> On Thu, Oct 24 2024, Marek Vasut wrote: >> >>> On 10/24/24 2:27 PM, Rasmus Villemoes wrote: >>>> Loading flash.bin using uuu fails when flash.bin does not have the >

Re: [PATCH] cmd/mem.c: fix undefined behavior in mem cmp

2024-09-27 Thread Rasmus Villemoes
Quentin Schulz writes: > From: Quentin Schulz > > My linter complains that "When using void pointers in calculations, the > behaviour is undefined". > > GCC does say that "In GNU C, addition and subtraction operations are > supported on pointers to void"[1] but this hints at this only being > su

Re: [PATCH 3/3] env: mmc: rework mmc_env_partition_by_guid() to work with two separate partitions

2024-09-19 Thread Rasmus Villemoes
Quentin Schulz writes: > Hi Rasmus, > > For this patch and the previous one, should we have test(s) to make > sure we don't regress? > That's obviously a good idea. But I don't have any idea how I'd go about writing such tests. AFAICT, there is no existing tests of the "find env partition by GUI

Re: [PATCH 0/3] env: mmc: fix use of two separate partitions with proper type GUID

2024-10-01 Thread Rasmus Villemoes
Rasmus Villemoes writes: > I always define a disk layout with two separate partitions for the two > copies of the U-Boot environment and, being the one who introduced the > type GUID for such partitions, of course also set those partitions' > type GUID appropriately. > &g

Re: [PATCH 1/3] env: mmc: refactor mmc_offset_try_partition()

2024-09-18 Thread Rasmus Villemoes
Quentin Schulz writes: >> - for (i = 1;;i++) { >> -ret = part_get_info(desc, i, &info); >> -if (ret < 0) >> -return ret; >> - >> -if (str && !strncmp((const char *)info.name, str, >> sizeof(info.name))) >> -break; >>

[PATCH] watchdog: gpio_wdt: add support for stoppable devices

2024-10-02 Thread Rasmus Villemoes
ver: - In ->probe(), such devices always request the gpio as GPIOD_IS_OUT. - In ->stop(), the linux driver has an "eternal ping" comment and sets the gpio to (logic) high. Signed-off-by: Rasmus Villemoes --- drivers/watchdog/gpio_wdt.c | 27 --- 1 fil

[PATCH 0/4] some serial rx buffer patches

2024-10-03 Thread Rasmus Villemoes
Some small improvements to the serial rx buffer feature. CI seems happy: https://github.com/u-boot/u-boot/pull/674 Rasmus Villemoes (4): serial: fix circular rx buffer edge case serial: do not overwrite not-consumed characters in rx buffer serial: add build-time sanity check of

[PATCH 2/4] serial: do not overwrite not-consumed characters in rx buffer

2024-10-03 Thread Rasmus Villemoes
ftware buffering more in line with how most hardware FIFOs behave (first received characters are kept, overflowing characters are dropped). Signed-off-by: Rasmus Villemoes --- drivers/serial/serial-uclass.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/serial/

[PATCH 1/4] serial: fix circular rx buffer edge case

2024-10-03 Thread Rasmus Villemoes
signed int) is defined to have the sign of the dividend (so (-35) % 32 is -3, not 29), and hence despite the modulus being a power-of-two, x % 32 does not actually compile to the same as a simple x & 31 - on x86 with -Os, it seems that gcc ends up emitting an idiv instruction, which is

[PATCH 3/4] serial: add build-time sanity check of CONFIG_SERIAL_RX_BUFFER_SIZE

2024-10-03 Thread Rasmus Villemoes
| BUILD_BUG_ON_NOT_POWER_OF_2(CONFIG_SERIAL_RX_BUFFER_SIZE); Signed-off-by: Rasmus Villemoes --- drivers/serial/serial-uclass.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c index 28d7a202afc..484f0f7d3e8 100644 --- a

[PATCH 4/4] serial: embed the rx buffer in struct serial_dev_priv

2024-10-03 Thread Rasmus Villemoes
it allocates the ->per_device_auto. The total run-time memory used is mostly the same, we reduce the code size a little, and as a bonus, struct serial_dev_priv does not contain the unused members when !SERIAL_RX_BUFFER. Signed-off-by: Rasmus Villemoes --- drivers/serial/serial-uclass.c |

[PATCH] imx8m: set sane default value for SPL_LOAD_FIT_ADDRESS

2024-10-24 Thread Rasmus Villemoes
as default for those platforms. Signed-off-by: Rasmus Villemoes --- boot/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/boot/Kconfig b/boot/Kconfig index 940389d4882..72d1f69afcd 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -231,6 +231,7 @@ config SPL_LOAD_FIT config SPL_L

[PATCH] arm: dts: socfpga: remove spurious execute permission from dt files

2024-11-25 Thread Rasmus Villemoes
It doesn't make sense for these files to have the x bit set. It was, probably accidentally, added in: Fixes: 2c494e62c31a (arm: dts: Stratix10: Add QSPI node) Signed-off-by: Rasmus Villemoes --- arch/arm/dts/socfpga_stratix10.dtsi | 0 arch/arm/dts/socfpga_stratix10_so

Re: [PATCH] Environment: Change reporting "nowhere" as "magic hat" to user

2024-11-29 Thread Rasmus Villemoes
On Fri, Nov 29 2024, Fabio Estevam wrote: > On Fri, Nov 29, 2024 at 7:35 AM Andrew Goodbody > wrote: >> >> On 28/11/2024 15:12, Alicja Michalska wrote: >> > Make string more user-friendly >> >> I disagree. I can make a guess as to what 'Loading Environment from >> nowhere' means. To me it sugges

Re: [PATCH 1/1] tools: use cryptographically safe RNG

2024-11-14 Thread Rasmus Villemoes
On Fri, Nov 15 2024, Mark Kettenis wrote: >> Date: Thu, 14 Nov 2024 11:39:27 -0600 >> From: Tom Rini >> >> On Thu, Nov 14, 2024 at 06:35:44PM +0100, Heinrich Schuchardt wrote: >> > Tom Rini schrieb am Do., 14. Nov. 2024, 18:27: >> > >> > > On Sat, Nov 02, 2024 at 05:32:59PM +0100, Heinrich Sc

Re: [PATCH 1/1] tools: use cryptographically safe RNG

2024-11-15 Thread Rasmus Villemoes
On Fri, Nov 15 2024, Heinrich Schuchardt wrote: >> > >> > Linking against libbsd might be an alternative on older systems. >> >> Or use getrandom(), which according to the man page has been exposed via >> glibc since glibc 2.25. Or just read from /dev/urandom which should work >> everywhere. >> >

Re: [PATCH 0/3] teach 'env default' to optionally keep runtime variables

2024-11-15 Thread Rasmus Villemoes
On Fri, Nov 15 2024, Simon Glass wrote: > Hi Rasmus, > > On Wed, 13 Nov 2024 at 15:32, Rasmus Villemoes wrote: >> >> On Wed, Oct 30 2024, Rasmus Villemoes wrote: >> >> > Doing bringup of a board, part of my bootstrap logic is in U-Boot. So >> >

[PATCH] powerpc/t2080qds: remove spurious x permission from README file

2024-11-25 Thread Rasmus Villemoes
It doesn't make sense for a README file to be executable. Remove that bit. Signed-off-by: Rasmus Villemoes --- board/freescale/t208xqds/README | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 board/freescale/t208xqds/README diff --git a/board/f

Re: [PATCH 0/3] teach 'env default' to optionally keep runtime variables

2024-11-13 Thread Rasmus Villemoes
On Wed, Oct 30 2024, Rasmus Villemoes wrote: > Doing bringup of a board, part of my bootstrap logic is in U-Boot. So > when tweaking that logic, I was bitten by a previous completed > bootstrap having left a copy of the environment on the device, which > was imported and thus overr

Re: [PATCH 1/1] tools: use cryptographically safe RNG

2024-11-15 Thread Rasmus Villemoes
On Fri, Nov 15 2024, Mark Kettenis wrote: >> >> Or use getrandom(), which according to the man page has been exposed via >> glibc since glibc 2.25. Or just read from /dev/urandom which should work >> everywhere. > > $ man getrandom > man: No entry for getrandom in the manual. I assume this is i

Re: [PATCH 1/3] lib: implement strnstr()

2025-01-06 Thread Rasmus Villemoes
On Mon, Jan 06 2025, Jerome Forissier wrote: >> + * >> + * Return: pointer to the first occurrence or NULL >> */ >> -char * strstr(const char * s1,const char * s2) >> +char *strnstr(const char *s1, const char *s2, size_t len) >> { >> -int l1, l2; >> +size_t l1, l2; >> >> +l1 = s

Re: [PATCH] tools: mkenvimage: Add pure shell implementation of mkenvimage

2025-02-07 Thread Rasmus Villemoes
On Wed, Feb 05 2025, Marek Vasut wrote: > Add implementation of mkenvimage written purely in bourne shell. > > This is not a replacement for mkenvimage tool, but rather a simple > implementation which can be used in environments where mkenvimage > itself cannot be deployed due to various constrai

Re: secure boot, mkimage with external signing server

2025-01-21 Thread Rasmus Villemoes
On Mon, Jan 20 2025, "Rosenschild, Klaus" wrote: > Hello, > I have a question regarding the signing of a FIT image using mkimage. I > already contacted DENX, they referred me to this mailing list. > > mkimage supports the creation of a signed FIT image. To do this, we need to > have an appropri

Re: AW: secure boot, mkimage with external signing server

2025-01-22 Thread Rasmus Villemoes
On Wed, Jan 22 2025, "Rosenschild, Klaus" wrote: > Hi Rasmus, > thank you for pointing to this solution. > I think this is the best way to do this. > > However, our signing server is very well protected and making changes there > is a long and complex process. > Right now, it only provides the f

Re: [PATCH 1/8] cyclic: Prevent corruption of cyclic list on reassignment

2025-01-26 Thread Rasmus Villemoes
On Sat, Jan 25 2025, Marek Vasut wrote: > On 1/20/25 10:17 AM, Rasmus Villemoes wrote: >> On Sat, Jan 18 2025, Marek Vasut wrote: >> >>> Make cyclic_register() return error code, 0 in case of success, >>> -EALREADY in case the called attempts to re-regis

Re: [PATCH 1/8] cyclic: Prevent corruption of cyclic list on reassignment

2025-01-20 Thread Rasmus Villemoes
On Sat, Jan 18 2025, Marek Vasut wrote: > Make cyclic_register() return error code, 0 in case of success, > -EALREADY in case the called attempts to re-register already > registered struct cyclic_info. The re-registration would lead > to corruption of gd->cyclic_list because the re-registration >

Re: [PATCH 0/2] Add rpi5 specific defconfig

2025-05-06 Thread Rasmus Villemoes
On Mon, May 05 2025, Tom Rini wrote: > On Mon, May 05, 2025 at 10:19:24PM +0200, Mark Kettenis wrote: >> > Date: Mon, 5 May 2025 07:48:43 -0600 >> > From: Tom Rini >> > >> > On Mon, May 05, 2025 at 11:45:05AM +0200, Rasmus Villemoes wrote: >

Re: [PATCH 0/2] Add rpi5 specific defconfig

2025-05-05 Thread Rasmus Villemoes
On Fri, May 02 2025, Tom Rini wrote: > On Fri, May 02, 2025 at 01:34:33PM +0200, Bruno Leite wrote: > >> From: Bruno Leite >> >> >> Currently rpi5 uses a generic rpi_arm64_defconfig file that builds rpi4 >> devicetree. Add a defconfig that is specific to the rpi5 building the >> now available

[PATCH 11/11] test: slre: add tests for character ranges

2025-05-06 Thread Rasmus Villemoes
The first of these, { "U-Boot", "^[B-Uo-t]*$", 0 }, would match previously when the - and the letters were all interpreted literally. Signed-off-by: Rasmus Villemoes --- test/lib/slre.c | 8 1 file changed, 8 insertions(+) diff --git a/test/lib/slre.c b/t

[PATCH 00/11] regex patches

2025-05-06 Thread Rasmus Villemoes
hat syntax" gotcha. I couldn't find any tests ('git grep slre -- test/' was empty), so I added a small test suite and tweaked slre.c. Rasmus Villemoes (11): cmd: test: add support for =~ operator slre: add myself as maintainer test: slre: add tests for regex librar

[PATCH 04/11] slre: drop wrong "anchored" optimization

2025-05-06 Thread Rasmus Villemoes
*$', this works correctly and matches exactly strings (including the empty string) consisting entirely of x'es. Fix both of these issues by dropping all use of the slre->anchored member and always test at all possible offsets. If the regex does have a ^ somewhere (including after a

[PATCH 01/11] cmd: test: add support for =~ operator

2025-05-06 Thread Rasmus Villemoes
s set, teach the test command a new operator, =~, which will allow one to more naturally write if test "${string_to_test}" =~ '' ; then ... Signed-off-by: Rasmus Villemoes --- cmd/test.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/cmd/test.c b/

[PATCH 03/11] test: slre: add tests for regex library

2025-05-06 Thread Rasmus Villemoes
Inspecting the slre.c code reveals a few bugs; those are easy to demonstrate with the new '=~' test operator. Before fixing them, let's add a place to add test cases. Signed-off-by: Rasmus Villemoes --- MAINTAINERS | 1 + test/lib/Makefile | 1 + test/li

[PATCH 02/11] slre: add myself as maintainer

2025-05-06 Thread Rasmus Villemoes
I guess that touching these files means "tag, you're it". That's fine with me. Signed-off-by: Rasmus Villemoes --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d62dd35a385..94c62daf834 100644 --- a/MAINTAINERS +++ b/MA

[PATCH 09/11] test: slre: add test cases for escape char in character class

2025-05-06 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- test/lib/slre.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/lib/slre.c b/test/lib/slre.c index 9b41ea92f38..053d046075e 100644 --- a/test/lib/slre.c +++ b/test/lib/slre.c @@ -26,6 +26,9 @@ static const struct re_test re_test

[PATCH 10/11] slre: implement support for ranges in character classes

2025-05-06 Thread Rasmus Villemoes
ger matches a literal dash, but I highly doubt anybody relies on that. Putting it first or last, or escaping it with \, as in most other RE engines, continues to work. Signed-off-by: Rasmus Villemoes --- lib/slre.c | 22 -- 1 file changed, 20 insertions(+), 2 deletio

[PATCH 06/11] test: slre: add some (negative) character class tests

2025-05-06 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- test/lib/slre.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/lib/slre.c b/test/lib/slre.c index b76d33475dd..9b41ea92f38 100644 --- a/test/lib/slre.c +++ b/test/lib/slre.c @@ -23,6 +23,9 @@ static const struct re_test re_test

[PATCH 08/11] slre: fix matching of escape sequence used inside character class

2025-05-06 Thread Rasmus Villemoes
d]", because DIGIT happens to be 17. Fix that by recognizing a zero byte as indicating something special and act accordingly. In order not to repeat the "increment *ofs and return 1" in all places, put those two lines after a new match: label. Signed-off-by: Rasmu

[PATCH 07/11] slre: refactor is_any_but()

2025-05-06 Thread Rasmus Villemoes
As preparation for fixing the handling of backslash-escapes used inside a character class, refactor is_any_but() to be defined in terms of is_any_of() so we don't have to repeat the same logic in two places. Signed-off-by: Rasmus Villemoes --- lib/slre.c | 15 ++- 1 file chang

[PATCH 05/11] test: slre: add more test cases

2025-05-06 Thread Rasmus Villemoes
Add some tests for the "drop wrong anchored optimization". Without the previous commit, the first, fifth and seventh of these would fail, i.e. those: { "xby", "^a|b", 1}, { "", "x*$", 1}, { "yy", "x*$

Re: [PATCH 01/11] cmd: test: add support for =~ operator

2025-05-06 Thread Rasmus Villemoes
On Tue, May 06 2025, Tom Rini wrote: > On Tue, May 06, 2025 at 10:49:31AM -0600, Tom Rini wrote: >> On Tue, May 06, 2025 at 04:10:25PM +0200, Rasmus Villemoes wrote: >> >> > Currently, the only way to make use of regex matching in the shell is >> > by using

[PATCH 3/4] mips: drop unused prefetch code and logic

2025-05-07 Thread Rasmus Villemoes
AFAICT, CONFIG_CPU_HAS_PREFETCH has never existed as a proper Kconfig symbol in U-Boot, nor has any board include file ever defined it. Signed-off-by: Rasmus Villemoes --- arch/mips/include/asm/processor.h | 16 1 file changed, 16 deletions(-) diff --git a/arch/mips/include

[PATCH 4/4] linux/list.h: drop fallback definition of prefetch()

2025-05-07 Thread Rasmus Villemoes
None of the list helpers use prefetch() anymore, and no C code relies on getting this definition from list.h. In any case, such an arch/cpu specific thing does not belong in a header that just consists of cpp helper macros. Signed-off-by: Rasmus Villemoes --- include/linux/list.h | 5 - 1

[PATCH 2/4] treewide: drop no-op prefetch() calls

2025-05-07 Thread Rasmus Villemoes
remove all uses. Signed-off-by: Rasmus Villemoes --- drivers/net/mvpp2.c | 1 - drivers/net/octeontx/nicvf_main.c | 2 -- drivers/usb/gadget/at91_udc.c | 1 - drivers/usb/musb-new/musb_core.c | 2 -- 4 files changed, 6 deletions(-) diff --git a/drivers/net/mvpp2.c b/drivers/net

[PATCH 0/4] list.h/treewide: get rid of no-op prefetch()

2025-05-07 Thread Rasmus Villemoes
ss diffs. The "macro argument reuse" arguments should also be ignored, as e.g. the "member" arguments are obviously always just bare identifiers, and the "pos" arguments must be assigned to multiple times. Rasmus Villemoes (4): linux/list.h: drop use of prefetch()

Re: [PATCH 0/8] membuff: Add tests and update to support a flag for empty/full

2025-03-07 Thread Rasmus Villemoes
On Wed, Mar 05 2025, Simon Glass wrote: > Hi Rasmus, > > On Tue, 4 Mar 2025 at 11:55, Rasmus Villemoes wrote: >> >> On Tue, Mar 04 2025, Simon Glass wrote: >> >> > Hi Rasmus, >> > >> > On Fri, 18 Oct 2024 at 08:55, Simon Glass wrote: >

Re: [PATCH] scripts/setlocalversion: Reinstate .scmversion support

2025-03-04 Thread Rasmus Villemoes
On Sun, Mar 02 2025, Marek Vasut wrote: > The .scmversion is used by oe-core to append U-Boot version string. > > LOCALVERSION is not fully compatible replacement as it adds trailing > "-dirty" string at the end of version string in case the U-Boot git > tree contains uncommitted changes. This be

Re: [PATCH] scripts/setlocalversion: Reinstate .scmversion support

2025-03-04 Thread Rasmus Villemoes
On Tue, Mar 04 2025, Tom Rini wrote: > On Tue, Mar 04, 2025 at 03:28:17PM +0100, Marek Vasut wrote: >> On 3/4/25 10:24 AM, Rasmus Villemoes wrote: >> > On Sun, Mar 02 2025, Marek Vasut wrote: >> > >> > > The .scmversion is used by

Re: [PATCH 0/8] membuff: Add tests and update to support a flag for empty/full

2025-03-04 Thread Rasmus Villemoes
On Tue, Mar 04 2025, Simon Glass wrote: > Hi Rasmus, > > On Fri, 18 Oct 2024 at 08:55, Simon Glass wrote: >> >> Hi Rasmus, >> >> On Fri, 18 Oct 2024 at 01:05, Rasmus Villemoes wrote: >> > >> > On tor, okt 17 2024, Simon Glass wrote: >>

[PATCH 1/4] linux/list.h: drop use of prefetch()

2025-05-07 Thread Rasmus Villemoes
nc of list.h is not really feasible, but we can synchronize the macros containing a prefetch() with their linux implementations as of v6.15-rc5, also importing the various helpers needed, e.g. list_is_head() and list_next_entry(). Signed-off-by: Rasmus Villemoes --- include/li

[PATCH 1/3] cyclic: make cyclic_unregister() idempotent

2025-05-07 Thread Rasmus Villemoes
ve to separately keep track of whether their cyclic callback is registered or not, and avoids them trying to peek into the struct cyclic_info for that information - which leads to somewhat ugly code as it would have to be guarded by ifdef CONFIG_CYCLIC. Signed-off-by: Rasmus Villemoes --- common/cyc

[PATCH 0/3] make cyclic_(un)register idempotent

2025-05-07 Thread Rasmus Villemoes
Three small patches I've been meaning to send for a while; I really believe (as I now learnt Thomas Gleixner also does) this is the way timer frameworks should behave. Rasmus Villemoes (3): cyclic: make cyclic_unregister() idempotent cyclic: make cyclic_register safe to call on al

[PATCH 2/3] cyclic: make cyclic_register safe to call on already-registered info

2025-05-07 Thread Rasmus Villemoes
ed at all. Back then, when we introduced hrtimers, we came to the conclusion that hrtimer_start() is sufficient. Signed-off-by: Rasmus Villemoes --- common/cyclic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/cyclic.c b/common/cyclic.c index 75662d9f613..ec952a01ee1 100644 --- a/

[PATCH 3/3] cyclic: document new guarantees for cyclic_(un)register

2025-05-07 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- doc/develop/cyclic.rst | 13 + 1 file changed, 13 insertions(+) diff --git a/doc/develop/cyclic.rst b/doc/develop/cyclic.rst index 6f1da6f0d9b..a99b17052f5 100644 --- a/doc/develop/cyclic.rst +++ b/doc/develop/cyclic.rst @@ -54,3 +54,16

Re: [PATCH] doc: document test command

2025-05-12 Thread Rasmus Villemoes
On Mon, May 12 2025, Quentin Schulz wrote: > Hi Rasmus, > Hi Quentin Thanks for the review. > On 5/6/25 10:54 PM, Rasmus Villemoes wrote: >> + >> +Numbers >> +~~~ >> + >> +The number comparison operators ``-lt``, ``-le``, ``-gt``, ``-gt``, >

Re: [PATCH] imx8m: soc: cope with existing optee node

2025-05-13 Thread Rasmus Villemoes
On Mon, Mar 10 2025, Vincent Stehlé wrote: > On i.MX8M SoCs, the /firmware/optee Devicetree node is created just before > booting the OS when OP-TEE is found running. If the node already exists, > this results in an error, which prevents the OS to boot: > > Could not create optee node. > ERRO

[PATCH] doc: document test command

2025-05-06 Thread Rasmus Villemoes
Add documentation for the test command, including the newly added =~ operator and some gotchas wrt. the numeric comparisons. Signed-off-by: Rasmus Villemoes --- This should be considered on top of https://lore.kernel.org/u-boot/20250506141035.385756-1-r...@prevas.dk/ , but everything other than

Re: [PATCH 01/11] cmd: test: add support for =~ operator

2025-05-06 Thread Rasmus Villemoes
On Tue, May 06 2025, Tom Rini wrote: > On Tue, May 06, 2025 at 09:07:05PM +0200, Rasmus Villemoes wrote: >> On Tue, May 06 2025, Tom Rini wrote: >> >> > On Tue, May 06, 2025 at 10:49:31AM -0600, Tom Rini wrote: >> >> On Tue, May 06, 2025 at 04:1

[PATCH v2 00/12] regex patches

2025-05-13 Thread Rasmus Villemoes
s 1-11 are unchanged from v1, other than including Simon's and Tom's R-bs. Rasmus Villemoes (12): cmd: test: add support for =~ operator slre: add myself as maintainer test: slre: add tests for regex library slre: drop wrong "anchored" optimization test: slre: add more

[PATCH v2 01/12] cmd: test: add support for =~ operator

2025-05-13 Thread Rasmus Villemoes
s set, teach the test command a new operator, =~, which will allow one to more naturally write if test "${string_to_test}" =~ '' ; then ... The =~ operator with similar functionality is also supported in bash when using its "extended" test operator [[ ]]. Re

[PATCH v2 03/12] test: slre: add tests for regex library

2025-05-13 Thread Rasmus Villemoes
Inspecting the slre.c code reveals a few bugs; those are easy to demonstrate with the new '=~' test operator. Before fixing them, let's add a place to add test cases. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- MAINTAINERS | 1 + test/lib/Makefile |

[PATCH v2 05/12] test: slre: add more test cases

2025-05-13 Thread Rasmus Villemoes
Add some tests for the "drop wrong anchored optimization". Without the previous commit, the first, fifth and seventh of these would fail, i.e. those: { "xby", "^a|b", 1}, { "", "x*$", 1}, { "yy", "x*$

[PATCH v2 08/12] slre: fix matching of escape sequence used inside character class

2025-05-13 Thread Rasmus Villemoes
d]", because DIGIT happens to be 17. Fix that by recognizing a zero byte as indicating something special and act accordingly. In order not to repeat the "increment *ofs and return 1" in all places, put those two lines after a new match: label. Reviewed-by: Simon Glass Signed-o

[PATCH v2 09/12] test: slre: add test cases for escape char in character class

2025-05-13 Thread Rasmus Villemoes
Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- test/lib/slre.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/lib/slre.c b/test/lib/slre.c index 9b41ea92f38..053d046075e 100644 --- a/test/lib/slre.c +++ b/test/lib/slre.c @@ -26,6 +26,9 @@ static const struct re_test

[PATCH v2 06/12] test: slre: add some (negative) character class tests

2025-05-13 Thread Rasmus Villemoes
Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- test/lib/slre.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/lib/slre.c b/test/lib/slre.c index b76d33475dd..9b41ea92f38 100644 --- a/test/lib/slre.c +++ b/test/lib/slre.c @@ -23,6 +23,9 @@ static const struct re_test

[PATCH v2 10/12] slre: implement support for ranges in character classes

2025-05-13 Thread Rasmus Villemoes
ger matches a literal dash, but I highly doubt anybody relies on that. Putting it first or last, or escaping it with \, as in most other RE engines, continues to work. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- lib/slre.c | 22 -- 1 file changed, 20 insert

[PATCH v2 04/12] slre: drop wrong "anchored" optimization

2025-05-13 Thread Rasmus Villemoes
branch character), that is correctly handled by the match engine by only matching when *ofs is 0. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- include/slre.h | 1 - lib/slre.c | 13 +++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/include/slre.h b/i

[PATCH v2 07/12] slre: refactor is_any_but()

2025-05-13 Thread Rasmus Villemoes
As preparation for fixing the handling of backslash-escapes used inside a character class, refactor is_any_but() to be defined in terms of is_any_of() so we don't have to repeat the same logic in two places. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- lib/slre.c

[PATCH v2 02/12] slre: add myself as maintainer

2025-05-13 Thread Rasmus Villemoes
I guess that touching these files means "tag, you're it". That's fine with me. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d62dd35a385..94c62daf834 1006

[PATCH v2 12/12] doc: document test command

2025-05-13 Thread Rasmus Villemoes
Add documentation for the test command, including the newly added =~ operator and some gotchas wrt. the numeric comparisons. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- doc/usage/cmd/setexpr.rst | 5 +- doc/usage/cmd/test.rst| 102

[PATCH v2 11/12] test: slre: add tests for character ranges

2025-05-13 Thread Rasmus Villemoes
The first of these, { "U-Boot", "^[B-Uo-t]*$", 0 }, would match previously when the - and the letters were all interpreted literally. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- test/lib/slre.c | 8 1 file changed, 8 insertions(+) diff --git a/te

[PATCH] mkimage: do a rough estimate for the size needed for hashes/signatures

2025-05-16 Thread Rasmus Villemoes
"keyid": "kernel-dev-20250218", "usagecount": 3, "maxusagecount": 10 thus allowing me to set maxusagecount correctly. Signed-off-by: Rasmus Villemoes --- tools/fit_image.c | 80 +-- 1 file chang

Re: [PATCH] mkimage: do a rough estimate for the size needed for hashes/signatures

2025-05-19 Thread Rasmus Villemoes
On Fri, May 16 2025, Simon Glass wrote: > Hi Rasmus, > > On Fri, 16 May 2025 at 14:54, Rasmus Villemoes wrote: >> >> >> While not perfect, we can give a reasonable estimate of an upper bound >> on the necessary extra size by simply counting the number of hash

Re: [PATCH 0/4] list.h/treewide: get rid of no-op prefetch()

2025-05-25 Thread Rasmus Villemoes
On Thu, May 22 2025, Tom Rini wrote: > On Wed, May 07, 2025 at 02:12:42PM +0200, Rasmus Villemoes wrote: > >> While looking through list.h, I saw that the regular list_* helpers >> (and one of the hlist_* ones) still contain the prefetch() that was >> removed in linux 14

Re: [PATCH 0/4] list.h/treewide: get rid of no-op prefetch()

2025-05-27 Thread Rasmus Villemoes
On Mon, May 26 2025, Tom Rini wrote: > On Mon, May 26, 2025 at 11:10:33PM +0200, Rasmus Villemoes wrote: >> On Sun, May 25 2025, Tom Rini wrote: >> >> > On Sun, May 25, 2025 at 10:07:56PM +0200, Rasmus Villemoes wrote: >> >> >> >> :( so we&#x

Re: [PATCH 0/4] list.h/treewide: get rid of no-op prefetch()

2025-05-26 Thread Rasmus Villemoes
On Sun, May 25 2025, Tom Rini wrote: > On Sun, May 25, 2025 at 10:07:56PM +0200, Rasmus Villemoes wrote: >> >> :( so we've been relying on that prefetch() laundering away the >> volatile. >> >> Which really begs the question: Why, exactly, is it that gd

Re: [PATCH 0/4] list.h/treewide: get rid of no-op prefetch()

2025-06-17 Thread Rasmus Villemoes
On Thu, May 22 2025, Tom Rini wrote: > On Wed, May 07, 2025 at 02:12:42PM +0200, Rasmus Villemoes wrote: > >> While looking through list.h, I saw that the regular list_* helpers >> (and one of the hlist_* ones) still contain the prefetch() that was >> removed in linux 14

Re: [PATCH 0/2] Add rpi5 specific defconfig

2025-06-18 Thread Rasmus Villemoes
On Sun, Jun 15 2025, Peter Robinson wrote: > On Tue, 6 May 2025 at 08:30, Rasmus Villemoes wrote: >> >> On Mon, May 05 2025, Tom Rini wrote: >> >> > On Mon, May 05, 2025 at 10:19:24PM +0200, Mark Kettenis wrote: >> >> > Date: Mon, 5 M

failsafe update of bootloader on am335x

2025-06-18 Thread Rasmus Villemoes
Hi, I'm looking at the am335x cpu, and have a few questions that I hope the community can answer: (1) It seems that the ROM code does not support booting from eMMC boot partitions; I can't find anything about it in the reference manual, and this ancient thread suggests that it indeed not supporte

Re: failsafe update of bootloader on am335x

2025-06-18 Thread Rasmus Villemoes
On Wed, Jun 18 2025, Tom Rini wrote: > On Wed, Jun 18, 2025 at 02:07:11PM +0200, Rasmus Villemoes wrote: >> Hi, >> >> I'm looking at the am335x cpu, and have a few questions that I hope the >> community can answer: >> >> (1) It seems that the ROM

[PATCH 02/12] powerpc: drop volatile qualifier from gd pointer

2025-06-04 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- arch/powerpc/include/asm/global_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h index cc2ce617350..26cbc7854d9 100644 --- a/arch/powerpc/include/asm

[PATCH 00/12] drop volatile from global data

2025-06-04 Thread Rasmus Villemoes
uot;docker: filesystem layer verification failed for digest sha256:379cc6cd06dc3fc80e31d5170204c0cfcc25cb3b3ad457ced23bed2b38ec9f36") Rasmus Villemoes (12): arm: drop volatile qualifier from gd pointer powerpc: drop volatile qualifier from gd pointer mips: drop volatile qualifier from gd po

[PATCH 04/12] microblaze: drop volatile qualifier from gd pointer

2025-06-04 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- arch/microblaze/include/asm/global_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/microblaze/include/asm/global_data.h b/arch/microblaze/include/asm/global_data.h index bb4112f22a3..f7922fac41c 100644 --- a/arch/microblaze

[PATCH 05/12] m68k: drop volatile qualifier from gd pointer

2025-06-04 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- arch/m68k/include/asm/global_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/m68k/include/asm/global_data.h b/arch/m68k/include/asm/global_data.h index 4ac886933c6..29b46645676 100644 --- a/arch/m68k/include/asm/global_data.h

[PATCH 06/12] m68k: drop pointless #if 0 block

2025-06-04 Thread Rasmus Villemoes
The way DECLARE_GLOBAL_DATA_PTR is used, the stuff under #if 0 can never compile as you cannot have a non-constant initializer at global scope (and one would get linker errors as well because the 'gd' symbol would be defined in multiple TUs). Signed-off-by: Rasmus Villemoes ---

<    5   6   7   8   9   10   11   >