History log of /fuchsia/zircon/kernel/object/pci_interrupt_dispatcher.cpp
Revision Date Author Comments
# a42c1b60 11-Sep-2018 Roland McGrath <mcgrathr@google.com>

[kernel] WITH_DEV_PCIE -> WITH_KERNEL_PCIE

Hard-code this in KERNEL_DEFINES rather than relying on the
magic predefine based on the presence of the dev/pcie module.

Test: CQ & manual verification that kernel text size didn't change
Change-Id: Id827a8a93bc61ac8b1d7727f51a18f53277a7a16


# 36320886 19-Jul-2018 Corey Tabaka <eieio@google.com>

[kernel] Dispatchers and most kernel objects lockdep instrumented.

- Convert SoloDispatcher to a CRTP template type similar to
PeerDispatcher. This makes the lock classes for different solo
dispatchers distinct.
- Instrument the locks for all dispatchers.
- Instrument the locks for all kernel objects except those that
lock the thread_lock.

Bug: ZX-23
Test: k ut all and system/test/* pass + manual stress testing.

Change-Id: I8106c04911e47ea15ccce8e7abd5fbd62adfa6fe


# bf29bc81 02-May-2018 Brian Swetland <swetland@google.com>

[kernel][interrupts] cleanup, introduce VirtualInterruptDispatcher

Since we already use virtual dispatch for registering, unregistering,
masking, unmasking, and processing IRQs, let's introduce a separate
subclass for Virtual interrupts and remove is_virtual checks. Also
make the subclasses responsible for owning and managing their vectors
and so forth.

Change-Id: Ia323a39575571b2aad6248a12066860022cc0d64


# cca25b86 26-Apr-2018 Brijen Raval <braval@google.com>

[syscall][irq] Remove (disabled) old irq syscall implementations

Change-Id: I2f4a4f42e174dbab5ac4eb84255955fa805cd75d


# b05757ba 29-Mar-2018 Brijen Raval <braval@google.com>

[interrupts][syscalls] zx_irq_create/wait/trigger/destroy impl.

This syscall is currently disabled by default and gated behind the
building option ENABLE_NEW_IRQ_API

ZX-2024
Change-Id: I29bf0ff2f858182c380e48808cfeb008143e6e79


# fae163a8 21-Feb-2018 George Kulakowski <kulakowski@google.com>

[interrupts] Use only the common dispatcher lock in interrupt dispatchers

Change-Id: Id200ada6792ed35ddb53c1843d54fa3359bebf1e


# ee363143 19-Jan-2018 Mark Seaborn <mseaborn@google.com>

[kernel][pci] Convert PciInterruptDispatcher to use preempt_disable

Calling sched_reschedule() when arch_in_int_handler() is true is now
allowed (see preempt_disable). This means we can remove uses of the
INT_RESCHEDULE return value. We can instead call sched_reschedule()
or pass reschedule=true to functions that take a "reschedule"
argument.

Change event_signal() to allow passing reschedule=true down to
wait_queue_wake_one() or wait_queue_wake_all() when
arch_in_int_handler() is true.

Testing: This is easily tested because this code path gets exercised
even under QEMU, which catches the need to remove the DEBUG_ASSERT()
in event_signal_internal().

ZX-1490

Change-Id: I305196cf0266ee3e21fdb70db2d6382095bbdc8b


# 038c9dc5 27-Dec-2017 Mike Voydanoff <voydanoff@google.com>

[syscalls][ddk] Interrupt syscall improvements:

It is now possible to wait for multiple interrupts on a single interrupt handle.
The zx_interrupt_bind() syscall is used to bind an interrupt vector to
an interrupt handle, allowing up to 62 interrupt vectors per handle.

The zx_interrupt_get_timestamp() syscall can now be used to retrieve a
timestamp for an interrupt.

Virtual interrupts are now supported. zx_interrupt_bind() can be used to
designate an interrupt slot as a virtual interrupt, and the virtual interrupt
can be signaled using the zx_interrupt_signal() syscall.

The zx_interrupt_complete() syscall has been removed.
Instead, zx_interrupt_wait() now handles unmasking the interrupt
at the right time depending on whether the interrupt is edge or level triggered.

Slot ZX_INTERRUPT_SLOT_USER is reserved as a virtual interrupt, and is typically
used with zx_interrupt_signal() to unblock interrupt threads so they can exit
at driver shutdown or to perform periodic work.

Currently PCI interrupt handles can only be bound to a single interrupt vector,
but it is possible to bind virtual interrupts to PCI interrupt handles.

ZX-1469 #done
ZX-1471 #done

Change-Id: I48c14183c1b9ecd437c8b1ce0d25326b7532e973


# 30cf5781 11-Dec-2017 Mike Voydanoff <voydanoff@google.com>

[kernel][interrupt] return error from register_int_handler()

register_int_handler() will return ZX_ERR_INVALID_ARGS instead of panicing
if the interrupt vector is invalid and will now also return ZX_ERR_ALREADY_BOUND
if the caller attempts to set a handler for an interrupt vector that already
has a handler.

This allows us to remove an unnecessary WAVL tree from InterruptEventDispatcher.

Also, zx_interrupt_create() will return an error if it attempts to bind to an
interrupt vector that is now being used by a kernel driver.

Add interrupt_has_handler() to determine if we have a handler for an interrupt vector
to use for this instead.

Also added a missing sanity check to PciInterruptDispatcher.

ZX-1369 #done

Change-Id: I107634c66b57cd5a7adfd6780d0afa24dfda449b


# 4e80f4fc 20-Sep-2017 Mike Voydanoff <voydanoff@google.com>

[syscalls] return ZX_ERR_CANCELED from mx_interrupt_wait() after mx_interrupt_signal()

This allows us to terminate interrupt threads without having to
use an additional flag.

Change-Id: I95cced20e723914a9698916f8c17e4bf5e39c64f


# f3e2126c 12-Sep-2017 Roland McGrath <mcgrathr@google.com>

[zx] Magenta -> Zircon

The Great Renaming is here!

Change-Id: I3229bdeb2a3d0e40fb4db6fec8ca7d971fbffb94


# 59e644b1 07-Sep-2017 George Kulakowski <kulakowski@google.com>

[zircon][mxtl->fbl] Rename mxtl to fbl

Change-Id: Ie21b6498e1bfb0a7fa0315e40b9e5c3ee78646be


# 388a7f68 31-Aug-2017 Dave Bort <dbort@google.com>

[lib/magenta] Rename kernel/lib/magenta to kernel/object

TODO: Rename magenta.{cpp,h} and other instances of "magenta" in this
module.

For MG-1091 "Rename kernel/lib/magenta"

Change-Id: I2abc316f543798e00d3a4d1c2c83195da26e6836