Re: [PATCH v2] bsps: Add BSP_FLUSH_KERNEL_CHAR_OUTPUT BSP option

2024-03-20 Thread Sebastian Huber



On 21.03.24 00:28, Chris Johns wrote:

On 21/3/2024 2:11 am, Sebastian Huber wrote:

On 19.03.24 18:44, Chris Johns wrote:

On 20/3/2024 2:03 am, Sebastian Huber wrote:

On 19.03.24 14:50, Kinsey Moore wrote:

The xilinx-zynqmp-rpu bsp_reset() is modified, but not included in the spec
file for the new option. Its family differs from the arm/xilinx-zynqmp BSP
family with a -rpu suffix.

Yes, but this BSP is quite new. I would prefer to let it not flush anything by
default to carry out a reset.


I'd be fine with this being enabled for the AArch64 BSPs as well, but I
imagine that's better as a separate patch.

Why should it be enabled by default? The arm/xilinx-zynq and arm/xilinx-zynqmp
BSPs were the only ones doing an UART flush in the general termination
procedure. It probably was done to address a specific use case (maybe test
runs).

Is the issue the flush is before an infinite loop which means the UART FIFO
should drain?


What is the issue you are wanting to solve removing the flush?


The bsp_reset() function should reset the system and do nothing more. 
Doing additional things like flushing an UART device may not make sense 
for all applications. Some applications may not use the UART device, so 
it may not be initialized and powered off.  Some applications may use it 
with an application-specific protocol which doesn't like the additional 
four '\r' during reset. Doing a UART flush takes some time and some 
applications may prefer a fast reset time. The bsp_reset() is the wrong 
place to do add specific cleanup functions. Applications can customize 
the termination procedure with their own fatal error extension, 
destructors, and exit handlers.


--
embedded brains GmbH & Co. KG
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH 0/1] This is the task for GSOC'24

2024-03-20 Thread Abhinav Srivastava
Screenshot: https://i.ibb.co/NTxGCj6/Screenshot-2024-03-20-22-41-54.png - 
Modified the sample hello world to print the popular dialogue "Oh, Hi Mark" 
from the movie "The Room" by Tommy Wiseau.

Abhinav Srivastava (1):
  Modify hello world sample for GSoC task

 testsuites/samples/hello/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.34.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 1/1] Modify hello world sample for GSoC task

2024-03-20 Thread Abhinav Srivastava
---
 testsuites/samples/hello/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testsuites/samples/hello/init.c b/testsuites/samples/hello/init.c
index 83f6342ab3..f1c5983ad2 100644
--- a/testsuites/samples/hello/init.c
+++ b/testsuites/samples/hello/init.c
@@ -41,7 +41,7 @@ static rtems_task Init(
 {
   rtems_print_printer_fprintf_putc(&rtems_test_printer);
   TEST_BEGIN();
-  printf( "Hello World\n" );
+  printf( "Oh, Hi Mark.\n" );
   TEST_END();
   rtems_test_exit( 0 );
 }
-- 
2.34.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


gprof Support

2024-03-20 Thread Joel Sherrill
Hi

Did gprof support some along as a side-effect of gcov support?

Any hints on getting it working appreciated.

--joel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH v2] bsps: Add BSP_FLUSH_KERNEL_CHAR_OUTPUT BSP option

2024-03-20 Thread Chris Johns
On 21/3/2024 2:11 am, Sebastian Huber wrote:
> On 19.03.24 18:44, Chris Johns wrote:
>> On 20/3/2024 2:03 am, Sebastian Huber wrote:
>>> On 19.03.24 14:50, Kinsey Moore wrote:
 The xilinx-zynqmp-rpu bsp_reset() is modified, but not included in the spec
 file for the new option. Its family differs from the arm/xilinx-zynqmp BSP
 family with a -rpu suffix.
>>> Yes, but this BSP is quite new. I would prefer to let it not flush anything 
>>> by
>>> default to carry out a reset.
>>>
 I'd be fine with this being enabled for the AArch64 BSPs as well, but I
 imagine that's better as a separate patch.
>>> Why should it be enabled by default? The arm/xilinx-zynq and 
>>> arm/xilinx-zynqmp
>>> BSPs were the only ones doing an UART flush in the general termination
>>> procedure. It probably was done to address a specific use case (maybe test
>>> runs).
>> Is the issue the flush is before an infinite loop which means the UART FIFO
>> should drain?

What is the issue you are wanting to solve removing the flush?

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] GSoC Hello World

2024-03-20 Thread Samuel Pires
---
 testsuites/samples/hello/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testsuites/samples/hello/init.c b/testsuites/samples/hello/init.c
index 83f6342ab3..5ebcdc9ef2 100644
--- a/testsuites/samples/hello/init.c
+++ b/testsuites/samples/hello/init.c
@@ -41,7 +41,7 @@ static rtems_task Init(
 {
   rtems_print_printer_fprintf_putc(&rtems_test_printer);
   TEST_BEGIN();
-  printf( "Hello World\n" );
+  printf( "Hello World from GSoC!\n" );
   TEST_END();
   rtems_test_exit( 0 );
 }
-- 
2.34.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] bsps: Move declarations to

2024-03-20 Thread Sebastian Huber
Move declarations of bsp_interrupt_get_affinity() and
bsp_interrupt_set_affinity() to .  Canonicalize the
 includes.

Implement bsp_interrupt_get_affinity() and bsp_interrupt_set_affinity() only if
needed (usually RTEMS_SMP).

Provide stub implementations for i386 to fix build errors.
---
 bsps/aarch64/raspberrypi/include/bsp/irq.h | 28 
 bsps/arm/raspberrypi/include/bsp/irq.h | 28 
 bsps/arm/raspberrypi/irq/irq.c | 23 +-
 bsps/i386/shared/irq/irq.c | 33 ++
 bsps/include/bsp/irq-generic.h | 52 +-
 bsps/include/dev/irq/arm-gic-irq.h | 11 -
 bsps/powerpc/qoriq/clock/clock-config.c|  2 +-
 bsps/powerpc/qoriq/include/bsp/irq.h   | 11 -
 bsps/powerpc/qoriq/irq/irq.c   |  1 -
 bsps/powerpc/t32mppc/include/bsp/irq.h | 23 --
 bsps/powerpc/t32mppc/irq/irq.c | 22 +
 bsps/riscv/griscv/clock/clockdrv.c |  2 +-
 bsps/riscv/griscv/include/bsp/irq.h| 13 --
 bsps/riscv/griscv/irq/irq.c|  1 -
 bsps/riscv/noel/include/bsp/irq.h  | 13 --
 bsps/riscv/riscv/include/bsp/irq.h | 13 --
 bsps/riscv/riscv/irq/irq.c |  1 -
 bsps/shared/dev/irq/arm-gicv2.c|  3 +-
 bsps/shared/dev/irq/arm-gicv3.c|  3 +-
 bsps/shared/irq/irq-affinity.c |  1 -
 bsps/sparc/erc32/include/bsp/irq.h | 22 +
 bsps/sparc/leon3/clock/ckinit.c|  3 +-
 bsps/sparc/leon3/include/bsp/irq.h | 11 -
 bsps/sparc/leon3/include/tm27.h|  2 +-
 bsps/sparc/leon3/start/bspsmp.c|  2 +-
 bsps/sparc/leon3/start/eirq.c  |  1 -
 bsps/sparc/shared/irq/irq-shared.c | 22 +
 27 files changed, 160 insertions(+), 187 deletions(-)

diff --git a/bsps/aarch64/raspberrypi/include/bsp/irq.h 
b/bsps/aarch64/raspberrypi/include/bsp/irq.h
index effec1b040..1ff6ae80de 100644
--- a/bsps/aarch64/raspberrypi/include/bsp/irq.h
+++ b/bsps/aarch64/raspberrypi/include/bsp/irq.h
@@ -23,14 +23,8 @@
 #ifndef ASM
 
 #include 
-#include 
-#include 
 #include 
 
-#if defined(RTEMS_SMP)
-#include 
-#endif
-
 /**
  * @defgroup raspberrypi_interrupt Interrrupt Support
  *
@@ -83,27 +77,5 @@
 
 #define BSP_IRQ_COUNT   (BCM2835_INTC_TOTAL_IRQ)
 
-#if defined(RTEMS_SMP)
-static inline rtems_status_code bsp_interrupt_set_affinity(
-  rtems_vector_number   vector,
-  const Processor_mask *affinity
-)
-{
-  (void) vector;
-  (void) affinity;
-  return RTEMS_UNSATISFIED;
-}
-
-static inline rtems_status_code bsp_interrupt_get_affinity(
-  rtems_vector_number  vector,
-  Processor_mask  *affinity
-)
-{
-  (void) vector;
-  _Processor_mask_From_index( affinity, 0 );
-  return RTEMS_UNSATISFIED;
-}
-#endif
-
 #endif /* ASM */
 #endif /* LIBBSP_ARM_RASPBERRYPI_IRQ_H */
diff --git a/bsps/arm/raspberrypi/include/bsp/irq.h 
b/bsps/arm/raspberrypi/include/bsp/irq.h
index 6801b01d84..895b268dfe 100644
--- a/bsps/arm/raspberrypi/include/bsp/irq.h
+++ b/bsps/arm/raspberrypi/include/bsp/irq.h
@@ -22,12 +22,6 @@
 #ifndef ASM
 
 #include 
-#include 
-#include 
-
-#if defined(RTEMS_SMP)
-#include 
-#endif
 
 /**
  * @defgroup raspberrypi_interrupt Interrrupt Support
@@ -78,27 +72,5 @@
 
 #define BSP_IRQ_COUNT   (BCM2835_INTC_TOTAL_IRQ)
 
-#if defined(RTEMS_SMP)
-static inline rtems_status_code bsp_interrupt_set_affinity(
-  rtems_vector_number   vector,
-  const Processor_mask *affinity
-)
-{
-  (void) vector;
-  (void) affinity;
-  return RTEMS_UNSATISFIED;
-}
-
-static inline rtems_status_code bsp_interrupt_get_affinity(
-  rtems_vector_number  vector,
-  Processor_mask  *affinity
-)
-{
-  (void) vector;
-  _Processor_mask_From_index( affinity, 0 );
-  return RTEMS_UNSATISFIED;
-}
-#endif
-
 #endif /* ASM */
 #endif /* LIBBSP_ARM_RASPBERRYPI_IRQ_H */
diff --git a/bsps/arm/raspberrypi/irq/irq.c b/bsps/arm/raspberrypi/irq/irq.c
index 30e10e5aec..7177cd2c05 100644
--- a/bsps/arm/raspberrypi/irq/irq.c
+++ b/bsps/arm/raspberrypi/irq/irq.c
@@ -19,7 +19,6 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -207,6 +206,28 @@ rtems_status_code 
bsp_interrupt_vector_disable(rtems_vector_number vector)
   return RTEMS_SUCCESSFUL;
 }
 
+#if defined(RTEMS_SMP)
+rtems_status_code bsp_interrupt_get_affinity(
+  rtems_vector_number  vector,
+  Processor_mask  *affinity
+)
+{
+  (void) vector;
+  _Processor_mask_From_index( affinity, 0 );
+  return RTEMS_UNSATISFIED;
+}
+
+rtems_status_code bsp_interrupt_set_affinity(
+  rtems_vector_number   vector,
+  const Processor_mask *affinity
+)
+{
+  (void) vector;
+  (void) affinity;
+  return RTEMS_UNSATISFIED;
+}
+#endif
+
 void bsp_interrupt_handler_default(rtems_vector_number vector)
 {
 printk("spurious interrupt: %" PRIdrtems_vector_number "\n", vector);
diff --git a/bsps/i386/shared/irq/irq.c b/bsps/i386/shared/irq/irq.c
index fe43bc1d7c..57753c2f77 100644
--- a/b

[PATCH] Mark parameters as intentionally unused

2024-03-20 Thread Sebastian Huber
The parameters are unused due to API constraints.  The functions are
used through function pointers.  Alternative implementations may use the
parameters.

Close #4862.
---
 bsps/sparc/leon3/start/bspclean.c   | 1 +
 cpukit/score/src/threadchangepriority.c | 1 +
 cpukit/score/src/threadq.c  | 2 ++
 cpukit/score/src/threadqenqueue.c   | 1 +
 cpukit/score/src/threadqops.c   | 2 ++
 cpukit/score/src/threadqtimeout.c   | 1 +
 cpukit/score/src/threadrestart.c| 1 +
 cpukit/score/src/userextiterate.c   | 2 ++
 8 files changed, 11 insertions(+)

diff --git a/bsps/sparc/leon3/start/bspclean.c 
b/bsps/sparc/leon3/start/bspclean.c
index 0324c45326..d624ec74c8 100644
--- a/bsps/sparc/leon3/start/bspclean.c
+++ b/bsps/sparc/leon3/start/bspclean.c
@@ -46,6 +46,7 @@ void bsp_fatal_extension(
 {
   rtems_interrupt_level level;
 
+  (void) always_set_to_false;
   rtems_interrupt_local_disable(level);
   (void) level;
 
diff --git a/cpukit/score/src/threadchangepriority.c 
b/cpukit/score/src/threadchangepriority.c
index ca49f6f417..78291b7798 100644
--- a/cpukit/score/src/threadchangepriority.c
+++ b/cpukit/score/src/threadchangepriority.c
@@ -111,6 +111,7 @@ static void _Thread_Priority_action_change(
   void *arg
 )
 {
+  (void) arg;
   _Thread_Set_scheduler_node_priority(
 priority_aggregation,
 priority_group_order
diff --git a/cpukit/score/src/threadq.c b/cpukit/score/src/threadq.c
index e694029a46..3c6d72bd14 100644
--- a/cpukit/score/src/threadq.c
+++ b/cpukit/score/src/threadq.c
@@ -179,5 +179,7 @@ void _Thread_queue_MP_callout_do_nothing(
 )
 {
   /* Do nothing */
+  (void) the_proxy;
+  (void) mp_id;
 }
 #endif
diff --git a/cpukit/score/src/threadqenqueue.c 
b/cpukit/score/src/threadqenqueue.c
index e43efd925b..038c483f65 100644
--- a/cpukit/score/src/threadqenqueue.c
+++ b/cpukit/score/src/threadqenqueue.c
@@ -400,6 +400,7 @@ void _Thread_queue_Deadlock_status( Thread_Control 
*the_thread )
 
 void _Thread_queue_Deadlock_fatal( Thread_Control *the_thread )
 {
+  (void) the_thread;
   _Internal_error( INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK );
 }
 
diff --git a/cpukit/score/src/threadqops.c b/cpukit/score/src/threadqops.c
index 511d1e4d00..9a09b4c442 100644
--- a/cpukit/score/src/threadqops.c
+++ b/cpukit/score/src/threadqops.c
@@ -156,6 +156,8 @@ static void _Thread_queue_FIFO_do_initialize(
 {
   Scheduler_Node *scheduler_node;
 
+  (void) queue;
+  (void) queue_context;
   scheduler_node = _Thread_Scheduler_get_home_node( the_thread );
 
   _Chain_Initialize_node( &scheduler_node->Wait.Priority.Node.Node.Chain );
diff --git a/cpukit/score/src/threadqtimeout.c 
b/cpukit/score/src/threadqtimeout.c
index acb3c1d048..e30a2ffded 100644
--- a/cpukit/score/src/threadqtimeout.c
+++ b/cpukit/score/src/threadqtimeout.c
@@ -53,6 +53,7 @@ void _Thread_queue_Add_timeout_ticks(
 {
   Watchdog_Interval ticks;
 
+  (void) queue;
   ticks = queue_context->Timeout.ticks;
 
   if ( ticks != WATCHDOG_NO_TIMEOUT ) {
diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c
index d1c4b283fb..72326682ca 100644
--- a/cpukit/score/src/threadrestart.c
+++ b/cpukit/score/src/threadrestart.c
@@ -83,6 +83,7 @@ static Thread_Control *_Thread_Join_flush_filter(
 {
   Thread_Join_context *join_context;
 
+  (void) queue;
   join_context = (Thread_Join_context *) queue_context;
 
   the_thread->Wait.return_argument = join_context->exit_value;
diff --git a/cpukit/score/src/userextiterate.c 
b/cpukit/score/src/userextiterate.c
index 6f6790082a..cae76d173c 100644
--- a/cpukit/score/src/userextiterate.c
+++ b/cpukit/score/src/userextiterate.c
@@ -118,6 +118,8 @@ void _User_extensions_Thread_begin_visitor(
 {
   User_extensions_thread_begin_extension callout = callouts->thread_begin;
 
+  (void) arg;
+
   if ( callout != NULL ) {
 (*callout)( executing );
   }
-- 
2.35.3

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH v2] bsps: Add BSP_FLUSH_KERNEL_CHAR_OUTPUT BSP option

2024-03-20 Thread Sebastian Huber

On 19.03.24 18:44, Chris Johns wrote:

On 20/3/2024 2:03 am, Sebastian Huber wrote:

On 19.03.24 14:50, Kinsey Moore wrote:

The xilinx-zynqmp-rpu bsp_reset() is modified, but not included in the spec
file for the new option. Its family differs from the arm/xilinx-zynqmp BSP
family with a -rpu suffix.

Yes, but this BSP is quite new. I would prefer to let it not flush anything by
default to carry out a reset.


I'd be fine with this being enabled for the AArch64 BSPs as well, but I
imagine that's better as a separate patch.

Why should it be enabled by default? The arm/xilinx-zynq and arm/xilinx-zynqmp
BSPs were the only ones doing an UART flush in the general termination
procedure. It probably was done to address a specific use case (maybe test 
runs).

Is the issue the flush is before an infinite loop which means the UART FIFO
should drain?


I don't really like the new bsp_flush_kernel_char_output() function. Another
approach could be an API change of

/**
  * @ingroup RTEMSAPIKernelCharIO
  *
  * @brief Polled character output functions shall have this type.
  */
typedef void ( *BSP_output_char_function_type )( char );

to something like this

typedef int ( *BSP_output_char_function_type )( int action );

If action in {0, ..., 255}, then print out the character. If 0x100 is set, then
flush the output device. If 0x200 is set, then do Y... The return value could be
used to give a status indication.

This could then be use for example by test runs, to flush the test output after
the end of the test.

This also requires a code change so is a flush function that bad an option?


You can change the character output handler since this is only a global 
variable (BSP_output_char). So, this bsp_flush_kernel_char_output() may 
not flush the device used by BSP_output_char. Doing a flush through the 
output handler lets you do the flush for the currently used device.


If we change the function type to

typedef int ( *BSP_output_char_function_type )( int action );

then we can add more features later if needed. Another feature which 
could be useful is: Output char immediately if possible and return 0, 
otherwise do nothing and return -1. This can be used to implement a 
full-duplex transfer in polling mode for the kernel I/O stream.


--
embedded brains GmbH & Co. KG
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH] bsps: Avoid unused argument in clock interrupt

2024-03-20 Thread Sebastian Huber
Pass the parameter of the clock interrupt handler to
Clock_driver_support_at_tick() and Clock_driver_timecounter_tick().  This makes
it possible to use the interrupt handler argument in clock drivers.

Use the interrupt handler provided by Clock_driver_support_install_isr() to
avoid local delarations of Clock_isr().

Update #4862.
---
 bsps/arm/beagle/clock/clock.c |  2 +-
 bsps/arm/csb336/clock/clockdrv.c  |  2 +-
 bsps/arm/csb337/clock/clock.c |  2 +-
 bsps/arm/edb7312/clock/clockdrv.c |  6 +--
 bsps/arm/gumstix/clock/clock.c|  2 +-
 bsps/arm/raspberrypi/clock/clockdrv.c | 27 +-
 bsps/arm/rtl22xx/clock/clockdrv.c |  2 +-
 bsps/arm/shared/clock/clock-a9mpcore.c| 28 ++
 bsps/arm/shared/clock/clock-nxp-lpc.c | 17 -
 bsps/arm/smdk2410/clock/clockdrv.c|  2 +-
 bsps/arm/tms570/clock/clock.c | 20 +-
 bsps/i386/pc386/clock/ckinit.c|  2 +-
 bsps/lm32/shared/clock/ckinit.c   |  2 +-
 bsps/lm32/shared/milkymist_clock/ckinit.c |  2 +-
 bsps/m68k/av5282/clock/clock.c|  2 +-
 bsps/m68k/gen68360/clock/clock.c  |  2 +-
 bsps/m68k/genmcf548x/clock/clock.c|  2 +-
 bsps/m68k/mcf52235/clock/clock.c  |  2 +-
 bsps/m68k/mcf5225x/clock/clock.c  |  2 +-
 bsps/m68k/mcf5235/clock/clock.c   |  2 +-
 bsps/m68k/mcf5329/clock/clock.c   |  2 +-
 bsps/m68k/mrm332/btimer/btimer.c  |  2 -
 bsps/m68k/uC5282/clock/clock.c|  2 +-
 bsps/microblaze/microblaze_fpga/clock/clock.c |  8 ++--
 bsps/mips/csb350/clock/clockdrv.c |  4 +-
 bsps/mips/rbtx4925/clock/clockdrv.c   |  2 +-
 bsps/mips/rbtx4938/clock/clockdrv.c   |  2 +-
 bsps/mips/shared/clock/clockdrv.c |  2 +-
 bsps/nios2/nios2_iss/clock/clock.c|  2 +-
 bsps/or1k/generic_or1k/clock/clockdrv.c   |  2 +-
 bsps/powerpc/mpc55xxevb/clock/clock-config.c  | 24 ++--
 bsps/powerpc/qoriq/clock/clock-config.c   | 14 +++
 bsps/riscv/griscv/clock/clockdrv.c|  2 +-
 bsps/riscv/riscv/clock/clockdrv.c | 13 +++
 bsps/shared/dev/clock/arm-generic-timer.c | 19 --
 bsps/shared/dev/clock/clockimpl.h | 37 +--
 bsps/shared/dev/clock/xil-ttc.c   | 32 ++--
 bsps/shared/grlib/btimer/tlib_ckinit.c|  4 +-
 bsps/sparc/erc32/clock/ckinit.c   |  8 ++--
 bsps/sparc/leon2/clock/ckinit.c   |  2 +-
 bsps/sparc/leon3/clock/ckinit.c   |  2 +-
 bsps/sparc64/shared/clock/ckinit.c|  2 +-
 42 files changed, 137 insertions(+), 178 deletions(-)

diff --git a/bsps/arm/beagle/clock/clock.c b/bsps/arm/beagle/clock/clock.c
index d42b051c98..a32dde86bf 100644
--- a/bsps/arm/beagle/clock/clock.c
+++ b/bsps/arm/beagle/clock/clock.c
@@ -290,7 +290,7 @@ static void 
beagle_clock_handler_install(rtems_interrupt_handler isr)
   clock_isr = isr;
 }
 
-#define Clock_driver_support_at_tick() beagle_clock_at_tick()
+#define Clock_driver_support_at_tick(arg) beagle_clock_at_tick()
 #define Clock_driver_support_initialize_hardware() beagle_clock_initialize()
 #define Clock_driver_support_install_isr(isr) \
   beagle_clock_handler_install(isr)
diff --git a/bsps/arm/csb336/clock/clockdrv.c b/bsps/arm/csb336/clock/clockdrv.c
index 58f98d87be..6af507a877 100644
--- a/bsps/arm/csb336/clock/clockdrv.c
+++ b/bsps/arm/csb336/clock/clockdrv.c
@@ -38,7 +38,7 @@ rtems_irq_connect_data clock_isr_data = {
  *- clear the interrupt bit?
  *- restart the timer?
  */
-#define Clock_driver_support_at_tick()   \
+#define Clock_driver_support_at_tick(arg)\
   do {   \
 uint32_t reg;\
  \
diff --git a/bsps/arm/csb337/clock/clock.c b/bsps/arm/csb337/clock/clock.c
index 69a3dafd81..ee05387baa 100644
--- a/bsps/arm/csb337/clock/clock.c
+++ b/bsps/arm/csb337/clock/clock.c
@@ -94,7 +94,7 @@ static void Clock_driver_support_initialize_hardware(void)
   ST_REG(ST_PIMR) = value;
 }
 
-#define Clock_driver_support_at_tick() \
+#define Clock_driver_support_at_tick(arg) \
   do { \
 uint32_t st_str; \
 \
diff --git a/bsps/arm/edb7312/clock/clockdrv.c 
b/bsps/arm/edb7312/clock/clockdrv.c
index 8c7cc4f26a..79289366da 100644
--- a/bsps/arm/edb7312/clock/clockdrv.c
+++ b/bsps/arm/edb7312/clock/clockdrv.c
@@ -18,9 +18,7 @@
   #define CLOCK_DRIVER_USE_FAST_IDLE 1
 #endif
 
-void Clock_isr(void * arg);
-
-#define Clock_driver_support_at_tick()\
+#define Clock_driver_support_at_tick(arg) \
   do {\
 *EP7312_TC1EOI = 0x;  \
   } while(0)
@@ -32,7 +30,7 @@ void Clock_isr(void 

[Docs] c-user: Clarify CONFIGURE_TICKS_PER_TIMESLICE

2024-03-20 Thread Sebastian Huber
Close #4986.
---
 c-user/config/general.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/c-user/config/general.rst b/c-user/config/general.rst
index 5ff79e7..61bfa1e 100644
--- a/c-user/config/general.rst
+++ b/c-user/config/general.rst
@@ -1017,7 +1017,7 @@ configured, see 
:ref:`CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER`.
 
 The following constraints apply to this configuration option:
 
-* The value of the configuration option shall be greater than or equal to zero.
+* The value of the configuration option shall be greater than or equal to one.
 
 * The value of the configuration option shall be less than or equal to
   `UINT32_MAX `_.
-- 
2.35.3

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH] Do not define CONFIGURE_TICKS_PER_TIMESLICE to 0

2024-03-20 Thread Sebastian Huber

On 20.03.24 15:14, Joel Sherrill wrote:
This is generally ok but it contradicts the documented behavior 
for CONFIGURE_TICKS_PER_TIMESLICE which states "The value of the 
configuration option shall be greater than or equal to zero."


This is the problem of the referenced ticket:

https://devel.rtems.org/ticket/4986



If zero is to be an error, then that needs to change.


This is what the patch does.



Further, this series of changes has made me realize that 
CONFIGURE_TICKS_PER_TIMESLICE and CONFIGURE_MICROSECONDS_PER_TICK should 
not be defined if the application has not defined 
CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER. Currently the documentation 
just says it has no effect.


This is a different topic. I would like to first fix the undefined 
behaviour if some uses:


#define CONFIGURE_TICKS_PER_TIMESLICE 0



Also the formatting of the text in the description is inconsistent. 
Could a ref be used for all of this?


The application shall define exactly one of the following configuration 
options


* :ref:`CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER`,
* ``CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER``, or
* :ref:`CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER`,


Sorry, were is this in the patch?

--
embedded brains GmbH & Co. KG
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] Do not define CONFIGURE_TICKS_PER_TIMESLICE to 0

2024-03-20 Thread Joel Sherrill
This is generally ok but it contradicts the documented behavior
for CONFIGURE_TICKS_PER_TIMESLICE which states "The value of the
configuration option shall be greater than or equal to zero."

If zero is to be an error, then that needs to change.

Further, this series of changes has made me realize that
CONFIGURE_TICKS_PER_TIMESLICE and CONFIGURE_MICROSECONDS_PER_TICK should
not be defined if the application has not defined
CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER. Currently the documentation just
says it has no effect.

Also the formatting of the text in the description is inconsistent. Could a
ref be used for all of this?

The application shall define exactly one of the following configuration
options

* :ref:`CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER`,
* ``CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER``, or
* :ref:`CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER`,

--joel

On Wed, Mar 20, 2024 at 2:28 AM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> Unconditionally make a CONFIGURE_TICKS_PER_TIMESLICE value less than or
> equal
> to zero an error.
>
> Update #4986.
> ---
>  cpukit/doxygen/appl-config.h  | 2 +-
>  cpukit/include/rtems/confdefs/clock.h | 3 +--
>  testsuites/ada/tmtests/tm01/init.c| 1 -
>  testsuites/ada/tmtests/tm02/init.c| 1 -
>  testsuites/ada/tmtests/tm03/init.c| 1 -
>  testsuites/ada/tmtests/tm04/init.c| 1 -
>  testsuites/ada/tmtests/tm05/init.c| 1 -
>  testsuites/ada/tmtests/tm06/init.c| 1 -
>  testsuites/ada/tmtests/tm07/init.c| 1 -
>  testsuites/ada/tmtests/tm08/init.c| 1 -
>  testsuites/ada/tmtests/tm09/init.c| 1 -
>  testsuites/ada/tmtests/tm10/init.c| 1 -
>  testsuites/ada/tmtests/tm11/init.c| 1 -
>  testsuites/ada/tmtests/tm12/init.c| 1 -
>  testsuites/ada/tmtests/tm13/init.c| 1 -
>  testsuites/ada/tmtests/tm14/init.c| 1 -
>  testsuites/ada/tmtests/tm15/init.c| 1 -
>  testsuites/ada/tmtests/tm16/init.c| 1 -
>  testsuites/ada/tmtests/tm17/init.c| 1 -
>  testsuites/ada/tmtests/tm18/init.c| 1 -
>  testsuites/ada/tmtests/tm19/init.c| 1 -
>  testsuites/ada/tmtests/tm20/init.c| 1 -
>  testsuites/ada/tmtests/tm21/init.c| 1 -
>  testsuites/ada/tmtests/tm22/init.c| 1 -
>  testsuites/ada/tmtests/tm23/init.c| 1 -
>  testsuites/ada/tmtests/tm24/init.c| 1 -
>  testsuites/ada/tmtests/tm25/init.c| 1 -
>  testsuites/ada/tmtests/tm28/init.c| 1 -
>  testsuites/ada/tmtests/tm29/init.c| 1 -
>  testsuites/ada/tmtests/tmck/init.c| 1 -
>  testsuites/rhealstone/rhdeadlockbrk/deadlockbrk.c | 1 -
>  testsuites/rhealstone/rhilatency/ilatency.c   | 1 -
>  testsuites/rhealstone/rhmlatency/mlatency.c   | 1 -
>  testsuites/rhealstone/rhtaskpreempt/taskpreempt.c | 1 -
>  testsuites/rhealstone/rhtaskswitch/taskswitch.c   | 1 -
>  testsuites/tmtests/tm01/system.h  | 1 -
>  testsuites/tmtests/tm02/system.h  | 1 -
>  testsuites/tmtests/tm03/system.h  | 1 -
>  testsuites/tmtests/tm04/system.h  | 1 -
>  testsuites/tmtests/tm05/system.h  | 1 -
>  testsuites/tmtests/tm06/system.h  | 1 -
>  testsuites/tmtests/tm07/system.h  | 1 -
>  testsuites/tmtests/tm08/system.h  | 1 -
>  testsuites/tmtests/tm09/system.h  | 1 -
>  testsuites/tmtests/tm10/system.h  | 1 -
>  testsuites/tmtests/tm11/system.h  | 1 -
>  testsuites/tmtests/tm12/system.h  | 1 -
>  testsuites/tmtests/tm13/system.h  | 1 -
>  testsuites/tmtests/tm14/system.h  | 1 -
>  testsuites/tmtests/tm15/system.h  | 1 -
>  testsuites/tmtests/tm16/system.h  | 1 -
>  testsuites/tmtests/tm17/system.h  | 1 -
>  testsuites/tmtests/tm18/system.h  | 1 -
>  testsuites/tmtests/tm19/system.h  | 1 -
>  testsuites/tmtests/tm20/system.h  | 1 -
>  testsuites/tmtests/tm21/system.h  | 1 -
>  testsuites/tmtests/tm22/system.h  | 1 -
>  testsuites/tmtests/tm23/system.h  | 1 -
>  testsuites/tmtests/tm24/system.h  | 1 -
>  testsuites/tmtests/tm25/system.h  | 1 -
>  testsuites/tmtests/tm26/system.h  | 1 -
>  testsuites/tmtests/tm27/system.h  | 1 -
>  testsuites/tmtests/tm28/system.h  | 1 -
>  testsuites/tmtests/tm29/system.h  | 1 -
>  testsuites/tmtests/tmck/system.h  | 1 -
>  65 files changed, 2 insertions(+), 66 deletions(-)
>
> 

Re: utf32 support

2024-03-20 Thread Frank Kühndel

Hello John,

On 3/19/24 16:53, John Howard wrote:

P.S.: UTF32 exists for Unicode in 2012 after consolidation from ISO 10646-2012. 
The two standards merged.


Oops. I am apparently outdated ...
Frank

--
embedded brains GmbH & Co. KG
Herr Frank KÜHNDEL
Dornierstr. 4
82178 Puchheim
Germany
email: frank.kuehn...@embedded-brains.de
phone:  +49-89-18 94 741 - 23
mobile: +49-176-15 22 06 - 11

Registergericht: Amtsgericht München
Registernummer: HRA 117265
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

RFC: Add API to get and set interrupt priorities for interrupt vectors

2024-03-20 Thread Sebastian Huber

Hello,

I added a ticket for a proposal for an API to get and set interrupt 
priorities for interrupt vectors:


https://devel.rtems.org/ticket/5002

I would like to implement this API at least for the BSPs using the 
ARM/AArch64 GIC.


--
embedded brains GmbH & Co. KG
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH] Do not define CONFIGURE_TICKS_PER_TIMESLICE to 0

2024-03-20 Thread Sebastian Huber
Unconditionally make a CONFIGURE_TICKS_PER_TIMESLICE value less than or equal
to zero an error.

Update #4986.
---
 cpukit/doxygen/appl-config.h  | 2 +-
 cpukit/include/rtems/confdefs/clock.h | 3 +--
 testsuites/ada/tmtests/tm01/init.c| 1 -
 testsuites/ada/tmtests/tm02/init.c| 1 -
 testsuites/ada/tmtests/tm03/init.c| 1 -
 testsuites/ada/tmtests/tm04/init.c| 1 -
 testsuites/ada/tmtests/tm05/init.c| 1 -
 testsuites/ada/tmtests/tm06/init.c| 1 -
 testsuites/ada/tmtests/tm07/init.c| 1 -
 testsuites/ada/tmtests/tm08/init.c| 1 -
 testsuites/ada/tmtests/tm09/init.c| 1 -
 testsuites/ada/tmtests/tm10/init.c| 1 -
 testsuites/ada/tmtests/tm11/init.c| 1 -
 testsuites/ada/tmtests/tm12/init.c| 1 -
 testsuites/ada/tmtests/tm13/init.c| 1 -
 testsuites/ada/tmtests/tm14/init.c| 1 -
 testsuites/ada/tmtests/tm15/init.c| 1 -
 testsuites/ada/tmtests/tm16/init.c| 1 -
 testsuites/ada/tmtests/tm17/init.c| 1 -
 testsuites/ada/tmtests/tm18/init.c| 1 -
 testsuites/ada/tmtests/tm19/init.c| 1 -
 testsuites/ada/tmtests/tm20/init.c| 1 -
 testsuites/ada/tmtests/tm21/init.c| 1 -
 testsuites/ada/tmtests/tm22/init.c| 1 -
 testsuites/ada/tmtests/tm23/init.c| 1 -
 testsuites/ada/tmtests/tm24/init.c| 1 -
 testsuites/ada/tmtests/tm25/init.c| 1 -
 testsuites/ada/tmtests/tm28/init.c| 1 -
 testsuites/ada/tmtests/tm29/init.c| 1 -
 testsuites/ada/tmtests/tmck/init.c| 1 -
 testsuites/rhealstone/rhdeadlockbrk/deadlockbrk.c | 1 -
 testsuites/rhealstone/rhilatency/ilatency.c   | 1 -
 testsuites/rhealstone/rhmlatency/mlatency.c   | 1 -
 testsuites/rhealstone/rhtaskpreempt/taskpreempt.c | 1 -
 testsuites/rhealstone/rhtaskswitch/taskswitch.c   | 1 -
 testsuites/tmtests/tm01/system.h  | 1 -
 testsuites/tmtests/tm02/system.h  | 1 -
 testsuites/tmtests/tm03/system.h  | 1 -
 testsuites/tmtests/tm04/system.h  | 1 -
 testsuites/tmtests/tm05/system.h  | 1 -
 testsuites/tmtests/tm06/system.h  | 1 -
 testsuites/tmtests/tm07/system.h  | 1 -
 testsuites/tmtests/tm08/system.h  | 1 -
 testsuites/tmtests/tm09/system.h  | 1 -
 testsuites/tmtests/tm10/system.h  | 1 -
 testsuites/tmtests/tm11/system.h  | 1 -
 testsuites/tmtests/tm12/system.h  | 1 -
 testsuites/tmtests/tm13/system.h  | 1 -
 testsuites/tmtests/tm14/system.h  | 1 -
 testsuites/tmtests/tm15/system.h  | 1 -
 testsuites/tmtests/tm16/system.h  | 1 -
 testsuites/tmtests/tm17/system.h  | 1 -
 testsuites/tmtests/tm18/system.h  | 1 -
 testsuites/tmtests/tm19/system.h  | 1 -
 testsuites/tmtests/tm20/system.h  | 1 -
 testsuites/tmtests/tm21/system.h  | 1 -
 testsuites/tmtests/tm22/system.h  | 1 -
 testsuites/tmtests/tm23/system.h  | 1 -
 testsuites/tmtests/tm24/system.h  | 1 -
 testsuites/tmtests/tm25/system.h  | 1 -
 testsuites/tmtests/tm26/system.h  | 1 -
 testsuites/tmtests/tm27/system.h  | 1 -
 testsuites/tmtests/tm28/system.h  | 1 -
 testsuites/tmtests/tm29/system.h  | 1 -
 testsuites/tmtests/tmck/system.h  | 1 -
 65 files changed, 2 insertions(+), 66 deletions(-)

diff --git a/cpukit/doxygen/appl-config.h b/cpukit/doxygen/appl-config.h
index 77c89dabf3..81150af066 100644
--- a/cpukit/doxygen/appl-config.h
+++ b/cpukit/doxygen/appl-config.h
@@ -3685,7 +3685,7 @@
  * The following constraints apply to this configuration option:
  *
  * * The value of the configuration option shall be greater than or equal to
- *   zero.
+ *   one.
  *
  * * The value of the configuration option shall be less than or equal to https://en.cppreference.com/w/c/types/integer";>UINT32_MAX.
diff --git a/cpukit/include/rtems/confdefs/clock.h 
b/cpukit/include/rtems/confdefs/clock.h
index d35757561d..e57daa899b 100644
--- a/cpukit/include/rtems/confdefs/clock.h
+++ b/cpukit/include/rtems/confdefs/clock.h
@@ -70,8 +70,7 @@
   #warning "The clock ticks per second is not an integer"
 #endif
 
-#if defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) \
-  && defined(CONFIGURE_TICKS_PER_TIMESLICE) \
+#if defined(CONFIGURE_TICKS_PER_TIMESLICE) \
   && CONFIGURE_TICKS_PER_TIMESLICE <= 0
   #error "CONFIGURE_TICKS_PER_TIMESLICE shall be greater than zero"
 #endif
diff --git a/testsuites/ada/tmtests/tm01/