apicvar.h (193662) | apicvar.h (196196) |
---|---|
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 --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 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 --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sys/i386/include/apicvar.h 193662 2009-06-07 22:52:48Z adrian $ | 29 * $FreeBSD: head/sys/i386/include/apicvar.h 196196 2009-08-13 17:09:45Z attilio $ |
30 */ 31 32#ifndef _MACHINE_APICVAR_H_ 33#define _MACHINE_APICVAR_H_ 34 35/* 36 * Local && I/O APIC variable definitions. 37 */ --- 57 unchanged lines hidden (view full) --- 95 * class and sending IPIs from other CPUs will be blocked. 96 * To avoid deadlocks there should be no more than two IPI interrupts 97 * pending at the same time. 98 * Currently this is guaranteed by dividing the IPIs in two groups that have 99 * each at most one IPI interrupt pending. The first group is protected by the 100 * smp_ipi_mtx and waits for the completion of the IPI (Only one IPI user 101 * at a time) The second group uses a single interrupt and a bitmap to avoid 102 * redundant IPI interrupts. | 30 */ 31 32#ifndef _MACHINE_APICVAR_H_ 33#define _MACHINE_APICVAR_H_ 34 35/* 36 * Local && I/O APIC variable definitions. 37 */ --- 57 unchanged lines hidden (view full) --- 95 * class and sending IPIs from other CPUs will be blocked. 96 * To avoid deadlocks there should be no more than two IPI interrupts 97 * pending at the same time. 98 * Currently this is guaranteed by dividing the IPIs in two groups that have 99 * each at most one IPI interrupt pending. The first group is protected by the 100 * smp_ipi_mtx and waits for the completion of the IPI (Only one IPI user 101 * at a time) The second group uses a single interrupt and a bitmap to avoid 102 * redundant IPI interrupts. |
103 * 104 * Right now IPI_STOP used by kdb shares the interrupt priority class with 105 * the two IPI groups mentioned above. As such IPI_STOP may cause a deadlock. 106 * Eventually IPI_STOP should use NMI IPIs - this would eliminate this and 107 * other deadlocks caused by IPI_STOP. | |
108 */ 109 110/* Interrupts for local APIC LVT entries other than the timer. */ 111#ifdef XEN 112/* These are the Xen i386 APIC definitions */ 113#define APIC_LOCAL_INTS 240 114#define APIC_ERROR_INT APIC_LOCAL_INTS 115#define APIC_THERMAL_INT (APIC_LOCAL_INTS + 1) --- 13 unchanged lines hidden (view full) --- 129#define IPI_PREEMPT 1 130#define IPI_HARDCLOCK 2 131#define IPI_STATCLOCK 3 132#define IPI_PROFCLOCK 4 133#define IPI_BITMAP_LAST IPI_PROFCLOCK 134#define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) 135 136#define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ | 103 */ 104 105/* Interrupts for local APIC LVT entries other than the timer. */ 106#ifdef XEN 107/* These are the Xen i386 APIC definitions */ 108#define APIC_LOCAL_INTS 240 109#define APIC_ERROR_INT APIC_LOCAL_INTS 110#define APIC_THERMAL_INT (APIC_LOCAL_INTS + 1) --- 13 unchanged lines hidden (view full) --- 124#define IPI_PREEMPT 1 125#define IPI_HARDCLOCK 2 126#define IPI_STATCLOCK 3 127#define IPI_PROFCLOCK 4 128#define IPI_BITMAP_LAST IPI_PROFCLOCK 129#define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) 130 131#define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ |
132#define IPI_STOP_HARD (APIC_IPI_INTS + 8) /* Stop CPU with a NMI. */ |
|
137 138#else /* XEN */ 139/* These are the normal i386 APIC definitions */ 140#define APIC_LOCAL_INTS 240 141#define APIC_ERROR_INT APIC_LOCAL_INTS 142#define APIC_THERMAL_INT (APIC_LOCAL_INTS + 1) 143#define APIC_IPI_INTS (APIC_LOCAL_INTS + 2) 144 --- 11 unchanged lines hidden (view full) --- 156#define IPI_PREEMPT 1 157#define IPI_HARDCLOCK 2 158#define IPI_STATCLOCK 3 159#define IPI_PROFCLOCK 4 160#define IPI_BITMAP_LAST IPI_PROFCLOCK 161#define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) 162 163#define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ | 133 134#else /* XEN */ 135/* These are the normal i386 APIC definitions */ 136#define APIC_LOCAL_INTS 240 137#define APIC_ERROR_INT APIC_LOCAL_INTS 138#define APIC_THERMAL_INT (APIC_LOCAL_INTS + 1) 139#define APIC_IPI_INTS (APIC_LOCAL_INTS + 2) 140 --- 11 unchanged lines hidden (view full) --- 152#define IPI_PREEMPT 1 153#define IPI_HARDCLOCK 2 154#define IPI_STATCLOCK 3 155#define IPI_PROFCLOCK 4 156#define IPI_BITMAP_LAST IPI_PROFCLOCK 157#define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) 158 159#define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ |
160#define IPI_STOP_HARD (APIC_IPI_INTS + 8) /* Stop CPU with a NMI. */ |
|
164#endif /* XEN */ 165 166/* 167 * The spurious interrupt can share the priority class with the IPIs since 168 * it is not a normal interrupt. (Does not use the APIC's interrupt fifo) 169 */ 170#define APIC_SPURIOUS_INT 255 171 --- 88 unchanged lines hidden --- | 161#endif /* XEN */ 162 163/* 164 * The spurious interrupt can share the priority class with the IPIs since 165 * it is not a normal interrupt. (Does not use the APIC's interrupt fifo) 166 */ 167#define APIC_SPURIOUS_INT 255 168 --- 88 unchanged lines hidden --- |