Print this page
4382 ddi_intr_get_nintrs manpage typo
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man9f/ddi_intr_get_nintrs.9f
+++ new/usr/src/man/man9f/ddi_intr_get_nintrs.9f
1 1 '\" te
2 2 .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
3 3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 -.TH DDI_INTR_GET_NINTRS 9F "Nov 13, 2006"
6 +.TH DDI_INTR_GET_NINTRS 9F "Dec 13, 2013"
7 7 .SH NAME
8 8 ddi_intr_get_nintrs, ddi_intr_get_navail \- return number of interrupts
9 9 supported or available for a given interrupt type
10 10 .SH SYNOPSIS
11 11 .LP
12 12 .nf
13 13 #include <sys/types.h>
14 14 #include <sys/conf.h>
15 15 #include <sys/ddi.h>
16 16 #include <sys/sunddi.h>
17 17
18 18 \fBint\fR \fBddi_intr_get_nintrs\fR(\fBdev_info_t *\fR\fIdip\fR, \fBint\fR \fItype\fR, \fBint *\fR\fInintrsp\fR);
19 19 .fi
20 20
21 21 .LP
22 22 .nf
23 23 \fBint\fR \fBddi_intr_get_navail\fR(\fBdev_info_t *\fR\fIdip\fR, \fBint\fR \fItype\fR, \fBint *\fR\fInavailp\fR);
24 24 .fi
25 25
26 26 .SH INTERFACE LEVEL
27 27 .sp
28 28 .LP
29 29 Solaris DDI specific (Solaris DDI).
30 30 .SH PARAMETERS
31 31 .sp
32 32 .LP
33 33 \fBddi_intr_get_nintrs()\fR
34 34 .sp
35 35 .ne 2
36 36 .na
37 37 \fB\fIdip\fR\fR
38 38 .ad
39 39 .RS 11n
40 40 Pointer to \fBdev_info\fR structure
41 41 .RE
42 42
43 43 .sp
44 44 .ne 2
45 45 .na
46 46 \fB\fItype\fR\fR
47 47 .ad
48 48 .RS 11n
49 49 Interrupt type
50 50 .RE
51 51
52 52 .sp
53 53 .ne 2
54 54 .na
55 55 \fB\fInintrsp\fR\fR
56 56 .ad
57 57 .RS 11n
58 58 Pointer to number of interrupts of the given type that are supported by the
59 59 system
60 60 .RE
61 61
62 62 .sp
63 63 .LP
64 64 \fBddi_intr_get_navail()\fR
65 65 .sp
66 66 .ne 2
67 67 .na
68 68 \fB\fIdip\fR\fR
69 69 .ad
70 70 .RS 11n
71 71 Pointer to \fBdev_info\fR structure
72 72 .RE
73 73
74 74 .sp
75 75 .ne 2
76 76 .na
77 77 \fB\fItype\fR\fR
78 78 .ad
79 79 .RS 11n
80 80 Interrupt type
81 81 .RE
82 82
83 83 .sp
84 84 .ne 2
85 85 .na
86 86 \fB\fInavailp\fR\fR
87 87 .ad
88 88 .RS 11n
89 89 Pointer to number of interrupts of the given type that are currently available
90 90 from the system
91 91 .RE
92 92
93 93 .SH DESCRIPTION
94 94 .sp
95 95 .LP
96 96 The \fBddi_intr_get_nintrs()\fR function returns the number of interrupts of
97 97 the given \fItype\fR supported by a particular hardware device. On a successful
98 98 return, the number of supported interrupts is returned as an integer pointed to
99 99 by the \fInintrsp\fR argument.
100 100 .sp
101 101 .LP
102 102 If the hardware device is not found to support any interrupts of the given
103 103 \fItype\fR, the \fBDDI_INTR_NOTFOUND\fR failure is returned rather than a zero
104 104 in \fInintrsp\fR.
105 105 .sp
106 106 .LP
↓ open down ↓ |
90 lines elided |
↑ open up ↑ |
107 107 The \fBddi_intr_get_navail()\fR function returns the number of interrupts of a
108 108 given \fItype\fR that is available to a particular hardware device. On a
109 109 successful return, the number of available interrupts is returned as an integer
110 110 pointed to by \fInavailp\fR.
111 111 .sp
112 112 .LP
113 113 The hardware device may support more than one interrupt and can request that
114 114 all interrupts be allocated. The host software can then use policy-based
115 115 decisions to determine how many interrupts are made available to the device.
116 116 Based on the determination, a value is returned that should be used to allocate
117 -interrupts with the \fBddi_int_alloc()\fR function.
117 +interrupts with the \fBddi_intr_alloc()\fR function.
118 118 .sp
119 119 .LP
120 120 The \fBddi_intr_get_supported_types\fR(9F) function returns a list of valid
121 121 supported types for the given hardware device. It must be called prior to
122 122 calling either the \fBddi_intr_get_nintrs()\fR or \fBddi_intr_get_navail()\fR.
123 123 .SH RETURN VALUES
124 124 .sp
125 125 .LP
126 126 The \fBddi_intr_get_nintrs()\fR and \fBddi_intr_get_navail()\fR functions
127 127 return:
128 128 .sp
129 129 .ne 2
130 130 .na
131 131 \fB\fBDDI_SUCCESS\fR\fR
132 132 .ad
133 133 .RS 21n
134 134 On success.
135 135 .RE
136 136
137 137 .sp
138 138 .ne 2
139 139 .na
140 140 \fB\fBDDI_EINVAL\fR\fR
141 141 .ad
142 142 .RS 21n
143 143 On encountering invalid input parameters.
144 144 .RE
145 145
146 146 .sp
147 147 .ne 2
148 148 .na
149 149 \fB\fBDDI_INTR_NOTFOUND\fR\fR
150 150 .ad
151 151 .RS 21n
152 152 On not finding any interrupts for the given interrupt type.
153 153 .RE
154 154
155 155 .sp
156 156 .ne 2
157 157 .na
158 158 \fB\fBDDI_FAILURE\fR\fR
159 159 .ad
160 160 .RS 21n
161 161 On any implementation specific failure.
162 162 .RE
163 163
164 164 .SH CONTEXT
165 165 .sp
166 166 .LP
167 167 The \fBddi_intr_get_nintrs()\fR and \fBddi_intr_get_navail()\fR functions can
168 168 be called from either user or kernel non-interrupt context.
169 169 .SH ATTRIBUTES
170 170 .sp
171 171 .LP
172 172 See \fBattributes\fR(5) for descriptions of the following attributes:
173 173 .sp
174 174
175 175 .sp
176 176 .TS
177 177 box;
178 178 c | c
179 179 l | l .
180 180 ATTRIBUTE TYPE ATTRIBUTE VALUE
181 181 _
182 182 Interface Stability Committed
183 183 .TE
184 184
185 185 .SH SEE ALSO
186 186 .sp
187 187 .LP
188 188 \fBattributes\fR(5), \fBddi_intr_alloc\fR(9F), \fBddi_intr_enable\fR(9F),
189 189 \fBddi_intr_get_supported_types\fR(9F)
190 190 .sp
191 191 .LP
192 192 \fIWriting Device Drivers\fR
193 193 .SH NOTES
194 194 .sp
195 195 .LP
196 196 The \fBddi_intr_get_nintrs()\fR and \fBddi_intr_get_navail()\fR functions can
197 197 be called at any time, even if the driver has added an interrupt handler for a
198 198 given interrupt specification.
199 199 .sp
200 200 .LP
201 201 On x86 platforms, the number of interrupts returned by the
202 202 \fBddi_intr_get_navail()\fR function might need to be further reduced by the
203 203 number of interrupts available for each interrupt priority on the system. In
204 204 that case, drivers should use different priorities for some of the interrupts.
205 205 .sp
206 206 .LP
207 207 Consumers of these interfaces should verify that the return value is not equal
208 208 to \fBDDI_SUCCESS\fR. Incomplete checking for failure codes could result in
209 209 inconsistent behavior among platforms.
↓ open down ↓ |
82 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX