函数逻辑报告

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:17
Last Modify:2020-03-16 21:24:45 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:mp_register_ioapic - Register an IOAPIC device*@id: hardware IOAPIC ID*@address: physical address of IOAPIC register area*@gsi_base: base of GSI associated with the IOAPIC*@cfg: configuration information for the IOAPIC

函数原型:int mp_register_ioapic(int id, unsigned int address, unsigned int gsi_base, struct ioapic_domain_cfg *cfg)

返回类型:int

参数:

类型参数名称
intid
unsigned intaddress
unsigned intgsi_base
struct ioapic_domain_cfg *cfg
2796  hotplug等于非非ioapic_initialized
2801  如果非address
2802  打印警告信息("Bogus (zero) I/O APIC address found, skipping!\n")
2803  返回:负EINVAL
2805  for_each_ioapic(ioapic)
2806  如果apicaddr恒等于address
2807  打印警告信息("address 0x%x conflicts with IOAPIC%d\n", address, ioapic)
2809  返回:负EEXIST
2812  idx等于find_free_ioapic_entry()
2813  如果idx大于等于MAX_IO_APICS
2814  打印警告信息("Max # of I/O APICs (%d) exceeded (found %d), skipping\n", MAX_IO_APICS, idx)
2816  返回:负ENOSPC
2819  type等于MP_IOAPIC
2820  flags等于MPC_APIC_USABLE
2821  apicaddr等于address
2823  Some hardware wants to get fixmapped without caching.(FIX_IO_APIC_BASE_0 + idx, address)
2824  如果bad_ioapic_register(idx)则
2825  clear_fixmap(FIX_IO_APIC_BASE_0 + idx)
2826  返回:负ENODEV
2829  apicid等于io_apic_unique_id(idx, id)
2830  apicver等于io_apic_get_version(idx)
2836  entries等于io_apic_get_redir_entries(idx)
2837  gsi_end等于gsi_baseentries减1
2839  gsi_cfg等于mp_ioapic_gsi_routing(ioapic)
2840  如果gsi_base大于等于gsi_basegsi_base小于等于gsi_endgsi_end大于等于gsi_basegsi_end小于等于gsi_end
2844  打印警告信息("GSI range [%u-%u] for new IOAPIC conflicts with GSI[%u-%u]\n", gsi_base, gsi_end, gsi_base, gsi_end)
2847  clear_fixmap(FIX_IO_APIC_BASE_0 + idx)
2848  返回:负ENOSPC
2851  gsi_cfg等于mp_ioapic_gsi_routing(idx)
2852  gsi_base等于gsi_base
2853  gsi_end等于gsi_end
2855  irqdomain = NULL
2856  irqdomain_cfg等于cfg
2863  如果hotplug
2864  如果mp_irqdomain_create(idx)则
2866  返回:负ENOMEM
2868  alloc_ioapic_saved_registers(idx)
2871  如果gsi_end大于等于The one past the highest gsi number used The one past the highest gsi number used 等于gsi_end加1
2873  如果nr_ioapics小于等于idxnr_ioapics等于idx加1
2877  * # of IRQ routing registers等于entries
2879  打印信息("IOAPIC[%d]: apic_id %d, version %d, address 0x%x, GSI %d-%d\n", idx, mpc_ioapic_id(idx), mpc_ioapic_ver(idx), mpc_ioapic_addr(idx), gsi_base, gsi_end)
2884  返回:0
调用者
名称描述
jailhouse_get_smp_config