APIC vector: Compact redirect entry's mask bit setting and clearing
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 8 Jul 2009 06:53:37 +0000 (14:53 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 11 Jul 2009 02:27:14 +0000 (10:27 +0800)
sys/platform/pc32/apic/apic_vector.s

index 981ab0e..2574ad3 100644 (file)
@@ -91,9 +91,7 @@
        movl    IOAPICADDR(irq_num), %ecx ;     /* ioapic addr */       \
        movl    REDIRIDX(irq_num), %eax ;       /* get the index */     \
        movl    %eax, (%ecx) ;                  /* write the index */   \
-       movl    IOAPIC_WINDOW(%ecx), %eax ;     /* current value */     \
-       orl     $IOART_INTMASK, %eax ;          /* set the mask */      \
-       movl    %eax, IOAPIC_WINDOW(%ecx) ;     /* new value */         \
+       orl     $IOART_INTMASK,IOAPIC_WINDOW(%ecx) ;/* set the mask */  \
 7: ;                                           /* already masked */    \
        APIC_IMASK_UNLOCK ;                                             \
 
        movl    IOAPICADDR(irq_num),%ecx ;      /* ioapic addr */       \
        movl    REDIRIDX(irq_num), %eax ;       /* get the index */     \
        movl    %eax,(%ecx) ;                   /* write the index */   \
-       movl    IOAPIC_WINDOW(%ecx),%eax ;      /* current value */     \
-       andl    $~IOART_INTMASK,%eax ;          /* clear the mask */    \
-       movl    %eax,IOAPIC_WINDOW(%ecx) ;      /* new value */         \
+       andl    $~IOART_INTMASK,IOAPIC_WINDOW(%ecx) ;/* clear the mask */ \
 7: ;                                                                   \
        APIC_IMASK_UNLOCK ;                                             \
 8: ;                                                                   \