Deleted Added
full compact
intr_machdep.h (153146) intr_machdep.h (156124)
1/*-
2 * Copyright (c) 2003 John Baldwin <jhb@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2003 John Baldwin <jhb@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/i386/include/intr_machdep.h 153146 2005-12-05 22:39:09Z jhb $
26 * $FreeBSD: head/sys/i386/include/intr_machdep.h 156124 2006-02-28 22:24:55Z jhb $
27 */
28
29#ifndef __MACHINE_INTR_MACHDEP_H__
30#define __MACHINE_INTR_MACHDEP_H__
31
32#ifdef _KERNEL
33
34/*

--- 45 unchanged lines hidden (view full) ---

80 void (*pic_eoi_source)(struct intsrc *);
81 void (*pic_enable_intr)(struct intsrc *);
82 int (*pic_vector)(struct intsrc *);
83 int (*pic_source_pending)(struct intsrc *);
84 void (*pic_suspend)(struct intsrc *);
85 void (*pic_resume)(struct intsrc *);
86 int (*pic_config_intr)(struct intsrc *, enum intr_trigger,
87 enum intr_polarity);
27 */
28
29#ifndef __MACHINE_INTR_MACHDEP_H__
30#define __MACHINE_INTR_MACHDEP_H__
31
32#ifdef _KERNEL
33
34/*

--- 45 unchanged lines hidden (view full) ---

80 void (*pic_eoi_source)(struct intsrc *);
81 void (*pic_enable_intr)(struct intsrc *);
82 int (*pic_vector)(struct intsrc *);
83 int (*pic_source_pending)(struct intsrc *);
84 void (*pic_suspend)(struct intsrc *);
85 void (*pic_resume)(struct intsrc *);
86 int (*pic_config_intr)(struct intsrc *, enum intr_trigger,
87 enum intr_polarity);
88 void (*pic_assign_cpu)(struct intsrc *, u_int apic_id);
88};
89
90/* Flags for pic_disable_source() */
91enum {
92 PIC_EOI,
93 PIC_NO_EOI,
94};
95

--- 4 unchanged lines hidden (view full) ---

100 * or an I/O APIC pointer.
101 */
102struct intsrc {
103 struct pic *is_pic;
104 struct intr_event *is_event;
105 u_long *is_count;
106 u_long *is_straycount;
107 u_int is_index;
89};
90
91/* Flags for pic_disable_source() */
92enum {
93 PIC_EOI,
94 PIC_NO_EOI,
95};
96

--- 4 unchanged lines hidden (view full) ---

101 * or an I/O APIC pointer.
102 */
103struct intsrc {
104 struct pic *is_pic;
105 struct intr_event *is_event;
106 u_long *is_count;
107 u_long *is_straycount;
108 u_int is_index;
109 u_int is_enabled:1;
108};
109
110struct trapframe;
111
112extern struct mtx icu_lock;
113extern int elcr_found;
114
115/* XXX: The elcr_* prototypes probably belong somewhere else. */
116int elcr_probe(void);
117enum intr_trigger elcr_read_trigger(u_int irq);
118void elcr_resume(void);
119void elcr_write_trigger(u_int irq, enum intr_trigger trigger);
110};
111
112struct trapframe;
113
114extern struct mtx icu_lock;
115extern int elcr_found;
116
117/* XXX: The elcr_* prototypes probably belong somewhere else. */
118int elcr_probe(void);
119enum intr_trigger elcr_read_trigger(u_int irq);
120void elcr_resume(void);
121void elcr_write_trigger(u_int irq, enum intr_trigger trigger);
122#ifdef SMP
123void intr_add_cpu(u_int apic_id);
124#else
125#define intr_add_cpu(apic_id)
126#endif
120int intr_add_handler(const char *name, int vector, driver_intr_t handler,
121 void *arg, enum intr_type flags, void **cookiep);
122int intr_config_intr(int vector, enum intr_trigger trig,
123 enum intr_polarity pol);
124void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame);
125struct intsrc *intr_lookup_source(int vector);
126int intr_register_source(struct intsrc *isrc);
127int intr_remove_handler(void *cookie);
128void intr_resume(void);
129void intr_suspend(void);
130void intrcnt_add(const char *name, u_long **countp);
131
132#endif /* !LOCORE */
133#endif /* _KERNEL */
134#endif /* !__MACHINE_INTR_MACHDEP_H__ */
127int intr_add_handler(const char *name, int vector, driver_intr_t handler,
128 void *arg, enum intr_type flags, void **cookiep);
129int intr_config_intr(int vector, enum intr_trigger trig,
130 enum intr_polarity pol);
131void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame);
132struct intsrc *intr_lookup_source(int vector);
133int intr_register_source(struct intsrc *isrc);
134int intr_remove_handler(void *cookie);
135void intr_resume(void);
136void intr_suspend(void);
137void intrcnt_add(const char *name, u_long **countp);
138
139#endif /* !LOCORE */
140#endif /* _KERNEL */
141#endif /* !__MACHINE_INTR_MACHDEP_H__ */