Function report |
Source Code:arch\x86\kernel\apic\io_apic.c |
Create Date:2022-07-28 08:30:48 |
Last Modify:2020-03-16 21:24:45 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:int mp_register_ioapic(int id, unsigned int address, unsigned int gsi_base, struct ioapic_domain_cfg *cfg)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
int | id | |
unsigned int | address | |
unsigned int | gsi_base | |
struct ioapic_domain_cfg * | cfg |
2796 | hotplug = Not Not ioapic_initialized |
2801 | If Not address Then |
2805 | for_each_ioapic(ioapic) |
2812 | idx = find_free_ioapic_entry() |
2813 | If idx >= MAX_IO_APICS Then |
2814 | pr_warn("Max # of I/O APICs (%d) exceeded (found %d), skipping\n", MAX_IO_APICS, idx) |
2816 | Return -ENOSPC |
2820 | flags = MPC_APIC_USABLE |
2824 | If bad_ioapic_register(idx) Then |
2825 | clear_fixmap(FIX_IO_APIC_BASE_0 + idx) |
2826 | Return -ENODEV |
2829 | apicid = io_apic_unique_id(idx, id) |
2830 | apicver = io_apic_get_version(idx) |
2836 | entries = io_apic_get_redir_entries(idx) |
2839 | gsi_cfg = mp_ioapic_gsi_routing(ioapic) |
2844 | pr_warn("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 | Return -ENOSPC |
2851 | gsi_cfg = mp_ioapic_gsi_routing(idx) |
2855 | irqdomain = NULL |
2856 | irqdomain_cfg = cfg |
2863 | If hotplug Then |
2864 | If mp_irqdomain_create(idx) Then |
2865 | clear_fixmap(FIX_IO_APIC_BASE_0 + idx) |
2866 | Return -ENOMEM |
2871 | If gsi_end >= The one past the highest gsi number used Then The one past the highest gsi number used = gsi_end + 1 |
2873 | If nr_ioapics <= idx Then nr_ioapics = idx + 1 |
2879 | pr_info("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 | Return 0 |
Name | Describe |
---|---|
jailhouse_get_smp_config |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |