diff options
author | peter <peter@FreeBSD.org> | 1997-06-22 16:04:22 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-06-22 16:04:22 +0000 |
commit | 2dc5ff96e76a38f1a5ffd4c22e350c882f7592eb (patch) | |
tree | 281c7f0e4899a210947f7dfa14231536350272d2 /sys/i386/isa/npx.c | |
parent | e0245a10b266a1abf80916d730d18966653de374 (diff) | |
download | FreeBSD-src-2dc5ff96e76a38f1a5ffd4c22e350c882f7592eb.zip FreeBSD-src-2dc5ff96e76a38f1a5ffd4c22e350c882f7592eb.tar.gz |
Preliminary support for per-cpu data pages.
This eliminates a lot of #ifdef SMP type code. Things like _curproc reside
in a data page that is unique on each cpu, eliminating the expensive macros
like: #define curproc (SMPcurproc[cpunumber()])
There are some unresolved bootstrap and address space sharing issues at
present, but Steve is waiting on this for other work. There is still some
strictly temporary code present that isn't exactly pretty.
This is part of a larger change that has run into some bumps, this part is
standalone so it should be safe. The temporary code goes away when the
full idle cpu support is finished.
Reviewed by: fsmp, dyson
Diffstat (limited to 'sys/i386/isa/npx.c')
-rw-r--r-- | sys/i386/isa/npx.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c index aca74fa..14487c95 100644 --- a/sys/i386/isa/npx.c +++ b/sys/i386/isa/npx.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)npx.c 7.2 (Berkeley) 5/12/91 - * $Id: npx.c,v 1.44 1997/05/31 09:27:31 peter Exp $ + * $Id: npx.c,v 1.45 1997/06/02 08:19:05 dfr Exp $ */ #include "npx.h" @@ -63,6 +63,7 @@ #include <machine/clock.h> #include <machine/specialreg.h> #if defined(APIC_IO) +#include <machine/smp.h> #include <machine/apic.h> #include <machine/mpapic.h> #endif /* APIC_IO */ @@ -140,10 +141,8 @@ SYSCTL_INT(_hw,HW_FLOATINGPT, floatingpoint, "Floatingpoint instructions executed in hardware"); static u_int npx0_imask = SWI_CLOCK_MASK; -#ifdef SMP -#define npxproc (SMPnpxproc[cpunumber()]) -struct proc *SMPnpxproc[NCPU]; -#else + +#ifndef SMP /* XXX per-cpu on smp */ struct proc *npxproc; #endif @@ -172,8 +171,8 @@ asm ss incl " __XSTRING(CNAME(npx_intrs_while_probing)) " pushl %eax - movl " __XSTRING(CNAME(apic_base)) ",%eax # EOI to local APIC - movl $0,0xb0(,%eax,1) # movl $0, APIC_EOI(%eax) + movl $lapic_eoi,%eax # EOI to local APIC + movl $0,(%eax) # movl $0, APIC_EOI(%eax) movb $0,%al outb %al,$0xf0 # clear BUSY# latch popl %eax |