Skip to contentSkip to conversation

mask all interrupts when MASTER_DISABLE is set

PATCH Applied Artyom Tarasenko 2 participants 2 messages Jun 21, 2010 – Jun 27, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mask all interrupts when MASTER_DISABLE is set

The MASTER_DISABLE bit (aka mask-all) masks all the interrupts.

According to Sun-4M System Architecture
"The level–15 interrupt sources [...] are maskable with the Interrupt Target Mask Register. While these interrupts are considered ’non–maskable’ within the SPARC IU, a mask capability is provided to allow the boot firmware to establish a basic environment before receiving any level–15 interrupts, which are non–maskable within SPARC. A mask–all bit is provided to allow disabling of all external interrupts during change of the CIT."

---
 hw/slavio_intctl.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
hw/slavio_intctl.c +6 -3
index b76d3ac..8a38f67 100644
@@ -289,9 +289,12 @@ static void slavio_check_interrupts(SLAVIO_INTCTLState *s, int set_irqs)
             }
         }
 
-        /* Level 15 and CPU timer interrupts are not maskable */
-        pil_pending |= s->slaves[i].intreg_pending &
-            (CPU_IRQ_INT15_IN | CPU_IRQ_TIMER_IN);
+        /* Level 15 and CPU timer interrupts are only masked when 
+           the MASTER_DISABLE bit is set */
+        if (!(s->intregm_disabled & MASTER_DISABLE)) {
+            pil_pending |= s->slaves[i].intreg_pending &
+                (CPU_IRQ_INT15_IN | CPU_IRQ_TIMER_IN);
+        }
 
         /* Add soft interrupts */
         pil_pending |= (s->slaves[i].intreg_pending & CPU_SOFTIRQ_MASK) >> 16;
Signature · 1 line
1.6.2.5
Applied
#1 lore raw

Thanks, applied.

Quoted 39 lines · Artyom Tarasenko

The MASTER_DISABLE bit (aka mask-all) masks all the interrupts.

According to Sun-4M System Architecture
"The level–15 interrupt sources [...] are maskable with the Interrupt Target Mask Register. While these interrupts are considered ’non–maskable’ within the SPARC IU, a mask capability is provided to allow the boot firmware to establish a basic environment before receiving any level–15 interrupts, which are non–maskable within SPARC. A mask–all bit is provided to allow disabling of all external interrupts during change of the CIT."

---
 hw/slavio_intctl.c |    9 ++++++---

 1 files changed, 6 insertions(+), 3 deletions(-)
hw/slavio_intctl.c +6 -4
index b76d3ac..8a38f67 100644
@@ -289,9 +289,12 @@ static void slavio_check_interrupts(SLAVIO_INTCTLState *s, int set_irqs)
             }
         }
 
-        /* Level 15 and CPU timer interrupts are not maskable */
-        pil_pending |= s->slaves[i].intreg_pending &
-            (CPU_IRQ_INT15_IN | CPU_IRQ_TIMER_IN);
+        /* Level 15 and CPU timer interrupts are only masked when
+           the MASTER_DISABLE bit is set */
+        if (!(s->intregm_disabled & MASTER_DISABLE)) {
+            pil_pending |= s->slaves[i].intreg_pending &
+                (CPU_IRQ_INT15_IN | CPU_IRQ_TIMER_IN);
+        }
 
         /* Add soft interrupts */
         pil_pending |= (s->slaves[i].intreg_pending & CPU_SOFTIRQ_MASK) >> 16;
--

1.6.2.5