diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/include/smp.h | 19 | ||||
-rw-r--r-- | sys/i386/i386/mplock.s | 8 | ||||
-rw-r--r-- | sys/i386/include/smp.h | 19 | ||||
-rw-r--r-- | sys/kern/kern_clock.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_mib.c | 3 | ||||
-rw-r--r-- | sys/kern/kern_shutdown.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_sig.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_synch.c | 2 | ||||
-rw-r--r-- | sys/sys/proc.h | 1 | ||||
-rw-r--r-- | sys/sys/signalvar.h | 2 | ||||
-rw-r--r-- | sys/sys/smp.h | 19 |
11 files changed, 64 insertions, 17 deletions
diff --git a/sys/amd64/include/smp.h b/sys/amd64/include/smp.h index c2340ae..c11bcb2 100644 --- a/sys/amd64/include/smp.h +++ b/sys/amd64/include/smp.h @@ -183,6 +183,23 @@ extern int smp_started; extern volatile int smp_idle_loops; #endif /* !LOCORE */ -#endif /* SMP || APIC_IO */ +#else /* !SMP && !APIC_IO */ + +/* + * Create dummy MP lock empties + */ + +static __inline void +get_mplock(void) +{ +} + +static __inline void +rel_mplock(void) +{ +} + +#endif + #endif /* _KERNEL */ #endif /* _MACHINE_SMP_H_ */ diff --git a/sys/i386/i386/mplock.s b/sys/i386/i386/mplock.s index 858df33..4345406 100644 --- a/sys/i386/i386/mplock.s +++ b/sys/i386/i386/mplock.s @@ -65,6 +65,9 @@ .text + +#ifdef SMP + /*********************************************************************** * void MPgetlock_edx(unsigned int *lock : %edx) * ---------------------------------- @@ -293,12 +296,16 @@ NON_GPROF_ENTRY(rel_mplock) popl %ecx ret +#endif + /*********************************************************************** * */ .data .p2align 2 /* xx_lock aligned on int boundary */ +#ifdef SMP + .globl _mp_lock _mp_lock: .long 0 @@ -322,3 +329,4 @@ _tryhits3: msg: .asciz "lock hits: 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x\n" #endif /* GLPROFILE */ +#endif /* SMP */ diff --git a/sys/i386/include/smp.h b/sys/i386/include/smp.h index c2340ae..c11bcb2 100644 --- a/sys/i386/include/smp.h +++ b/sys/i386/include/smp.h @@ -183,6 +183,23 @@ extern int smp_started; extern volatile int smp_idle_loops; #endif /* !LOCORE */ -#endif /* SMP || APIC_IO */ +#else /* !SMP && !APIC_IO */ + +/* + * Create dummy MP lock empties + */ + +static __inline void +get_mplock(void) +{ +} + +static __inline void +rel_mplock(void) +{ +} + +#endif + #endif /* _KERNEL */ #endif /* _MACHINE_SMP_H_ */ diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index d8066a7..dc1ea6d 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -60,14 +60,12 @@ #include <machine/cpu.h> #include <machine/limits.h> +#include <machine/smp.h> #ifdef GPROF #include <sys/gmon.h> #endif -#if defined(SMP) && defined(BETTER_CLOCK) -#include <machine/smp.h> -#endif static void initclocks __P((void *dummy)); SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL) diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index 2d5217c..a07988e 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -46,10 +46,7 @@ #include <sys/sysctl.h> #include <sys/proc.h> #include <sys/jail.h> - -#if defined(SMP) #include <machine/smp.h> -#endif SYSCTL_NODE(, 0, sysctl, CTLFLAG_RW, 0, "Sysctl internal magic"); diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index f5940ac..e4a4696 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -63,9 +63,7 @@ #include <machine/pcb.h> #include <machine/clock.h> #include <machine/md_var.h> -#ifdef SMP #include <machine/smp.h> /* smp_active, cpuid */ -#endif #include <sys/signalvar.h> diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index b374fed..a8b7cee 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -66,9 +66,7 @@ #include <machine/ipl.h> #include <machine/cpu.h> -#ifdef SMP #include <machine/smp.h> -#endif #define ONSIG 32 /* NSIG for osig* syscalls. XXX. */ diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index d7a66b0..3ae903d 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -58,9 +58,7 @@ #include <machine/cpu.h> #include <machine/ipl.h> -#ifdef SMP #include <machine/smp.h> -#endif static void sched_setup __P((void *dummy)); SYSINIT(sched_setup, SI_SUB_KICK_SCHEDULER, SI_ORDER_FIRST, sched_setup, NULL) diff --git a/sys/sys/proc.h b/sys/sys/proc.h index ad1ba41..4e9ddde 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -372,6 +372,7 @@ extern u_long pgrphash; #ifndef curproc extern struct proc *curproc; /* Current running proc. */ +extern u_int astpending; /* software interrupt pending */ extern int switchticks; /* `ticks' at last context switch. */ extern struct timeval switchtime; /* Uptime at last context switch */ #endif diff --git a/sys/sys/signalvar.h b/sys/sys/signalvar.h index 496d685..e1dbb27 100644 --- a/sys/sys/signalvar.h +++ b/sys/sys/signalvar.h @@ -39,9 +39,7 @@ #include <sys/signal.h> #include <sys/proc.h> -#ifdef SMP #include <machine/smp.h> -#endif /* * Kernel signal definitions and data structures, diff --git a/sys/sys/smp.h b/sys/sys/smp.h index c2340ae..c11bcb2 100644 --- a/sys/sys/smp.h +++ b/sys/sys/smp.h @@ -183,6 +183,23 @@ extern int smp_started; extern volatile int smp_idle_loops; #endif /* !LOCORE */ -#endif /* SMP || APIC_IO */ +#else /* !SMP && !APIC_IO */ + +/* + * Create dummy MP lock empties + */ + +static __inline void +get_mplock(void) +{ +} + +static __inline void +rel_mplock(void) +{ +} + +#endif + #endif /* _KERNEL */ #endif /* _MACHINE_SMP_H_ */ |