APM fix

Pavel Machek (pavel@bug.ucw.cz)
Tue, 15 Sep 1998 01:45:03 +0200


Hi!

This fixes APM when APM_CLEAR_SSEGS is undefined. This is bugfix.

Pavel

PS: I know that you have this whole file moved in your tree. Sorry for
inconvience.

--- clean//drivers/char/apm_bios.c Fri Sep 11 20:54:23 1998
+++ linux/drivers/char/apm_bios.c Tue Sep 15 01:14:57 1998
@@ -52,6 +52,7 @@
* 1.5: Fix segment register reloading (in case of bad segments saved
* across BIOS call).
* Stephen ROthwell
+ * 1.5a: Make it work without APM_ZERO_REGS <pavel@ucw.cz>
*
* APM 1.1 Reference:
*
@@ -379,8 +382,11 @@
"movl $0, %%edi\n\t"
"jnc 1f\n\t"
"movl $1, %%edi\n"
- "1:\tpopl %%es\n\t"
+ "1:\t"
+#ifdef APM_ZERO_SEGS
+ "popl %%es\n\t"
"popl %%ds\n\t"
+#endif
"popfl\n\t"
: "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx),
"=S" (*esi), "=D" (error)
@@ -427,8 +433,11 @@
"movl $0, %%edi\n\t"
"jnc 1f\n\t"
"movl $1, %%edi\n"
- "1:\tpopl %%es\n\t"
+ "1:\t"
+#ifdef APM_ZERO_SEGS
+ "popl %%es\n\t"
"popl %%ds\n\t"
+#endif
"popfl\n\t"
: "=a" (*eax), "=D" (error)
: "a" (eax_in), "b" (ebx_in), "c" (ecx_in)

-- 
I'm really pavel@atrey.karlin.mff.cuni.cz. 	   Pavel
Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/