[PATCH v3 00/42] Document, enhance, and test Interrupt Manager Extension
Gedare Bloom
gedare at rtems.org
Fri Jul 23 16:38:15 UTC 2021
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
<sebastian.huber at embedded-brains.de> 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/irq-extension.h>
> 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 | 48 +-
> bsps/powerpc/qemuppc/irq/irq_init.c | 50 +-
> bsps/powerpc/qoriq/include/bsp/irq.h | 4 +-
> bsps/powerpc/qoriq/irq/irq.c | 126 +-
> bsps/powerpc/shared/irq/ppc-irq-generic.c | 48 +-
> bsps/powerpc/t32mppc/include/bsp/irq.h | 6 +-
> bsps/powerpc/t32mppc/irq/irq.c | 48 +-
> bsps/powerpc/tqm8xx/irq/irq.c | 52 +-
> bsps/powerpc/virtex/irq/irq_init.c | 52 +-
> bsps/riscv/griscv/include/bsp/irq.h | 4 +-
> bsps/riscv/griscv/irq/irq.c | 67 +-
> bsps/riscv/riscv/include/bsp/irq.h | 4 +-
> bsps/riscv/riscv/irq/irq.c | 73 +-
> bsps/shared/dev/irq/arm-gicv2.c | 132 +-
> bsps/shared/dev/irq/arm-gicv3.c | 180 +-
> bsps/shared/irq-default-sources.am | 7 +
> bsps/shared/irq-sources.am | 7 +
> bsps/shared/irq/irq-affinity.c | 106 +
> bsps/shared/irq/irq-default-handler.c | 12 +-
> bsps/shared/irq/irq-default.c | 48 +-
> bsps/shared/irq/irq-enable-disable.c | 101 +
> bsps/shared/irq/irq-entry-remove.c | 115 +
> bsps/shared/irq/irq-generic.c | 643 ++--
> bsps/shared/irq/irq-handler-install.c | 114 +
> bsps/shared/irq/irq-handler-iterate.c | 72 +
> bsps/shared/irq/irq-handler-remove.c | 80 +
> bsps/shared/irq/irq-raise-clear.c | 99 +
> bsps/sparc/erc32/include/bsp/irq.h | 9 +-
> bsps/sparc/erc32/include/erc32.h | 12 +-
> bsps/sparc/leon2/include/bsp/irq.h | 3 +-
> bsps/sparc/leon2/include/leon.h | 16 +-
> bsps/sparc/leon3/include/bsp/irq.h | 4 +-
> bsps/sparc/leon3/start/eirq.c | 136 +-
> bsps/sparc/shared/irq/irq-shared.c | 95 +-
> bsps/x86_64/amd64/interrupts/idt.c | 49 +-
> c/src/lib/libbsp/m68k/genmcf548x/Makefile.am | 6 +-
> c/src/lib/libbsp/powerpc/ss555/Makefile.am | 7 +
> cpukit/include/rtems/irq-extension.h | 2642 +++++++++++++----
> cpukit/include/rtems/rtems/intr.h | 162 +-
> cpukit/include/rtems/score/interr.h | 7 +
> cpukit/sapi/src/fatalsrctext.c | 3 +-
> spec/build/bsps/m68k/genmcf548x/grp.yml | 2 +
> spec/build/bsps/m68k/genmcf548x/obj.yml | 5 -
> spec/build/bsps/objirq.yml | 7 +
> spec/build/bsps/powerpc/ss555/bspss555.yml | 7 +
> .../testsuites/validation/libvalidation.yml | 2 +
> .../testsuites/validation/validation-0.yml | 12 +
> testsuites/sptests/spinternalerror02/init.c | 2 +-
> testsuites/validation/tc-intr-clear.c | 586 ++++
> testsuites/validation/tc-intr-entry-install.c | 1364 +++++++++
> testsuites/validation/tc-intr-entry-remove.c | 1432 +++++++++
> testsuites/validation/tc-intr-get-affinity.c | 639 ++++
> .../validation/tc-intr-get-attributes.c | 440 +++
> testsuites/validation/tc-intr-is-pending.c | 629 ++++
> testsuites/validation/tc-intr-raise-on.c | 709 +++++
> testsuites/validation/tc-intr-raise.c | 576 ++++
> testsuites/validation/tc-intr-set-affinity.c | 670 +++++
> .../validation/tc-intr-vector-disable.c | 632 ++++
> testsuites/validation/tc-intr-vector-enable.c | 638 ++++
> .../validation/tc-intr-vector-is-enabled.c | 627 ++++
> testsuites/validation/ts-default.h | 12 +-
> testsuites/validation/ts-validation-0.c | 2 +-
> testsuites/validation/tx-call-within-isr.c | 134 +
> testsuites/validation/tx-interrupt.c | 152 +
> testsuites/validation/tx-support.h | 23 +
> 90 files changed, 14941 insertions(+), 1421 deletions(-)
> create mode 100644 bsps/shared/irq/irq-affinity.c
> create mode 100644 bsps/shared/irq/irq-enable-disable.c
> create mode 100644 bsps/shared/irq/irq-entry-remove.c
> create mode 100644 bsps/shared/irq/irq-handler-install.c
> create mode 100644 bsps/shared/irq/irq-handler-iterate.c
> create mode 100644 bsps/shared/irq/irq-handler-remove.c
> create mode 100644 bsps/shared/irq/irq-raise-clear.c
> create mode 100644 testsuites/validation/tc-intr-clear.c
> create mode 100644 testsuites/validation/tc-intr-entry-install.c
> create mode 100644 testsuites/validation/tc-intr-entry-remove.c
> create mode 100644 testsuites/validation/tc-intr-get-affinity.c
> create mode 100644 testsuites/validation/tc-intr-get-attributes.c
> create mode 100644 testsuites/validation/tc-intr-is-pending.c
> create mode 100644 testsuites/validation/tc-intr-raise-on.c
> create mode 100644 testsuites/validation/tc-intr-raise.c
> create mode 100644 testsuites/validation/tc-intr-set-affinity.c
> create mode 100644 testsuites/validation/tc-intr-vector-disable.c
> create mode 100644 testsuites/validation/tc-intr-vector-enable.c
> create mode 100644 testsuites/validation/tc-intr-vector-is-enabled.c
> create mode 100644 testsuites/validation/tx-call-within-isr.c
> create mode 100644 testsuites/validation/tx-interrupt.c
>
> --
> 2.26.2
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list