summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/apic_vector.S70
-rw-r--r--sys/amd64/amd64/mp_machdep.c25
-rw-r--r--sys/amd64/amd64/mptable.c25
-rw-r--r--sys/amd64/include/mptable.h25
-rw-r--r--sys/i386/i386/apic_vector.s70
-rw-r--r--sys/i386/i386/mp_machdep.c25
-rw-r--r--sys/i386/i386/mptable.c25
-rw-r--r--sys/i386/include/mptable.h25
-rw-r--r--sys/i386/include/smptests.h86
-rw-r--r--sys/i386/isa/apic_vector.s70
-rw-r--r--sys/kern/subr_smp.c25
11 files changed, 0 insertions, 471 deletions
diff --git a/sys/amd64/amd64/apic_vector.S b/sys/amd64/amd64/apic_vector.S
index 0f50a96..4ebf35d 100644
--- a/sys/amd64/amd64/apic_vector.S
+++ b/sys/amd64/amd64/apic_vector.S
@@ -96,7 +96,6 @@ IDTVEC(vec_name) ; \
testl _apic_isrbit_location + 4 + 8 * (irq_num), %eax ; \
jz 9f ; /* not active */ \
movl $0, _lapic+LA_EOI ; \
- APIC_ITRACE(apic_itrace_eoi, irq_num, APIC_ITRACE_EOI) ; \
9:
#else
@@ -104,7 +103,6 @@ IDTVEC(vec_name) ; \
testl $IRQ_BIT(irq_num), _lapic+LA_ISR1; \
jz 9f ; /* not active */ \
movl $0, _lapic+LA_EOI; \
- APIC_ITRACE(apic_itrace_eoi, irq_num, APIC_ITRACE_EOI) ; \
9:
#endif
@@ -126,70 +124,6 @@ IDTVEC(vec_name) ; \
7: ; /* already unmasked */ \
IMASK_UNLOCK
-#ifdef APIC_INTR_DIAGNOSTIC
-#ifdef APIC_INTR_DIAGNOSTIC_IRQ
-log_intr_event:
- pushf
- cli
- pushl $CNAME(apic_itrace_debuglock)
- call CNAME(s_lock_np)
- addl $4, %esp
- movl CNAME(apic_itrace_debugbuffer_idx), %ecx
- andl $32767, %ecx
- movl PCPU(CPUID), %eax
- shll $8, %eax
- orl 8(%esp), %eax
- movw %ax, CNAME(apic_itrace_debugbuffer)(,%ecx,2)
- incl %ecx
- andl $32767, %ecx
- movl %ecx, CNAME(apic_itrace_debugbuffer_idx)
- pushl $CNAME(apic_itrace_debuglock)
- call CNAME(s_unlock_np)
- addl $4, %esp
- popf
- ret
-
-
-#define APIC_ITRACE(name, irq_num, id) \
- lock ; /* MP-safe */ \
- incl CNAME(name) + (irq_num) * 4 ; \
- pushl %eax ; \
- pushl %ecx ; \
- pushl %edx ; \
- movl $(irq_num), %eax ; \
- cmpl $APIC_INTR_DIAGNOSTIC_IRQ, %eax ; \
- jne 7f ; \
- pushl $id ; \
- call log_intr_event ; \
- addl $4, %esp ; \
-7: ; \
- popl %edx ; \
- popl %ecx ; \
- popl %eax
-#else
-#define APIC_ITRACE(name, irq_num, id) \
- lock ; /* MP-safe */ \
- incl CNAME(name) + (irq_num) * 4
-#endif
-
-#define APIC_ITRACE_ENTER 1
-#define APIC_ITRACE_EOI 2
-#define APIC_ITRACE_TRYISRLOCK 3
-#define APIC_ITRACE_GOTISRLOCK 4
-#define APIC_ITRACE_ENTER2 5
-#define APIC_ITRACE_LEAVE 6
-#define APIC_ITRACE_UNMASK 7
-#define APIC_ITRACE_ACTIVE 8
-#define APIC_ITRACE_MASKED 9
-#define APIC_ITRACE_NOISRLOCK 10
-#define APIC_ITRACE_MASKED2 11
-#define APIC_ITRACE_SPLZ 12
-#define APIC_ITRACE_DORETI 13
-
-#else
-#define APIC_ITRACE(name, irq_num, id)
-#endif
-
/*
* Slow, threaded interrupts.
*
@@ -213,8 +147,6 @@ IDTVEC(vec_name) ; \
; \
maybe_extra_ipending ; \
; \
- APIC_ITRACE(apic_itrace_enter, irq_num, APIC_ITRACE_ENTER) ; \
-; \
MASK_LEVEL_IRQ(irq_num) ; \
EOI_IRQ(irq_num) ; \
0: ; \
@@ -224,11 +156,9 @@ IDTVEC(vec_name) ; \
__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX avoid dbl cnt */ \
pushl $irq_num; /* pass the IRQ */ \
- APIC_ITRACE(apic_itrace_enter2, irq_num, APIC_ITRACE_ENTER2) ; \
sti ; \
call _sched_ithd ; \
addl $4, %esp ; /* discard the parameter */ \
- APIC_ITRACE(apic_itrace_leave, irq_num, APIC_ITRACE_LEAVE) ; \
; \
MEXITCOUNT ; \
jmp _doreti
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 03b02d6..bf560cd 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -259,27 +259,6 @@ extern int nkpt;
u_int32_t cpu_apic_versions[MAXCPU];
u_int32_t *io_apic_versions;
-#ifdef APIC_INTR_DIAGNOSTIC
-int apic_itrace_enter[32];
-int apic_itrace_tryisrlock[32];
-int apic_itrace_gotisrlock[32];
-int apic_itrace_active[32];
-int apic_itrace_masked[32];
-int apic_itrace_noisrlock[32];
-int apic_itrace_masked2[32];
-int apic_itrace_unmask[32];
-int apic_itrace_noforward[32];
-int apic_itrace_leave[32];
-int apic_itrace_enter2[32];
-int apic_itrace_doreti[32];
-int apic_itrace_eoi[32];
-#ifdef APIC_INTR_DIAGNOSTIC_IRQ
-unsigned short apic_itrace_debugbuffer[32768];
-int apic_itrace_debugbuffer_idx;
-struct simplelock apic_itrace_debuglock;
-#endif
-#endif
-
#ifdef APIC_INTR_REORDER
struct {
volatile int *location;
@@ -1920,10 +1899,6 @@ struct simplelock panic_lock;
static void
init_locks(void)
{
-#if defined(APIC_INTR_DIAGNOSTIC) && defined(APIC_INTR_DIAGNOSTIC_IRQ)
- s_lock_init((struct simplelock*)&apic_itrace_debuglock);
-#endif
-
s_lock_init((struct simplelock*)&mcount_lock);
s_lock_init((struct simplelock*)&fast_intr_lock);
diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c
index 03b02d6..bf560cd 100644
--- a/sys/amd64/amd64/mptable.c
+++ b/sys/amd64/amd64/mptable.c
@@ -259,27 +259,6 @@ extern int nkpt;
u_int32_t cpu_apic_versions[MAXCPU];
u_int32_t *io_apic_versions;
-#ifdef APIC_INTR_DIAGNOSTIC
-int apic_itrace_enter[32];
-int apic_itrace_tryisrlock[32];
-int apic_itrace_gotisrlock[32];
-int apic_itrace_active[32];
-int apic_itrace_masked[32];
-int apic_itrace_noisrlock[32];
-int apic_itrace_masked2[32];
-int apic_itrace_unmask[32];
-int apic_itrace_noforward[32];
-int apic_itrace_leave[32];
-int apic_itrace_enter2[32];
-int apic_itrace_doreti[32];
-int apic_itrace_eoi[32];
-#ifdef APIC_INTR_DIAGNOSTIC_IRQ
-unsigned short apic_itrace_debugbuffer[32768];
-int apic_itrace_debugbuffer_idx;
-struct simplelock apic_itrace_debuglock;
-#endif
-#endif
-
#ifdef APIC_INTR_REORDER
struct {
volatile int *location;
@@ -1920,10 +1899,6 @@ struct simplelock panic_lock;
static void
init_locks(void)
{
-#if defined(APIC_INTR_DIAGNOSTIC) && defined(APIC_INTR_DIAGNOSTIC_IRQ)
- s_lock_init((struct simplelock*)&apic_itrace_debuglock);
-#endif
-
s_lock_init((struct simplelock*)&mcount_lock);
s_lock_init((struct simplelock*)&fast_intr_lock);
diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h
index 03b02d6..bf560cd 100644
--- a/sys/amd64/include/mptable.h
+++ b/sys/amd64/include/mptable.h
@@ -259,27 +259,6 @@ extern int nkpt;
u_int32_t cpu_apic_versions[MAXCPU];
u_int32_t *io_apic_versions;
-#ifdef APIC_INTR_DIAGNOSTIC
-int apic_itrace_enter[32];
-int apic_itrace_tryisrlock[32];
-int apic_itrace_gotisrlock[32];
-int apic_itrace_active[32];
-int apic_itrace_masked[32];
-int apic_itrace_noisrlock[32];
-int apic_itrace_masked2[32];
-int apic_itrace_unmask[32];
-int apic_itrace_noforward[32];
-int apic_itrace_leave[32];
-int apic_itrace_enter2[32];
-int apic_itrace_doreti[32];
-int apic_itrace_eoi[32];
-#ifdef APIC_INTR_DIAGNOSTIC_IRQ
-unsigned short apic_itrace_debugbuffer[32768];
-int apic_itrace_debugbuffer_idx;
-struct simplelock apic_itrace_debuglock;
-#endif
-#endif
-
#ifdef APIC_INTR_REORDER
struct {
volatile int *location;
@@ -1920,10 +1899,6 @@ struct simplelock panic_lock;
static void
init_locks(void)
{
-#if defined(APIC_INTR_DIAGNOSTIC) && defined(APIC_INTR_DIAGNOSTIC_IRQ)
- s_lock_init((struct simplelock*)&apic_itrace_debuglock);
-#endif
-
s_lock_init((struct simplelock*)&mcount_lock);
s_lock_init((struct simplelock*)&fast_intr_lock);
diff --git a/sys/i386/i386/apic_vector.s b/sys/i386/i386/apic_vector.s
index 0f50a96..4ebf35d 100644
--- a/sys/i386/i386/apic_vector.s
+++ b/sys/i386/i386/apic_vector.s
@@ -96,7 +96,6 @@ IDTVEC(vec_name) ; \
testl _apic_isrbit_location + 4 + 8 * (irq_num), %eax ; \
jz 9f ; /* not active */ \
movl $0, _lapic+LA_EOI ; \
- APIC_ITRACE(apic_itrace_eoi, irq_num, APIC_ITRACE_EOI) ; \
9:
#else
@@ -104,7 +103,6 @@ IDTVEC(vec_name) ; \
testl $IRQ_BIT(irq_num), _lapic+LA_ISR1; \
jz 9f ; /* not active */ \
movl $0, _lapic+LA_EOI; \
- APIC_ITRACE(apic_itrace_eoi, irq_num, APIC_ITRACE_EOI) ; \
9:
#endif
@@ -126,70 +124,6 @@ IDTVEC(vec_name) ; \
7: ; /* already unmasked */ \
IMASK_UNLOCK
-#ifdef APIC_INTR_DIAGNOSTIC
-#ifdef APIC_INTR_DIAGNOSTIC_IRQ
-log_intr_event:
- pushf
- cli
- pushl $CNAME(apic_itrace_debuglock)
- call CNAME(s_lock_np)
- addl $4, %esp
- movl CNAME(apic_itrace_debugbuffer_idx), %ecx
- andl $32767, %ecx
- movl PCPU(CPUID), %eax
- shll $8, %eax
- orl 8(%esp), %eax
- movw %ax, CNAME(apic_itrace_debugbuffer)(,%ecx,2)
- incl %ecx
- andl $32767, %ecx
- movl %ecx, CNAME(apic_itrace_debugbuffer_idx)
- pushl $CNAME(apic_itrace_debuglock)
- call CNAME(s_unlock_np)
- addl $4, %esp
- popf
- ret
-
-
-#define APIC_ITRACE(name, irq_num, id) \
- lock ; /* MP-safe */ \
- incl CNAME(name) + (irq_num) * 4 ; \
- pushl %eax ; \
- pushl %ecx ; \
- pushl %edx ; \
- movl $(irq_num), %eax ; \
- cmpl $APIC_INTR_DIAGNOSTIC_IRQ, %eax ; \
- jne 7f ; \
- pushl $id ; \
- call log_intr_event ; \
- addl $4, %esp ; \
-7: ; \
- popl %edx ; \
- popl %ecx ; \
- popl %eax
-#else
-#define APIC_ITRACE(name, irq_num, id) \
- lock ; /* MP-safe */ \
- incl CNAME(name) + (irq_num) * 4
-#endif
-
-#define APIC_ITRACE_ENTER 1
-#define APIC_ITRACE_EOI 2
-#define APIC_ITRACE_TRYISRLOCK 3
-#define APIC_ITRACE_GOTISRLOCK 4
-#define APIC_ITRACE_ENTER2 5
-#define APIC_ITRACE_LEAVE 6
-#define APIC_ITRACE_UNMASK 7
-#define APIC_ITRACE_ACTIVE 8
-#define APIC_ITRACE_MASKED 9
-#define APIC_ITRACE_NOISRLOCK 10
-#define APIC_ITRACE_MASKED2 11
-#define APIC_ITRACE_SPLZ 12
-#define APIC_ITRACE_DORETI 13
-
-#else
-#define APIC_ITRACE(name, irq_num, id)
-#endif
-
/*
* Slow, threaded interrupts.
*
@@ -213,8 +147,6 @@ IDTVEC(vec_name) ; \
; \
maybe_extra_ipending ; \
; \
- APIC_ITRACE(apic_itrace_enter, irq_num, APIC_ITRACE_ENTER) ; \
-; \
MASK_LEVEL_IRQ(irq_num) ; \
EOI_IRQ(irq_num) ; \
0: ; \
@@ -224,11 +156,9 @@ IDTVEC(vec_name) ; \
__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX avoid dbl cnt */ \
pushl $irq_num; /* pass the IRQ */ \
- APIC_ITRACE(apic_itrace_enter2, irq_num, APIC_ITRACE_ENTER2) ; \
sti ; \
call _sched_ithd ; \
addl $4, %esp ; /* discard the parameter */ \
- APIC_ITRACE(apic_itrace_leave, irq_num, APIC_ITRACE_LEAVE) ; \
; \
MEXITCOUNT ; \
jmp _doreti
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c
index 03b02d6..bf560cd 100644
--- a/sys/i386/i386/mp_machdep.c
+++ b/sys/i386/i386/mp_machdep.c
@@ -259,27 +259,6 @@ extern int nkpt;
u_int32_t cpu_apic_versions[MAXCPU];
u_int32_t *io_apic_versions;
-#ifdef APIC_INTR_DIAGNOSTIC
-int apic_itrace_enter[32];
-int apic_itrace_tryisrlock[32];
-int apic_itrace_gotisrlock[32];
-int apic_itrace_active[32];
-int apic_itrace_masked[32];
-int apic_itrace_noisrlock[32];
-int apic_itrace_masked2[32];
-int apic_itrace_unmask[32];
-int apic_itrace_noforward[32];
-int apic_itrace_leave[32];
-int apic_itrace_enter2[32];
-int apic_itrace_doreti[32];
-int apic_itrace_eoi[32];
-#ifdef APIC_INTR_DIAGNOSTIC_IRQ
-unsigned short apic_itrace_debugbuffer[32768];
-int apic_itrace_debugbuffer_idx;
-struct simplelock apic_itrace_debuglock;
-#endif
-#endif
-
#ifdef APIC_INTR_REORDER
struct {
volatile int *location;
@@ -1920,10 +1899,6 @@ struct simplelock panic_lock;
static void
init_locks(void)
{
-#if defined(APIC_INTR_DIAGNOSTIC) && defined(APIC_INTR_DIAGNOSTIC_IRQ)
- s_lock_init((struct simplelock*)&apic_itrace_debuglock);
-#endif
-
s_lock_init((struct simplelock*)&mcount_lock);
s_lock_init((struct simplelock*)&fast_intr_lock);
diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c
index 03b02d6..bf560cd 100644
--- a/sys/i386/i386/mptable.c
+++ b/sys/i386/i386/mptable.c
@@ -259,27 +259,6 @@ extern int nkpt;
u_int32_t cpu_apic_versions[MAXCPU];
u_int32_t *io_apic_versions;
-#ifdef APIC_INTR_DIAGNOSTIC
-int apic_itrace_enter[32];
-int apic_itrace_tryisrlock[32];
-int apic_itrace_gotisrlock[32];
-int apic_itrace_active[32];
-int apic_itrace_masked[32];
-int apic_itrace_noisrlock[32];
-int apic_itrace_masked2[32];
-int apic_itrace_unmask[32];
-int apic_itrace_noforward[32];
-int apic_itrace_leave[32];
-int apic_itrace_enter2[32];
-int apic_itrace_doreti[32];
-int apic_itrace_eoi[32];
-#ifdef APIC_INTR_DIAGNOSTIC_IRQ
-unsigned short apic_itrace_debugbuffer[32768];
-int apic_itrace_debugbuffer_idx;
-struct simplelock apic_itrace_debuglock;
-#endif
-#endif
-
#ifdef APIC_INTR_REORDER
struct {
volatile int *location;
@@ -1920,10 +1899,6 @@ struct simplelock panic_lock;
static void
init_locks(void)
{
-#if defined(APIC_INTR_DIAGNOSTIC) && defined(APIC_INTR_DIAGNOSTIC_IRQ)
- s_lock_init((struct simplelock*)&apic_itrace_debuglock);
-#endif
-
s_lock_init((struct simplelock*)&mcount_lock);
s_lock_init((struct simplelock*)&fast_intr_lock);
diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h
index 03b02d6..bf560cd 100644
--- a/sys/i386/include/mptable.h
+++ b/sys/i386/include/mptable.h
@@ -259,27 +259,6 @@ extern int nkpt;
u_int32_t cpu_apic_versions[MAXCPU];
u_int32_t *io_apic_versions;
-#ifdef APIC_INTR_DIAGNOSTIC
-int apic_itrace_enter[32];
-int apic_itrace_tryisrlock[32];
-int apic_itrace_gotisrlock[32];
-int apic_itrace_active[32];
-int apic_itrace_masked[32];
-int apic_itrace_noisrlock[32];
-int apic_itrace_masked2[32];
-int apic_itrace_unmask[32];
-int apic_itrace_noforward[32];
-int apic_itrace_leave[32];
-int apic_itrace_enter2[32];
-int apic_itrace_doreti[32];
-int apic_itrace_eoi[32];
-#ifdef APIC_INTR_DIAGNOSTIC_IRQ
-unsigned short apic_itrace_debugbuffer[32768];
-int apic_itrace_debugbuffer_idx;
-struct simplelock apic_itrace_debuglock;
-#endif
-#endif
-
#ifdef APIC_INTR_REORDER
struct {
volatile int *location;
@@ -1920,10 +1899,6 @@ struct simplelock panic_lock;
static void
init_locks(void)
{
-#if defined(APIC_INTR_DIAGNOSTIC) && defined(APIC_INTR_DIAGNOSTIC_IRQ)
- s_lock_init((struct simplelock*)&apic_itrace_debuglock);
-#endif
-
s_lock_init((struct simplelock*)&mcount_lock);
s_lock_init((struct simplelock*)&fast_intr_lock);
diff --git a/sys/i386/include/smptests.h b/sys/i386/include/smptests.h
index a9a1888..8114c8a 100644
--- a/sys/i386/include/smptests.h
+++ b/sys/i386/include/smptests.h
@@ -60,8 +60,6 @@
*/
#define PUSHDOWN_LEVEL_1
#define PUSHDOWN_LEVEL_2
-#define PUSHDOWN_LEVEL_3_NOT
-#define PUSHDOWN_LEVEL_4_NOT
/*
* Debug version of simple_lock. This will store the CPU id of the
@@ -97,74 +95,6 @@
/*
- * INTR_SIMPLELOCK has been removed, as the interrupt mechanism will likely
- * not use this sort of optimization if we move to interrupt threads.
- */
-#ifdef PUSHDOWN_LEVEL_4
-#endif
-
-
-/*
- * CPL_AND_CML has been removed. Interrupt threads will eventually not
- * use either mechanism so there is no point trying to optimize it.
- */
-#ifdef PUSHDOWN_LEVEL_3
-#endif
-
-
-/*
- * SPL_DEBUG_POSTCODE/INTR_SPL/SPL_DEBUG - removed
- *
- * These functions were too expensive for the standard case but, more
- * importantly, we should be able to come up with a much cleaner way
- * to handle the cpl. Having to do any locking at all is a mistake
- * for something that is modified as often as cpl is.
- */
-
-/*
- * FAST_WITHOUTCPL - now made the default (define removed). Text below
- * contains the current discussion. I am confident we can find a solution
- * that does not require us to process softints from a hard int, which can
- * kill serial performance due to the lack of true hardware ipl's.
- *
- ****
- *
- * Ignore the ipending bits when exiting FAST_INTR() routines.
- *
- * according to Bruce:
- *
- * setsoft*() may set ipending. setsofttty() is actually used in the
- * FAST_INTR handler in some serial drivers. This is necessary to get
- * output completions and other urgent events handled as soon as possible.
- * The flag(s) could be set in a variable other than ipending, but they
- * needs to be checked against cpl to decide whether the software interrupt
- * handler can/should run.
- *
- * (FAST_INTR used to just return
- * in all cases until rev.1.7 of vector.s. This worked OK provided there
- * were no user-mode CPU hogs. CPU hogs caused an average latency of 1/2
- * clock tick for output completions...)
- ***
- *
- * So I need to restore cpl handling someday, but AFTER
- * I finish making spl/cpl MP-safe.
- */
-#ifdef PUSHDOWN_LEVEL_1
-#endif
-
-
-/*
- * FAST_SIMPLELOCK no longer exists, because it doesn't help us. The cpu
- * is likely to already hold the MP lock and recursive MP locks are now
- * very cheap, so we do not need this optimization. Eventually *ALL*
- * interrupts will run in their own thread, so there is no sense complicating
- * matters now.
- */
-#ifdef PUSHDOWN_LEVEL_1
-#endif
-
-
-/*
* Portions of the old TEST_LOPRIO code, back from the grave!
*/
#define GRAB_LOPRIO
@@ -186,22 +116,6 @@
#ifdef APIC_IO
/*
- * Enable extra counters for some selected locations in the interrupt handlers.
- * Look in apic_vector.s, apic_ipl.s and ipl.s for APIC_ITRACE or
- * APIC_INTR_DIAGNOSTIC.
- */
-#undef APIC_INTR_DIAGNOSTIC
-
-/*
- * Add extra tracking of a specific interrupt. Look in apic_vector.s,
- * apic_ipl.s and ipl.s for APIC_ITRACE and log_intr_event.
- * APIC_INTR_DIAGNOSTIC must be defined for this to work.
- */
-#ifdef APIC_INTR_DIAGNOSTIC
-#define APIC_INTR_DIAGNOSTIC_IRQ 17
-#endif
-
-/*
* Don't assume that slow interrupt handler X is called from vector
* X + ICU_OFFSET.
*/
diff --git a/sys/i386/isa/apic_vector.s b/sys/i386/isa/apic_vector.s
index 0f50a96..4ebf35d 100644
--- a/sys/i386/isa/apic_vector.s
+++ b/sys/i386/isa/apic_vector.s
@@ -96,7 +96,6 @@ IDTVEC(vec_name) ; \
testl _apic_isrbit_location + 4 + 8 * (irq_num), %eax ; \
jz 9f ; /* not active */ \
movl $0, _lapic+LA_EOI ; \
- APIC_ITRACE(apic_itrace_eoi, irq_num, APIC_ITRACE_EOI) ; \
9:
#else
@@ -104,7 +103,6 @@ IDTVEC(vec_name) ; \
testl $IRQ_BIT(irq_num), _lapic+LA_ISR1; \
jz 9f ; /* not active */ \
movl $0, _lapic+LA_EOI; \
- APIC_ITRACE(apic_itrace_eoi, irq_num, APIC_ITRACE_EOI) ; \
9:
#endif
@@ -126,70 +124,6 @@ IDTVEC(vec_name) ; \
7: ; /* already unmasked */ \
IMASK_UNLOCK
-#ifdef APIC_INTR_DIAGNOSTIC
-#ifdef APIC_INTR_DIAGNOSTIC_IRQ
-log_intr_event:
- pushf
- cli
- pushl $CNAME(apic_itrace_debuglock)
- call CNAME(s_lock_np)
- addl $4, %esp
- movl CNAME(apic_itrace_debugbuffer_idx), %ecx
- andl $32767, %ecx
- movl PCPU(CPUID), %eax
- shll $8, %eax
- orl 8(%esp), %eax
- movw %ax, CNAME(apic_itrace_debugbuffer)(,%ecx,2)
- incl %ecx
- andl $32767, %ecx
- movl %ecx, CNAME(apic_itrace_debugbuffer_idx)
- pushl $CNAME(apic_itrace_debuglock)
- call CNAME(s_unlock_np)
- addl $4, %esp
- popf
- ret
-
-
-#define APIC_ITRACE(name, irq_num, id) \
- lock ; /* MP-safe */ \
- incl CNAME(name) + (irq_num) * 4 ; \
- pushl %eax ; \
- pushl %ecx ; \
- pushl %edx ; \
- movl $(irq_num), %eax ; \
- cmpl $APIC_INTR_DIAGNOSTIC_IRQ, %eax ; \
- jne 7f ; \
- pushl $id ; \
- call log_intr_event ; \
- addl $4, %esp ; \
-7: ; \
- popl %edx ; \
- popl %ecx ; \
- popl %eax
-#else
-#define APIC_ITRACE(name, irq_num, id) \
- lock ; /* MP-safe */ \
- incl CNAME(name) + (irq_num) * 4
-#endif
-
-#define APIC_ITRACE_ENTER 1
-#define APIC_ITRACE_EOI 2
-#define APIC_ITRACE_TRYISRLOCK 3
-#define APIC_ITRACE_GOTISRLOCK 4
-#define APIC_ITRACE_ENTER2 5
-#define APIC_ITRACE_LEAVE 6
-#define APIC_ITRACE_UNMASK 7
-#define APIC_ITRACE_ACTIVE 8
-#define APIC_ITRACE_MASKED 9
-#define APIC_ITRACE_NOISRLOCK 10
-#define APIC_ITRACE_MASKED2 11
-#define APIC_ITRACE_SPLZ 12
-#define APIC_ITRACE_DORETI 13
-
-#else
-#define APIC_ITRACE(name, irq_num, id)
-#endif
-
/*
* Slow, threaded interrupts.
*
@@ -213,8 +147,6 @@ IDTVEC(vec_name) ; \
; \
maybe_extra_ipending ; \
; \
- APIC_ITRACE(apic_itrace_enter, irq_num, APIC_ITRACE_ENTER) ; \
-; \
MASK_LEVEL_IRQ(irq_num) ; \
EOI_IRQ(irq_num) ; \
0: ; \
@@ -224,11 +156,9 @@ IDTVEC(vec_name) ; \
__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX avoid dbl cnt */ \
pushl $irq_num; /* pass the IRQ */ \
- APIC_ITRACE(apic_itrace_enter2, irq_num, APIC_ITRACE_ENTER2) ; \
sti ; \
call _sched_ithd ; \
addl $4, %esp ; /* discard the parameter */ \
- APIC_ITRACE(apic_itrace_leave, irq_num, APIC_ITRACE_LEAVE) ; \
; \
MEXITCOUNT ; \
jmp _doreti
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index 03b02d6..bf560cd 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -259,27 +259,6 @@ extern int nkpt;
u_int32_t cpu_apic_versions[MAXCPU];
u_int32_t *io_apic_versions;
-#ifdef APIC_INTR_DIAGNOSTIC
-int apic_itrace_enter[32];
-int apic_itrace_tryisrlock[32];
-int apic_itrace_gotisrlock[32];
-int apic_itrace_active[32];
-int apic_itrace_masked[32];
-int apic_itrace_noisrlock[32];
-int apic_itrace_masked2[32];
-int apic_itrace_unmask[32];
-int apic_itrace_noforward[32];
-int apic_itrace_leave[32];
-int apic_itrace_enter2[32];
-int apic_itrace_doreti[32];
-int apic_itrace_eoi[32];
-#ifdef APIC_INTR_DIAGNOSTIC_IRQ
-unsigned short apic_itrace_debugbuffer[32768];
-int apic_itrace_debugbuffer_idx;
-struct simplelock apic_itrace_debuglock;
-#endif
-#endif
-
#ifdef APIC_INTR_REORDER
struct {
volatile int *location;
@@ -1920,10 +1899,6 @@ struct simplelock panic_lock;
static void
init_locks(void)
{
-#if defined(APIC_INTR_DIAGNOSTIC) && defined(APIC_INTR_DIAGNOSTIC_IRQ)
- s_lock_init((struct simplelock*)&apic_itrace_debuglock);
-#endif
-
s_lock_init((struct simplelock*)&mcount_lock);
s_lock_init((struct simplelock*)&fast_intr_lock);
OpenPOWER on IntegriCloud