函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__irq_alloc_domain_generic_chip - Allocate generic chips for an irq domain*@d: irq domain for which to allocate chips*@irqs_per_chip: Number of interrupts each chip handles (max 32)*@num_ct: Number of irq_chip_type instances associated with this*@name:

函数原型:int __irq_alloc_domain_generic_chips(struct irq_domain *d, int irqs_per_chip, int num_ct, const char *name, irq_flow_handler_t handler, unsigned int clr, unsigned int set, enum irq_gc_flags gcflags)

返回类型:int

参数:

类型参数名称
struct irq_domain *d
intirqs_per_chip
intnum_ct
const char *name
irq_flow_handler_thandler
unsigned intclr
unsigned intset
enum irq_gc_flagsgcflags
294  如果gc则返回:负EBUSY
297  numchips等于DIV_ROUND_UP(revmap_size, irqs_per_chip)
298  如果非numchips则返回:负EINVAL
302  sz等于dgc的长度加numchipsgc的长度
303  sz加等于numchipsgc的长度加num_ctsizeof(structirq_chip_type)的和
305  tmp等于dgc等于分配内存并置零
306  如果非dgc则返回:负ENOMEM
308  irqs_per_chip等于irqs_per_chip
309  num_chips等于numchips
310  irq_flags_to_set等于set
311  irq_flags_to_clear等于clr
312  gc_flags等于gcflags
313  gc等于dgc
316  tmp加等于dgc的长度加numchipsgc的长度
317 i小于numchips循环
319  gc[i]等于gc等于tmp
320  irq_init_generic_chip(gc, name, num_ct, i * irqs_per_chip, NULL, handler)
323  domain等于d
324  如果gcflags按位与IRQ_GC_BE_IO
325  reg_readl等于irq_readl_be
329  raw_spin_lock_irqsave( & gc_lock, flags)
330  添加链表项
331  raw_spin_unlock_irqrestore( & gc_lock, flags)
333  tmp加等于gc的长度加num_ctsizeof(structirq_chip_type)
335  返回:0