diff options
author | Bruce Evans <bde@FreeBSD.org> | 2001-10-16 12:55:38 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 2001-10-16 12:55:38 +0000 |
commit | 2504f76272f218fca5fa994ca7100a11a3c6abb2 (patch) | |
tree | fedbd89cf3491a6388dbfcc3cc3af32e01532093 /sys/amd64/isa/npx.c | |
parent | 2175f5f1b95cd0bc923c4df2e38e6f514d307b3f (diff) | |
download | src-2504f76272f218fca5fa994ca7100a11a3c6abb2.tar.gz src-2504f76272f218fca5fa994ca7100a11a3c6abb2.zip |
Notes
Diffstat (limited to 'sys/amd64/isa/npx.c')
-rw-r--r-- | sys/amd64/isa/npx.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/sys/amd64/isa/npx.c b/sys/amd64/isa/npx.c index 87bfe1678309..7323d1952465 100644 --- a/sys/amd64/isa/npx.c +++ b/sys/amd64/isa/npx.c @@ -297,7 +297,7 @@ npx_probe(dev) #else /* SMP */ int result; - critical_t savecrit; + u_long save_eflags; u_char save_icu1_mask; u_char save_icu2_mask; struct gate_descriptor save_idt_npxtrap; @@ -311,29 +311,24 @@ npx_probe(dev) if (resource_int_value("npx", 0, "irq", &npx_irq) != 0) npx_irq = 13; npx_intrno = NRSVIDT + npx_irq; - savecrit = critical_enter(); + save_eflags = read_eflags(); + disable_intr(); save_icu1_mask = inb(IO_ICU1 + 1); save_icu2_mask = inb(IO_ICU2 + 1); save_idt_npxintr = idt[npx_intrno]; save_idt_npxtrap = idt[16]; - outb(IO_ICU1 + 1, ~IRQ_SLAVE); - outb(IO_ICU2 + 1, ~(1 << (npx_irq - 8))); + outb(IO_ICU1 + 1, ~(IRQ_SLAVE | (1 << npx_irq))); + outb(IO_ICU2 + 1, ~((1 << npx_irq) >> 8)); setidt(16, probetrap, SDT_SYS386TGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); setidt(npx_intrno, probeintr, SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - - /* - * XXX This looks highly bogus, but it appears that npc_probe1 - * needs interrupts enabled. Does this make any difference - * here? - */ - critical_exit(savecrit); + enable_intr(); result = npx_probe1(dev); - savecrit = critical_enter(); + disable_intr(); outb(IO_ICU1 + 1, save_icu1_mask); outb(IO_ICU2 + 1, save_icu2_mask); idt[npx_intrno] = save_idt_npxintr; idt[16] = save_idt_npxtrap; - critical_exit(savecrit); + write_eflags(save_eflags); return (result); #endif /* SMP */ |