linux-mips-fnet
[Top] [All Lists]

query about arch/mips/dec/irq.c (mask & unmask irq)

To: linux-mips@fnet.fr
Subject: query about arch/mips/dec/irq.c (mask & unmask irq)
From: Dave Airlie <airlied@csn.ul.ie>
Date: Thu, 16 Sep 1999 18:31:44 +0100 (IST)
In the DECstation irq.c code 

mask_irq does
    if (dec_interrupt[irq_nr].iemask) {         /* This is an ASIC
interrupt    */
        *imr &= ~dec_interrupt[irq_nr].iemask;
        dummy = *imr;
        dummy = *imr;
    } else                      /* This is a cpu interrupt        */
        set_cp0_status(ST0_IM, read_32bit_cp0_register(CP0_STATUS) &
~dec_interrupt[irq_nr].cpu_mask);

and unmask does
if (dec_interrupt[irq_nr].iemask) {         /* This is an ASIC interrupt
*/
        *imr |= dec_interrupt[irq_nr].iemask;
        dummy = *imr;
        dummy = *imr;
    } 
    set_cp0_status(ST0_IM, read_32bit_cp0_register(CP0_STATUS) |
dec_interrupt[irq_nr].cpu_mask);

Note the else in the mask_irq code but not in the unmask, does this matter
at all ? or should the else on the other one be there ?

Dave.

------------ David Airlie, David.Airlie@ul.ie,airlied@skynet --------
Telecommunications Research Centre, ECE Dept, University of Limerick \
http://www.csn.ul.ie/~airlied   -- Telecommunications Researcher      \
--- TEL: +353-61-202695 -----------------------------------------------

<Prev in Thread] Current Thread [Next in Thread>