diff options
author | fsmp <fsmp@FreeBSD.org> | 1997-07-26 01:55:19 +0000 |
---|---|---|
committer | fsmp <fsmp@FreeBSD.org> | 1997-07-26 01:55:19 +0000 |
commit | 8d2474227fe29ac2be4c351bb26c86bfffd652eb (patch) | |
tree | 3cd521ab4b254a95b25f79083bfefbd049c08b44 /sys | |
parent | 78cff7365d666ea82c32d53ae429cb3f5b843259 (diff) | |
download | FreeBSD-src-8d2474227fe29ac2be4c351bb26c86bfffd652eb.zip FreeBSD-src-8d2474227fe29ac2be4c351bb26c86bfffd652eb.tar.gz |
mpapic.c & mp_machdep:
- removed TEST_ALTTIMER.
- removed APIC_PIN0_TIMER.
- removed TIMER_ALL.
mplock.s:
- minor update of try_mplock for new algorithm where a CPU uses try_mplock
instead of get_mplock in the ISRs.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/mp_machdep.c | 15 | ||||
-rw-r--r-- | sys/amd64/amd64/mptable.c | 15 | ||||
-rw-r--r-- | sys/amd64/include/mptable.h | 15 | ||||
-rw-r--r-- | sys/i386/i386/mp_machdep.c | 15 | ||||
-rw-r--r-- | sys/i386/i386/mpapic.c | 26 | ||||
-rw-r--r-- | sys/i386/i386/mplock.s | 11 | ||||
-rw-r--r-- | sys/i386/i386/mptable.c | 15 | ||||
-rw-r--r-- | sys/i386/include/mptable.h | 15 | ||||
-rw-r--r-- | sys/kern/subr_smp.c | 15 |
9 files changed, 35 insertions, 107 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 8a3f0c2..daf3033 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: mp_machdep.c,v 1.20 1997/07/23 20:20:21 smp Exp smp $ + * $Id: mp_machdep.c,v 1.36 1997/07/23 20:47:19 fsmp Exp $ */ #include "opt_smp.h" @@ -40,7 +40,7 @@ #include <machine/apic.h> #include <machine/mpapic.h> #include <machine/segments.h> -#include <machine/smptests.h> /** TEST_DEFAULT_CONFIG, APIC_PIN0_TIMER, TEST_TEST1 */ +#include <machine/smptests.h> /** TEST_DEFAULT_CONFIG, TEST_TEST1 */ #include <machine/tss.h> #include <machine/specialreg.h> @@ -1068,17 +1068,6 @@ isa_apic_pin(int isa_irq) { int intr; -#if defined(SMP_TIMER_NC) -#if defined(NEW_STRATEGY) || defined(APIC_PIN0_TIMER) -#error -#error 'options SMP_TIMER_NC' no longer used, remove & reconfig. -#error -#else - if (isa_irq == 0) - return -1; -#endif /* NEW_STRATEGY || APIC_PIN0_TIMER */ -#endif /* SMP_TIMER_NC */ - for (intr = 0; intr < nintrs; ++intr) { /* check each record */ if (INTTYPE(intr) == 0) { /* standard INT */ if (SRCBUSIRQ(intr) == isa_irq) { diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c index 8a3f0c2..daf3033 100644 --- a/sys/amd64/amd64/mptable.c +++ b/sys/amd64/amd64/mptable.c @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: mp_machdep.c,v 1.20 1997/07/23 20:20:21 smp Exp smp $ + * $Id: mp_machdep.c,v 1.36 1997/07/23 20:47:19 fsmp Exp $ */ #include "opt_smp.h" @@ -40,7 +40,7 @@ #include <machine/apic.h> #include <machine/mpapic.h> #include <machine/segments.h> -#include <machine/smptests.h> /** TEST_DEFAULT_CONFIG, APIC_PIN0_TIMER, TEST_TEST1 */ +#include <machine/smptests.h> /** TEST_DEFAULT_CONFIG, TEST_TEST1 */ #include <machine/tss.h> #include <machine/specialreg.h> @@ -1068,17 +1068,6 @@ isa_apic_pin(int isa_irq) { int intr; -#if defined(SMP_TIMER_NC) -#if defined(NEW_STRATEGY) || defined(APIC_PIN0_TIMER) -#error -#error 'options SMP_TIMER_NC' no longer used, remove & reconfig. -#error -#else - if (isa_irq == 0) - return -1; -#endif /* NEW_STRATEGY || APIC_PIN0_TIMER */ -#endif /* SMP_TIMER_NC */ - for (intr = 0; intr < nintrs; ++intr) { /* check each record */ if (INTTYPE(intr) == 0) { /* standard INT */ if (SRCBUSIRQ(intr) == isa_irq) { diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h index 8a3f0c2..daf3033 100644 --- a/sys/amd64/include/mptable.h +++ b/sys/amd64/include/mptable.h @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: mp_machdep.c,v 1.20 1997/07/23 20:20:21 smp Exp smp $ + * $Id: mp_machdep.c,v 1.36 1997/07/23 20:47:19 fsmp Exp $ */ #include "opt_smp.h" @@ -40,7 +40,7 @@ #include <machine/apic.h> #include <machine/mpapic.h> #include <machine/segments.h> -#include <machine/smptests.h> /** TEST_DEFAULT_CONFIG, APIC_PIN0_TIMER, TEST_TEST1 */ +#include <machine/smptests.h> /** TEST_DEFAULT_CONFIG, TEST_TEST1 */ #include <machine/tss.h> #include <machine/specialreg.h> @@ -1068,17 +1068,6 @@ isa_apic_pin(int isa_irq) { int intr; -#if defined(SMP_TIMER_NC) -#if defined(NEW_STRATEGY) || defined(APIC_PIN0_TIMER) -#error -#error 'options SMP_TIMER_NC' no longer used, remove & reconfig. -#error -#else - if (isa_irq == 0) - return -1; -#endif /* NEW_STRATEGY || APIC_PIN0_TIMER */ -#endif /* SMP_TIMER_NC */ - for (intr = 0; intr < nintrs; ++intr) { /* check each record */ if (INTTYPE(intr) == 0) { /* standard INT */ if (SRCBUSIRQ(intr) == isa_irq) { diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c index 8a3f0c2..daf3033 100644 --- a/sys/i386/i386/mp_machdep.c +++ b/sys/i386/i386/mp_machdep.c @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: mp_machdep.c,v 1.20 1997/07/23 20:20:21 smp Exp smp $ + * $Id: mp_machdep.c,v 1.36 1997/07/23 20:47:19 fsmp Exp $ */ #include "opt_smp.h" @@ -40,7 +40,7 @@ #include <machine/apic.h> #include <machine/mpapic.h> #include <machine/segments.h> -#include <machine/smptests.h> /** TEST_DEFAULT_CONFIG, APIC_PIN0_TIMER, TEST_TEST1 */ +#include <machine/smptests.h> /** TEST_DEFAULT_CONFIG, TEST_TEST1 */ #include <machine/tss.h> #include <machine/specialreg.h> @@ -1068,17 +1068,6 @@ isa_apic_pin(int isa_irq) { int intr; -#if defined(SMP_TIMER_NC) -#if defined(NEW_STRATEGY) || defined(APIC_PIN0_TIMER) -#error -#error 'options SMP_TIMER_NC' no longer used, remove & reconfig. -#error -#else - if (isa_irq == 0) - return -1; -#endif /* NEW_STRATEGY || APIC_PIN0_TIMER */ -#endif /* SMP_TIMER_NC */ - for (intr = 0; intr < nintrs; ++intr) { /* check each record */ if (INTTYPE(intr) == 0) { /* standard INT */ if (SRCBUSIRQ(intr) == isa_irq) { diff --git a/sys/i386/i386/mpapic.c b/sys/i386/i386/mpapic.c index bb369c0..af9ba12 100644 --- a/sys/i386/i386/mpapic.c +++ b/sys/i386/i386/mpapic.c @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: mpapic.c,v 1.23 1997/07/23 20:20:21 smp Exp smp $ + * $Id: mpapic.c,v 1.22 1997/07/23 20:47:19 fsmp Exp $ */ #include "opt_smp.h" @@ -30,7 +30,7 @@ #include <sys/types.h> #include <sys/systm.h> -#include <machine/smptests.h> /** TEST_LOPRIO, TEST_IPI, TEST_ALTTIMER */ +#include <machine/smptests.h> /** TEST_LOPRIO, TEST_TEST1 */ #include <machine/smp.h> #include <machine/mpapic.h> #include <machine/segments.h> @@ -233,19 +233,23 @@ io_apic_setup(int apic) #undef DEFAULT_FLAGS -#if defined(TIMER_ALL) -#define DEL_MODE IOART_DELLOPRI +#if defined(TEST_LOPRIO) +#define DEFAULT_EXTINT_FLAGS \ + ((u_int32_t) \ + (IOART_INTMSET | \ + IOART_TRGREDG | \ + IOART_INTAHI | \ + IOART_DESTPHY | \ + IOART_DELLOPRI)) #else -#define DEL_MODE IOART_DELFIXED -#endif /** TIMER_ALL */ - #define DEFAULT_EXTINT_FLAGS \ ((u_int32_t) \ (IOART_INTMSET | \ IOART_TRGREDG | \ IOART_INTAHI | \ IOART_DESTPHY | \ - DEL_MODE)) + IOART_DELFIXED)) +#endif /* TEST_LOPRIO */ /* * Setup the source of External INTerrupts. @@ -261,12 +265,7 @@ ext_int_setup(int apic, int intr) if (apic_int_type(apic, intr) != 3) return -1; -#if defined(TIMER_ALL) target = IOART_DEST; -#else - target = boot_cpu_id << 24; -#endif /* TIMER_ALL */ - select = IOAPIC_REDTBL0 + (2 * intr); vector = NRSVIDT + intr; flags = DEFAULT_EXTINT_FLAGS; @@ -276,7 +275,6 @@ ext_int_setup(int apic, int intr) return 0; } -#undef DEL_MODE #undef DEFAULT_EXTINT_FLAGS diff --git a/sys/i386/i386/mplock.s b/sys/i386/i386/mplock.s index b278c9d..8e43778 100644 --- a/sys/i386/i386/mplock.s +++ b/sys/i386/i386/mplock.s @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: mplock.s,v 1.11 1997/07/18 21:27:53 fsmp Exp $ + * $Id: mplock.s,v 1.11 1997/07/25 22:19:16 smp Exp smp $ * * Functions for locking between CPUs in a SMP system. * @@ -42,6 +42,9 @@ #define GRAB_HWI \ movl $ALLHWI_LEVEL, TPR_TARGET /* task prio to 'all HWI' */ +#define GRAB_HWI_2 \ + movl $ALLHWI_LEVEL, lapic_tpr /* task prio to 'all HWI' */ + /* after last release of lock give up LOW PRIO (ie, arbitrate INTerrupts) */ #define ARB_HWI \ movl $LOPRIO_LEVEL, lapic_tpr /* task prio to 'arbitrate' */ @@ -51,6 +54,9 @@ #define GRAB_HWI \ andl $~APIC_TPR_PRIO, TPR_TARGET /* task prio to 'all HWI' */ +#define GRAB_HWI_2 \ + andl $~APIC_TPR_PRIO, lapic_tpr /* task prio to 'all HWI' */ + #define ARB_HWI \ movl lapic_tpr, %eax ; /* TPR */ \ andl $~APIC_TPR_PRIO, %eax ; /* clear TPR field */ \ @@ -63,6 +69,7 @@ #else /** TEST_LOPRIO */ #define GRAB_HWI /* nop */ +#define GRAB_HWI_2 /* nop */ #define ARB_HWI /* nop */ #endif /** TEST_LOPRIO */ @@ -125,7 +132,7 @@ NON_GPROF_ENTRY(MPtrylock) lock cmpxchg %ecx, (%edx) /* - try it atomically */ jne 3f /* ...do not collect $200 */ - GRAB_HWI /* 1st acquire, grab hw INTs */ + GRAB_HWI_2 /* 1st acquire, grab hw INTs */ movl $1, %eax ret 3: movl $0, %eax diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c index 8a3f0c2..daf3033 100644 --- a/sys/i386/i386/mptable.c +++ b/sys/i386/i386/mptable.c @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: mp_machdep.c,v 1.20 1997/07/23 20:20:21 smp Exp smp $ + * $Id: mp_machdep.c,v 1.36 1997/07/23 20:47:19 fsmp Exp $ */ #include "opt_smp.h" @@ -40,7 +40,7 @@ #include <machine/apic.h> #include <machine/mpapic.h> #include <machine/segments.h> -#include <machine/smptests.h> /** TEST_DEFAULT_CONFIG, APIC_PIN0_TIMER, TEST_TEST1 */ +#include <machine/smptests.h> /** TEST_DEFAULT_CONFIG, TEST_TEST1 */ #include <machine/tss.h> #include <machine/specialreg.h> @@ -1068,17 +1068,6 @@ isa_apic_pin(int isa_irq) { int intr; -#if defined(SMP_TIMER_NC) -#if defined(NEW_STRATEGY) || defined(APIC_PIN0_TIMER) -#error -#error 'options SMP_TIMER_NC' no longer used, remove & reconfig. -#error -#else - if (isa_irq == 0) - return -1; -#endif /* NEW_STRATEGY || APIC_PIN0_TIMER */ -#endif /* SMP_TIMER_NC */ - for (intr = 0; intr < nintrs; ++intr) { /* check each record */ if (INTTYPE(intr) == 0) { /* standard INT */ if (SRCBUSIRQ(intr) == isa_irq) { diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h index 8a3f0c2..daf3033 100644 --- a/sys/i386/include/mptable.h +++ b/sys/i386/include/mptable.h @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: mp_machdep.c,v 1.20 1997/07/23 20:20:21 smp Exp smp $ + * $Id: mp_machdep.c,v 1.36 1997/07/23 20:47:19 fsmp Exp $ */ #include "opt_smp.h" @@ -40,7 +40,7 @@ #include <machine/apic.h> #include <machine/mpapic.h> #include <machine/segments.h> -#include <machine/smptests.h> /** TEST_DEFAULT_CONFIG, APIC_PIN0_TIMER, TEST_TEST1 */ +#include <machine/smptests.h> /** TEST_DEFAULT_CONFIG, TEST_TEST1 */ #include <machine/tss.h> #include <machine/specialreg.h> @@ -1068,17 +1068,6 @@ isa_apic_pin(int isa_irq) { int intr; -#if defined(SMP_TIMER_NC) -#if defined(NEW_STRATEGY) || defined(APIC_PIN0_TIMER) -#error -#error 'options SMP_TIMER_NC' no longer used, remove & reconfig. -#error -#else - if (isa_irq == 0) - return -1; -#endif /* NEW_STRATEGY || APIC_PIN0_TIMER */ -#endif /* SMP_TIMER_NC */ - for (intr = 0; intr < nintrs; ++intr) { /* check each record */ if (INTTYPE(intr) == 0) { /* standard INT */ if (SRCBUSIRQ(intr) == isa_irq) { diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c index 8a3f0c2..daf3033 100644 --- a/sys/kern/subr_smp.c +++ b/sys/kern/subr_smp.c @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: mp_machdep.c,v 1.20 1997/07/23 20:20:21 smp Exp smp $ + * $Id: mp_machdep.c,v 1.36 1997/07/23 20:47:19 fsmp Exp $ */ #include "opt_smp.h" @@ -40,7 +40,7 @@ #include <machine/apic.h> #include <machine/mpapic.h> #include <machine/segments.h> -#include <machine/smptests.h> /** TEST_DEFAULT_CONFIG, APIC_PIN0_TIMER, TEST_TEST1 */ +#include <machine/smptests.h> /** TEST_DEFAULT_CONFIG, TEST_TEST1 */ #include <machine/tss.h> #include <machine/specialreg.h> @@ -1068,17 +1068,6 @@ isa_apic_pin(int isa_irq) { int intr; -#if defined(SMP_TIMER_NC) -#if defined(NEW_STRATEGY) || defined(APIC_PIN0_TIMER) -#error -#error 'options SMP_TIMER_NC' no longer used, remove & reconfig. -#error -#else - if (isa_irq == 0) - return -1; -#endif /* NEW_STRATEGY || APIC_PIN0_TIMER */ -#endif /* SMP_TIMER_NC */ - for (intr = 0; intr < nintrs; ++intr) { /* check each record */ if (INTTYPE(intr) == 0) { /* standard INT */ if (SRCBUSIRQ(intr) == isa_irq) { |