profile
viewpoint
Flávio Vinicius Alvares Ceolin ceolin Intel Portland-OR

zephyrproject-rtos/mbedtls 2

mbedtls module for Zephyr, this is not a mirror of the official mbedtls repository.

ceolin/free-programming-books 0

:books: Freely available programming books

ceolin/gcr 0

gcr

ceolin/go-soletta 0

Go bindings for Soletta library

ceolin/go-soletta-1 0

Go language bindings for Soletta Project

ceolin/linux 0

Spotify's Linux kernel for Debian-based systems

ceolin/lwan 0

Experimental, scalable, high performance HTTP server

ceolin/mbedtls 0

mbedtls module for Zephyr, this is not a mirror of the official mbedtls repository.

push eventceolin/zephyr

Jedrzej Ciupis

commit sha 5e93790dae90bee28ba98773fe5de161eeb887d9

modules: nordic: various 802.15.4 fixes Update hal_nordic revision to include latest nRF 802.15.4 fixes. Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>

view details

Watson Zeng

commit sha 2354f055ec41fa49f8fde5f5ffca0f84313b7544

toolchain: arcmwdt: add compile options: -Wno-typedef-redefinition Without the -Wno-typedef-redefinition option, arcmwdt (clang based) complains if a typedef gets redefined in gnu99 mode (since this is officially a C11 feature). While new versions of GCC do not seem to issue this warning in gnu99 mode anymore. So some existing code with typedef redefined which works well with GCC will issue this warning. As this warning is not fatal, so simply shut it off for good. Signed-off-by: Watson Zeng <zhiwei@synopsys.com>

view details

Ioannis Glaropoulos

commit sha 64ecac692cad99c553a6377ed56100c47763384b

modules: trusted-firmware-m: update default RSA keys Update the default paths to private keys used for signing the Secure and the Non-Secure firmware, when building Zephyr together with TF-M. The update is done to match the default configuration in the upstream TF-M project. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

view details

Ioannis Glaropoulos

commit sha c9fd62a2eae938a8c2df7757cd831e1d4f9ba9d9

boards: arm: update board definitions due to new TF-M build system TF-M related information in the relevant board definitions needs to be updated in the wake of the new TF-M Build system. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

view details

Ioannis Glaropoulos

commit sha 310999da5b6c84f7842c7d797c68da96ebb72f01

boards: arm: update tfm post-build scripts after upmerge Update the TF-M post-build scripts in the relevant ARM platforms in the wake of updating TF-M to the latest upstream. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

view details

Ioannis Glaropoulos

commit sha e2dc8982beeeca22aff07db6447d8376dce476b5

boards: arm: Add support for TF-M in nRF5340 PDK Adding support for TF-M in the Nordic nRF5340 Application MCU. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

view details

Ioannis Glaropoulos

commit sha eea78b1ea919c7c28dbdfda6ca2c16470c725b8e

boards: arm: Add support for TF-M in nRF9160 DK Adding support for TF-M in the Nordic nRF9160 DK. Allow the TF-M integration samples to be built and executed for nRF9160 DK. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

view details

Ioannis Glaropoulos

commit sha a152e82f4a23ddac95660a661751c213dafd5ba8

boards: arm: add documentation for integrating TF-M on nRF platforms Add the required documentation extensions for the nRF5340 and the nRF9160 DKs that explains how to build and run Zephyr with TF-M as the Secure firmware image counterpart. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

view details

Ioannis Glaropoulos

commit sha 49c56b4071a994074d6d00e74193c763dba7e45c

boards: nucleo_l552ze_q_ns: pass compiler name to the post-build script Pass the compiler name and path to the TF-M post-build script as an argument, so the TF-M build can work with the Zephyr SDK as well (not only with the GNU ARM embedded toolchain.) Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

view details

Ioannis Glaropoulos

commit sha d3a8aba3dd3f801d9956100a64bc10db723306fb

CODEOWNERS: add code owners for the TF-M integration samples Adding code owners for the TF-M integration samples. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

view details

Ioannis Glaropoulos

commit sha 53c7c42ccaba98c4671af3534cd9ece06d605c6a

manifest: update trusted-firmware-m to latest revision Update manifest file for tf-m to get the latest revision in Zephyr. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

view details

Ioannis Glaropoulos

commit sha 7e82dba13060b7b61a182d48e647eda092fb49ea

samples: tfm_integration: adapt CMakeLists.txt to new TF-M build system Changes required in TF-M integration samples CMakeLists.txt files due to the new upstream TF-M build system. In brief, configuration related to PSA API (IPC), Regression, and Isolation level needs to be passed, now, directly, not via invoking a given TF-M CMake configuration. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

view details

Ioannis Glaropoulos

commit sha 5e4902d505b8a37e5e73dcafa3ac167261bdb837

samples: tfm_integration: tfm_ipc: adapt nucleo_l552ze_q_ns overlay This commit adapts the DTS overlay for nucleo_l552ze_q_ns board, to comply with the changes applied in the flash layout of the TF-M build. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

view details

Ioannis Glaropoulos

commit sha a814f47c0cc7582a6dc414897f357fd9ab5a7d95

samples: tfm_integration: fix build & flash guides for all platforms Add documentation on how to build and run the TF-M integration samples on nRF platforms. The arm-none-eabi-gcc does not need to be on the PATH anymore for building and running the tfm_ipc sample on nucleo so remove the note from the sample docs. Fix some paths for TFM binaries for the LPC board as well. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

view details

Ioannis Glaropoulos

commit sha 4ea11f80e9242269f119d26b94cc76e5df858dd1

.buildkite: temporary fix to manually install imgtool Force CI to manually install imgtool, which is needed for sanitycheck to build and run the TF-M integration samples with MCUboot (where MCUboot is built from the TF-M external project). Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

view details

Ioannis Glaropoulos

commit sha 7fdea78d7567d17e1dcb4c2e2d320ca225cb48f5

samples: tfm_integration: fix requirements for building TFM binaries In the samples' documentation we update the requirements for building TF-M binaries according to the latest upstream TF-M documentation. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

view details

Ioannis Glaropoulos

commit sha a19fbca4aab47def7da6cb1e4a77bf17e8735311

samples: tfm_integration: psa_level_1: fix sample name in .yaml Fix the name of the sample in the .yaml file so it matches the sample directory, and does not collide with tfm_ipc. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

view details

Ioannis Glaropoulos

commit sha 966015f503d1438c25d59793762495452be5ebbc

samples: tfm_integration: tfm_ipc: add nucleo_l552ze_q_ns to the list Add nucleo_l552ze_q_ns board to the allowed list of platforms for the tfm_ipc sample. This allows the sample to be built for the nucleo_l552ze_q_ns platform by sanity check. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>

view details

Mikkel Jakobsen

commit sha 8f2d69c4a3e24f4afcef7737cc31d17155a97122

arch: posix: add missing include for cpuhalt.c Add posix_board_if.h which declares posix_exit(). This fixes implicit declaration of function errors when running sanitycheck on samples for native_posix that calls sys_reboot(). Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@prevas.dk>

view details

Joakim Andersson

commit sha d1e58021672acd42fa7ab07954dfd5d9fce07dd8

Bluetooth: kconfig: Remove the range on BT_RX_STACK_SIZE Remove the range on the setting the bluetooth BT_RX_STACK_SIZE. This range prevents setting the RX stack size lower than 1024, which depending on the application is too high. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>

view details

push time in 6 hours

issue commentzephyrproject-rtos/zephyr

mec15xxevb_assy6853:running samples/boards/mec15xxevb_assy6853/power_management Sleep entry latency is higher than expected

@maksimmasalski regarding @nashif question, what is the latency issue here ? Is there any time constraint that this test is not achieving because of pm ?

maksimmasalski

comment created time in 7 hours

Pull request review commentzephyrproject-rtos/zephyr

kernel: sched: Use k_ticks_t in z_tick_sleep

 static inline void z_vrfy_k_yield(void) #include <syscalls/k_yield_mrsh.c> #endif -static int32_t z_tick_sleep(int32_t ticks)+static int32_t z_tick_sleep(k_ticks_t ticks) { #ifdef CONFIG_MULTITHREADING 	uint32_t expected_wakeup_time;  	__ASSERT(!arch_is_in_isr(), ""); -	LOG_DBG("thread %p for %d ticks", _current, ticks);+#ifdef CONFIG_TIMEOUT_64BIT+	LOG_DBG("thread %p for %" PRId64 " ticks", _current, ticks);

Thanks ! Just logging it conditionally now.

ceolin

comment created time in a day

PullRequestReviewEvent

push eventceolin/zephyr

Flavio Ceolin

commit sha 43d1742401b92df240a9b4899240228d5b3dc0fd

kernel: sched: Use k_ticks_t in z_tick_sleep z_tick_sleep was using int32_t what could cause a possible overflow when converting from k_ticks_t. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

push time in a day

Pull request review commentzephyrproject-rtos/zephyr

kernel: sched: Use k_ticks_t in z_tick_sleep

 static inline void z_vrfy_k_yield(void) #include <syscalls/k_yield_mrsh.c> #endif -static int32_t z_tick_sleep(int32_t ticks)+static int32_t z_tick_sleep(k_ticks_t ticks) { #ifdef CONFIG_MULTITHREADING 	uint32_t expected_wakeup_time;  	__ASSERT(!arch_is_in_isr(), ""); -	LOG_DBG("thread %p for %d ticks", _current, ticks);+#ifdef CONFIG_TIMEOUT_64BIT+	LOG_DBG("thread %p for %" PRId64 " ticks", _current, ticks);

Sorry the whole logging subsystem does not support 64 bit or the problem is xtensa specific ? AFAIU the problem is in xtensa SDK, PRI*64 is not being properly defined there. If that is the case I think is fine just exclude the platform from the test. This problem is being addressed in the next SDK release AFAIK.

ceolin

comment created time in a day

PullRequestReviewEvent

push eventceolin/zephyr

Flavio Ceolin

commit sha 37f457b0d48efde385ed31789c95c325f676916a

tests: application_development: Exclude qemu_xtensa Exclude qemu_xtensa from tests/application_development/libcxx The SDK for this platform does not properly handle PRI*64 macros. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

push time in 2 days

pull request commentzephyrproject-rtos/zephyr

pm: Add power management states definition

I thought that this was the outcome of that discussion. I saw your comment about having 1:1 with ACPI, but didn't see any agreement around it.

I didn't see anybody object. The only documentation I know of for the architecture is @nashif's powerpoint presentation which uses the ACPI S and D states.

I see a trade-off here between clarity and granularity, also how many embedded platforms follow ACPI name convention ?

I do think it makes sense to define Zephyr's behavior in terms of a well-defined and understood architecture such as ACPI. Even if the names aren't used for some reason, the description of the Zephyr-only terms should at least have some relation to existing standards,

Lets make it clear, you are proposing we to use ACPI states ? G0-3, S1-6 ... ? I don't have a strong argument against it, just that this seems more desktop/laptop orientated and even linux does not fully follow it, my main concern is that this granularity is not necessary for 99% of our targets, but I see the value of following a standard and having the power to cover that 1% At this point, I want to have a consensus around it and move forward. Are you proposing 1:1 with ACPI ?

ceolin

comment created time in 2 days

pull request commentzephyrproject-rtos/zephyr

pm: Add power management states definition

In #24228 we were discussing the names; are we going to continue to use Zephyr-specific terminology? I'd hoped we could come closer to using ACPI terminology for system and device power.

I thought that this was the outcome of that discussion. I saw your comment about having 1:1 with ACPI, but didn't see any agreement around it. Do we have this granularity need ? I see a trade-off here between clarity and granularity, also how many embedded platforms follow ACPI name convention ? TI CC1352 does not, at least.

btw, I should have mentioned, but these are only the system states, I'll send later devices power states.

ceolin

comment created time in 2 days

pull request commentzephyrproject-rtos/zephyr

pm: Add power management states definition

In #24228 we were discussing the names; are we going to continue to use Zephyr-specific terminology? I'd hoped we could come closer to using ACPI terminology for system and device power.

I thought that this was the outcome of that discussion. I saw your comment about having 1:1 with ACPI, but didn't see any agreement around it. Do we have this granularity need ? I see a trade-off here between clarity and granularity, also how many embedded platforms follow ACPI name convention ? TI CC1352 does not, at least.

ceolin

comment created time in 2 days

push eventceolin/zephyr

Flavio Ceolin

commit sha c3c8ff891578f2f0b2962e2dca085c3f6f413b16

pm: Add power management states definition Add definition power management states, these states were inspired by ACPI specification. This commit is part of the following pr https://github.com/zephyrproject-rtos/zephyr/pull/27315 from Wentong. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

push time in 2 days

pull request commentzephyrproject-rtos/zephyr

pm: Add power management states definition

This is part of #27315 There is another pending commit replacing the usage of old states with the ones introduced here, but I'm holding it to avoid a huge clash with #29410

ceolin

comment created time in 5 days

PR opened zephyrproject-rtos/zephyr

Reviewers
pm: Add power management states definition

Add definition power management states, these states were inspired by ACPI specification. This commit is part of the following pr https://github.com/zephyrproject-rtos/zephyr/pull/27315 from Wentong.

Signed-off-by: Flavio Ceolin flavio.ceolin@intel.com

+104 -0

0 comment

2 changed files

pr created time in 5 days

create barnchceolin/zephyr

branch : pm/power-states

created branch time in 5 days

pull request commentzephyrproject-rtos/zephyr

Power Management: Namespace cleanups

looks good to me, only few comments

nashif

comment created time in 6 days

Pull request review commentzephyrproject-rtos/zephyr

Power Management: Namespace cleanups

 void __attribute__((weak)) pm_system_resume_from_deep_sleep(void)  * @return N/A  */ #if !SMP_FALLBACK-static void set_kernel_idle_time_in_ticks(int32_t ticks)+static void _set_kernel_idle_time_in_ticks(int32_t ticks) {

This commit is not necessary since you get rid of this function later.

nashif

comment created time in 6 days

PullRequestReviewEvent

Pull request review commentzephyrproject-rtos/zephyr

Power Management: Namespace cleanups

+/*+ * Copyright (c) 2018,2020 Intel Corporation.+ *+ * SPDX-License-Identifier: Apache-2.0+ */++#ifndef _ZEPHYR_SUBSYS_POWER_DEBUG_H_+#define _ZEPHYR_SUBSYS_POWER_DEBUG_H_+#include <zephyr.h>+#include <kernel.h>++#ifdef CONFIG_PM_DEBUG++struct pm_debug_info {+	uint32_t count;+	uint32_t last_res;+	uint32_t total_res;+};++static struct pm_debug_info pm_dbg_info[POWER_STATE_MAX];+static uint32_t timer_start, timer_end;

every file including this header will have its own copy of these variables. Shouldn't it be declared in C file and referenced as extern in the functions here ?

nashif

comment created time in 6 days

PullRequestReviewEvent

issue closedzephyrproject-rtos/zephyr

x86_64 doesn't seem to be handling spurious interrupts properly

Describe the bug

The last issue was that there is apparently stray interrupt being signaled by... something, somewhere between OS entry and when we try to swap to main (which enables interrupts). It turns out x86_64 doesn't have a spurious interrupt handler, so on interrupt it just jumps to NULL.

This shouldn't be happening, we ought to be getting a fatal error with reason K_ERR_SPURIOUS_IRQ.

Need to check x86_64's code path on spurious interrupts.

closed time in 6 days

andrewboie

issue commentzephyrproject-rtos/zephyr

x86_64 doesn't seem to be handling spurious interrupts properly

Commit c7d76cbe5844fb96823ae6467d8f10a8d3593cc1 installed a spurious handlers that triggers a fatal error with K_ERR_SPURIOUS_IRQ just like in others platforms. This commit was done after this pr be opened.

andrewboie

comment created time in 6 days

push eventceolin/zephyr

Flavio Ceolin

commit sha f9656fcd5f5e8c7ccbd2a22160d2af8522b20104

kernel: sched: Use k_ticks_t in z_tick_sleep z_tick_sleep was using int32_t what could cause a possible overflow when converting from k_ticks_t. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

push time in 7 days

Pull request review commentzephyrproject-rtos/zephyr

kernel: sched: Use k_ticks_t in z_tick_sleep

 static int32_t z_tick_sleep(int32_t ticks) 	timeout = Z_TIMEOUT_TICKS(ticks); #else 	ticks += _TICK_ALIGN;-	timeout = (k_ticks_t) ticks;+	timeout = ticks;

yep, I missed that we had it to legacy api, just changing it. Thanks for pointing it out.

ceolin

comment created time in 7 days

PullRequestReviewEvent

push eventceolin/zephyr

Mikkel Jakobsen

commit sha 8f2d69c4a3e24f4afcef7737cc31d17155a97122

arch: posix: add missing include for cpuhalt.c Add posix_board_if.h which declares posix_exit(). This fixes implicit declaration of function errors when running sanitycheck on samples for native_posix that calls sys_reboot(). Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@prevas.dk>

view details

Joakim Andersson

commit sha d1e58021672acd42fa7ab07954dfd5d9fce07dd8

Bluetooth: kconfig: Remove the range on BT_RX_STACK_SIZE Remove the range on the setting the bluetooth BT_RX_STACK_SIZE. This range prevents setting the RX stack size lower than 1024, which depending on the application is too high. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>

view details

Jukka Rissanen

commit sha 25b924e45b29fd428fa5f1985b08db2b04467924

net: conn_mgr: Change the name of the handler thread The name of the connection manager thread (conn_mgr_thread) was unnecessarily long in "kernel stacks" command. So make the name to "conn_mgr" which fits nicely to the output of that command. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>

view details

Jukka Rissanen

commit sha 00f0d5729a23e396dd11f7bc7c17c12069f9662f

net: tc: Make thread name unique If there are more than one RX or TX threads, then make the name of each of them unique so that it is easier to figure them out in "kernel stacks" command. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>

view details

Øyvind Rønningstad

commit sha 22eb8f496ae83cee93108a6ef8478a0a238b5d03

nrf53: soc.c: Replace bespoke nrf53_has_erratum19() with MDK variant Use nrf53_errata_19() from nrf_erratas.h, which is more robust Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>

view details

Nicholas Lowell

commit sha c0d156cf73ab89f6f74acb906abd92779b50155f

driver: gpio: proper Kconfig shell dependency make gpio shell depend on main shell to prevent misconfigurations Signed-off-by: Nicholas Lowell <nlowell@lexmark.com>

view details

Kumar Gala

commit sha 037e1274d040d0167695aead4b095329a59fa565

sanitycheck: qualify device testing output If --device-testing and --build-only are specified surpress some board related output Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

view details

Kumar Gala

commit sha 1285c1f80a26c15977433e8c8e3298eacb413e5c

sanitycheck: make artifact cleanup for device-testing usable If we specify --device-testing and -M make it so that the resulting artifacts are usable to run with device-testing again. This means keeping around the zephyr binary images (zephyr.{bin, hex, elf}) and a few files so 'west' can function for flashing (CMakeCache.txt and zephyr/runners.yaml). Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

view details

Kumar Gala

commit sha b2c07e439e3321e8c203106faebf783374cae845

sanitycheck: sanitize paths for device testing artifacts To make the artifacts we keep around for --device-testing -M re-usable we need to sanitize any aboslute build paths that might exist in CMakeCache.txt or zephyr/runners.yaml. This allows us to build the tests to run on one CI system and run the tests on another system that has the board(s) connected to it. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>

view details

Marcin Niestroj

commit sha 2e648d4872a27daeb9b4fb1585b22ac0e813f87e

drivers: wifi: esp: rename wifi-reset-gpios to reset-gpios Most DT bindings use reset-gpios name when there is a pin to reset whole chip. Rename wifi-reset-gpios to reset-gpios to be more consistent between various drivers. Additionally this prevents confusion, as somebody might think that this pin resets only WiFi, which is not true. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>

view details

Marcin Niestroj

commit sha 668cbe19a34e38d72526efee7a726123dc39b2e3

drivers: wifi: esp: support power-gpios to enable ESP module Add power-gpios device-tree binding property to power on module before communicating with it. This pin is called CHIP_PU in case of ESP32{,-S2} and CHIP_EN in case of ESP8266. Dedicated reset pin is available only on the latter, however Espressif recommends (in ESP8266 Hardware Design Guidelines) to use CHIP_EN instead. Follow those recommendations and use power-gpios to reset chip if that is provided over device-tree. Configure power-gpios and reset-gpios as inactive by default, so that chip becomes ready after executing esp_reset() function, either if one or both are provided over device-tree. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>

view details

Damian Krolik

commit sha 62a5179b7b54c904d4d4016f6ee9b9cd80307204

openthread: add openthread_api_mutex_try_lock() Existing openthread_api_mutex_lock()/unlock() functions are crucial to assure thread safety of an application which needs to use OT API directly, but some applications may also require a non-blocking version of the former for less critical OT-related tasks. Add openthread_api_mutex_try_lock() which never waits and exits immediately if the mutex is held by another thread. Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>

view details

Erwan Gouriou

commit sha 0143b5e3dee8722e2a2690cb0545606d41335824

drivers/pinctrl: stm32f1: Provide a function which centralize remap Centralize AFIO remapping into one single function. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>

view details

Erwan Gouriou

commit sha f44e931b0c8086b5b465fc4f37f54daed4f5698a

drivers/pinmux: stm32: Get remap functions visible across family Move pinctrl remap functions out of stm32f1 definition in order to get it available to all series. Allows use of more IS_ENABLED macros in calling drivers and make code more readable. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>

view details

Erwan Gouriou

commit sha 0b9c584ec15433f6941ebb133bfeea1db39e5df3

drivers/pinmux: stm32: Provide unique API to stm32_dt_pinctrl Set stm32_dt_pinctrl_configure function as the unique entry point to STM32 DT pinctrl management. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>

view details

Erwan Gouriou

commit sha fa190589a98e5133b2c3fabd93e40c998f7b5678

drivers/pinmux: stm32: remap code should be guarded under node status CAN remaps were guarded by CMSIS defines which are always defined for a given SoC. Though under this control, we're using DT_ macros that expect a certain node to be available, which otherwise leads to cmopilation issue. Align CAN node remap code on other peripherals code and check for node availability. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>

view details

Erwan Gouriou

commit sha 84d22110571ccc3968f749d5c2835ae40b21d32e

drivers/pinmux: stm32f1: Revise timers possible remap values Only pinctrl for tim2 can have a REMAP_FULL value. Usual value is REMAP_1. Fix this Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>

view details

Gerard Marull-Paretas

commit sha de8134a42ef812b772fbd34ae85b4e6eb30bc454

drivers: pwm: stm32: fix timer instance access The parameters of the associated PWM timer were not being picked up properly, as it was assumed that parent index is the same as the child index. This is not necessarily true if other timer nodes are active and not being used for PWM. Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>

view details

Emil Obalski

commit sha 09ad74b418fe62df13ca51d1e2d178d49a34ddad

usb: hci: Update Log messages. Align debug messages to other classes in the tree (CDC/HID). Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>

view details

Emil Obalski

commit sha 55bd049ed0bbbc10b92b78d2946674b60643957a

usb: hci: Restart USB transfers after resuming from suspend. USB bus might be suspended to save power. After the device is Resumed from Suspended state there is a need to restart OUT transfers for Endpoints used by HCI class. The transfers shall be restarted only if the device was Resumed after Suspend from Configured state. This patch applies the fix. Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>

view details

push time in 8 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentzephyrproject-rtos/zephyr

PM - Get rid of some weak functions

 extern unsigned char sys_pm_idle_exit_notify;  * @{  */ +/**+ * Power managment notifier struct+ *+ * This struct contains callbacks that are called when the target enters and+ * exits power states.+ */+struct pm_notifier {+	/**+	 * Application defined function for doing any target specific operations+	 * for power state entry.+	 */+	void (*state_entry)(enum power_states state);+	/**+	 * Application defined function for doing any target specific operations+	 * for power state exit.+	 */+	void (*state_exit)(enum power_states state);+};++/**+ * @brief Statically define a power management notifier.+ *+ * Define a power managment notifier.+ *+ * @param name Name of the pm_notifier variable.+ * @param entry_fn Function to be called when platform enters a power state+ * @param exit_fn  Function to be called when platform exits a power state+ */+#define PM_NOTIFIER_DEFINE(name, entry_fn, exit_fn)		\+	static Z_STRUCT_SECTION_ITERABLE(pm_notifier, name) =	\

They can be initialized with NULL pointer callbacks in this case, we can go with the linked list approach, I have nothing against that. What I want here is confirm whether or not makes sense allow multiple notifiers. Btw, make it kernel objects may make sense if applications want to use it from user mode and I have the feeling that this will be a valid case.

ceolin

comment created time in 8 days

PullRequestReviewEvent

Pull request review commentzephyrproject-rtos/zephyr

PM - Get rid of some weak functions

+/*+ * Copyright (c) 2018 Intel Corporation.+ *+ * SPDX-License-Identifier: Apache-2.0+ */++#ifndef _PM_POLICY_H_+#define _PM_POLICY_H_++#include <power/power.h>++#include <string.h>++#ifdef __cplusplus+extern "C" {+#endif++/**+ * @brief Define the base struct necessary for a pm_policy.+ *+ * Different policies can have their own struct type according with+ * their necessity, the only requirements is the struct contains this+ * macro in the beginning of the declaration and be statically defined+ * using @c PM_POLICY_DEFINE.+ */+#define PM_POLICY_BASE \+	struct { \+		const char *name; \+		const size_t len; \+		enum power_states (*next_state_get)(struct pm_policy *policy,\+						    int32_t ticks); \+		bool (*low_power_devices_get)(struct pm_policy *policy, \+					      enum power_states state); \+	}++/**+ * @brief PM Policy definition+ *+ * Store information about a power management policy.+ */+struct pm_policy {+	PM_POLICY_BASE;+};++/**+ * @brief Statically define and register a power management policy+ *+ * The policy can be accessed outside the module where it is defined using:+ *+ * @code extern struct <policy_type> <policy_name>; @endcode+ *+ * @param policy_type The pm_policy struct used+ * @param policy_name The name of this policy+ * @param policy_next_state_get Callback to get the next PM state+ * @param policy_low_power_devices_get Callback to determine whether to put+ *        devices in low power state, given the system PM state+ */+#define PM_POLICY_DEFINE(policy_type, policy_name, policy_next_state_get, \+			 policy_low_power_devices_get, ...)		\+	Z_STRUCT_SECTION_ITERABLE_ALTERNATE(pm_policy, policy_type,	\+					    policy_name) = {		\+		.name = STRINGIFY(policy_name),			\+		.len = sizeof(struct policy_type),			\+		.next_state_get = policy_next_state_get,		\+		.low_power_devices_get = policy_low_power_devices_get,	\+		__VA_ARGS__						\+	}++#define PM_POLICY_FOREACH(struct_type, iterator)			\+	extern struct struct_type _CONCAT(_##struct_type, _list_start)[]; \+	extern struct struct_type _CONCAT(_##struct_type, _list_end)[]; \+	for (struct struct_type *iterator =				\+		     _CONCAT(_##struct_type, _list_start);		\+	     ({ __ASSERT(iterator <= _CONCAT(_##struct_type, _list_end), \+			 "unexpected list end location");		\+		     iterator < _CONCAT(_##struct_type, _list_end); }); \+	     iterator = (struct struct_type *)				\+		     ((uint8_t *)iterator + iterator->len))++/**+ * @brief Function to create device PM list+ */+void sys_pm_create_device_list(void);++/**+ * @brief Function to suspend the devices in PM device list

Intend to work on it when changing the power states. This API much likely will need to change, this pr is just adding the foundation for that.

ceolin

comment created time in 8 days

PullRequestReviewEvent

Pull request review commentzephyrproject-rtos/zephyr

PM - Get rid of some weak functions

+/*+ * Copyright (c) 2018 Intel Corporation.+ *+ * SPDX-License-Identifier: Apache-2.0+ */++#ifndef _PM_POLICY_H_+#define _PM_POLICY_H_++#include <power/power.h>++#include <string.h>++#ifdef __cplusplus+extern "C" {+#endif++/**+ * @brief Define the base struct necessary for a pm_policy.+ *+ * Different policies can have their own struct type according with+ * their necessity, the only requirements is the struct contains this+ * macro in the beginning of the declaration and be statically defined+ * using @c PM_POLICY_DEFINE.+ */+#define PM_POLICY_BASE \+	struct { \+		const char *name; \+		const size_t len; \+		enum power_states (*next_state_get)(struct pm_policy *policy,\

I was in doubt about just adding a pointer that can be used by the implementation to store its context or allow extending the type. I can change it, in the end it will not increase the struct size because I can get rid of len and it will simplify some things.

ceolin

comment created time in 8 days

PullRequestReviewEvent

Pull request review commentzephyrproject-rtos/zephyr

PM - Get rid of some weak functions

+/*+ * Copyright (c) 2018 Intel Corporation.+ *+ * SPDX-License-Identifier: Apache-2.0+ */++#ifndef _PM_POLICY_H_+#define _PM_POLICY_H_++#include <power/power.h>++#include <string.h>++#ifdef __cplusplus+extern "C" {+#endif++/**+ * @brief Define the base struct necessary for a pm_policy.+ *+ * Different policies can have their own struct type according with+ * their necessity, the only requirements is the struct contains this+ * macro in the beginning of the declaration and be statically defined+ * using @c PM_POLICY_DEFINE.+ */+#define PM_POLICY_BASE \+	struct { \+		const char *name; \+		const size_t len; \+		enum power_states (*next_state_get)(struct pm_policy *policy,\+						    int32_t ticks); \+		bool (*low_power_devices_get)(struct pm_policy *policy, \+					      enum power_states state); \+	}++/**+ * @brief PM Policy definition+ *+ * Store information about a power management policy.+ */+struct pm_policy {+	PM_POLICY_BASE;+};++/**+ * @brief Statically define and register a power management policy+ *+ * The policy can be accessed outside the module where it is defined using:+ *+ * @code extern struct <policy_type> <policy_name>; @endcode+ *+ * @param policy_type The pm_policy struct used+ * @param policy_name The name of this policy+ * @param policy_next_state_get Callback to get the next PM state+ * @param policy_low_power_devices_get Callback to determine whether to put+ *        devices in low power state, given the system PM state+ */+#define PM_POLICY_DEFINE(policy_type, policy_name, policy_next_state_get, \+			 policy_low_power_devices_get, ...)		\+	Z_STRUCT_SECTION_ITERABLE_ALTERNATE(pm_policy, policy_type,	\+					    policy_name) = {		\+		.name = STRINGIFY(policy_name),			\+		.len = sizeof(struct policy_type),			\+		.next_state_get = policy_next_state_get,		\+		.low_power_devices_get = policy_low_power_devices_get,	\+		__VA_ARGS__						\+	}++#define PM_POLICY_FOREACH(struct_type, iterator)			\+	extern struct struct_type _CONCAT(_##struct_type, _list_start)[]; \+	extern struct struct_type _CONCAT(_##struct_type, _list_end)[]; \+	for (struct struct_type *iterator =				\+		     _CONCAT(_##struct_type, _list_start);		\+	     ({ __ASSERT(iterator <= _CONCAT(_##struct_type, _list_end), \+			 "unexpected list end location");		\+		     iterator < _CONCAT(_##struct_type, _list_end); }); \+	     iterator = (struct struct_type *)				\+		     ((uint8_t *)iterator + iterator->len))++/**+ * @brief Function to create device PM list+ */+void sys_pm_create_device_list(void);++/**+ * @brief Function to suspend the devices in PM device list+ */+int sys_pm_suspend_devices(void);++/**+ * @brief Function to put the devices in PM device list in low power state+ */+int sys_pm_low_power_devices(void);++/**+ * @brief Function to force suspend the devices in PM device list+ */+int sys_pm_force_suspend_devices(void);++/**+ * @brief Function to resume the devices in PM device list+ */+void sys_pm_resume_devices(void);++/**+ * @brief Function to get the next PM state based on the ticks+ */+static inline enum power_states sys_pm_policy_next_state(int32_t ticks)+{+	extern struct pm_policy *sys_pm_policy;++	if (sys_pm_policy == NULL) {+		return -EINVAL;+	}++	if (sys_pm_policy->next_state_get == NULL) {+		/* Should it be -ENOSYS ? */+		return -ENOTSUP;+	}++	return sys_pm_policy->next_state_get(sys_pm_policy, ticks);+}++/**+ * @brief Function to determine whether to put devices in low+ *        power state, given the system PM state.+ */+static inline bool sys_pm_policy_low_power_devices(enum power_states state)+{+	extern struct pm_policy *sys_pm_policy;++	if (sys_pm_policy == NULL) {+		return -EINVAL;+	}++	if (sys_pm_policy->low_power_devices_get == NULL) {+		/* Should it be -ENOSYS ? */+		return -ENOTSUP;+	}++	return sys_pm_policy->low_power_devices_get(sys_pm_policy, state);+}++/**+ * @brief Function to set the system power management policy+ *+ * @param policy_name The policy name to be used. @see PM_POLICY_DEFINE+ *+ * @return false if the policy is not available, true otherwise.+ */+static inline bool sys_pm_policy_set(const char *policy_name)+{+	extern struct pm_policy *sys_pm_policy;

yep, that makes sense.

ceolin

comment created time in 8 days

PullRequestReviewEvent

Pull request review commentzephyrproject-rtos/zephyr

PM - Get rid of some weak functions

+/*+ * Copyright (c) 2018 Intel Corporation.+ *+ * SPDX-License-Identifier: Apache-2.0+ */++#ifndef _PM_POLICY_H_+#define _PM_POLICY_H_++#include <power/power.h>++#include <string.h>++#ifdef __cplusplus+extern "C" {+#endif++/**+ * @brief Define the base struct necessary for a pm_policy.+ *+ * Different policies can have their own struct type according with+ * their necessity, the only requirements is the struct contains this+ * macro in the beginning of the declaration and be statically defined+ * using @c PM_POLICY_DEFINE.+ */+#define PM_POLICY_BASE \+	struct { \+		const char *name; \+		const size_t len; \+		enum power_states (*next_state_get)(struct pm_policy *policy,\+						    int32_t ticks); \+		bool (*low_power_devices_get)(struct pm_policy *policy, \+					      enum power_states state); \+	}++/**+ * @brief PM Policy definition+ *+ * Store information about a power management policy.+ */+struct pm_policy {+	PM_POLICY_BASE;+};++/**+ * @brief Statically define and register a power management policy+ *+ * The policy can be accessed outside the module where it is defined using:+ *+ * @code extern struct <policy_type> <policy_name>; @endcode+ *+ * @param policy_type The pm_policy struct used+ * @param policy_name The name of this policy+ * @param policy_next_state_get Callback to get the next PM state+ * @param policy_low_power_devices_get Callback to determine whether to put+ *        devices in low power state, given the system PM state+ */+#define PM_POLICY_DEFINE(policy_type, policy_name, policy_next_state_get, \+			 policy_low_power_devices_get, ...)		\+	Z_STRUCT_SECTION_ITERABLE_ALTERNATE(pm_policy, policy_type,	\+					    policy_name) = {		\+		.name = STRINGIFY(policy_name),			\+		.len = sizeof(struct policy_type),			\+		.next_state_get = policy_next_state_get,		\+		.low_power_devices_get = policy_low_power_devices_get,	\+		__VA_ARGS__						\+	}++#define PM_POLICY_FOREACH(struct_type, iterator)			\+	extern struct struct_type _CONCAT(_##struct_type, _list_start)[]; \+	extern struct struct_type _CONCAT(_##struct_type, _list_end)[]; \+	for (struct struct_type *iterator =				\+		     _CONCAT(_##struct_type, _list_start);		\+	     ({ __ASSERT(iterator <= _CONCAT(_##struct_type, _list_end), \+			 "unexpected list end location");		\+		     iterator < _CONCAT(_##struct_type, _list_end); }); \+	     iterator = (struct struct_type *)				\+		     ((uint8_t *)iterator + iterator->len))++/**+ * @brief Function to create device PM list+ */+void sys_pm_create_device_list(void);++/**+ * @brief Function to suspend the devices in PM device list+ */+int sys_pm_suspend_devices(void);++/**+ * @brief Function to put the devices in PM device list in low power state+ */+int sys_pm_low_power_devices(void);++/**+ * @brief Function to force suspend the devices in PM device list+ */+int sys_pm_force_suspend_devices(void);++/**+ * @brief Function to resume the devices in PM device list+ */+void sys_pm_resume_devices(void);++/**+ * @brief Function to get the next PM state based on the ticks+ */+static inline enum power_states sys_pm_policy_next_state(int32_t ticks)+{+	extern struct pm_policy *sys_pm_policy;++	if (sys_pm_policy == NULL) {+		return -EINVAL;+	}++	if (sys_pm_policy->next_state_get == NULL) {+		/* Should it be -ENOSYS ? */+		return -ENOTSUP;+	}++	return sys_pm_policy->next_state_get(sys_pm_policy, ticks);+}++/**+ * @brief Function to determine whether to put devices in low+ *        power state, given the system PM state.+ */+static inline bool sys_pm_policy_low_power_devices(enum power_states state)+{+	extern struct pm_policy *sys_pm_policy;++	if (sys_pm_policy == NULL) {+		return -EINVAL;+	}++	if (sys_pm_policy->low_power_devices_get == NULL) {+		/* Should it be -ENOSYS ? */+		return -ENOTSUP;+	}++	return sys_pm_policy->low_power_devices_get(sys_pm_policy, state);+}++/**+ * @brief Function to set the system power management policy+ *+ * @param policy_name The policy name to be used. @see PM_POLICY_DEFINE+ *+ * @return false if the policy is not available, true otherwise.+ */+static inline bool sys_pm_policy_set(const char *policy_name)

This is just more convenient for the application, instead of having to do:

extern struct pm_policy *dummy_policy;
sys_pm_policy_set(dummy_policy);
ceolin

comment created time in 8 days

PullRequestReviewEvent

Pull request review commentzephyrproject-rtos/zephyr

PM - Get rid of some weak functions

+/*+ * Copyright (c) 2018 Intel Corporation.+ *+ * SPDX-License-Identifier: Apache-2.0+ */++#ifndef _PM_POLICY_H_+#define _PM_POLICY_H_++#include <power/power.h>++#include <string.h>++#ifdef __cplusplus+extern "C" {+#endif++/**+ * @brief Define the base struct necessary for a pm_policy.+ *+ * Different policies can have their own struct type according with+ * their necessity, the only requirements is the struct contains this+ * macro in the beginning of the declaration and be statically defined+ * using @c PM_POLICY_DEFINE.+ */+#define PM_POLICY_BASE \+	struct { \+		const char *name; \+		const size_t len; \+		enum power_states (*next_state_get)(struct pm_policy *policy,\+						    int32_t ticks); \+		bool (*low_power_devices_get)(struct pm_policy *policy, \+					      enum power_states state); \+	}++/**+ * @brief PM Policy definition+ *+ * Store information about a power management policy.+ */+struct pm_policy {+	PM_POLICY_BASE;+};++/**+ * @brief Statically define and register a power management policy+ *+ * The policy can be accessed outside the module where it is defined using:+ *+ * @code extern struct <policy_type> <policy_name>; @endcode+ *+ * @param policy_type The pm_policy struct used+ * @param policy_name The name of this policy+ * @param policy_next_state_get Callback to get the next PM state+ * @param policy_low_power_devices_get Callback to determine whether to put+ *        devices in low power state, given the system PM state+ */+#define PM_POLICY_DEFINE(policy_type, policy_name, policy_next_state_get, \+			 policy_low_power_devices_get, ...)		\+	Z_STRUCT_SECTION_ITERABLE_ALTERNATE(pm_policy, policy_type,	\+					    policy_name) = {		\+		.name = STRINGIFY(policy_name),			\+		.len = sizeof(struct policy_type),			\+		.next_state_get = policy_next_state_get,		\+		.low_power_devices_get = policy_low_power_devices_get,	\+		__VA_ARGS__						\+	}++#define PM_POLICY_FOREACH(struct_type, iterator)			\+	extern struct struct_type _CONCAT(_##struct_type, _list_start)[]; \+	extern struct struct_type _CONCAT(_##struct_type, _list_end)[]; \+	for (struct struct_type *iterator =				\+		     _CONCAT(_##struct_type, _list_start);		\+	     ({ __ASSERT(iterator <= _CONCAT(_##struct_type, _list_end), \+			 "unexpected list end location");		\+		     iterator < _CONCAT(_##struct_type, _list_end); }); \+	     iterator = (struct struct_type *)				\+		     ((uint8_t *)iterator + iterator->len))++/**+ * @brief Function to create device PM list+ */+void sys_pm_create_device_list(void);++/**+ * @brief Function to suspend the devices in PM device list+ */+int sys_pm_suspend_devices(void);++/**+ * @brief Function to put the devices in PM device list in low power state+ */+int sys_pm_low_power_devices(void);++/**+ * @brief Function to force suspend the devices in PM device list+ */+int sys_pm_force_suspend_devices(void);++/**+ * @brief Function to resume the devices in PM device list+ */+void sys_pm_resume_devices(void);++/**+ * @brief Function to get the next PM state based on the ticks+ */+static inline enum power_states sys_pm_policy_next_state(int32_t ticks)+{+	extern struct pm_policy *sys_pm_policy;++	if (sys_pm_policy == NULL) {+		return -EINVAL;+	}++	if (sys_pm_policy->next_state_get == NULL) {+		/* Should it be -ENOSYS ? */+		return -ENOTSUP;+	}++	return sys_pm_policy->next_state_get(sys_pm_policy, ticks);+}++/**+ * @brief Function to determine whether to put devices in low+ *        power state, given the system PM state.+ */+static inline bool sys_pm_policy_low_power_devices(enum power_states state)+{+	extern struct pm_policy *sys_pm_policy;++	if (sys_pm_policy == NULL) {+		return -EINVAL;+	}++	if (sys_pm_policy->low_power_devices_get == NULL) {+		/* Should it be -ENOSYS ? */+		return -ENOTSUP;+	}++	return sys_pm_policy->low_power_devices_get(sys_pm_policy, state);+}++/**+ * @brief Function to set the system power management policy+ *+ * @param policy_name The policy name to be used. @see PM_POLICY_DEFINE+ *+ * @return false if the policy is not available, true otherwise.+ */+static inline bool sys_pm_policy_set(const char *policy_name)+{+	extern struct pm_policy *sys_pm_policy;++	PM_POLICY_FOREACH(pm_policy, policy) {+		if (policy->name != NULL &&

Nope, it is just a sanitycheck

ceolin

comment created time in 8 days

PullRequestReviewEvent

Pull request review commentzephyrproject-rtos/zephyr

PM - Get rid of some weak functions

+/*+ * Copyright (c) 2018 Intel Corporation.+ *+ * SPDX-License-Identifier: Apache-2.0+ */++#ifndef _PM_POLICY_H_+#define _PM_POLICY_H_++#include <power/power.h>++#include <string.h>++#ifdef __cplusplus+extern "C" {+#endif++/**+ * @brief Define the base struct necessary for a pm_policy.+ *+ * Different policies can have their own struct type according with+ * their necessity, the only requirements is the struct contains this+ * macro in the beginning of the declaration and be statically defined+ * using @c PM_POLICY_DEFINE.+ */+#define PM_POLICY_BASE \+	struct { \+		const char *name; \+		const size_t len; \+		enum power_states (*next_state_get)(struct pm_policy *policy,\+						    int32_t ticks); \+		bool (*low_power_devices_get)(struct pm_policy *policy, \+					      enum power_states state); \+	}++/**+ * @brief PM Policy definition+ *+ * Store information about a power management policy.+ */+struct pm_policy {+	PM_POLICY_BASE;+};++/**+ * @brief Statically define and register a power management policy+ *+ * The policy can be accessed outside the module where it is defined using:+ *+ * @code extern struct <policy_type> <policy_name>; @endcode+ *+ * @param policy_type The pm_policy struct used+ * @param policy_name The name of this policy+ * @param policy_next_state_get Callback to get the next PM state+ * @param policy_low_power_devices_get Callback to determine whether to put+ *        devices in low power state, given the system PM state+ */+#define PM_POLICY_DEFINE(policy_type, policy_name, policy_next_state_get, \+			 policy_low_power_devices_get, ...)		\+	Z_STRUCT_SECTION_ITERABLE_ALTERNATE(pm_policy, policy_type,	\+					    policy_name) = {		\+		.name = STRINGIFY(policy_name),			\+		.len = sizeof(struct policy_type),			\+		.next_state_get = policy_next_state_get,		\+		.low_power_devices_get = policy_low_power_devices_get,	\+		__VA_ARGS__						\+	}++#define PM_POLICY_FOREACH(struct_type, iterator)			\+	extern struct struct_type _CONCAT(_##struct_type, _list_start)[]; \+	extern struct struct_type _CONCAT(_##struct_type, _list_end)[]; \+	for (struct struct_type *iterator =				\+		     _CONCAT(_##struct_type, _list_start);		\+	     ({ __ASSERT(iterator <= _CONCAT(_##struct_type, _list_end), \+			 "unexpected list end location");		\+		     iterator < _CONCAT(_##struct_type, _list_end); }); \+	     iterator = (struct struct_type *)				\+		     ((uint8_t *)iterator + iterator->len))++/**+ * @brief Function to create device PM list+ */+void sys_pm_create_device_list(void);++/**+ * @brief Function to suspend the devices in PM device list+ */+int sys_pm_suspend_devices(void);++/**+ * @brief Function to put the devices in PM device list in low power state+ */+int sys_pm_low_power_devices(void);++/**+ * @brief Function to force suspend the devices in PM device list+ */+int sys_pm_force_suspend_devices(void);++/**+ * @brief Function to resume the devices in PM device list+ */+void sys_pm_resume_devices(void);++/**+ * @brief Function to get the next PM state based on the ticks+ */+static inline enum power_states sys_pm_policy_next_state(int32_t ticks)+{+	extern struct pm_policy *sys_pm_policy;++	if (sys_pm_policy == NULL) {+		return -EINVAL;+	}++	if (sys_pm_policy->next_state_get == NULL) {+		/* Should it be -ENOSYS ? */

Initially I had used ENOSYS, but then in checkpatch.pl we have "ENOSYS means 'invalid syscall nr' and nothing else\n", that is not the case here and I saw some places using ENOTSUP. I think ENOSYS is better, but I tried to be more consistent with the rest of the code base.

ceolin

comment created time in 8 days

PullRequestReviewEvent

Pull request review commentzephyrproject-rtos/zephyr

PM - Get rid of some weak functions

+/*+ * Copyright (c) 2018 Intel Corporation.+ *+ * SPDX-License-Identifier: Apache-2.0+ */++#ifndef _PM_POLICY_H_+#define _PM_POLICY_H_++#include <power/power.h>++#include <string.h>++#ifdef __cplusplus+extern "C" {+#endif++/**+ * @brief Define the base struct necessary for a pm_policy.+ *+ * Different policies can have their own struct type according with+ * their necessity, the only requirements is the struct contains this+ * macro in the beginning of the declaration and be statically defined+ * using @c PM_POLICY_DEFINE.+ */+#define PM_POLICY_BASE \+	struct { \+		const char *name; \+		const size_t len; \+		enum power_states (*next_state_get)(struct pm_policy *policy,\+						    int32_t ticks); \+		bool (*low_power_devices_get)(struct pm_policy *policy, \+					      enum power_states state); \+	}++/**+ * @brief PM Policy definition+ *+ * Store information about a power management policy.+ */+struct pm_policy {+	PM_POLICY_BASE;+};++/**+ * @brief Statically define and register a power management policy+ *+ * The policy can be accessed outside the module where it is defined using:+ *+ * @code extern struct <policy_type> <policy_name>; @endcode+ *+ * @param policy_type The pm_policy struct used+ * @param policy_name The name of this policy+ * @param policy_next_state_get Callback to get the next PM state+ * @param policy_low_power_devices_get Callback to determine whether to put+ *        devices in low power state, given the system PM state+ */+#define PM_POLICY_DEFINE(policy_type, policy_name, policy_next_state_get, \+			 policy_low_power_devices_get, ...)		\+	Z_STRUCT_SECTION_ITERABLE_ALTERNATE(pm_policy, policy_type,	\+					    policy_name) = {		\+		.name = STRINGIFY(policy_name),			\+		.len = sizeof(struct policy_type),			\+		.next_state_get = policy_next_state_get,		\+		.low_power_devices_get = policy_low_power_devices_get,	\+		__VA_ARGS__						\+	}++#define PM_POLICY_FOREACH(struct_type, iterator)			\+	extern struct struct_type _CONCAT(_##struct_type, _list_start)[]; \+	extern struct struct_type _CONCAT(_##struct_type, _list_end)[]; \+	for (struct struct_type *iterator =				\+		     _CONCAT(_##struct_type, _list_start);		\+	     ({ __ASSERT(iterator <= _CONCAT(_##struct_type, _list_end), \+			 "unexpected list end location");		\+		     iterator < _CONCAT(_##struct_type, _list_end); }); \+	     iterator = (struct struct_type *)				\+		     ((uint8_t *)iterator + iterator->len))++/**+ * @brief Function to create device PM list+ */+void sys_pm_create_device_list(void);

agreed, this is not part of the policy though. I didn't touch it yet, just move it around.

ceolin

comment created time in 8 days

PullRequestReviewEvent

push eventceolin/zephyr

Flavio Ceolin

commit sha c739e3ec2e36b5bf27669b4708914f3fc43301be

kernel: sched: Use k_ticks_t in z_tick_sleep z_tick_sleep was using int32_t what could cause a possible overflow when converting from k_ticks_t. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

push time in 8 days

PR opened zephyrproject-rtos/zephyr

Reviewers
maintainers: Set myself as pm maintainer

Set myself (ceolin) as maintainer for power management.

Signed-off-by: Flavio Ceolin flavio.ceolin@intel.com

+1 -1

0 comment

1 changed file

pr created time in 9 days

push eventceolin/zephyr

Flavio Ceolin

commit sha 441aa70d8b6752a13f17c6daf375b814ea8b3b99

maintainers: Set myself as pm maintainer Set myself (ceolin) as maintainer for power management. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

push time in 9 days

push eventceolin/zephyr

Andrew Boie

commit sha ffc5bdffbbc7f30188ed3fce0e33716d5ee7b90b

sched: hold spinlock in z_thread_timeout() We are checking and modifying members of thread->base (in particular it's waitq and thread_state) which are nominally protected by sched_spinlock. Hold it while doing this to avoid concurrent changes on another CPU or ISR preeemption. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>

view details

Andrew Boie

commit sha 83d7770de47cb01f6c22c55cf93799b2d9ff1b7d

sched: check if runnable in sliceable() We need to check if a thread is runnable at all before we contemplate putting it on the end of the priority queue, it might not be on the queue at all if it was suspended. Replaces the less comprehensive check to see if the thread was pending a timeout. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>

view details

Andrew Boie

commit sha 8e0f6a5936faa7c0bd48d5cc7d245f85cab22ddc

sched: hold spinlock in z_time_slice() We are checking thread->base members like thread_state and prio and making decisions based on it, hold the sched_spinlock to avoid potential concurrency problems if these members are modified on another CPU or nested interrupt. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>

view details

Andrew Boie

commit sha a8775ab8cbf8436cd7fb4af0d33b6563ff10928f

sched: don't use local lock in z_tick_sleep() We're modifying thread_state. Use sched_spinlock instead. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>

view details

Mahesh Mahadevan

commit sha 1b6f21b61560e8e70414efa9eeb3803093a915f8

west.yml: Update hal_nxp revision Includes the fix for the FLASH_SIZE on MXRT devices Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>

view details

Peter Bigot

commit sha 4078442bfd8a10ccf55d215fc85532187178faa0

Revert "doc: release: 2.4: note behavior change in device_get_binding" This reverts commit 6dde16d9f85a54c04d0c8f24813e959814aef76d. The original behavior has been restored for this release. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>

view details

Emil Obalski

commit sha d6dba725022d420bdda1ea25a3c242674d04cb77

usb: cdc: Semaphore per CDC_ACM instance. Usage of `pool_wait_sem` was incorrect. The semaphore shall be dependent on context it was called for. In case of many CDC_ACM devices one could possibly block others. This fixes an issue by making semaphore a part of the internal CDC_ACM device structure. Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>

view details

Emil Obalski

commit sha da93a9e50f40c37922168b9890a91e4c06e964f0

usb: cdc_acm: Do not change rx/tx_irq_ena flags on RESET and CONFIGURED Both tx_irq_ena and rx_irq_ena flags shall be updated only by using UART API. Those flags are used to let the device start sending or receiving data. Changing those flags without awareness of the user may lead to errors. Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>

view details

Peter Bigot

commit sha 2e99f3b652bbb32edc4db55a248e3368a405002d

usb: cdc_acm: fix formatting specifiers in log messages The z length modifier must be applied to avoid build errors when the format is verified by the compiler on systems where size_t is larger than int. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>

view details

Peter Bigot

commit sha 692449d6c7735c5b3eaa78139421e77f05979379

usb: fix header language linkage The block that introduced a C linkage region was not closed in the header as it should be. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>

view details

Peter Bigot

commit sha 2c105e8f0d82ba8a8113be6d14e88846af9fb4ef

usb: clean CMakeLists conditions Use the helper function to conditionally include source files. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>

view details

Peter Bigot

commit sha 611263921a0c9587dfe8be8649edf5ab70bf0668

usb: add optional work queue The USB infrastructure currently uses the system work queue for offloading transfers, CDC-ACM UART transmission/reception, and device firmware activities. This causes problems when the system work queue is also used to initiate some activities (such as UART) that normally complete without requiring an external thread: in that case the USB infrastructure is prevented from making progress because the system work queue is blocked waiting for the USB infrastructure to provide data. Break the dependency by allowing the USB infrastructure to use a dedicated work queue which doesn't depend on availability of the system work queue. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>

view details

Peter Bigot

commit sha a28f570855bc134d06ffd87dde4f2751cea5ad00

tests: bluetooth: shell: add usb shell test configuration Verify builds and execution when a CDC-ACM UART is used for the shell. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>

view details

NavinSankar Velliangiri

commit sha dd8f135e2c4d47a151aad9f61a57ee5a33e4eabe

mgmt: hawkbit: Fix NULL pointer dereferences Coverity spots that null pointer is passing to flash_img_buffered_write. This patch fixes the problem. Signed-off-by: NavinSankar Velliangiri <navin@linumiz.com>

view details

Daniel Leung

commit sha 5632ee26f3711b77a217aba926775208f46a2a42

x86: pcie: fallback to config via PIO When probing for PCI-E device resources, it is possible that configuration via MMIO is not available. This may caused by BIOS or its settings. So when CONFIG_PCIE_MMIO_CFG=y, have a fallback path to config devices via PIO. The inability to config via MMIO has been observed on a couple UP Squared boards. Fixes #27339 Signed-off-by: Daniel Leung <daniel.leung@intel.com>

view details

Ryan Erickson

commit sha 61ce2dc6815faa0cf3bc8982ec91969053f8b1b6

drivers: modem: hl7800: RTC only available with newlibc RTC API is only available if NEWLIB_LIBC is available. Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>

view details

Ryan Erickson

commit sha 2e7b26301378cb6f7f1a7dabbacffdf69937a4ff

drivers: modem: hl7800: struct device data renamed change struct device->driver_data to new name of struct device->data. Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>

view details

Ryan Erickson

commit sha c74166ed5ec7800fec40bd19ea09684f89210711

drivers: modem: hl7800: modem receiver IMEI Modem receiver IMEI data field is only available when CONFIG_MODEM_SIM_NUMBERS. Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>

view details

Ryan Erickson

commit sha ad043541100d732840c715e1261145296d89c34b

drivers: modem: hl7800: remove VLA Remove variable length array from function to comply with MISRA checks. Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>

view details

Ryan Erickson

commit sha 03e62be2900365e40e4f152024a8f7d47349627a

drivers: modem: hl7800: do not require DEVICE_POWER_MANAGEMENT Remove requirement for DEVICE_POWER_MANAGEMENT, the driver does not need it to operate. Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>

view details

push time in 9 days

pull request commentzephyrproject-rtos/zephyr

kernel: sched: Use k_ticks_t in z_tick_sleep

@andyross any idea how to exercise this issue ? I reproduced the problem hardcoding curr_tick to overflow, but this is not exposed at all.

ceolin

comment created time in 9 days

PR opened zephyrproject-rtos/zephyr

Reviewers
kernel: sched: Use k_ticks_t in z_tick_sleep

z_tick_sleep was using int32_t what could cause a possible overflow when converting from k_ticks_t.

Fixes #29066

+3 -3

0 comment

1 changed file

pr created time in 9 days

create barnchceolin/zephyr

branch : k_sleep

created branch time in 9 days

push eventceolin/zephyr

Flavio Ceolin

commit sha 1bacafe9fe38dbfd2e459c8429c4ae4af43a99ad

power: Add notifier API Get rid of weak functions adding a new API to register an object to receive notifications when the system changes power state. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

Flavio Ceolin

commit sha 43b5176e0e9a92fcc345c22279b1494afd1dd34b

power: Define a policy API Currently the pm_policy is done overriding weak symbols. There are some problems with this approach: 1) Only one policy is possible, application can not change the policy according with its need. 2) Undefined behavior in case of having two definitions of the same weak symbol. 3) Without an associated object it is not possible to control access through user mode. This pr aims to address these problems, note that it is not adding a new kernel object but it creates the foundation to do it if necessary. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

Flavio Ceolin

commit sha 6cf25a98e4a79f286fc35da443815fcd6e2306fb

doc: power: Update power management policy Update documentation about how an application can define its own power management policy. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

push time in 9 days

PR opened zephyrproject-rtos/zephyr

Reviewers
PM - Get rid of some weak functions RFC area: Power Management

This pr changes how pm policies and notifications are done. Instead of using weak functions that can be override by the application this pr defines new types and APIs for that. I kept the same behavior and name conventions for now, the idea is to do incremental steps. Currently I took slightly different approaches between the notification and policy API. For the policy, the API allows application to extend the basic policy, that is a little bit different from what we have being done so, any feedback is welcome here.

The next step, is to define a better name convention for power management, organize headers, power states, ... (ensure that points agreed in https://github.com/zephyrproject-rtos/zephyr/pull/27315 are addressed)

+373 -113

0 comment

13 changed files

pr created time in 9 days

push eventceolin/zephyr

Flavio Ceolin

commit sha 8ae43d47c96acc83b3af7a7806bd1bf6b4594a42

subsys: power: Add notifier API Get rid of weak functions adding a new API to register an object to receive notifications when the system changes power state. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

Flavio Ceolin

commit sha eca1e0844c24e92ebee9dd64af70ddbc208dbb18

subsys: power: Define a policy API Currently the pm_policy is done overriding weak symbols. There are some problems with this approach: 1) Only one policy is possible, application can not change the policy according with its need. 2) Undefined behavior in case of having two definitions of the same weak symbol. 3) Without an associated object it is not possible to control access through user mode. This pr aims to address these problems, note that it is not adding a new kernel object but it creates the foundation to do it if necessary. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

Flavio Ceolin

commit sha 736b8c65174c48651054211dd5d28fdf80c7ef81

doc: power: Update power management policy Update documentation about how an application can define its own power management policy. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

push time in 9 days

push eventceolin/zephyr

Flavio Ceolin

commit sha 8a4b4a4bb945c4aff50898376658659e02f1d0ef

subsys: power: Define a policy API Currently the pm_policy is done overriding weak symbols. There are some problems with this approach: 1) Only one policy is possible, application can not change the policy according with its need. 2) Undefined behavior in case of having two definitions of the same weak symbol. 3) Without an associated object it is not possible to control access through user mode. This pr aims to address these problems, note that it is not adding a new kernel object but it creates the foundation to do it if necessary. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

Flavio Ceolin

commit sha 1f0badaca3e0720d50a0fd31313646538780fd3f

doc: power: Update power management policy Update documentation about how an application can define its own power management policy. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

push time in 9 days

push eventceolin/zephyr

Joakim Andersson

commit sha 374cbdd1243b28ed6606f88d127a48a5f5587432

Bluetooth: GATT: Refactor use of 16-bit UUID core types Refactor use of 16-bit common GATT UUID types where a complete UUID object is declared on the stack only to use the 16-bit value. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>

view details

Peter Bigot

commit sha 4a0a196f574e6f5f0089b510c36ade4bf083eb29

tests: uart_async_api: fix fault accessing cached device pointer The cached device pointer must be placed in memory that allows user mode invocation of the test functions to access it. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>

view details

Flavio Ceolin

commit sha 0173063e508f611e60e5881e5d28de2f23d0cff5

tests: cmsis_rtos_v2: Fix a race condition Both threads, 4 and the ztest_thread (test_thread_join) where joining thread5. If thread 4 is scheduled before the main thread it will be dead before the main thread had chance to join it. Just changed thread 4 priority to ensure that this problem does not happen. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

Flavio Ceolin

commit sha dc68e35ad2325aab36df028fbce2527bb6e3d024

tests: cmsis_rtos_v2: Fix stack overflow Increase the stack to avoid overflow problems. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

Andy Ross

commit sha 55a85771b02b1bfeda8c7485cc95d4eaea4c95b2

arch/x86: Make EFI copies bytewise Originally the EFI boot code was written to assume that all sections in the ELF file were 8-byte aligned and sized (because I thought this was part of some platform spec somewhere). This turned out to be wrong in practice (at least for section sizes), so the requirement was reduced to 4 bytes. But now we have a section being generated somewhere that turns out to violate even that. There's no particular value in doing those copies in big chunks. There's at best a mild performance benefit, but if we really cared we'd be using a more complicated memcpy() implementation anyway. Replace the loop in the C code with a bytewise copy, change the size field in the generated header to store bytes, and remove the assertions (which were the failuers actually being seen in practice) in the script that were there to detect this misalignment. Fixes #29095 Signed-off-by: Andy Ross <andrew.j.ross@intel.com>

view details

Andrew Boie

commit sha c1ccd6b14e2914761468969c5c6b1ab3c2580742

tests: sys_mutex: remove stack size override This was causing stack usage to be right on the margin for some platforms, without a clear reason why it needs to be here (it was copied from another test case which no longer exists). Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>

view details

Jukka Rissanen

commit sha d3283231a51f55b458f5b927287965d541f5e11b

net: tcp2: Socket was accepted too early The TCP2 was calling accept callback before actually finalizing the connection attempt. Fixes #29164 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>

view details

Ryan Erickson

commit sha 72d54055a3b4a236a3e0d164de7b824a8fa1f4b9

drivers: modem: hl7800: UDP socket not closed Ensure UDP socket is always closed when offload_put is called. Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>

view details

Thorvald Natvig

commit sha 4d0750920b52e0ce8a3e188d08a1769ff7ec527b

drivers: ethernet: eth_gecko: Fetch MAC address from device info If neither a random address nor a specific local address is in the device tree, then use the MAC address from the device information page. Signed-off-by: Thorvald Natvig <thorvald@natvig.com>

view details

Ningx Zhao

commit sha fe2787a6650ad6b36cae16d1030d8484310cf8b6

Tests: ringbuffer: Improve the description cases The existing testcase's doxygen describes are the general implementation idea of a function.On this basis, adding more descriptive statements to describe which conditions need to be preset when running the testcase, which test techniques are applied, and describe the testcase Design steps in detail. Make it more readable. Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>

view details

Armand Ciejak

commit sha ab5fd19c2b17bbbf0d8d0bd92bfdf017daa4967f

net: ip: dhcpv4: Add dhcpv4_update_message_timeout() This avoids code duplication. The same logic was present in dhcpv4_send_request() and dhcpv4_send_discover(). Signed-off-by: Armand Ciejak <armand@riedonetworks.com>

view details

Armand Ciejak

commit sha b98d3b125cd6b1a4ff6534fd8ac49b80ca22f275

net: ip: dhcpv4: Limit message interval to a maximum of 64 seconds Clip the timeout to 64 seconds, this avoids the timeout value to increase to high values (e.g. several years). Signed-off-by: Armand Ciejak <armand@riedonetworks.com>

view details

Armand Ciejak

commit sha 6a110f93c0736444faf5189e0f0f2aaa034f9311

net: ip: dhcpv4: Add randomization to message interval Add +1/-1 second randomization to the timeout as per RFC 2131 chapter 4.1. Signed-off-by: Armand Ciejak <armand@riedonetworks.com>

view details

Maureen Helm

commit sha f8924af3ce0408a1765f3b7c4c1e655fa0f6d8a9

dts: arm: Fix k6x ethernet base address Commit ac31c4e458c7a5930479b297e8f3bcd5c8b002ed updated the mcux ethernet driver to get the ethernet peripheral base address from device tree instead of an nxp hal preprocessor macro. This exposed an error in the k6x device tree and caused a runtime assertion in networking applications on the frdm_k64f board: ASSERTION FAIL [instance < (sizeof(s_enetBases) / sizeof((s_enetBases)[0]))] @ WEST_TOPDIR/modules/hal/nxp/mcux/drivers/kinetis/fsl_enet.c:323 Signed-off-by: Maureen Helm <maureen.helm@nxp.com>

view details

Krzysztof Chruscinski

commit sha 00edf738c598a95210bd07d4d00a485807f00422

tests: drivers: uart: Add test suite for preemption resilience Added test which is calling uart_poll_out from various contexts and asynchronous/interrupt driven API. Test is validating that calls can be preempted at any moment and no data is lost. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>

view details

Krzysztof Chruscinski

commit sha db6bfde8b36ec4e164eed11715acb29996172459

drivers: serial: nrfx_uarte: Refactoring poll_out Refactoring poll_out to be ready for handling preemption. uart_tx and uart_fifo_fill modified so they are resilient to being preempted by uart_poll_out. Refactored uart_poll_out implementation to be common for interrupt driven API and asynchronous API. In both APIs active state is detected by evaluating state of ENDTX and TXSTOPPED events. If anyone is set it means that new transfer can be started. Patch is fixing existing issues: - potential bytes dropping with flow control enabled - busywaiting for ENDTX (asynchronous API) - poor performance - potential bytes dropping during preemption - potential uart_tx returning -EBUSY when interrupted poll_out Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>

view details

Krzysztof Chruscinski

commit sha a1a0ffd0d1bf373a78f0a0f04b10c9b1450cae0d

board: arm: nrf: Set uart0 compatible to nordic,nrf-uarte Update nordic boards to use UARTE driver for UART0 by default. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>

view details

Krzysztof Chruscinski

commit sha a348cec400837ff4581995d73df6f904cddd9ef6

drivers: clock_control: Change clock_control_async_on parameters Stable API change: modify parameters of clock_control_async_on which previously took a structure which contains list node, callback and user context. Removing list node and replacing structure with two parameters: callback and user context. List node is removed because it has no use in current API. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>

view details

Krzysztof Chruscinski

commit sha 61f710b47c3f772e7d957c56684f08bc057c2c95

doc: release-notes: Add note about clock control API change Added note about change in clock_control_async_on Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>

view details

Krzysztof Chruscinski

commit sha b5919479c4cc830344413845357ad09c1c275ca5

drivers: clock_control: nrf: Change errno for clock_control_async_on Aligned returned errno with API. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>

view details

push time in 9 days

push eventceolin/zephyr

Flavio Ceolin

commit sha 39fc6d757451c230ec53176537e16141134e6d95

subsys: power: Define a policy API Currently the pm_policy is done overriding weak symbols. There are some problems with this approach: 1) Only one policy is possible, application can not change the policy according with its need. 2) Undefined behavior in case of having two definitions of the same weak symbol. 3) Without an associated object it is not possible to control access through user mode. This pr aims to address these problems, note that it is not adding a new kernel object but it creates the foundation to do it if necessary. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

push time in 10 days

push eventceolin/zephyr

Flavio Ceolin

commit sha 3c8e2a9a5ed6686df4a39f74fc50a4b6dafd20cd

temp 3 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

push time in 12 days

push eventceolin/zephyr

Flavio Ceolin

commit sha c583083dcc8657812eec860e4b47d631b8798a6d

temp 2 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

push time in 13 days

create barnchceolin/zephyr

branch : pm/weak

created branch time in 13 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

pull request commentzephyrproject-rtos/zephyr

mgmt/osdp: samples: Add filter dt_alias_enabled("zephyr,entropy")

@cbsiddharth, I'd say, you should address this on source code level [too]. Specifically, config OSDP_SC_ENABLED in Kconfig should depend on something similar to what z_impl_sys_csrand_get itself depends on.

@pfalcon, @galak, I get into a dependency chain when I try to depend on ENTROPY_HAS_DRIVER (as it is done in other places) becauseOSDP selects ENTROPY_GENERATOR. Can you point me to another subsystem that does this right?

Aren't we looking it from the wrong perspective ? Instead of filtering the sample, shouldn't we enable OSDP_SC_ENABLED only if there is a truly random number generator available ? Looking osdp Kconfig, it seems that is also wrongly depending in the entropy generator while it should be depending on the random subsys CSPRING_ENABLED

@cbsiddharth could you take a look in this approach: https://github.com/zephyrproject-rtos/zephyr/pull/29137

cbsiddharth

comment created time in 16 days

PR opened zephyrproject-rtos/zephyr

Reviewers
OSDP SC requires CSPRNG
  • Make OSDP SC requires CSPRNG
  • General fixes when OSDP SC is not enabled
+10 -3

0 comment

3 changed files

pr created time in 16 days

push eventceolin/zephyr

Eugeniy Paltsev

commit sha 932e178007f1cedbe65881aca1e300eb72f3dbd1

ARC: use MWDT intrinsics to access aux regs in case of MWDT toolchain Metaware doesn't support gcc's builtins so use corresponding intrinsics instead. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

view details

Eugeniy Paltsev

commit sha 022705606680854c1602dbfb63f7b6e7171c0d71

ARC: change direct IRQ declaration for metaware toolchain * change direct IRQ declaration for metaware toolchain * drop unused irq-related definitions Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

view details

Wayne Ren

commit sha cc897a5198d3cce672f981b53192b9c731d0fda1

ARC: add linker script template for metware toolchain Add linker script template for MWDT toolchain (linker-mwdt.ld) Move linker.ld to linker-gnu.ld (without changes) The "linker.ld" is wraper now. Signed-off-by: Wayne Ren <wei.ren@synopsys.com>

view details

Eugeniy Paltsev

commit sha 6b8f92be087f48cd31700015be0674b428a03f98

app_memdomain: ARC: adjust asembler directives for MWDT toolchain ARC MWDT assembler has slightly different directives names: .pushsect instead of .pushsection .popsect instead of .popsection Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

view details

Eugeniy Paltsev

commit sha 0a7b65ef5e965c1e4a85e414129e3006e69b3c30

linker: tweak section naming to feet all linkers MWDT toolchain adds additional suffix to sections name in case of ffunction-sections / fdata-sections are enabled. As proposed by Andy Ross let's pick a single set of rules and syntax that work. Suggested-by: Andy Ross <andy@plausible.org> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

view details

Eugeniy Paltsev

commit sha c2bb7db3fd0c1af37f27ea0267e7426a8d5998b5

ARC: linker: implement linker related definition for MWDT Implement linker related definitions and macros for MWDT toolchain. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

view details

Eugeniy Paltsev

commit sha 2167ffbe457e582259f6b7ce11a6b6db527d5fa8

ARC: toolchain: handle difference in macros for MWDT and ARC GNU Create include/toolchain/mwdt.h to handle difference in several macros for MWDT and ARC GNU toolchains. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

view details

Wayne Ren

commit sha b868018b519eb79246f5c6ec3e1068ee3d7f70a7

cmake: add metaware toolchain support in build system * add metaware toolchain support in build system: * compiler * linker * binutils * gcc objcopy is used because it can't be replaced with mwdt's binutils currently * To use ARC metaware toolchain, you'd better: * in Linux/Unix environment * install arc gcc/zephyr toolchain to use gnu's objcopy tool * set ZEPHYR_TOOLCHAIN_VARIANT=arcmwdt Signed-off-by: Wayne Ren <wei.ren@synopsys.com> Signed-off-by: Watson Zeng <zhiwei@synopsys.com> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

view details

Eugeniy Paltsev

commit sha f609a9acd8a0bd86e380d820ae95d29316f53ddc

ARC: soc: add MWDT compiler options for nsim targets Add metaware compiler options for nsim targets Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

view details

Wayne Ren

commit sha 53e1d9866f35ab1a595ef1a1e3329ebe0c66f307

ARC: board: nsim: enable metaware toolchain in sanitycheck Enable MWDT toolchain in sanitycheck for all ARC nSIM boards Signed-off-by: Wayne Ren <wei.ren@synopsys.com> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

view details

Eugeniy Paltsev

commit sha a28ec6201f1eb0962777134a697476f2423d89fe

isr_tables: don't whole-archive library As of today we have a bit weird situation with generated sw_isr_table / irq_vector_table tables. On the final linkage stage we pass two files which content section with sw_isr_table / irq_vector_table. They are * libarch__common.a (with an outdated tables from the first linkage stage) * isr_tables.c.obj (with an actual tables) The sections where tables are located are marked with ".gnu.linkonce" prefix. That means: <<<As a GNU extension, if the name begins with .gnu.linkonce, we only link a single copy of the section.>>> However the "libarch__common.a" is passed to linker with "--whole-archive" option which means <<<include every object file in the archive in the link, rather than searching the archive for the required object files>>> That combination confuses MWDT linker and breaks linkage with MWDT toolchain. As a simple fix we can move the sw_isr_table / irq_vector_table sections to their own library and link this library with "--no-whole-archive" option. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

view details

Eugeniy Paltsev

commit sha 6dfaac0c9553d0b2d189a39495eae08ef447841c

cmake: allow to specify compliler for DTS preprocessing MWDT CCAC compiler can't handle the dts file as gcc does, so allow to specify compliler for DTS preprocessing which is differ from ${CMAKE_C_COMPILER}. Use ARC GNU compiler for DTS preprocessing in case of MWDT toolchain. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

view details

Eugeniy Paltsev

commit sha 3a9bc23ad941c819188dfa88330670403e1bd3d0

ARC: SOC: NSIM: fix CMakeLists indentation No functional changes intended Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

view details

Eugeniy Paltsev

commit sha 05b6468a73ba195b04fe1c4028a63392ca312210

ARC: linker: add more place for optimization Do not force linker to place text sections after each other to have more freedom to optimize. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

view details

Torsten Rasmussen

commit sha 93e063ffc846390fa964dbecd500fa704829bb44

cmake: mwdt compiler adopted to new toolchain abstraction This commit converts the MWDT compiler implementation from the old macro based approach and into the new toolchain property scheme. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>

view details

Torsten Rasmussen

commit sha 571f48fc77c2e97fd96c52e39bcbe1b9e6cc46ac

cmake: mwdt bintools adopted to new toolchain abstraction This commit converts the MWDT bintools implementation from the old macro based approach and into the new toolchain property scheme. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>

view details

Torsten Rasmussen

commit sha 9aa4039d410e6eae0b66784708e0b6cfb94b2a10

cmake: MWDT linker command list fix. This commit fixes an issue where the list returned by zephyr_get_include_directories_for_lang() would be a space separated list, cause the arguments to be quoted during linking. This is fixed by requesting `$<SEMICOLON>` to be used as separated which which again ensures a correct expansion of the list. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>

view details

Henrik Brix Andersen

commit sha 2f95794b29acbeecc1cf311313fbafbc6508c5a3

doc: releases: 2.4: add EEPROM release notes for v2.4 Add EEPROM release notes for v2.4. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>

view details

Johann Fischer

commit sha 362d8b27a7f69e30aaed3e68419563bae4ec5c84

drivers: usb_dc_mcux_ehci: fix endpoints index assignment MCUX EHCI USB device controller supports a specific number of bidirectional endpoints. Bidirectional means that an endpoint object is represented to the outside as an OUT and an IN Eindpoint with its own buffers and control structures. ep_abs_idx index refers to the corresponding control structure, for example: EP addr | ep_idx | ep_abs_idx ------------------------------- 0x00 | 0x00 | 0x00 0x80 | 0x00 | 0x01 0x01 | 0x01 | 0x02 0x81 | 0x01 | 0x03 .... | .... | .... The NUM_OF_EP_MAX (and number of s_ep_ctrl) should be double of num_bidir_endpoints. There is also no need to reserve endpoint addresses for this controller type. Signed-off-by: Johann Fischer <j.fischer@phytec.de>

view details

Daniel Leung

commit sha 8197bdea2b979ac0c224a3a735d4d9ed1a2bd75a

tests: timing_info: remove timing info Remove this benchmark which was relying on custom tracing points in the code and was not scalable. Use latency_measure benchmark instead which is more realistic and measures similar metrics in a fully reproducible manner and on all supported architectures. Signed-off-by: Anas Nashif <anas.nashif@intel.com> Signed-off-by: Daniel Leung <daniel.leung@intel.com>

view details

push time in 16 days

pull request commentzephyrproject-rtos/zephyr

mgmt/osdp: samples: Add filter dt_alias_enabled("zephyr,entropy")

@cbsiddharth, I'd say, you should address this on source code level [too]. Specifically, config OSDP_SC_ENABLED in Kconfig should depend on something similar to what z_impl_sys_csrand_get itself depends on.

@pfalcon, @galak, I get into a dependency chain when I try to depend on ENTROPY_HAS_DRIVER (as it is done in other places) becauseOSDP selects ENTROPY_GENERATOR. Can you point me to another subsystem that does this right?

Aren't we looking it from the wrong perspective ? Instead of filtering the sample, shouldn't we enable OSDP_SC_ENABLED only if there is a truly random number generator available ? Looking osdp Kconfig, it seems that is also wrongly depending in the entropy generator while it should be depending on the random subsys CSPRING_ENABLED

cbsiddharth

comment created time in 16 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentzephyrproject-rtos/zephyr

tests: cmsis_rtos_v2: Fix race condition

 void test_thread_join(void) 	zassert_not_null(tB, "Failed to create thread B with osThreadNew!");  	printk(" - Creating thread A...\n");+	attr.priority = osPriorityLow;

Done, thanks for reviewing it

ceolin

comment created time in 18 days

PullRequestReviewEvent

Pull request review commentzephyrproject-rtos/zephyr

tests: cmsis_rtos_v2: Fix race condition

 CONFIG_CMSIS_V2_MEM_SLAB_MAX_DYNAMIC_SIZE=128 CONFIG_CMSIS_V2_THREAD_MAX_COUNT=23 CONFIG_CMSIS_V2_THREAD_DYNAMIC_MAX_COUNT=10 CONFIG_TIMEOUT_64BIT=n+CONFIG_CMSIS_V2_THREAD_MAX_STACK_SIZE=1024

up squared

ceolin

comment created time in 18 days

PullRequestReviewEvent

push eventceolin/zephyr

Flavio Ceolin

commit sha 137f185a28eddccad2d4079def900c6bd5eb60e6

tests: cmsis_rtos_v2: Fix a race condition Both threads, 4 and the ztest_thread (test_thread_join) where joining thread5. If thread 4 is scheduled before the main thread it will be dead before the main thread had chance to join it. Just changed thread 4 priority to ensure that this problem does not happen. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

Flavio Ceolin

commit sha e4cd55d9f2f5f3db4a1c89eab5ada681162be024

tests: cmsis_rtos_v2: Fix stack overflow Increase the stack to avoid overflow problems. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

push time in 18 days

issue commentzephyrproject-rtos/zephyr

subsys: power: Need syscall that allows to force sleep state

I've mixed feelings about it. sys_pm_force_power_state don't have a kernel object associated so, there is not way to limit it to specific thread which mean that all user threads will be able to do it ....

albertofloyd

comment created time in a month

pull request commentzephyrproject-rtos/zephyr

arch: arm: Fix undefined symbol reference

Thanks @ceolin, could you please submit a cortex m specific test that catches this build error?

this is not affecting cortex_m. I've tested with qemu_cortex_a53. To reproduce one jus need to set CONFIG_GEN_SW_ISR_TABLE=n. Don't know exactly how to properly test it.

That's correct @ceolin , I missed that, sorry. I guess, making a test-case in the gen_isr_table test that does CONFIG_GEN_SW_ISR_TABLE=n would do it.

Hi @ioannisg thanks a lot. I've added a new testcase to disabling GEN_ISR*. The test is build only because there will be a fatal error due unhandled interruption. Also, I've found other issues around looking it, one is that dynamic irqs can be installed even when GEN_SW_ISR_TABLE=n, other is that gen_isr_tables.py receive parameters that are not used when it should, but the trickiest one might be related with the linker script, but I need to check it better. Will fill an issue anyway.

ceolin

comment created time in a month

push eventceolin/zephyr

Flavio Ceolin

commit sha 7da9ccd7a4dc9dc4c5ee53d4a87c7277a7cfdfe7

tests: gen_isr_table: Disable tables generation Add a new sample disabling GEN_ISR_TABLES. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

push time in a month

issue commentzephyrproject-rtos/zephyr

arch/common/isr_tables.c compilation fails with CONFIG_NUM_IRQS=0

You can achieve that with CONFIG_GEN_IRQ_VECTOR_TABLE=n. When this option is enabled (that is the common case) a lot of other places assume that CONFIG_NUM_IRQS is greater than 0. I may be no understanding the problem but I think that if you have NUM_IRQS = 0 you don't want to a vector table generated

@henrikbrixandersen

henrikbrixandersen

comment created time in a month

Pull request review commentzephyrproject-rtos/zephyr

arch: arm: Fix undefined symbol reference

 SECTION_SUBSEC_FUNC(exc_vector_table,_vector_table_section,_vector_table) 	ldr pc, =z_arm_prefetch_abort    /* prefetch abort offset  0xc */ 	ldr pc, =z_arm_data_abort        /* data abort     offset 0x10 */ 	nop				 /*                offset 0x14 */+#ifdef CONFIG_GEN_SW_ISR_TABLE 	ldr pc, =_isr_wrapper		 /* IRQ            offset 0x18 */+#else+	ldr pc, =z_irq_spurious

we have Kconfig dependencies handling it, I don't know what you are proposing The problem is that the code is not checking this dependency. As far as I understand there is nothing we can do, if an interruption happens and we don't have a handler it will cause a failure, this code is just adding a default handler for interruptions that is z_irq_spurious in case we build without generate an interruption table. Am I missing something ?

ceolin

comment created time in a month

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentzephyrproject-rtos/zephyr

tests: subsys: test cases for soc power management

+/*+ * Copyright (c) 2020 Intel Corporation+ *+ * SPDX-License-Identifier: Apache-2.0+ */++#include <errno.h>+#include <zephyr.h>+#include <device.h>+#include <soc.h>+#include <power/power.h>+#include <logging/log.h>+#include <sys/util.h>+#define LOG_LEVEL LOG_LEVEL_DBG+LOG_MODULE_REGISTER(pwrmgmt_test);++#define SLP_STATES_SUPPORTED      2ul++/* Thread properties */+#define TASK_STACK_SIZE           1024ul+#define PRIORITY                  K_PRIO_COOP(5)++/* Sleep time should be lower than CONFIG_SYS_PM_MIN_RESIDENCY_SLEEP_1 */+#define THREAD_A_SLEEP_TIME       100ul+#define THREAD_B_SLEEP_TIME       1000ul++/* Maximum latency should be less than 300 ms */+#define MAX_EXPECTED_MS_LATENCY   500ul++/* Sleep some extra time than minimum residency */+#define DP_EXTRA_SLP_TIME         1100ul+#define LT_EXTRA_SLP_TIME         500ul++#define SEC_TO_MSEC               1000ul++K_THREAD_STACK_DEFINE(stack_a, TASK_STACK_SIZE);+K_THREAD_STACK_DEFINE(stack_b, TASK_STACK_SIZE);++static struct k_thread thread_a_id;+static struct k_thread thread_b_id;++struct pm_counter {+	uint8_t entry_cnt;+	uint8_t exit_cnt;+};++/* Track time elapsed */+static int64_t trigger_time;+static bool checks_enabled;+/* Track entry/exit to sleep */+struct pm_counter pm_counters[SLP_STATES_SUPPORTED];++static void pm_latency_check(void)+{+	int64_t latency;+	int secs;+	int msecs;++	latency = k_uptime_delta(&trigger_time);+	secs = (int)(latency / SEC_TO_MSEC);+	msecs = (int)(latency % SEC_TO_MSEC);+	LOG_INF("PM sleep entry latency %d.%03d seconds", secs, msecs);++	if (secs > 0) {+		LOG_WRN("Sleep entry latency is too high");+		return;+	}++	if (msecs > MAX_EXPECTED_MS_LATENCY)+		LOG_WRN("Sleep entry latency is higher than expected");+}++/* Hooks to count entry/exit */+void sys_pm_notify_power_state_entry(enum power_states state)+{+	if (!checks_enabled) {+		return;+	}++	if (sys_pm_is_sleep_state(state)) {+		pm_counters[0].entry_cnt++;+		pm_latency_check();+	} else if (sys_pm_is_deep_sleep_state(state)) {+		pm_counters[1].entry_cnt++;+		pm_latency_check();+	}+}++void sys_pm_notify_power_state_exit(enum power_states state)+{+	if (!checks_enabled) {+		return;+	}++	if (sys_pm_is_sleep_state(state))+		pm_counters[0].exit_cnt++;+	else if (sys_pm_is_deep_sleep_state(state))+		pm_counters[1].exit_cnt++;+}++static void pm_check_counters(uint8_t cycles)+{+	for (int i = 0; i < SLP_STATES_SUPPORTED; i++) {++		/* Skip counters report when deep sleep is not enabled */+		if (i == 1 &&+			!IS_ENABLED(CONFIG_HAS_SYS_POWER_STATE_DEEP_SLEEP_1))+			continue;++		LOG_INF("PM state[%d] entry counter %d\n", i,+			pm_counters[i].entry_cnt);+		LOG_INF("PM state[%d] exit counter %d\n", i,+			pm_counters[i].exit_cnt);++		if (pm_counters[i].entry_cnt != pm_counters[i].exit_cnt)+			LOG_WRN("PM counters entry/exit mismatch");

Shouldn't the test fail here ?

s-kelvin

comment created time in a month

PullRequestReviewEvent

Pull request review commentzephyrproject-rtos/zephyr

tests: subsys: test cases for soc power management

+/*+ * Copyright (c) 2020 Intel Corporation+ *+ * SPDX-License-Identifier: Apache-2.0+ */++#include <errno.h>+#include <zephyr.h>+#include <device.h>+#include <soc.h>+#include <power/power.h>+#include <logging/log.h>+#include <sys/util.h>+#define LOG_LEVEL LOG_LEVEL_DBG+LOG_MODULE_REGISTER(pwrmgmt_test);++#define SLP_STATES_SUPPORTED      2ul++/* Thread properties */+#define TASK_STACK_SIZE           1024ul+#define PRIORITY                  K_PRIO_COOP(5)++/* Sleep time should be lower than CONFIG_SYS_PM_MIN_RESIDENCY_SLEEP_1 */+#define THREAD_A_SLEEP_TIME       100ul+#define THREAD_B_SLEEP_TIME       1000ul++/* Maximum latency should be less than 300 ms */+#define MAX_EXPECTED_MS_LATENCY   500ul++/* Sleep some extra time than minimum residency */+#define DP_EXTRA_SLP_TIME         1100ul+#define LT_EXTRA_SLP_TIME         500ul++#define SEC_TO_MSEC               1000ul++K_THREAD_STACK_DEFINE(stack_a, TASK_STACK_SIZE);+K_THREAD_STACK_DEFINE(stack_b, TASK_STACK_SIZE);++static struct k_thread thread_a_id;+static struct k_thread thread_b_id;++struct pm_counter {+	uint8_t entry_cnt;+	uint8_t exit_cnt;+};++/* Track time elapsed */+static int64_t trigger_time;+static bool checks_enabled;+/* Track entry/exit to sleep */+struct pm_counter pm_counters[SLP_STATES_SUPPORTED];++static void pm_latency_check(void)+{+	int64_t latency;+	int secs;+	int msecs;++	latency = k_uptime_delta(&trigger_time);+	secs = (int)(latency / SEC_TO_MSEC);+	msecs = (int)(latency % SEC_TO_MSEC);+	LOG_INF("PM sleep entry latency %d.%03d seconds", secs, msecs);++	if (secs > 0) {+		LOG_WRN("Sleep entry latency is too high");+		return;+	}++	if (msecs > MAX_EXPECTED_MS_LATENCY)+		LOG_WRN("Sleep entry latency is higher than expected");+}++/* Hooks to count entry/exit */+void sys_pm_notify_power_state_entry(enum power_states state)+{+	if (!checks_enabled) {

why do you need this variable / check ?

s-kelvin

comment created time in a month

PullRequestReviewEvent

Pull request review commentzephyrproject-rtos/zephyr

arch: arm: Fix undefined symbol reference

 SECTION_SUBSEC_FUNC(exc_vector_table,_vector_table_section,_vector_table) 	ldr pc, =z_arm_prefetch_abort    /* prefetch abort offset  0xc */ 	ldr pc, =z_arm_data_abort        /* data abort     offset 0x10 */ 	nop				 /*                offset 0x14 */+#ifdef CONFIG_GEN_SW_ISR_TABLE 	ldr pc, =_isr_wrapper		 /* IRQ            offset 0x18 */+#else+	ldr pc, =z_irq_spurious

I don't know, but the problem happens even when you disable GEN_ISR_TABLES. The assembler is unconditionally looking that symbol that exists only when you enable it. z_irq_spurious will cause a fault that seems better than just a silent misbehavior.

ceolin

comment created time in a month

PullRequestReviewEvent

Pull request review commentzephyrproject-rtos/zephyr

tests: cmsis_rtos_v2: Fix race condition

 static void thread4(void *argument) 	printk(" + Thread A started.\n"); 	status = osThreadJoin(tB); 	zassert_equal(status, osOK, "osThreadJoin thread B failed!");++	/*+	 * Both this thread and the main thread (test_thread_join) are+	 * joining thread5. If this thread is scheduled before the+	 * main thread this thread will be dead before the main thread+	 * has chance to join it. Adding a delay (following the test

does this patch looks right now ?

ceolin

comment created time in a month

PullRequestReviewEvent

pull request commentzephyrproject-rtos/zephyr

arch: arm: Fix undefined symbol reference

Thanks @ceolin, could you please submit a cortex m specific test that catches this build error?

this is not affecting cortex_m. I've tested with qemu_cortex_a53. To reproduce one jus need to set CONFIG_GEN_SW_ISR_TABLE=n. Don't know exactly how to properly test it.

ceolin

comment created time in a month

PR opened zephyrproject-rtos/swg-scripts

Reviewers
Release: Add more contents to vulnerability report
  • Fix undefined attribute
  • Fix vulnerability report format
  • Add link to cve
+6 -1

0 comment

1 changed file

pr created time in a month

push eventceolin/swg-scripts

Flavio Ceolin

commit sha dbb4af7a477f2b0a42b43329df125514bad4b1b5

scan: Generate release report Added a new option to filter the contents targeting release managers. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

Flavio Ceolin

commit sha b2b86abcd4e6cd664873be041d5a456d9a7cddba

release: Add release notes script A simple script that generates two different kinds of report used during Zephyr's release. One is just the release notes, that consists of the cve number and a summary, the other is a more detailed description of the vulnerabilities fixed in the current release. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

Flavio Ceolin

commit sha 1cf0c94f6748f0f3093047433123dc12125177b3

release: Fix an undefined attribute embargo field was only being defined if the JIRA issue had this field, that was causing an access to an undefined attribute. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

Flavio Ceolin

commit sha d79d9ec80c165c694bd33ec1eb6e6291a8751e0f

release: Fix vulnerability report format Use hifen instead of underscore for CVE number. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

Flavio Ceolin

commit sha 695467b6ee81e9fb635394530aa6bc7ff1458ec2

release: Add cve link in the report Add cve link in the vulnerability report. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

view details

push time in a month

PullRequestReviewEvent

pull request commentzephyrproject-rtos/zephyr

arch: arm: Fix undefined symbol reference

Found this issue when looking #27490

ceolin

comment created time in a month

PR opened zephyrproject-rtos/zephyr

Reviewers
arch: arm: Fix undefined symbol reference

_isr_wrapper is not defined when building with CONFIG_GEN_SW_ISR_TABLE = n.

Signed-off-by: Flavio Ceolin flavio.ceolin@intel.com

+10 -1

0 comment

2 changed files

pr created time in a month

create barnchceolin/zephyr

branch : irq

created branch time in a month

issue commentzephyrproject-rtos/zephyr

arch/common/isr_tables.c compilation fails with CONFIG_NUM_IRQS=0

You can achieve that with CONFIG_GEN_IRQ_VECTOR_TABLE=n. When this option is enabled (that is the common case) a lot of other places assume that CONFIG_NUM_IRQS is greater than 0. I may be no understanding the problem but I think that if you have NUM_IRQS = 0 you don't want to a vector table generated

henrikbrixandersen

comment created time in a month

more