2 # Copyright (c) 2015-2016 Svatopluk Kraus
3 # Copyright (c) 2015-2016 Michal Meloun
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
9 # 1. Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 # 2. Redistributions in binary form must reproduce the above copyright
12 # notice, this list of conditions and the following disclaimer in the
13 # documentation and/or other materials provided with the distribution.
15 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 #include <sys/cpuset.h>
31 #include <sys/resource.h>
38 dflt_pic_bind_intr(device_t dev, struct intr_irqsrc *isrc)
45 null_pic_activate_intr(device_t dev, struct intr_irqsrc *isrc,
46 struct resource *res, struct intr_map_data *data)
53 null_pic_deactivate_intr(device_t dev, struct intr_irqsrc *isrc,
54 struct resource *res, struct intr_map_data *data)
61 null_pic_setup_intr(device_t dev, struct intr_irqsrc *isrc,
62 struct resource *res, struct intr_map_data *data)
69 null_pic_teardown_intr(device_t dev, struct intr_irqsrc *isrc,
70 struct resource *res, struct intr_map_data *data)
77 null_pic_init_secondary(device_t dev)
82 null_pic_ipi_send(device_t dev, cpuset_t cpus, u_int ipi)
87 dflt_pic_ipi_setup(device_t dev, u_int ipi, struct intr_irqsrc *isrc)
94 METHOD int activate_intr {
96 struct intr_irqsrc *isrc;
98 struct intr_map_data *data;
99 } DEFAULT null_pic_activate_intr;
101 METHOD int bind_intr {
103 struct intr_irqsrc *isrc;
104 } DEFAULT dflt_pic_bind_intr;
106 METHOD void disable_intr {
108 struct intr_irqsrc *isrc;
111 METHOD void enable_intr {
113 struct intr_irqsrc *isrc;
116 METHOD int map_intr {
118 struct intr_map_data *data;
119 struct intr_irqsrc **isrcp;
122 METHOD int deactivate_intr {
124 struct intr_irqsrc *isrc;
125 struct resource *res;
126 struct intr_map_data *data;
127 } DEFAULT null_pic_deactivate_intr;
129 METHOD int setup_intr {
131 struct intr_irqsrc *isrc;
132 struct resource *res;
133 struct intr_map_data *data;
134 } DEFAULT null_pic_setup_intr;
136 METHOD int teardown_intr {
138 struct intr_irqsrc *isrc;
139 struct resource *res;
140 struct intr_map_data *data;
141 } DEFAULT null_pic_teardown_intr;
143 METHOD void post_filter {
145 struct intr_irqsrc *isrc;
148 METHOD void post_ithread {
150 struct intr_irqsrc *isrc;
153 METHOD void pre_ithread {
155 struct intr_irqsrc *isrc;
158 METHOD void init_secondary {
160 } DEFAULT null_pic_init_secondary;
162 METHOD void ipi_send {
164 struct intr_irqsrc *isrc;
167 } DEFAULT null_pic_ipi_send;
169 METHOD int ipi_setup {
172 struct intr_irqsrc **isrcp;
173 } DEFAULT dflt_pic_ipi_setup;