diff options
author | tegge <tegge@FreeBSD.org> | 1997-12-15 02:18:35 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 1997-12-15 02:18:35 +0000 |
commit | ba494eff3a511b2f5c5d9bbc02686772b9ed4de7 (patch) | |
tree | 6d2e4d72fd7140f16dc511d497a2d2acfcae6f26 /sys/i386/isa/ipl.s | |
parent | da6ab2349a36aff5f17c3d322976dace8fa64ac7 (diff) | |
download | FreeBSD-src-ba494eff3a511b2f5c5d9bbc02686772b9ed4de7.zip FreeBSD-src-ba494eff3a511b2f5c5d9bbc02686772b9ed4de7.tar.gz |
Add support for low resolution SMP kernel profiling.
- A nonprofiling version of s_lock (called s_lock_np) is used
by mcount.
- When profiling is active, more registers are clobbered in
seemingly simple assembly routines. This means that some
callers needed to save/restore extra registers.
- The stack pointer must have space for a 'fake' return address
in idle, to avoid stack underflow.
Diffstat (limited to 'sys/i386/isa/ipl.s')
-rw-r--r-- | sys/i386/isa/ipl.s | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/i386/isa/ipl.s b/sys/i386/isa/ipl.s index 406e561..38e6934 100644 --- a/sys/i386/isa/ipl.s +++ b/sys/i386/isa/ipl.s @@ -36,7 +36,7 @@ * * @(#)ipl.s * - * $Id: ipl.s,v 1.17 1997/09/29 05:32:02 fsmp Exp $ + * $Id: ipl.s,v 1.18 1997/10/13 00:01:53 fsmp Exp $ */ @@ -127,9 +127,9 @@ doreti_next: #ifdef SMP TEST_CIL cli /* early to prevent INT deadlock */ - movl %eax, %edx /* preserve cpl while getting lock */ + pushl %eax /* preserve cpl while getting lock */ ICPL_LOCK - movl %edx, %eax + popl %eax doreti_next2: #endif movl %eax,%ecx @@ -262,6 +262,7 @@ doreti_unpend: jae doreti_swi cli #ifdef SMP + pushl %edx /* preserve %edx */ pushl %eax /* preserve %eax */ ICPL_LOCK #ifdef CPL_AND_CML @@ -270,6 +271,7 @@ doreti_unpend: popl _cpl #endif FAST_ICPL_UNLOCK + popl %edx #else movl %eax,_cpl #endif @@ -293,6 +295,7 @@ doreti_swi: */ #ifdef SMP orl imasks(,%ecx,4), %eax + pushl %edx /* save handler entry point */ cli /* prevent INT deadlock */ pushl %eax /* save cpl|cml */ ICPL_LOCK @@ -303,6 +306,7 @@ doreti_swi: #endif FAST_ICPL_UNLOCK sti + popl %edx /* restore handler entry point */ #else orl imasks(,%ecx,4),%eax movl %eax,_cpl |