函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\apic\io_apic.c Create Date:2022-07-27 09:30:24
Last Modify:2020-03-16 21:24:45 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:mp_irqdomain_alloc

函数原型:int mp_irqdomain_alloc(struct irq_domain *domain, unsigned int virq, unsigned int nr_irqs, void *arg)

返回类型:int

参数:

类型参数名称
struct irq_domain *domain
unsigned intvirq
unsigned intnr_irqs
void *arg
2981  info等于arg
2984  如果非infonr_irqs大于1则返回:负EINVAL
2986  irq_data等于q_domain_get_irq_data - Get irq_data associated with @virq and @domain*@domain: domain to match*@virq: IRQ number to get irq_data
2987  如果非irq_data则返回:负EINVAL
2990  ioapic等于mp_irqdomain_ioapic_idx(domain)
2991  pin等于ioapic_pin
2992  如果q_find_mapping() - Find a linux irq from a hw irq number.*@domain: domain owning this hardware interrupt*@hwirq: hardware irq number in that domain space大于0则返回:负EEXIST
2995  data等于分配内存并置零
2996  如果非data则返回:负ENOMEM
2999  ioapic_entry等于entry
3000  ret等于irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, info)
3001  如果ret小于0则
3002  释放内存
3003  返回:ret
3006  初始化链表头
3007  硬件中断号等于ioapic_pin
3008  中断控制器信息等于如果parent恒等于x86_vector_domainioapic_chip否则ioapic_ir_chip
3010  和中断控制器相关的私有数据等于data
3011  mp_irqdomain_get_attr(mp_pin_to_gsi(ioapic, pin), data, info)
3013  cfg等于irqd_cfg(irq_data)
3014  add_pin_to_irq_node(data, ioapic_alloc_attr_node(info), ioapic, pin)
3016  local_irq_save(flags)
3017  如果ioapic_entrymp_setup_entry(cfg, data, ioapic_entry)
3019  mp_register_handler(virq, trigger)
3020  如果virq小于nr_legacy_irqs()则mask(virq)
3022  local_irq_restore(flags)
3024  Define the default level of output to be very little* This can be turned up by using apic=verbose for more* information and apic=debug for _lots_ of information.* apic_verbosity is defined in apic.c(APIC_VERBOSE, debug-level messages "IOAPIC[%d]: Set routing entry (%d-%d -> 0x%x -> IRQ %d Mode:%i Active:%i Dest:%d)\n", ioapic, mpc_ioapic_id(ioapic), pin, vector, virq, trigger, polarity, dest_apicid)
3029  返回:0