Page MenuHomeFreeBSD

Working on commonizing standard interrupt functionality
Needs ReviewPublic

Authored by on Mar 20 2023, 11:15 PM.
Referenced Files
Unknown Object (File)
Mon, May 15, 5:38 AM
Unknown Object (File)
Thu, May 11, 11:31 PM
Unknown Object (File)
Sun, May 7, 4:42 AM
Unknown Object (File)
Thu, May 4, 1:29 AM
Unknown Object (File)
Apr 26 2023, 3:31 PM
Unknown Object (File)
Mar 27 2023, 1:51 AM



Identifying some functionality all architectures have and trying to
make a common interface.

Squash review:
intrcompat: add "interrupt_t" typedef for all architectures

For code which doesn't care about the underlying structure and simply
needs to have a common name.

intrng: add standard interrupt controller interface

Interrupt numbering belongs to the interrupt controller, not the core
event code. As such, this layer should be providing a function to
resolve the interrupt number to the source/event.

powerpc: add ability to access intr_event by interrupt number

Most other systems have this via INTRNG or other means. Now add the
functionality to PowerPC.

intr/x86: implement standard interrupt interface

Different name for the main function, but then a simple macro on top.

Diff Detail

rG FreeBSD src repository
Lint Passed
No Test Coverage
Build Status
Buildable 50489
Build 47380: arc lint + arc unit

Event Timeline

The reasoning behind intrtab_lookup() is it should be possible to break the interrupt table functionality out of the interrupt cores. I've got some rough ideas of what such would look like, the difficulty is PowerPC being so different from everything else.

One concern I've got. What is the range of supported compilers? I believe some older compilers won't accept typedef struct foo type_t; as an incomplete declaration of struct foo. Those would need separate incomplete declarations, but I'm unsure whether those are included in the support window for this.