linux 中nvme 的中断申请及处理

/**
 * struct irq_desc - interrupt descriptor
 * @irq_data:        per irq and chip data passed down to chip functions
 * @kstat_irqs:        irq stats per cpu
 * @handle_irq:        highlevel irq-events handler
 * @preflow_handler:    handler called before the flow handler (currently used by sparc)
 * @action:        the irq action chain
 * @status:        status information
 * @core_internal_state__do_not_mess_with_it: core internal status information
 * @depth:        disable-depth, for nested irq_disable() calls
 * @wake_depth:        enable depth, for multiple irq_set_irq_wake() callers
 * @irq_count:        stats field to detect stalled irqs
 * @last_unhandled:    aging timer for unhandled count
 * @irqs_unhandled:    stats field for spurious unhandled interrupts
 * @lock:        locking for SMP
 * @affinity_hint:    hint to user space for preferred irq affinity
 * @affinity_notify:    context for notification of affinity changes
 * @pending_mask:    pending rebalanced interrupts
 * @threads_oneshot:    bitfield to handle shared oneshot threads
 * @threads_active:    number of irqaction threads currently running
 * @wait_for_threads:    wait queue for sync_irq to wait for threaded handlers
 * @dir:        /proc/irq/ procfs entry
 * @name:        flow handler name for /proc/interrupts output
 */
struct irq_desc {
    struct irq_data        irq_data;
    unsigned int __percpu    *kstat_irqs;///* irq的统计信息,在proc中可查到 */
    irq_flow_handler_t    handle_irq;
    /* 回调函数,当此中断产生中断时,会调用handle_irq,在handle_irq中进行遍历irqaction链表*/
         /* handle_simple_irq  用于简单处理;
     * handle_level_irq  用于电平触发中断的流控处理;
     * handle_edge_irq  用于边沿触发中断的流控处理;
     * handle_fasteoi_irq  用于需要响应eoi的中断控制器;
     * handle_percpu_irq  用于只在单一cpu响应的中断;
     * handle_nested_irq  用于处理使用线程的嵌套中断;
     */
#ifdef CONFIG_IRQ_PREFLOW_FASTEOI
    irq_preflow_handler_t    preflow_handler;
#endif
    struct irqaction    *action;    /* IRQ action list */

    unsigned int        status_use_accessors;
    unsigned int        core_internal_state__do_not_mess_with_it;
    unsigned int        depth;        /* nested irq disables */ /* 嵌套深度,中断线被激活显示0,如果为正数,表示被禁止次数 */
    unsigned int        wake_depth;    /* nested wake enables */
    unsigned int        irq_count;    /* For detecting broken IRQs *//* 此中断线上发生的中断次数 */
    unsigned long        last_unhandled;    /* Aging timer for unhandled count */ /* 上次发生未处理中断时的ji
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值