Re: [PATCH v3 00/42] Document, enhance, and test Interrupt Manager Extension
I checked the attributes, raise, and sparc/arm implementations. My minor points can be done while pushing, I'm good with the patch set. On Fri, Jul 23, 2021 at 7:57 AM Sebastian Huber wrote: > > This patch set enhances the Interrupt Manager Extension so that it can be > tested with generic tests. The following new directives are introduced for > this purpose: > > * rtems_interrupt_get_attributes() > > * rtems_interrupt_vector_is_enabled() > > * rtems_interrupt_vector_enable() > > * rtems_interrupt_vector_disable() > > * rtems_interrupt_is_pending() > > * rtems_interrupt_cause_on() > > The documentation and the implementation for the following directives is also > provided: > > * rtems_interrupt_cause() > > * rtems_interrupt_clear() > > A default implementation is provided for all BSPs so that the new test cases > link. A proper implementation is provided for SPARC BSPs and AArch32/AArch64 > BSPs which use the GIC. I used an i.MX7D BSP to run the tests on real > hardware. The tests don't run on Qemu currently due to a bug in the GIC > emulation: > > https://lists.gnu.org/archive/html/qemu-devel/2021-07/msg02500.html > > The following new directives were added to support interrupt handlers which > are > managed through user-provided storage (rtems_interrupt_entry): > > * rtems_interrupt_entry_initialize() > > * rtems_interrupt_entry_install() > > * rtems_interrupt_entry_remove() > > All directives are documented in the RTEMS Classic API Guide: > > https://ftp.rtems.org/pub/rtems/people/sebh/c-user.pdf > > See also: > > https://lists.rtems.org/pipermail/devel/2019-October/055770.html > > https://devel.rtems.org/ticket/3269 > > v3: > > * Rename rtems_interrupt_cause() in rtems_interrupt_raise(). > > * Rename rtems_interrupt_cause_on() in rtems_interrupt_raise_on(). > > * Fine tune the interrupt attributes. > > * Fix several typos. > > Sebastian Huber (42): > bsps/irq: Move get/set affinity to separate file > bsps/irq: Canonicalize get/set affinity errors > bsps/irq: Move handler iterate to separate file > rtems: Add rtems_interrupt_raise() > rtems: Generate > rtems: Add rtems_interrupt_get_attributes() > rtems: Add rtems_interrupt_vector_enable() > rtems: Add rtems_interrupt_vector_is_enabled() > rtems: Add rtems_interrupt_is_pending() > rtems: Add RTEMS_FATAL_SOURCE_SPURIOUS_INTERRUPT > bsps/irq: Add rtems_interrupt_vector_is_enabled() > bsps/irq: Add rtems_interrupt_raise() > bsps/irq: Add rtems_interrupt_get_attributes() > bsps/irq: Add rtems_interrupt_is_pending() > bsps/irq: bsp_interrupt_vector_enable() > bsps/irq: bsp_interrupt_vector_disable() > bsps/irq: bsp_interrupt_get_affinity() > bsps/irq: bsp_interrupt_set_affinity() > bsps/irq: Implement new directives for GICv2/3 > sparc/irq: Implement new interrupt directives > rtems: Add rtems_interrupt_entry_install() > bsps/irq: Use rtems_interrupt_entry > bsps/irq: Add bsp_interrupt_check_and_lock() > bsps/irq: Move bsp_interrupt_handler_is_empty() > bsps/irq: Add rtems_interrupt_entry_install() > bsp/raspberrypi: Add interrupt get/set affinity > validation: Add CallWithinISR() > validation: HasInterruptVectorEntriesInstalled() > validation: GetValidInterruptVectorNumber() > validation: GetTestableInterruptVector() > validation: Test rtems_interrupt_get_attributes() > validation: rtems_interrupt_vector_is_enabled() > validation: Test rtems_interrupt_vector_enable() > validation: Test rtems_interrupt_vector_disable() > validation: Test rtems_interrupt_entry_install() > validation: Test rtems_interrupt_entry_remove() > validation: Test rtems_interrupt_raise() > validation: Test rtems_interrupt_clear() > validation: Test rtems_interrupt_is_pending() > validation: Test rtems_interrupt_raise_on() > validation: Test rtems_interrupt_get_affinity() > validation: Test rtems_interrupt_set_affinity() > > bsps/aarch64/a53/include/bsp/irq.h|2 +- > bsps/arm/beagle/irq/irq.c | 48 +- > bsps/arm/csb336/irq/irq.c | 50 +- > bsps/arm/csb337/irq/irq.c | 48 +- > bsps/arm/edb7312/irq/irq.c| 50 +- > bsps/arm/gumstix/irq/irq.c| 48 +- > bsps/arm/lpc24xx/irq/irq.c| 48 +- > bsps/arm/lpc32xx/irq/irq.c| 50 +- > bsps/arm/raspberrypi/include/bsp/irq.h| 26 + > bsps/arm/raspberrypi/irq/irq.c| 59 +- > bsps/arm/rtl22xx/irq/irq.c| 48 +- > bsps/arm/shared/irq/irq-armv7m.c | 48 +- > bsps/arm/smdk2410/irq/irq.c | 48 +- > bsps/arm/tms570/irq/irq.c | 48 +- > bsps/i386/shared/irq/irq.c| 53 +- > bsps/include/bsp/irq-generic.h| 436 ++- > bsps/include/dev/irq/arm-gic-irq.h|7 +- > bsps/lm32/shared/irq/irq.c| 48 +- >
[PATCH v3 00/42] Document, enhance, and test Interrupt Manager Extension
This patch set enhances the Interrupt Manager Extension so that it can be tested with generic tests. The following new directives are introduced for this purpose: * rtems_interrupt_get_attributes() * rtems_interrupt_vector_is_enabled() * rtems_interrupt_vector_enable() * rtems_interrupt_vector_disable() * rtems_interrupt_is_pending() * rtems_interrupt_cause_on() The documentation and the implementation for the following directives is also provided: * rtems_interrupt_cause() * rtems_interrupt_clear() A default implementation is provided for all BSPs so that the new test cases link. A proper implementation is provided for SPARC BSPs and AArch32/AArch64 BSPs which use the GIC. I used an i.MX7D BSP to run the tests on real hardware. The tests don't run on Qemu currently due to a bug in the GIC emulation: https://lists.gnu.org/archive/html/qemu-devel/2021-07/msg02500.html The following new directives were added to support interrupt handlers which are managed through user-provided storage (rtems_interrupt_entry): * rtems_interrupt_entry_initialize() * rtems_interrupt_entry_install() * rtems_interrupt_entry_remove() All directives are documented in the RTEMS Classic API Guide: https://ftp.rtems.org/pub/rtems/people/sebh/c-user.pdf See also: https://lists.rtems.org/pipermail/devel/2019-October/055770.html https://devel.rtems.org/ticket/3269 v3: * Rename rtems_interrupt_cause() in rtems_interrupt_raise(). * Rename rtems_interrupt_cause_on() in rtems_interrupt_raise_on(). * Fine tune the interrupt attributes. * Fix several typos. Sebastian Huber (42): bsps/irq: Move get/set affinity to separate file bsps/irq: Canonicalize get/set affinity errors bsps/irq: Move handler iterate to separate file rtems: Add rtems_interrupt_raise() rtems: Generate rtems: Add rtems_interrupt_get_attributes() rtems: Add rtems_interrupt_vector_enable() rtems: Add rtems_interrupt_vector_is_enabled() rtems: Add rtems_interrupt_is_pending() rtems: Add RTEMS_FATAL_SOURCE_SPURIOUS_INTERRUPT bsps/irq: Add rtems_interrupt_vector_is_enabled() bsps/irq: Add rtems_interrupt_raise() bsps/irq: Add rtems_interrupt_get_attributes() bsps/irq: Add rtems_interrupt_is_pending() bsps/irq: bsp_interrupt_vector_enable() bsps/irq: bsp_interrupt_vector_disable() bsps/irq: bsp_interrupt_get_affinity() bsps/irq: bsp_interrupt_set_affinity() bsps/irq: Implement new directives for GICv2/3 sparc/irq: Implement new interrupt directives rtems: Add rtems_interrupt_entry_install() bsps/irq: Use rtems_interrupt_entry bsps/irq: Add bsp_interrupt_check_and_lock() bsps/irq: Move bsp_interrupt_handler_is_empty() bsps/irq: Add rtems_interrupt_entry_install() bsp/raspberrypi: Add interrupt get/set affinity validation: Add CallWithinISR() validation: HasInterruptVectorEntriesInstalled() validation: GetValidInterruptVectorNumber() validation: GetTestableInterruptVector() validation: Test rtems_interrupt_get_attributes() validation: rtems_interrupt_vector_is_enabled() validation: Test rtems_interrupt_vector_enable() validation: Test rtems_interrupt_vector_disable() validation: Test rtems_interrupt_entry_install() validation: Test rtems_interrupt_entry_remove() validation: Test rtems_interrupt_raise() validation: Test rtems_interrupt_clear() validation: Test rtems_interrupt_is_pending() validation: Test rtems_interrupt_raise_on() validation: Test rtems_interrupt_get_affinity() validation: Test rtems_interrupt_set_affinity() bsps/aarch64/a53/include/bsp/irq.h|2 +- bsps/arm/beagle/irq/irq.c | 48 +- bsps/arm/csb336/irq/irq.c | 50 +- bsps/arm/csb337/irq/irq.c | 48 +- bsps/arm/edb7312/irq/irq.c| 50 +- bsps/arm/gumstix/irq/irq.c| 48 +- bsps/arm/lpc24xx/irq/irq.c| 48 +- bsps/arm/lpc32xx/irq/irq.c| 50 +- bsps/arm/raspberrypi/include/bsp/irq.h| 26 + bsps/arm/raspberrypi/irq/irq.c| 59 +- bsps/arm/rtl22xx/irq/irq.c| 48 +- bsps/arm/shared/irq/irq-armv7m.c | 48 +- bsps/arm/smdk2410/irq/irq.c | 48 +- bsps/arm/tms570/irq/irq.c | 48 +- bsps/i386/shared/irq/irq.c| 53 +- bsps/include/bsp/irq-generic.h| 436 ++- bsps/include/dev/irq/arm-gic-irq.h|7 +- bsps/lm32/shared/irq/irq.c| 48 +- bsps/m68k/genmcf548x/include/bsp/irq.h|8 + bsps/m68k/genmcf548x/irq/irq.c| 188 +- bsps/mips/shared/irq/irq.c| 48 +- bsps/powerpc/gen5200/irq/irq.c| 52 +- bsps/powerpc/gen83xx/irq/irq.c| 52 +- bsps/powerpc/mpc55xxevb/start/irq.c | 48 +- bsps/powerpc/mpc8260ads/irq/irq.c | 50 +- bsps/powerpc/psim/irq/irq_init.c |