gic控制器开中断和关中断

// Rountine to acknowledge ,diable and enable interupts
static void gic_poke_irq(struct irq_data*d,u32 offset)
{
  u32 mask = 1 << (gic_irq(%d)%32);
  write1_relaxed(mask,gic_dist_base(d)+offset+(gic_irq(d)/32)*4);
}

static void gic_mask_irq(struct irq_data*d)
{
   gic_poke_irq(d,GIC_DIST_ENABLE_CLEAR);
}

static void gic_unmask_irq(struct irq_data*d)
{
    gic_poke_irq(d,GIC_DIST_ENABLE_SET);
}

  

posted @ 2020-11-29 17:04  卷哭你  阅读(366)  评论(0编辑  收藏  举报