函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\irq\irq_sim.c Create Date:2022-07-27 11:14:40
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:q_sim_init - Initialize the interrupt simulator: allocate a range of* dummy interrupts.*@sim: The interrupt simulator object to initialize.*@num_irqs: Number of interrupts to allocate* On success: return the base of the allocated interrupt range.

函数原型:int irq_sim_init(struct irq_sim *sim, unsigned int num_irqs)

返回类型:int

参数:

类型参数名称
struct irq_sim *sim
unsigned intnum_irqs
79  irqs等于分配数组内存
80  如果非irqs则返回:负ENOMEM
83  irq_base等于use macros to avoid needing export.h for THIS_MODULE ( - 1, 0, num_irqs, 0)
84  如果irq_base小于0则
85  释放内存
86  返回:irq_base
89  pending等于bitmap_zalloc(num_irqs, GFP_KERNEL)
90  如果非pending
91  释放内存
92  q_free_descs - free irq descriptors*@from: Start of descriptor range*@cnt: Number of consecutive irqs to free
93  返回:负ENOMEM
96 i小于num_irqs循环
97  irqnum等于irq_basei
98  enabled = false
99  q_set_chip - set the irq chip for an irq*@irq: irq number*@chip: pointer to irq chip description structure
100  q_set_chip_data - set irq chip data for an irq*@irq: Interrupt number*@data: Pointer to chip specific data* Set the hardware irq chip data for an irq
101  irq_set_handler(irq_base + i, & handle_simple_irq - Simple and software-decoded IRQs.*@desc: the interrupt description structure for this irq* Simple interrupts are either sent from a demultiplexing interrupt* handler or come from hardware, where no interrupt hardware control)
102  irq_modify_status(irq_base + i, IRQ_NOREQUEST | IRQ_NOAUTOEN, IRQ_NOPROBE)
106  init_irq_work( & work, irq_sim_handle_irq)
107  irq_count等于num_irqs
109  返回:irq_base
调用者
名称描述
devm_irq_sim_initq_sim_init - Initialize the interrupt simulator for a managed device.*@dev: Device to initialize the simulator object for.*@sim: The interrupt simulator object to initialize.*@num_irqs: Number of interrupts to allocate