Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

split INTRNG main file into two files #1285

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

split INTRNG main file into two files #1285

wants to merge 9 commits into from

Commits on Nov 4, 2024

  1. intrng: split intr_describe_irq()

    intr_describe_irq() was mixing two operations together.  There was the
    mapping step and the underlying intr_event_describe_handler() call.
    Split these two steps apart to match other portions of the interface.
    
    Differential Revision: https://reviews.freebsd.org/D39333
    ehem committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    4950164 View commit details
    Browse the repository at this point in the history
  2. intr/x86: purge ->is_handlers value

    Use of the macro CK_SLIST_EMPTY() on ->is_event->ie_handlers readily
    substitues for the value ->is_handlers.  While only minor shrinkage of
    struct intsrc, small reductions do accumulate.
    
    Update the i8254 hack to work with this setup.
    ehem committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    e67b25c View commit details
    Browse the repository at this point in the history
  3. x86/intr: match intr_add_handler() to other architectures

    Making INTRNG's intr_add_handler() act similarly to x86's would be a
    bit troublesome.  As such modify x86's functionality.  Currently INTRNG
    uses a bit array to indicate processor restriction, so remove the
    domain to allow matching.
    ehem committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    3aac7a8 View commit details
    Browse the repository at this point in the history
  4. intrng: expose lower-level device interface for INTRNG

    Specialized peripheral PIC drivers may need to handle most interrupt
    setup steps themselves without touching newbus.  Two cases are
    intr_add_handler() and intr_describe() which are internally used by
    `intr_setup_irq()`/`intr_describe_irq()`.  Exposing these allow for
    alternative use case.
    
    In fact the BUS interface for INTRNG is arguably a layering violation.
    Those 6 functions could just as well be in nexus.c or a kernel library.
    
    Differential Revision: https://reviews.freebsd.org/D39333
    ehem committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    bb008d4 View commit details
    Browse the repository at this point in the history
  5. intrng: handle intr_describe() being passed NULL cookies

    Handle the situation as a request to update the interrupt table name,
    without updating the event name.
    ehem committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    9a8857a View commit details
    Browse the repository at this point in the history
  6. intrng: adjust intr_teardown_irq() to use intr_describe()

    intr_teardown_irq() is PIC-level, while intrcnt_updatename() is
    interrupt-level.  As such, intr_teardown_irq() should use the next layer
    of function, instead of an interrupt-internal function.
    ehem committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    8e25038 View commit details
    Browse the repository at this point in the history
  7. intrng: split intr_isrc_assign_cpu()

    intr_isrc_assign_cpu() failed to split the intr_event functionality
    from the assignment functionality.  The actual assignment is a PIC-level
    operation and as such should be separate.
    ehem committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    f2ab354 View commit details
    Browse the repository at this point in the history
  8. intrng: switch PIC interface to use pic_list_lock

    Using isrc_table_lock for these functions violates layering.  Instead
    use pic_list_lock, which isn't quite proper, but matches the layer these
    functions are located.
    ehem committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    0168eec View commit details
    Browse the repository at this point in the history
  9. intrng: break PIC functionality off of main INTRNG file

    This should serve to truly split things into layers.  Perhaps this could
    then be used on x86 and serve to continue unifying interrupt frameworks.
    ehem committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    71acae7 View commit details
    Browse the repository at this point in the history