Commit graph

91855 commits

Author SHA1 Message Date
Anas Nashif e10665531f spelling: add enabeld typo
add typo of enabeld.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-06 19:27:28 -05:00
Anas Nashif 5e591c38f1 kernel: do not export z_thread_priority_set
This function is only being used by a test, so instead of reimplementing
a syscall in the test, provide a Kconfig option to provide the
functionality that only works with tests and remove some of the
duplication and extra code.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-06 19:27:28 -05:00
Anas Nashif 3ca50f5060 kernel: move z_init_static_threads to where it is being used
Move out of thread and put directly in init.c where it is being used.
Also remove definition from kernel.h, this is an internal function and
should not be in a public header.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-06 19:27:28 -05:00
Anas Nashif a6ce422b10 kernel: remove cmsis-rtos layering violation
We shouldn't be calling hooks from optional and upper layer subsystems
in the kernel, instead, just call the hook to set thread status in the
API where it is needed.

This now clears related bit in cmsis thread status bitarray when
terminating a thread in the cmsis rtos v1 layer directly and not in the
kenrel code.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-06 19:27:28 -05:00
Anas Nashif 077222c975 kernel: split cpu_mask handling into own file
In an effort to cleanup sched.c, move sections of code that can be
compiled in based on options into own files. CPU mask here is managed by
a kconfig and is not widely used (SMP affinity on multicore systems).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-06 19:27:28 -05:00
Anas Nashif 6e95bdeca6 kernel: reorg Kconfigs and split them
The kernel kconfig is becoming too big and unmanageable with too many
options scattered across the file. Move some areas out and reorg main
Kconfig slightly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-06 19:27:28 -05:00
Anas Nashif 8791012ed1 kernel: move essential flag related routines out
The functions to manipulate the essential flag indeed operate on
threads, but they are misplaced in the thread implementation file. Put
them alongside other routines setting other thread flags and cleanup
headers a bit.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-06 19:27:28 -05:00
Anas Nashif 2c31db4cc8 kernel: split irq_offload ccode into own file
Move irq_offload code out of thread.c into own file. This code is not
related to threads.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-06 19:27:28 -05:00
Anas Nashif a7d74f80ce kernel: move spinlock validation to own file
Move spin_lock validation outside of thread.c into own file. This code
really has nothing to do with the thread code.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-06 19:27:28 -05:00
Stephanos Ioannidis 7df7e834d9 ci: twister: Set build job timeout to 24 hours
This commit increases the twister build job timeout from the default value
of 6 hours to 24 hours because scheduled (weekly) build runs take longer
than 6 hours to complete.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-03-06 16:42:33 -05:00
Stephanos Ioannidis cb81b295e0 tests: kernel: thread_runtime_stats: Relax precision test for QEMU
This commit relaxes the idle event statistics test precision requirement
for emulated QEMU targets because the cycle counts may be inaccurate when
the host CPU is overloaded (e.g. when running tests with twister) and a
high failure rate is observed for this test in the CI.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-03-06 16:42:33 -05:00
Stephanos Ioannidis c64d0b9ce5 testsuite: ztest: Increase ZTEST_TEST_DELAY_MS to 5000
This commit increases the default value of `ZTEST_TEST_DELAY_MS` from 3000
to 5000 milliseconds because the current value of 3000ms may not be
sufficient for the hosts with lower CPU clock frequency (e.g. new Zephyr CI
runners with cost-effective processors).

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-03-06 16:42:33 -05:00
Stephanos Ioannidis de68ea7ce0 ci: twister: Set twister timeout multiplier to 2
This commit sets the twister timeout multiplier to 2, which effectively
increases the default test timeout from 60 to 120 seconds, because the new
cost-effective Zephyr runners may take longer to execute tests and the
default timeout is not sufficient for some tests to complete.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-03-06 16:42:33 -05:00
Stephanos Ioannidis 527435d642 ci: twister: Prioritise remote Redis cache storage
This commit updates the twister workflow such that ccache only uses remote
Redis cache storage when available.

The purpose of this to reduce the individual runner local disk IOPS
requirement; thereby, reducing the overall load on the SAN.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-03-06 16:42:33 -05:00
Stephanos Ioannidis d3f9f391ad ci: twister: Add --specs to ccache ignore option list
This commit adds the compiler `--specs=*` flag to the ccache ignore option
list because ccache is unable to resolve the toolchain-provided specs file
path and will consider source files to be uncacheable if it is unable to
read the specified specs file.

Note that adding `--specs=*` to the ignore option list is not a problem
because it is unlikely for the content of the toolchain libc spec file to
change without the compiler executable itself changing.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-03-06 16:42:33 -05:00
Stephanos Ioannidis 3823f1f0db ci: twister: Use Redis remote storage for ccache
This commit updates the twister workflow to, when available, use Redis
remote storage backend for the ccache compilation cache data.

The Redis cache server is hosted in the Kubernetes cluster in which the
zephyr-runner pods run -- the Redis remote storage backend will be ignored
if the server is unavailable.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-03-06 16:42:33 -05:00
Stephanos Ioannidis 1be3aacad3 ci: twister: Store ccache data in node cache
This commit updates the twister workflow to store ccache data in the
zephyr-runner v2 node cache.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-03-06 16:42:33 -05:00
Stephanos Ioannidis 9a9bebb9f9 ci: twister: Print cloud service information
This commit updates the twister workflow jobs that run on the zephyr-runner
v2 to print the underlying cloud service information in the logs to help
trace and debug potential runner issues.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-03-06 16:42:33 -05:00
Stephanos Ioannidis 7c19bc70bf ci: twister: Use zephyr-runner v2
This commit updates the twister workflow to use the new zephyr-runner v2 CI
runner deployment.

It also updates the workflow to use the `ci-repo-cache` Docker image, which
includes the Zephyr repository cache, because the node level repository
cache is no longer available in the zephyr-runner v2.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-03-06 16:42:33 -05:00
Pieter De Gendt 0db120abd4 net: lib: shell: iface: Fix when building ethernet without IP support
The count stack variable is also used when CONFIG_NET_L2_ETHERNET_MGMT is
enabled. Make sure it is available.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-06 15:23:52 -06:00
Henrik Brix Andersen 7987d802e3 doc: releases: release-notes: 3.7: mention automatic CAN sample points
Add a note on the extended support for automatic CAN sample point location.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-06 15:23:13 -06:00
Henrik Brix Andersen 49653d39dd drivers: can: extend support for automatic sample point location
Extend support for automatic sample point location to also cover
can_calc_timing() and can_calc_timing_data().

Previously, automatic sample point location was only supported by
can_set_bitrate() and can_set_bitrate_data().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-06 15:23:13 -06:00
Anas Nashif b2cfdc41d2 MAINTAINERS: add xtensa tests to area
Add xtensa arch tests to respective area.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-06 15:30:08 -05:00
Anas Nashif c6a01e7342 tests: xtensa: fix test identifier
start with arch.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-06 15:30:08 -05:00
Armin Brauns 5f844f5252 include: disk.h: make name field in struct disk_info const
This isn't modified anywhere, which is good, because it is typically
initialized with a string literal, which would likely blow up if you tried.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-03-06 21:29:11 +01:00
Robert Lubos a487addc61 sys: Include sys/util.h header in sys/atomic.h
Commit a1358aaedf introduced ROUND_UP
macro use within sys/atomic.h header, but did not include the header
(sys/util.h) which actually defines the macro. This commit fixes it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-03-06 12:51:52 -05:00
Jukka Rissanen 47db2e050e doc: migration-guide-3.7: Add IPv4 netmask information
The IPv4 netmask handling is changed and it might need
adjustments from user if using more than one IPv4 address
inside one specific network interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-06 15:59:22 +00:00
Ivan Iushkov 8f458bb51f modules: crypto: update tinycrypt revision
update tinycrypt revision to fix
warnings reported by ubsan

Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
2024-03-06 15:58:59 +00:00
Fin Maaß abdfc4b1fe logging: support using real time as timestamp
Adds a option to use real time from posix instant
of the system uptime as the logging timestamp.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-03-06 15:58:43 +00:00
TOKITA Hiroshi c00bd4a8d5 boards: arm: rpi_pico: Add default serial for connector definition
Add `pico_serial` which is alias of `uart0` as a definition
related to pico_header.
The uart0(GP0 and GP1)  is shown as default serial port
in pinout diaglam.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-03-06 15:58:29 +00:00
Dawid Niedzwiecki 4d97dcf115 ec_host_cmd: introduce Host Command state
Introduce a current state of Host Command subsystem.

It makes sures that a backend has been initilized and doesn't allow
sending a response twice. There is a possibility, that a command handler
that calls ec_host_cmd_send_response function returns anyway (which is a
mistake).

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-03-06 14:35:34 +01:00
Armin Brauns 99fd397147 scripts/check_compliance: pass --no-ext-diff to git diff
If $GIT_EXTERNAL_DIFF is set, this difftool is used instead of the default
internal unified diff, which breaks the Checkpatch check.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-03-06 14:34:22 +01:00
Henrik Brix Andersen 68f4f12c1b drivers: can: respect minimum supported prescaler value
Respect the minimum supported prescaler value when calculating CAN timing.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-06 14:18:08 +01:00
Henrik Brix Andersen 5e1ce7e0f7 drivers: can: minor improvements to internal timing calculation code
Improve the internal CAN timing calculation code readability by unifying
variable and function naming, avoiding unnecessary casting, and rewording
comments.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-06 14:18:08 +01:00
Ederson de Souza 4440d6a189 kernel/userspace: Fix dynamic thread stack allocation at userspace
It wasn't saving adjusted stack size at either the private stack or the
k_object, thus failing subsequent checks.

Test added to check for this case and prevent regressions.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-03-06 14:17:53 +01:00
TOKITA Hiroshi 7e78df8c40 samples: drivers: led_ws2812: Rename boards files to follow hwmv2
The esp32s3_devkitm and the nrf5340dk_nrf5340 only have ws2812 in
each configurations that is procpu and cpuapp respectively.
Rename overlay and conf files to avoid building with unnecessary
configurations.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-03-06 14:17:27 +01:00
TOKITA Hiroshi 0f458c9564 drivers: led_strip: ws2812_rpi_pico_pio: Change output-pin to gpios
For sharing pin definition property with `worldsemi,ws2812-gpio`,
rename `output-pin` to `gpios`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-03-06 14:17:27 +01:00
TOKITA Hiroshi 0702f0eb45 drivers: led_strip: ws2812_gpio: Rename in-gpios property to gpios
ws2812-gpio's `in-gpios` property is not used as an input pin.
Renaming it to `gpios` to reflect the actual situation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-03-06 14:17:27 +01:00
Fabio Baltieri 8b9464089c input: add a pmw3610 driver
Add a driver for the Pixart PMW3610 mouse sensor device.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-06 13:34:16 +01:00
Jukka Rissanen 1d96454dc7 tests: net: dns: Fix the tests to check the exponential backoff
Make sure that we do needed number of exponential backoff queries
if configured so.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-06 13:33:50 +01:00
Jukka Rissanen 5be84131d6 net: dns: Split long resolving to smaller pieces
If getaddrinfo() is called with a long DNS timeout, then split
the timeout to smaller pieces with exponential backoff. Reason
for this is that if a DNS query is lost, then we do not need
to wait for a long time to find it out.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-06 13:33:50 +01:00
Florian La Roche 0d5a670f4f lib/os/printk.c: use ARG_UNUSED() for char_out()
Use ARG_UNUSED() within the function char_out()
to handel unused param.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2024-03-06 12:11:26 +01:00
Joakim Andersson ad58b39f41 logging: Add option to not generate dictionary database always
Add option to not generate the logging dictionary database when the
zephyr finale image is created. Instead this database can be created
by its own build target.
This reduces the build time during debugging as the database file is not
required as part of the debugging.

Fix build byproducts not listing the output file.
Add comment so users know which command is executing as this command
can take a long time.

Signed-off-by: Joakim Andersson <joakim.andersson@heimdallpower.com>
2024-03-06 10:38:37 +00:00
Martin Kiepfer 61934bb6d6 boards: m5stack_core2: Add possibility to control 5V_BUS signal
This commit fixes #67277 and hence adds possibility
to properly utilize grove extension port.

5V_BUS can be enabled via regulator bus_5v. By default this
regulator is disabled.

Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
2024-03-06 10:23:31 +00:00
Martin Kiepfer a060c48cb0 doc: boards: m5stack_core2 documentation updates
Minor corrections and updates on current development states

Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
2024-03-06 10:23:31 +00:00
Martin Kiepfer 0addb90ff7 drivers: mfd: axp192: add possibility to disable N_VBUSEN functionality
By default N_VBUSEN signal is used by the host to define if VBUS
signal should be used for power supply (VBUS-IPSOUT).

This feature enables the possbibility to change this behaviour.
When N_VBUSEN detection is disabled, axp192 will automatically
decide to use VBUS (REG10H[7] = 1).
Please refer to datasheet for details.

Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
2024-03-06 10:23:31 +00:00
Martin Kiepfer 2a83c58023 drivers: gpio: axp192: Add support to control EXTEN pin
AXP192 features an EXTEN pin that is on output only.

This commit appends control of EXTEN pin to gpio functionality
of AXP192.
Port-Mapping is as follows:
- [0..4]: GPIO0..4
- [5]: EXTEN

Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
2024-03-06 10:23:31 +00:00
Martin Kiepfer 1a94b0ab24 drivers: regulator: axp192: Bugfix to control DCDC2 output
Fix wrong definition of DCDC2 register values.

Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
2024-03-06 10:23:31 +00:00
TOKITA Hiroshi 6bcf73ff14 boards: espressif: esp32s3_devkitm: Correct filename typo
boards/espressif/esp32s3_devkitm/esp32s3_devkitm_esp32s3_procpu_.yaml
has needless `_` in filename.

Renamed it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-03-06 10:22:23 +00:00
Omkar Kulkarni 0483d68334 Bluetooth: Mesh: Add missing model extensions
DFD Server, DFU Server, and DFU Client models are extended models
that extend other underlaying models. If BT_MESH_MODEL_EXTENSIONS
is not enabled, extension hierarchy is not initialized and this
results in issues in subscriptions and errors in representation
of hierarchy in CDP1. Since extensions are spec defined, force
selection of this option here to prevent users forgetting about it.

Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
2024-03-06 10:21:59 +00:00