Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Sep 2003 12:21:49 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 38903 for review
Message-ID:  <200309301921.h8UJLnaI011858@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=38903

Change 38903 by peter@peter_daintree on 2003/09/30 12:21:16

	import jhb's cleanups

Affected files ...

.. //depot/projects/hammer/sys/amd64/amd64/intr_machdep.c#2 integrate
.. //depot/projects/hammer/sys/amd64/amd64/io_apic.c#7 integrate
.. //depot/projects/hammer/sys/amd64/amd64/local_apic.c#9 integrate

Differences ...

==== //depot/projects/hammer/sys/amd64/amd64/intr_machdep.c#2 (text+ko) ====

@@ -78,12 +78,8 @@
 	int error, vector;
 
 	vector = isrc->is_pic->pic_vector(isrc);
-	mtx_lock_spin(&intr_table_lock);
-	if (interrupt_sources[vector] != NULL) {
-		mtx_unlock_spin(&intr_table_lock);
+	if (interrupt_sources[vector] != NULL)
 		return (EEXIST);
-	}
-	mtx_unlock_spin(&intr_table_lock);
 	/*
 	 * Ok, so this is kind of a nasty optimization that only works
 	 * because sizeof(int) == sizeof(void *) on i386.  If we passed
@@ -103,7 +99,6 @@
 		return (error);
 	mtx_lock_spin(&intr_table_lock);
 	if (interrupt_sources[vector] != NULL) {
-		/* XXX: This should never happen. */
 		mtx_unlock_spin(&intr_table_lock);
 		ithread_destroy(isrc->is_ithread);
 		return (EEXIST);
@@ -117,12 +112,8 @@
 struct intsrc *
 intr_lookup_source(int vector)
 {
-	struct intsrc *isrc;
 
-	mtx_lock_spin(&intr_table_lock);
-	isrc = interrupt_sources[vector];
-	mtx_unlock_spin(&intr_table_lock);
-	return (isrc);
+	return (interrupt_sources[vector]);
 }
 
 int

==== //depot/projects/hammer/sys/amd64/amd64/io_apic.c#7 (text+ko) ====

@@ -38,23 +38,14 @@
 #include <sys/malloc.h>
 #include <sys/lock.h>
 #include <sys/mutex.h>
-#if 0
-#include <sys/proc.h>
-#endif
 
 #include <vm/vm.h>
 #include <vm/pmap.h>
 
 #include <machine/apicreg.h>
-#if 0
-#include <machine/cpufunc.h>
-#endif
 #include <machine/frame.h>
 #include <machine/intr_machdep.h>
 #include <machine/apicvar.h>
-#if 0
-#include <machine/smp.h>
-#endif
 #include <machine/segments.h>
 
 #ifdef DEV_ISA

==== //depot/projects/hammer/sys/amd64/amd64/local_apic.c#9 (text+ko) ====

@@ -35,29 +35,17 @@
 #include <sys/bus.h>
 #include <sys/kernel.h>
 #include <sys/pcpu.h>
-#if 0
-#include <sys/lock.h>
-#include <sys/mutex.h>
-#include <sys/proc.h>
-#endif
 
 #include <vm/vm.h>
 #include <vm/pmap.h>
 
 #include <machine/apicreg.h>
-#if 0
-#include <machine/cpufunc.h>
-#endif
 #include <machine/cputypes.h>
 #include <machine/frame.h>
 #include <machine/intr_machdep.h>
 #include <machine/apicvar.h>
 #include <machine/md_var.h>
 #include <machine/smp.h>
-#if 0
-#include <machine/mpapic.h>
-#include <machine/segments.h>
-#endif
 #include <machine/specialreg.h>
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309301921.h8UJLnaI011858>