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
31 #include <sys/cpuset.h>
32 #include <sys/resource.h>
39 dflt_pic_bind_intr(device_t dev, struct intr_irqsrc *isrc)
46 null_pic_activate_intr(device_t dev, struct intr_irqsrc *isrc,
47 struct resource *res, struct intr_map_data *data)
54 null_pic_deactivate_intr(device_t dev, struct intr_irqsrc *isrc,
55 struct resource *res, struct intr_map_data *data)
62 null_pic_setup_intr(device_t dev, struct intr_irqsrc *isrc,
63 struct resource *res, struct intr_map_data *data)
70 null_pic_teardown_intr(device_t dev, struct intr_irqsrc *isrc,
71 struct resource *res, struct intr_map_data *data)
78 null_pic_init_secondary(device_t dev)
83 null_pic_ipi_send(device_t dev, cpuset_t cpus, u_int ipi)
88 dflt_pic_ipi_setup(device_t dev, u_int ipi, struct intr_irqsrc *isrc)
95 METHOD int activate_intr {
97 struct intr_irqsrc *isrc;
99 struct intr_map_data *data;
100 } DEFAULT null_pic_activate_intr;
102 METHOD int bind_intr {
104 struct intr_irqsrc *isrc;
105 } DEFAULT dflt_pic_bind_intr;
107 METHOD void disable_intr {
109 struct intr_irqsrc *isrc;
112 METHOD void enable_intr {
114 struct intr_irqsrc *isrc;
117 METHOD int map_intr {
119 struct intr_map_data *data;
120 struct intr_irqsrc **isrcp;
123 METHOD int deactivate_intr {
125 struct intr_irqsrc *isrc;
126 struct resource *res;
127 struct intr_map_data *data;
128 } DEFAULT null_pic_deactivate_intr;
130 METHOD int setup_intr {
132 struct intr_irqsrc *isrc;
133 struct resource *res;
134 struct intr_map_data *data;
135 } DEFAULT null_pic_setup_intr;
137 METHOD int teardown_intr {
139 struct intr_irqsrc *isrc;
140 struct resource *res;
141 struct intr_map_data *data;
142 } DEFAULT null_pic_teardown_intr;
144 METHOD void post_filter {
146 struct intr_irqsrc *isrc;
149 METHOD void post_ithread {
151 struct intr_irqsrc *isrc;
154 METHOD void pre_ithread {
156 struct intr_irqsrc *isrc;
159 METHOD void init_secondary {
161 } DEFAULT null_pic_init_secondary;
163 METHOD void ipi_send {
165 struct intr_irqsrc *isrc;
168 } DEFAULT null_pic_ipi_send;
170 METHOD int ipi_setup {
173 struct intr_irqsrc **isrcp;
174 } DEFAULT dflt_pic_ipi_setup;