[PATCH] score: Add PER_CPU_DATA_NEED_INITIALIZATION()

2021-06-10 Thread Sebastian Huber
Make the initialization of the per-CPU data optional. --- cpukit/Makefile.am | 1 + cpukit/include/rtems/score/percpudata.h | 14 cpukit/sapi/src/exinit.c | 13 cpukit/score/src/percpudata.c| 94 cpukit/score/sr

[PATCH] EPOCH(9): Use PER_CPU_DATA_NEED_INITIALIZATION()

2021-06-10 Thread Sebastian Huber
Use the PER_CPU_DATA_NEED_INITIALIZATION() macro if necessary to request an initialization of the per-CPU data. --- rtemsbsd/rtems/rtems-kernel-epoch.c | 4 1 file changed, 4 insertions(+) diff --git a/rtemsbsd/rtems/rtems-kernel-epoch.c b/rtemsbsd/rtems/rtems-kernel-epoch.c index f4fff0ea.

[PATCH v2] Update Strong APA Scheduler

2021-06-10 Thread Richi Dubey
This change allows for the migration of higher priority tasks on the arrival of a lower priority task limited by affinity constraints. --- cpukit/include/rtems/scheduler.h | 10 +- .../include/rtems/score/schedulerstrongapa.h | 166 ++- cpukit/score/src/schedulerstrongapa.c

Re: [PATCH 1/4] Update Strong APA Scheduler

2021-06-10 Thread Richi Dubey
Hello Sebastian, Thanks for the quick review. I have sent a new v2 patch. Can you please check if it looks good? On Wed, Jun 9, 2021 at 7:25 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > Hello Richi, > > could you please adjust your new Doxygen comments so that they are in >

Re: [PATCH v2] Update Strong APA Scheduler

2021-06-10 Thread Sebastian Huber
On 10/06/2021 10:49, Richi Dubey wrote: +/* Forward Declaration of Per_CPU_Control */ +struct Per_CPU_Control; +typedef struct Per_CPU_Control Per_CPU_Control; Please remove the typedef. + +#define STRONG_SCHEDULER_NODE_OF_CHAIN( node ) \ + RTEMS_CONTAINER_OF( node, Scheduler_strong_APA_Node

[PATCH 6/7] grlib: Fix apbuart_outbyte_polled()

2021-06-10 Thread Sebastian Huber
Callers usually want to output a character. --- bsps/include/grlib/apbuart.h| 2 +- bsps/shared/grlib/uart/apbuart_polled.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bsps/include/grlib/apbuart.h b/bsps/include/grlib/apbuart.h index 68bcf1bffa..f54689abc2 10

[PATCH 4/7] grlib: Remove NL -> CR in apbuart_outbyte_polled()

2021-06-10 Thread Sebastian Huber
This is already done in rtems_putc(). --- bsps/include/grlib/apbuart.h | 1 - bsps/riscv/griscv/console/printk_support.c | 2 +- bsps/shared/grlib/uart/apbuart_cons.c | 2 +- bsps/shared/grlib/uart/apbuart_polled.c| 7 --- bsps/shared/grlib/uart/apbuart_termios.c | 2 +

[PATCH 2/7] grlib: Add ambapp_plb()

2021-06-10 Thread Sebastian Huber
Replace the global variable ambapp_plb with a function to allow an automatic on demand initialization. --- bsps/include/grlib/ambapp.h| 5 ++ bsps/include/grlib/grlib_impl.h| 2 - bsps/riscv/griscv/console/console.c| 4 +- bsps/riscv/griscv/console/printk_sup

[PATCH 1/7] grlib: Customizable allocation in ambapp_scan()

2021-06-10 Thread Sebastian Huber
Make the memory allocations in ambapp_scan() customizable via the new struct ambapp_context parameter which generalizes the memory copy handler. --- bsps/include/grlib/ambapp.h | 27 ++ bsps/shared/grlib/amba/ambapp.c | 41 - 2 files changed,

[PATCH 3/7] bsps/leon3: Auto initialization for printk()

2021-06-10 Thread Sebastian Huber
Get rid of the hack to output into the idle stack during the early system initialization. This fixes also a couple of test program failures which fail due to missing output. --- bsps/sparc/leon3/console/printk_support.c | 42 --- 1 file changed, 14 insertions(+), 28 deletions(

[PATCH 0/7] AMBA Plug & Play and APBUART improvements

2021-06-10 Thread Sebastian Huber
Sebastian Huber (7): grlib: Customizable allocation in ambapp_scan() grlib: Add ambapp_plb() bsps/leon3: Auto initialization for printk() grlib: Remove NL -> CR in apbuart_outbyte_polled() grlib: Add apbuart_outbyte_wait() grlib: Fix apbuart_outbyte_polled() grlib: Simplify apbuart_in

[PATCH 7/7] grlib: Simplify apbuart_inbyte_nonblocking()

2021-06-10 Thread Sebastian Huber
--- bsps/shared/grlib/uart/apbuart_polled.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bsps/shared/grlib/uart/apbuart_polled.c b/bsps/shared/grlib/uart/apbuart_polled.c index 587dacc731..49e137af85 100644 --- a/bsps/shared/grlib/uart/apbuart_polled.c +++ b/bsps

[PATCH 5/7] grlib: Add apbuart_outbyte_wait()

2021-06-10 Thread Sebastian Huber
--- bsps/include/grlib/apbuart.h | 8 +++--- bsps/riscv/griscv/console/printk_support.c | 3 ++- bsps/shared/grlib/uart/apbuart_cons.c | 2 +- bsps/shared/grlib/uart/apbuart_polled.c| 30 +++--- bsps/shared/grlib/uart/apbuart_termios.c | 2 +- bsps/spar

Re: [PATCH] score: Add PER_CPU_DATA_NEED_INITIALIZATION()

2021-06-10 Thread Gedare Bloom
On Thu, Jun 10, 2021 at 2:06 AM Sebastian Huber wrote: > > Make the initialization of the per-CPU data optional. > --- > cpukit/Makefile.am | 1 + > cpukit/include/rtems/score/percpudata.h | 14 > cpukit/sapi/src/exinit.c | 13 > cpukit/score/src/

Re: [PATCH] EPOCH(9): Use PER_CPU_DATA_NEED_INITIALIZATION()

2021-06-10 Thread Gedare Bloom
ok On Thu, Jun 10, 2021 at 2:09 AM Sebastian Huber wrote: > > Use the PER_CPU_DATA_NEED_INITIALIZATION() macro if necessary to request an > initialization of the per-CPU data. > --- > rtemsbsd/rtems/rtems-kernel-epoch.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/rtemsbsd/rtems/

Re: [PATCH v2] Update Strong APA Scheduler

2021-06-10 Thread Gedare Bloom
We'll need the entire patch set resent for commit, but you can work through the scheduler addition first if you like, and then resend the tests as their own patch set. On Thu, Jun 10, 2021 at 7:20 AM Sebastian Huber wrote: > > On 10/06/2021 10:49, Richi Dubey wrote: > > +/* Forward Declaration of

Re: [PATCH] score: Add PER_CPU_DATA_NEED_INITIALIZATION()

2021-06-10 Thread Sebastian Huber
On 10/06/2021 15:48, Gedare Bloom wrote: +/* + * SPDX-License-Identifier: BSD-2-Clause + * The SPDX should go by itself on the first line of the file, according to our templates? Hm, yes. I was lucky enough to copy from the wrong template. -- embedded brains GmbH Herr Sebastian HUBER Dorniers

Re: [PATCH v2] Update Strong APA Scheduler

2021-06-10 Thread Richi Dubey
I understand. Thanks. On Thu, Jun 10, 2021 at 7:20 PM Gedare Bloom wrote: > We'll need the entire patch set resent for commit, but you can work > through the scheduler addition first if you like, and then resend the > tests as their own patch set. > > On Thu, Jun 10, 2021 at 7:20 AM Sebastian Hu

[PATCH v3] Update Strong APA Scheduler

2021-06-10 Thread Richi Dubey
This change allows for the migration of higher priority tasks on the arrival of a lower priority task limited by affinity constraints. --- cpukit/include/rtems/scheduler.h | 10 +- .../include/rtems/score/schedulernodeimpl.h | 3 + .../include/rtems/score/schedulerstrongapa.h |

Re: [PATCH v2] Update Strong APA Scheduler

2021-06-10 Thread Richi Dubey
Thanks again for the prompt response. I have sent v3. Can you please check? On Thu, Jun 10, 2021 at 6:50 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 10/06/2021 10:49, Richi Dubey wrote: > > +/* Forward Declaration of Per_CPU_Control */ > > +struct Per_CPU_Control; > > +ty

Re: [PATCH v3] Update Strong APA Scheduler

2021-06-10 Thread Sebastian Huber
On 11/06/2021 07:45, Richi Dubey wrote: diff --git a/cpukit/include/rtems/score/schedulernodeimpl.h b/cpukit/include/rtems/score/schedulernodeimpl.h index 5d6f795912..ba116077c7 100644 --- a/cpukit/include/rtems/score/schedulernodeimpl.h +++ b/cpukit/include/rtems/score/schedulernodeimpl.h @@ -4

[libbsd] EPOCH(9): Fix epoch call and drain

2021-06-10 Thread Sebastian Huber
Since the epoch call callbacks may lock/unlock a mutex the callbacks must be called from within thread context with thread dispatching enabled. Use thread pinning to ensure that the calling thread stays on the right processor. Use the interrupt server to ensure the thread context for the epoch dr