函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__irq_domain_add() - Allocate a new irq_domain data structure*@fwnode: firmware node for the interrupt controller*@size: Size of linear map; 0 for radix mapping only*@hwirq_max: Maximum number of interrupts supported by controller*@direct_max: Maximum

函数原型:struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size, irq_hw_number_t hwirq_max, int direct_max, const struct irq_domain_ops *ops, void *host_data)

返回类型:struct irq_domain

参数:

类型参数名称
struct fwnode_handle *fwnode
intsize
irq_hw_number_thwirq_max
intdirect_max
const struct irq_domain_ops *ops
void *host_data
135  of_node等于to_of_node(fwnode)
141  domain等于根据内存节点分配内存
143  如果非domain则返回:NULL
146  如果fwnodeis_fwnode_irqchip(fwnode)则
147  fwid等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(fwnode, structirqchip_fwid, fwnode)
150  :type恒等于IRQCHIP_FWNODE_NAMED
154  如果非硬件中断对象名
155  释放内存
156  返回:NULL
159  退出
160  默认
163  退出
180  否则如果of_node
188  name等于kasprintf(GFP_KERNEL, "%pOF", of_node)
189  如果非name
190  释放内存
191  返回:NULL
194  替换字符串中的所有字符
196  硬件中断对象名等于name
197  Optional data 等于fwnode
198  flags或等于IRQ_DOMAIN_NAME_ALLOCATED
201  如果非硬件中断对象名
202  如果fwnode打印错误信息("Invalid fwnode type for irqdomain\n")
204  硬件中断对象名等于kasprintf(GFP_KERNEL, "unknown-%d", atomic_inc_return( & unknown_domains))
206  如果非硬件中断对象名
207  释放内存
208  返回:NULL
210  flags或等于IRQ_DOMAIN_NAME_ALLOCATED
213  Dummy ref counting routines - to be implemented later
216  INIT_RADIX_TREE( & revmap_tree, GFP_KERNEL)
217  mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & revmap_tree_mutex)
218  硬件中断对象名等于ops
219  host_data等于host_data
220  reverse map data. The linear map gets appended to the irq_domain 等于hwirq_max
221  revmap_size等于size
222  revmap_direct_max_irq等于direct_max
223  irq_domain_check_hierarchy(domain)
225  mutex_lock( & irq_domain_mutex)
226  debugfs_add_domain_dir(domain)
227  添加链表项
228  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
230  pr_debug("Added domain %s\n", 硬件中断对象名)
231  返回:domain
调用者
名称描述
irq_domain_add_simpleq_domain_add_simple() - Register an irq_domain and optionally map a range of irqs*@of_node: pointer to interrupt controller's device tree node.*@size: total number of irqs in mapping*@first_irq: first number of irq block assigned to the domain,
irq_domain_add_legacyq_domain_add_legacy() - Allocate and register a legacy revmap irq_domain.*@of_node: pointer to interrupt controller's device tree node.*@size: total number of irqs in legacy mapping*@first_irq: first number of irq block assigned to the domain