Commit Graph

10 Commits

Author SHA1 Message Date
Sebastian Huber
3fee662093 bsps/irq: Use BSP_INTERRUPT_VECTOR_COUNT
Use BSP_INTERRUPT_VECTOR_COUNT instead of BSP_INTERRUPT_VECTOR_MAX.

Update #3269.
2021-06-24 11:36:25 +02:00
Sebastian Huber
3ee19b7ac3 bsps/irq: Change license to BSD-2-Clause
Change license to BSD-2-Clause according to file history and
re-licensing agreement.

Update #3053.
2021-06-17 17:24:32 +02:00
Sebastian Huber
99c73303de rtems: Improve rtems_interrupt_server_create()
Also start interrupt server tasks on processors which do not have a
scheduler.  Applications may dynamically manage processors using
rtems_scheduler_remove_processor() and rtems_scheduler_add_processor().
2020-11-24 07:40:24 +01:00
Sebastian Huber
bb4e534014 bsps: Fix rtems_interrupt_server_delete()
The ISR lock must be destroyed to prevent memory corruption if RTEMS_PROFILING
and RTEMS_SMP is enabled.

Close #4158.
2020-10-19 17:44:49 +02:00
Sebastian Huber
c60942ea5b rtems: Add rtems_interrupt_server_create()
Add rtems_interrupt_server_destroy().

Before this patch, the only way to create interrupt servers was
rtems_interrupt_server_initialize(). This function creates the default
interrupt server and in SMP configurations additional interrupt servers
for the additional processors. The interrupt server is heavily used by
libbsd. This includes the epoch based reclamation which performs time
consuming resource and memory deallocation work. This does not work well
with time critical services, for example an UART over SPI or I2C. One
approach to address this problem is to allow the application to create
custom interrupt servers with the right priority and task properties.
The interrupt server API accounted for this, however, it was not
implemented before this patch.

Close #4034.
2020-08-03 08:52:41 +02:00
Gedare Bloom
739e3d0f72 bsps/irq: fix resource leak in irq-server.c
Resource leak identified by Coverity (CID 1456675). The value
of instances is leaked in case some but not all irq servers are
created. It should be stored in bsp_interrupt_server_instances.
2020-01-03 11:33:02 -07:00
Sebastian Huber
33ed4123c0 rtems: Add rtems_interrupt_server_entry_move()
The use case for this function is the libbsd.  In FreeBSD, the interrupt
setup and binding to a processor is done in two steps.  Message
based interrupts like PCIe MSI and MSI-X interrupts can be implemented
through interrupt server entries.  They are setup at the default
interrupt server and may optionally move to an interrupt server bound to
a specific processor.
2019-09-20 09:22:46 +02:00
Sebastian Huber
f9219db2a9 rtems: Add rtems_scheduler_get_processor_maximum()
Add rtems_scheduler_get_processor_maximum() as a replacement for
rtems_get_processor_count(). The rtems_get_processor_count() is a bit
orphaned. Adopt it by the Scheduler Manager. The count is also
misleading, since the processor set may have gaps and the actual count
of online processors may be less than the value returned by
rtems_get_processor_count().

Update #3732.
2019-04-09 08:06:46 +02:00
Sebastian Huber
4e686261d8 bsps/irq: Fix interrupt server init (SMP) 2019-02-07 11:13:59 +01:00
Sebastian Huber
9b7c456732 bsps: Move generic IRQ support to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-09 07:09:47 +02:00