From 1d34167488e56e36ad702627b17be7ac18a9db9c Mon Sep 17 00:00:00 2001 From: Damien Zammit Date: Sun, 10 Nov 2019 16:27:42 +0100 Subject: simplify interrupt handling We have removed spl levels, now remove the machinery to manage different PIC masks according to levels. Only keep machinery to disable interrupts whatever the level. * i386/i386/pic.c (pic_mask): Remove array. (picinit): Do not form PIC mask. Set initial PIC mask to 0. (form_pic_mask): Remove function. * i386/i386/pic.h (form_pic_mask, pic_mask): Remove declarations. * i386/i386/spl.S (SETMASK): Remove macro. (XEN_SETMASK): Add macro, containing the Xen version of SETMASK. (spl0, splx_cli, spl) [MACH_XEN]: Call XEN_SETMASK instead of SETMASK. * i386/i386/pit.c (clkstart): Do not call form_pic_mask. * i386/i386at/autoconf.c (take_dev_irq, take_ctlr_irq): Likewise. * i386/i386at/kd_mouse.c (kd_mouse_open, kd_mouse_close): Likewise. * linux/dev/arch/i386/kernel/irq.c (mask_irq, unmask_irq): Directly update curr_pic_mask without using pic_mask array. (init_IRQ, restore_IRQ): do not call form_pic_mask. * linux/dev/include/asm-i386/system.h: Include . (__save_flags, __restore_flags): Use curr_ipl and splx instead of hardware flags. * linux/dev/init/main.c (linux_init): Do not call cli. * linux/dev/kernel/sched.c (linux_timer_intr): Do not use pic_mask. * linux/src/drivers/block/ide.c (try_to_identify): Disable irq probing. * linux/src/drivers/scsi/NCR53c406a.c (NCR53c406a_detect): Disable irq probing. --- i386/i386at/autoconf.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'i386/i386at/autoconf.c') diff --git a/i386/i386at/autoconf.c b/i386/i386at/autoconf.c index 908c3ec0..6ed2270c 100644 --- a/i386/i386at/autoconf.c +++ b/i386/i386at/autoconf.c @@ -130,7 +130,6 @@ void take_dev_irq( iunit[pic] = dev->unit; ivect[pic] = dev->intr; intpri[pic] = (int)dev->sysdep; - form_pic_mask(); } else { printf("The device below will clobber IRQ %d.\n", pic); printf("You have two devices at the same IRQ.\n"); @@ -151,7 +150,6 @@ void take_ctlr_irq( iunit[pic] = ctlr->unit; ivect[pic] = ctlr->intr; intpri[pic] = (int)ctlr->sysdep; - form_pic_mask(); } else { printf("The device below will clobber IRQ %d.\n", pic); printf("You have two devices at the same IRQ. This won't work.\n"); -- cgit v1.2.3