summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1996-03-19 04:40:03 +0000
committernate <nate@FreeBSD.org>1996-03-19 04:40:03 +0000
commitebbb96df5dd5aa4740d33043b7be12012c68415c (patch)
tree73b3c0647fe4217fe9baf9be85e2ae572631232c
parent792e8500f7db555c706c737c2f67c0a1e59d86b3 (diff)
downloadFreeBSD-src-ebbb96df5dd5aa4740d33043b7be12012c68415c.zip
FreeBSD-src-ebbb96df5dd5aa4740d33043b7be12012c68415c.tar.gz
Always enable interrupts before calling the APM idle/busy routines.
Suggested by: phk@FreeBSD.org
-rw-r--r--sys/amd64/amd64/cpu_switch.S4
-rw-r--r--sys/amd64/amd64/swtch.s4
-rw-r--r--sys/i386/apm/apm.c4
-rw-r--r--sys/i386/bios/apm.c4
-rw-r--r--sys/i386/i386/swtch.s4
5 files changed, 10 insertions, 10 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S
index 33bbe28..aed9d3f 100644
--- a/sys/amd64/amd64/cpu_switch.S
+++ b/sys/amd64/amd64/cpu_switch.S
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: swtch.s,v 1.29 1996/02/04 21:20:36 davidg Exp $
+ * $Id: swtch.s,v 1.30 1996/03/12 05:44:23 nate Exp $
*/
#include "npx.h" /* for NNPX */
@@ -261,11 +261,11 @@ idle_loop:
call _vm_page_zero_idle
testl %eax, %eax
jnz idle_loop
+ sti
#if NAPM > 0
call _apm_cpu_idle
call _apm_cpu_busy
#else
- sti
hlt /* wait for interrupt */
#endif
jmp idle_loop
diff --git a/sys/amd64/amd64/swtch.s b/sys/amd64/amd64/swtch.s
index 33bbe28..aed9d3f 100644
--- a/sys/amd64/amd64/swtch.s
+++ b/sys/amd64/amd64/swtch.s
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: swtch.s,v 1.29 1996/02/04 21:20:36 davidg Exp $
+ * $Id: swtch.s,v 1.30 1996/03/12 05:44:23 nate Exp $
*/
#include "npx.h" /* for NNPX */
@@ -261,11 +261,11 @@ idle_loop:
call _vm_page_zero_idle
testl %eax, %eax
jnz idle_loop
+ sti
#if NAPM > 0
call _apm_cpu_idle
call _apm_cpu_busy
#else
- sti
hlt /* wait for interrupt */
#endif
jmp idle_loop
diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c
index 56ef020..2f7b9a0 100644
--- a/sys/i386/apm/apm.c
+++ b/sys/i386/apm/apm.c
@@ -13,7 +13,7 @@
*
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
- * $Id: apm.c,v 1.31 1996/03/18 22:47:16 nate Exp $
+ * $Id: apm.c,v 1.32 1996/03/18 23:30:14 nate Exp $
*/
#include "apm.h"
@@ -511,7 +511,7 @@ apm_cpu_idle(void)
* APM driver.
*/
if (!sc->active || sc->halt_cpu) {
- __asm("sti ; hlt"); /* wait for interrupt */
+ __asm("hlt"); /* wait for interrupt */
}
}
diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c
index 56ef020..2f7b9a0 100644
--- a/sys/i386/bios/apm.c
+++ b/sys/i386/bios/apm.c
@@ -13,7 +13,7 @@
*
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
- * $Id: apm.c,v 1.31 1996/03/18 22:47:16 nate Exp $
+ * $Id: apm.c,v 1.32 1996/03/18 23:30:14 nate Exp $
*/
#include "apm.h"
@@ -511,7 +511,7 @@ apm_cpu_idle(void)
* APM driver.
*/
if (!sc->active || sc->halt_cpu) {
- __asm("sti ; hlt"); /* wait for interrupt */
+ __asm("hlt"); /* wait for interrupt */
}
}
diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s
index 33bbe28..aed9d3f 100644
--- a/sys/i386/i386/swtch.s
+++ b/sys/i386/i386/swtch.s
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: swtch.s,v 1.29 1996/02/04 21:20:36 davidg Exp $
+ * $Id: swtch.s,v 1.30 1996/03/12 05:44:23 nate Exp $
*/
#include "npx.h" /* for NNPX */
@@ -261,11 +261,11 @@ idle_loop:
call _vm_page_zero_idle
testl %eax, %eax
jnz idle_loop
+ sti
#if NAPM > 0
call _apm_cpu_idle
call _apm_cpu_busy
#else
- sti
hlt /* wait for interrupt */
#endif
jmp idle_loop
OpenPOWER on IntegriCloud