Nolibc is useful for selftests as the test programs can be very small,
and compiled with just a kernel crosscompiler, without userspace support.
Currently nolibc is only usable with kselftest.h, not the more
convenient to use kselftest_harness.h
This series provides this compatibility by adding new
snprintf() allows limiting the output buffer, while still returning the
number of all bytes that would have been written.
Implement the limitation logic in preparation for snprintf().
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/include/nolibc/stdio.h | 16 ++--
With the addition of snprintf() and its usage in nolibc-test, the name of
the "vfprintf" test suite is not accurate anymore.
Rename the suite to be more generic.
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/testing/selftests/nolibc/nolibc-test.c | 4 ++--
1 file changed, 2
Introduce a getopt() implementation based on the one from musl.
The only deviations are adaption to the kernel coding style and nolibc
infrastructure and removal of multi-byte support.
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/include/nolibc/Makefile | 1 +
tools/inclu
With a proper snprintf() implementation in place, the ugly pipe usage is
not necessary anymore.
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/testing/selftests/nolibc/nolibc-test.c | 30 +++-
1 file changed, 3 insertions(+), 27 deletions(-)
diff --gi
nolibc's waitpid() now uses the waitid() syscall internally.
This removes the original reasoning for the reverted commit as
waitpid() is now available on all platforms and has an easier interface.
Switch back to waitpid().
This reverts commit a0bc8947ac731ff95a56e0c1737e69e8c56d5b78.
Signed-off-
The old wait4() syscall used by waitpid() before is not available everywhere.
Switch to the waitid() syscall which is the new replacement.
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/include/nolibc/sys.h | 71 ++
1 file changed,
Decouple the formatting logic from the writing logic to later enable
writing straight to a buffer in sprintf().
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/include/nolibc/stdio.h | 21 +
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/too
setpgrp() is defined to be identical to setpgid(0, 0).
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/include/nolibc/sys.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index
f52e1953020945fb2902d47ad5
riscv32 does not have any of the older poll systemcalls.
Use ppoll_time64 instead.
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/include/nolibc/sys.h | 8
1 file changed, 8 insertions(+)
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index
a5
riscv32 does not have any of the older select systemcalls.
Use pselect6_time64 instead.
poll() is also used to implement sleep().
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/include/nolibc/sys.h | 8
1 file changed, 8 insertions(+)
diff --git a/tools/include/noli
_exit() is the faster variant of exit(), skipping all cleanup actions.
As nolibc does not perform any cleanup anyways, the implementation is
trivial.
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/include/nolibc/sys.h | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(
Nolibc doesn't provide all normal header files.
Don't try to include these non-existent header files, as the symbols are
available unconditionally anyways.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/kselftest_harness.h | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-
The kselftest harness uses these functions.
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/include/nolibc/string.h| 17 +
tools/testing/selftests/nolibc/nolibc-test.c | 5 +
2 files changed, 22 insertions(+)
diff --git a/tools/include/nol
To get rid of setjmp()/longjmp(), the teardown logic needs to be usable
from __bail(). Introduce a new callback for it.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/kselftest_harness.h | 19 +--
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/tools/t
Some upcoming changes to the assertion macros need those two symbols
also to be available for tests without fixtures.
Provide them with a NULL value.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/kselftest_harness.h | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
dif
In nolibc intmax_t and uintmax_t are always the same as
(unsigned) long long/uint64_t as 128bit numbers are not supported.
Even libcs that do support 128bit numbers often fix intmax_t to 64bit
as it is used in ABIs and any change would break those.
Signed-off-by: Thomas Weißschuh
Acked-by: Willy
The printf format checking in the compiler uses the intmax types from
the compiler, not libc. This can lead to compiler errors.
Instead use the types already provided by the compiler.
Example issue with clang 19 for arm64:
nolibc-test.c:30:2: error: format specifies type 'uintmax_t' (aka 'unsign
To get rid of setjmp()/longjmp(), the teardown logic needs to be usable
from __bail(). To access the atomic teardown conditional from there,
move it into the test metadata.
This also allows the removal of "setup_completed".
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/kselftest_ha
Make the harness compatible with nolibc which does not implement signals
by replacing the signal logic with pidfds.
The code also becomes simpler.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/kselftest_harness.h | 72 ++---
1 file changed, 25 insertions(+),
The pointers to the wrappers are stored in function pointers,
preventing them from actually being inlined.
Remove the inline qualifier, aligning these wrappers with the other
functions defined through macros.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/kselftest_harness.h | 4 ++-
This field is unused and has no meaning for tests without fixtures.
Don't set it for them.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/kselftest_harness.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/kselftest_harness.h
b/tools/testing/selftests/kse
__sync_bool_compare_and_swap() is deprecated and requires libatomic on
GCC. Compiler toolchains don't necessarily have libatomic available, so
avoid this requirement by using atomics that don't need libatomic.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/kselftest_harness.h | 4 ++
All comments in this file use C89 comment style.
Except for this one. Change it to get one step closer to C89
compatibility.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/kselftest_harness.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests
For tests without fixtures the variant argument is unused.
This is intentional, prevent to compiler from complaining.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/kselftest_harness.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kselft
With -Wmissing-prototypes the compiler will warn about non-static
functions which don't have a prototype defined.
As they are not used from a different compilation unit they don't need to
be defined globally.
Avoid the issue by marking the functions static.
Signed-off-by: Thomas Weißschuh
---
t
Add a selftest for the harness itself so any changes can be validated.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/kselftest/.gitignore | 1 +
tools/testing/selftests/kselftest/Makefile | 6 +
.../testi
On 4/5/2025 5:14 AM, Sean Christopherson wrote:
Track IRQ bypass produsers and consumers using an xarray to avoid the O(2n)
produsers -> producers
insertion time associated with walking a list to check for duplicate
entries, and to search for an partner.
At low (tens or few hundreds) total
On Tue, Apr 1, 2025 at 9:57 PM Stefano Garzarella wrote:
>
> On Fri, Mar 28, 2025 at 06:02:50PM +0800, Cindy Lu wrote:
> >Add a new UAPI to configure the vhost device to use the kthread mode
>
> nit: missing . at the end
>
> >The userspace application can use IOCTL VHOST_FORK_FROM_OWNER
> >to choo
On Mon, Apr 7, 2025 at 7:07 AM Hou Tao wrote:
>
> Hi,
>
> On 4/5/2025 1:59 PM, malaya kumar rout wrote:
> > On Fri, Apr 4, 2025 at 9:22 PM Andrii Nakryiko
> > wrote:
> >> On Sun, Mar 23, 2025 at 11:43 PM Malaya Kumar Rout
> >> wrote:
> >>> Static Analyis for bench_htab_mem.c with cppcheck:error
On Tue, Apr 1, 2025 at 9:48 PM Stefano Garzarella wrote:
>
> On Fri, Mar 28, 2025 at 06:02:48PM +0800, Cindy Lu wrote:
> >Abstract vhost worker operations (create/stop/wakeup) into an ops
> >structure to prepare for kthread mode support.
> >
> >Signed-off-by: Cindy Lu
> >---
> > drivers/vhost/vho
On Tue, Apr 1, 2025 at 9:59 PM Stefano Garzarella wrote:
>
> On Fri, Mar 28, 2025 at 06:02:51PM +0800, Cindy Lu wrote:
> >The VHOST_NEW_WORKER requires the inherit_owner
> >setting to be true. So we need to add a check for this.
> >
> >Signed-off-by: Cindy Lu
> >---
> > drivers/vhost/vhost.c | 7
On Tue, Apr 1, 2025 at 9:51 PM Stefano Garzarella wrote:
>
> On Fri, Mar 28, 2025 at 06:02:49PM +0800, Cindy Lu wrote:
> >This commit restores the previously removed functions kthread
> >wake/stop/create, and use ops structure vhost_worker_ops to
> >manage worker wakeup, stop and creation. The fun
On Tue, Apr 1, 2025 at 12:04 PM Jon Kohler wrote:
>
> In handle_tx_copy, TX batching processes packets below ~PAGE_SIZE and
> batches up to 64 messages before calling sock->sendmsg.
>
> Currently, when there are no more messages on the ring to dequeue,
> handle_tx_copy re-enables kicks on the ring
On Fri, Apr 4, 2025 at 10:24 PM Jon Kohler wrote:
>
> Commit 098eadce3c62 ("vhost_net: disable zerocopy by default") disabled
> the module parameter for the handle_tx_zerocopy path back in 2019,
> nothing that many downstream distributions (e.g., RHEL7 and later) had
> already done the same.
>
> B
On 4/7/25 08:03, Xuan Zhuo wrote:
On Fri, 4 Apr 2025 16:39:03 +0700, Bui Quang Minh
wrote:
When pausing rx (e.g. set up xdp, xsk pool, rx resize), we call
napi_disable() on the receive queue's napi. In delayed refill_work, it
also calls napi_disable() on the receive queue's napi. This can lea
v3:
- Take up Johannes' suggestion of just skip the !usage case and
fix test_memcontrol selftest to fix the rests of the min/low
failures.
v4:
- Add "#ifdef CONFIG_MEMCG" directives around shrink_node_memcgs() to
avoid compilation problem with !CONFIG_MEMCG configs.
The test_memcontrol
The test_memcg_protection() function is used for the test_memcg_min and
test_memcg_low sub-tests. This function generates a set of parent/child
cgroups like:
parent: memory.min/low = 50M
child 0: memory.min/low = 75M, memory.current = 50M
child 1: memory.min/low = 25M, memory.current = 50
The test_memcontrol selftest consistently fails its test_memcg_low
sub-test due to the fact that two of its test child cgroups which
have a memmory.low of 0 or an effective memory.low of 0 still have low
events generated for them since mem_cgroup_below_low() use the ">="
operator when comparing to
Hi,
On 4/5/2025 1:59 PM, malaya kumar rout wrote:
> On Fri, Apr 4, 2025 at 9:22 PM Andrii Nakryiko
> wrote:
>> On Sun, Mar 23, 2025 at 11:43 PM Malaya Kumar Rout
>> wrote:
>>> Static Analyis for bench_htab_mem.c with cppcheck:error
>>> tools/testing/selftests/bpf/benchs/bench_htab_mem.c:284:3:
>
On Fri, 4 Apr 2025 16:39:03 +0700, Bui Quang Minh
wrote:
> When pausing rx (e.g. set up xdp, xsk pool, rx resize), we call
> napi_disable() on the receive queue's napi. In delayed refill_work, it
> also calls napi_disable() on the receive queue's napi. This can leads to
> deadlock when napi_disa
On 4/3/25 1:29 AM, Dongli Zhang wrote:
> Log write descriptors for the control queue, leveraging
> vhost_scsi_get_desc() and vhost_get_vq_desc() to retrieve the array of
> write descriptors to obtain the log buffer.
>
> For Task Management Requests, similar to the I/O queue, store the log
> buffer
On 4/3/25 1:29 AM, Dongli Zhang wrote:
> Log write descriptors for the I/O queue, leveraging vhost_scsi_get_desc()
> and vhost_get_vq_desc() to retrieve the array of write descriptors to
> obtain the log buffer.
>
> In addition, introduce a vhost-scsi specific function to log vring
> descriptors.
Hello Ivan Abramov.
On Thu, 03 Apr 2025 13:19:31 +0300, Ivan Abramov wrote:
> This series was inspired by Syzkaller report on warning in
> cfg802154_switch_netns().
>
> WARNING: CPU: 0 PID: 5837 at net/ieee802154/core.c:258
> cfg802154_switch_netns+0x3c7/0x3d0 net/ieee802154/core.c:258
> Modules
On Fri, Apr 04, 2025 at 03:48:49PM +0200, David Hildenbrand wrote:
> On 04.04.25 15:36, Halil Pasic wrote:
> > On Fri, 4 Apr 2025 12:55:09 +0200
> > David Hildenbrand wrote:
> >
> > > For virito-balloon, we should probably do the following:
> > >
> > > From 38e340c2bb53c2a7cc7c675f5dfdd44ecf77
On Sun, Apr 06, 2025 at 03:03:16PM +0200, Luca Weiss wrote:
Overall this driver feels like it's not terribly well integrated into
the subsystem - it's not using the standard framework features for
things. The code itself looks broadly fine but things need moving about
a bit to feel more like a st
On Fri, Apr 04, 2025 at 12:55:09PM +0200, David Hildenbrand wrote:
> On 04.04.25 12:00, David Hildenbrand wrote:
> > On 04.04.25 06:36, Halil Pasic wrote:
> > > On Thu, 3 Apr 2025 16:28:31 +0200
> > > David Hildenbrand wrote:
> > >
> > > > > Sorry I have to have a look at that discussion. Maybe i
On Fri, Apr 4, 2025 at 9:14 PM Masahiro Yamada wrote:
>
> On Fri, Apr 4, 2025 at 11:37 PM Uros Bizjak wrote:
> >
> > On Fri, Apr 4, 2025 at 4:06 PM Masahiro Yamada wrote:
> >
> > > > > > Current version of genksyms doesn't know anything about
> > > > > > __typeof_unqual__()
> > > > > > operator
On 06/04/2025 15:03, Luca Weiss wrote:
> Add a node for the amplifier found on Fairphone 3, receiving sound via
> I2S from the SoC and being connected to the speaker.
>
> Signed-off-by: Luca Weiss
> ---
Reviewed-by: Krzysztof Kozlowski
Best regards,
Krzysztof
;&uart_5_default>;
+ pinctrl-1 = <&uart_5_sleep>;
+ pinctrl-names = "default", "sleep";
+
+ status = "disabled";
+ };
+
i2c_5: i2c@7af5000 {
compatible = "qcom,i2c-qup-v2.2.1";
reg = <0x07af5000 0x600>;
---
base-commit: a4cda136f021ad44b8b52286aafd613030a6db5f
change-id: 20250406-msm8953-uart_5-f663eed66041
Best regards,
--
Luca Weiss
On 06/04/2025 15:03, Luca Weiss wrote:
> +static const struct i2c_device_id aw8898_id[] = {
> + { "aw8898" },
> + { /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(i2c, aw8898_id);
> +
> +static const struct of_device_id aw8898_of_match[] = {
> + { .compatible = "awinic,aw8898" },
> +
On 06/04/2025 15:03, Luca Weiss wrote:
> +description:
> + Digital IO power supply
> +
> + vdd-supply:
> +description:
> + Battery power supply
> +
> + "#sound-dai-cells":
> +const: 0
> +
> +required:
> + - compatible
> + - reg
> + - reset-gpios
Some or all of the suppli
On Fri, Mar 21, 2025 at 8:28 AM Sami Tolvanen wrote:
>
> With CONFIG_GENDWARFKSYMS, __gendwarfksyms_ptr variables are added
> to the kernel in EXPORT_SYMBOL() to ensure DWARF type information
> is available for exported symbols in the TUs where they're actually
> exported. These symbols are droppe
Add a driver for the AW8898 Audio Amplifier.
Signed-off-by: Luca Weiss
---
sound/soc/codecs/Kconfig | 10 +
sound/soc/codecs/Makefile | 1 +
sound/soc/codecs/snd-soc-aw8898.c | 583 ++
3 files changed, 594 insertions(+)
diff --git a/sound/
Add a node for the amplifier found on Fairphone 3, receiving sound via
I2S from the SoC and being connected to the speaker.
Signed-off-by: Luca Weiss
---
arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts | 20
1 file changed, 20 insertions(+)
diff --git a/arch/arm64/boot/dt
Add the bindings for the Awinic AW8898 amplifier.
Signed-off-by: Luca Weiss
---
.../devicetree/bindings/sound/awinic,aw8898.yaml | 75 ++
1 file changed, 75 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/awinic,aw8898.yaml
b/Documentation/devicetree/bi
d/soc/codecs/Kconfig | 10 +
sound/soc/codecs/Makefile | 1 +
sound/soc/codecs/snd-soc-aw8898.c | 583 +
5 files changed, 689 insertions(+)
---
base-commit: 287e43781488fd6ca5f4306dbb4f2a88c5564d79
change
On 06/04/2025 10:05, Xiangzhi Tang (唐相志) wrote:
> On Wed, 2025-04-02 at 12:31 +0200, Krzysztof Kozlowski wrote:
>> External email : Please do not click links or open attachments until
>> you have verified the sender or the content.
>>
>>
>> On 02/04/2025 11:19, Xiangzhi Tang wrote:
>>> Add support
On 06/04/2025 09:29, Xiangzhi Tang (唐相志) wrote:
> On Wed, 2025-04-02 at 13:16 +0200, Krzysztof Kozlowski wrote:
>> External email : Please do not click links or open attachments until
>> you have verified the sender or the content.
>>
Please kindly trim the replies from unnecessary context. It ma
On 06/04/2025 08:46, Xiangzhi Tang (唐相志) wrote:
> On Wed, 2025-04-02 at 13:11 +0200, Krzysztof Kozlowski wrote:
>> External email : Please do not click links or open attachments until
>> you have verified the sender or the content.
>>
>>
>> On 02/04/2025 11:19, Xiangzhi Tang wrote:
>>> +
>>> +descr
在 2025/4/4 20:18, Will Deacon 写道:
On Wed, Mar 19, 2025 at 10:59:57AM +0800, Shuai Xue wrote:
+ ARM maintainers for review.
在 2025/3/12 14:15, Shuai Xue 写道:
The pidfd_test fails on the ARM64 platform with the following error:
Bail out! pidfd_poll check for premature notification on ch
On Wed, 2025-04-02 at 12:31 +0200, Krzysztof Kozlowski wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> On 02/04/2025 11:19, Xiangzhi Tang wrote:
> > Add support MediaTek's Video Companion Processor(VCP) host driver
On Wed, 2025-04-02 at 07:55 -0500, Rob Herring (Arm) wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> On Wed, 02 Apr 2025 17:19:24 +0800, Xiangzhi Tang wrote:
> > Add the new binding document for MediaTek Video Comp
On Wed, 2025-04-02 at 13:16 +0200, Krzysztof Kozlowski wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> On 02/04/2025 11:19, Xiangzhi Tang wrote:
> > Add host driver to control the mediatek Risc-V coprocessor
> >
>
On Wed, 2025-04-02 at 08:19 -0600, Mathieu Poirier wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> On Wed, Apr 02, 2025 at 05:19:25PM +0800, Xiangzhi Tang wrote:
> > Add host driver to control the mediatek Risc-V c
65 matches
Mail list logo