1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
<table class="head">
<tr>
<td class="head-ltitle">BUS_DESCRIBE_INTR(9)</td>
<td class="head-vol">Kernel Developer's Manual</td>
<td class="head-rtitle">BUS_DESCRIBE_INTR(9)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">BUS_DESCRIBE_INTR</code>,
<code class="Nm">bus_describe_intr</code> —
<span class="Nd">associate a description with an active interrupt
handler</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="In">#include
<<a class="In">sys/param.h</a>></code>
<br/>
<code class="In">#include <<a class="In">sys/bus.h</a>></code></p>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">BUS_DESCRIBE_INTR</code>(<var class="Fa">device_t dev</var>,
<var class="Fa">device_t child</var>, <var class="Fa">struct resource
*irq</var>, <var class="Fa">void *cookie</var>, <var class="Fa">const char
*descr</var>);</p>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">bus_describe_intr</code>(<var class="Fa">device_t dev</var>,
<var class="Fa">struct resource *irq</var>, <var class="Fa">void
*cookie</var>, <var class="Fa">const char *fmt</var>,
<var class="Fa">...</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The
<a class="permalink" href="#BUS_DESCRIBE_INTR"><code class="Fn" id="BUS_DESCRIBE_INTR">BUS_DESCRIBE_INTR</code></a>()
method associates a description with an active interrupt handler. The
<var class="Fa">cookie</var> parameter must be the value returned by a
successful call to <a class="Xr">BUS_SETUP_INTR(9)</a> for the interrupt
<var class="Fa">irq</var>.</p>
<p class="Pp" id="bus_describe_intr">The
<a class="permalink" href="#bus_describe_intr"><code class="Fn">bus_describe_intr</code></a>()
function is a simple wrapper around
<code class="Fn">BUS_DESCRIBE_INTR</code>(). As a convenience,
<code class="Fn">bus_describe_intr</code>() allows the caller to use
<a class="Xr">printf(9)</a> style formatting to build the description string
using <var class="Fa">fmt</var>.</p>
<p class="Pp">When an interrupt handler is established by
<a class="Xr">BUS_SETUP_INTR(9)</a>, the handler is named after the device
the handler is established for. This name is then used in various places
such as interrupt statistics displayed by <a class="Xr">systat(1)</a> and
<a class="Xr">vmstat(8)</a>. For devices that use a single interrupt, the
device name is sufficiently unique to identify the interrupt handler.
However, for devices that use multiple interrupts it can be useful to
distinguish the interrupt handlers. When a description is set for an active
interrupt handler, a colon followed by the description is appended to the
device name to form the interrupt handler name.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
<p class="Pp">Zero is returned on success, otherwise an appropriate error is
returned.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<p class="Pp"><a class="Xr">systat(1)</a>, <a class="Xr">vmstat(8)</a>,
<a class="Xr">BUS_SETUP_INTR(9)</a>, <a class="Xr">device(9)</a>,
<a class="Xr">printf(9)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<p class="Pp">The <code class="Fn">BUS_DESCRIBE_INTR</code>() method and
<code class="Fn">bus_describe_intr</code>() functions first appeared in
<span class="Ux">FreeBSD 8.1</span>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1>
<p class="Pp">It is not currently possible to remove a description from an
active interrupt handler.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 9, 2015</td>
<td class="foot-os">FreeBSD 15.0</td>
</tr>
</table>
|