Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

kstat_intr(9s) [sunos man page]

kstat_intr(9S)						    Data Structures for Drivers 					    kstat_intr(9S)

NAME
kstat_intr - structure for interrupt kstats SYNOPSIS
#include <sys/types.h> #include <sys/kstat.h> #include <sys/ddi.h> #include <sys/sunddi.h> INTERFACE LEVEL
Solaris DDI specific (Solaris DDI) DESCRIPTION
Interrupt statistics are kept in the kstat_intr structure. When kstat_create(9F) creates an interrupt kstat, the ks_data field is a pointer to one of these structures. The macro KSTAT_INTR_PTR() is provided to retrieve this field. It looks like this: #define KSTAT_INTR_PTR(kptr) ((kstat_intr_t *)(kptr)->ks_data) An interrupt is a hard interrupt (sourced from the hardware device itself), a soft interrupt (induced by the system through the use of some system interrupt source), a watchdog interrupt (induced by a periodic timer call), spurious (an interrupt entry point was entered but there was no interrupt to service), or multiple service (an interrupt was detected and serviced just prior to returning from any of the other types). Drivers generally report only claimed hard interrupts and soft interrupts from their handlers, but measurement of the spurious class of interrupts is useful for auto-vectored devices in order to pinpoint any interrupt latency problems in a particular system configuration. Devices that have more than one interrupt of the same type should use multiple structures. STRUCTURE MEMBERS
ulong_t intrs[KSTAT_NUM_INTRS]; /* interrupt counters */ The only member exposed to drivers is the intrs member. This field is an array of counters. The driver must use the appropriate counter in the array based on the type of interrupt condition. The following indexes are supported: KSTAT_INTR_HARD Hard interrupt KSTAT_INTR_SOFT Soft interrupt KSTAT_INTR_WATCHDOG Watchdog interrupt KSTAT_INTR_SPURIOUS Spurious interrupt KSTAT_INTR_MULTSVC Multiple service interrupt SEE ALSO
kstat(9S) Writing Device Drivers SunOS 5.10 4 Apr 1994 kstat_intr(9S)

Check Out this Related Man Page

ddi_intr_get_supported_types(9F)										  ddi_intr_get_supported_types(9F)

NAME
ddi_intr_get_supported_types - return information on supported hardware interrupt types SYNOPSIS
#include <sys/types.h> #include <sys/conf.h> #include <sys/ddi.h> #include <sys/sunddi.h> int ddi_intr_get_supported_types(dev_info_t *dip, int *typesp); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI) dip Pointer to dev_info structure typesp Pointer to supported interrupt types The ddi_intr_get_supported_types() function retrieves the interrupt types supported by a particular hardware device and by the system soft- ware. Upon successful return, the supported types are returned as a bit mask in the integer pointed to by the typesp argument. See <sys/ddi_intr.h> for a list of interrupts that can be returned by a hardware device. For PCI devices that support MSI and/or MSI-X based hardware, this interface returns only the interrupt types that are supported by all the hardware in the path to the hardware device. An interrupt type is usable by the hardware device if it is returned by the ddi_intr_get_supported_types() function. The device driver can be programmed to use one of the returned interrupt types to receive hardware interrupts. The ddi_intr_get_supported_types() function returns: DDI_SUCCESS On success. DDI_EINVAL On encountering invalid input parameters. DDI_INTR_NOTFOUND Returned when the hardware device is found not to support any hardware interrupts. CONTEXT
The ddi_intr_get_supported_types() function can be called from user or kernel non-interrupt context. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ pci(4), attributes(5), pcmcia(7D), sysbus(4), ddi_intr_add_handler(9F), ddi_intr_alloc(9F), ddi_intr_enable(9F) The ddi_intr_get_supported_types() function can be called by the device driver even at any time if the driver has added an interrupt han- dler for a given interrupt type. Soft interrupts are always usable and are not returned by this interface. Any consumer of this interface should verify that the return value is not equal to DDI_SUCCESS. Incomplete checking for failure codes could result in inconsistent behavior among platforms. 07 Apr 2005 ddi_intr_get_supported_types(9F)
Man Page