From: Ben Gras Date: Mon, 26 Apr 2010 15:32:42 +0000 (+0000) Subject: remove intr_disabled() as interrupts are always disabled in the kernel now. X-Git-Tag: v3.1.7~123 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=86e8eff9051cac5bd835c73bf42cafcbf0aad170;p=minix.git remove intr_disabled() as interrupts are always disabled in the kernel now. --- diff --git a/kernel/arch/i386/i8259.c b/kernel/arch/i386/i8259.c index a2b0b6c8b..42674bb5a 100644 --- a/kernel/arch/i386/i8259.c +++ b/kernel/arch/i386/i8259.c @@ -23,16 +23,6 @@ #define ICW4_PC_AEOI_SLAVE 0x0B /* not SFNM, buffered, auto EOI, 8086 */ #define ICW4_PC_AEOI_MASTER 0x0F /* not SFNM, buffered, auto EOI, 8086 */ -/*===========================================================================* - * intr_disabled * - *===========================================================================*/ -PRIVATE int intr_disabled(void) -{ - if(!(read_cpu_flags() & X86_FLAG_I)) - return 1; - return 0; -} - /*===========================================================================* * intr_init * *===========================================================================*/ @@ -43,8 +33,6 @@ PUBLIC int intr_init(const int mine, const int auto_eoi) * use the BIOS locations instead. The flag "mine" is set if the 8259s are * to be programmed for MINIX, or to be reset to what the BIOS expects. */ - if (!intr_disabled()) - intr_disable(); /* The AT and newer PS/2 have two interrupt controllers, one master, * one slaved at IRQ 2. (We don't have to deal with the PC that diff --git a/kernel/profile.c b/kernel/profile.c index 84ec551ba..121f60533 100644 --- a/kernel/profile.c +++ b/kernel/profile.c @@ -40,16 +40,12 @@ PUBLIC void init_profile_clock(u32_t freq) { int irq; - intr_disable(); - if((irq = arch_init_profile_clock(freq)) >= 0) { /* Register interrupt handler for statistical system profiling. */ profile_clock_hook.proc_nr_e = CLOCK; put_irq_handler(&profile_clock_hook, irq, profile_clock_handler); enable_irq(&profile_clock_hook); } - - intr_enable(); } /*===========================================================================* @@ -57,9 +53,7 @@ PUBLIC void init_profile_clock(u32_t freq) *===========================================================================*/ PUBLIC void stop_profile_clock() { - intr_disable(); arch_stop_profile_clock(); - intr_enable(); /* Unregister interrupt handler. */ disable_irq(&profile_clock_hook);