xref: /titanic_51/usr/src/uts/sun4/io/px/px_intr.h (revision 3db86aab554edbb4244c8d1a1c90f152eee768af)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_SYS_PX_INTR_H
28 #define	_SYS_PX_INTR_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 typedef struct px_class_val {
37 	uint32_t class_code;
38 	uint32_t class_mask;
39 	uint32_t class_val;
40 } px_class_val_t;
41 
42 extern dev_info_t *px_get_my_childs_dip(dev_info_t *dip, dev_info_t *rdip);
43 extern uint32_t px_class_to_pil(dev_info_t *rdip);
44 
45 extern int px_intx_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t op,
46 	ddi_intr_handle_impl_t *handle, void *result);
47 extern int px_msix_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t op,
48 	ddi_intr_handle_impl_t *handle, void *result);
49 
50 extern int px_add_intx_intr(dev_info_t *dip, dev_info_t *rdip,
51 	ddi_intr_handle_impl_t *hdlp);
52 extern int px_rem_intx_intr(dev_info_t *dip, dev_info_t *rdip,
53 	ddi_intr_handle_impl_t *hdlp);
54 
55 extern int px_add_msiq_intr(dev_info_t *dip, dev_info_t *rdip,
56 	ddi_intr_handle_impl_t *hdlp, msiq_rec_type_t rec_type,
57 	msgcode_t msg_code, msiqid_t *msiq_id_p);
58 extern int px_rem_msiq_intr(dev_info_t *dip, dev_info_t *rdip,
59 	ddi_intr_handle_impl_t *hdlp, msiq_rec_type_t rec_type,
60 	msgcode_t msg_code, msiqid_t msiq_id);
61 
62 extern uint_t px_intx_intr(caddr_t arg);
63 extern uint_t px_msiq_intr(caddr_t arg);
64 
65 #ifdef	__cplusplus
66 }
67 #endif
68 
69 #endif	/* _SYS_PX_INTR_H */
70