]> git.hungrycats.org Git - linux/commitdiff
[PATCH] PnP BIOS exception fixes
authorBrian Gerst <bgerst@didntduck.org>
Thu, 4 Mar 2004 15:05:03 +0000 (07:05 -0800)
committerJaroslav Kysela <perex@suse.cz>
Thu, 4 Mar 2004 15:05:03 +0000 (07:05 -0800)
This fixes two errors in fixup_exception() for PnP BIOS faults:
 - Check for the correct segments used for the BIOS
 - Fix asm constraints so that EIP and ESP are properly reloaded

arch/i386/mm/extable.c

index d9b0e43343f4d177a0f231e31d2f6d218bf9dc3a..f706449319c4577e5d944561b295d199449bcc02 100644 (file)
@@ -12,7 +12,7 @@ int fixup_exception(struct pt_regs *regs)
        const struct exception_table_entry *fixup;
 
 #ifdef CONFIG_PNPBIOS
-       if (unlikely((regs->xcs | 8) == 0x88)) /* 0x80 or 0x88 */
+       if (unlikely((regs->xcs & ~15) == (GDT_ENTRY_PNPBIOS_BASE << 3)))
        {
                extern u32 pnp_bios_fault_eip, pnp_bios_fault_esp;
                extern u32 pnp_bios_is_utter_crap;
@@ -21,7 +21,7 @@ int fixup_exception(struct pt_regs *regs)
                __asm__ volatile(
                        "movl %0, %%esp\n\t"
                        "jmp *%1\n\t"
-                       : "=a" (pnp_bios_fault_esp), "=b" (pnp_bios_fault_eip));
+                       : : "g" (pnp_bios_fault_esp), "g" (pnp_bios_fault_eip));
                panic("do_trap: can't hit this");
        }
 #endif