Function report |
Source Code:arch\x86\kernel\apic\io_apic.c |
Create Date:2022-07-28 08:30:55 |
Last Modify:2020-03-16 21:24:45 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:mp_irqdomain_alloc
Proto:int mp_irqdomain_alloc(struct irq_domain *domain, unsigned int virq, unsigned int nr_irqs, void *arg)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct irq_domain * | domain | |
unsigned int | virq | |
unsigned int | nr_irqs | |
void * | arg |
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 |
2990 | ioapic = mp_irqdomain_ioapic_idx(domain) |
2991 | pin = ioapic_pin |
2992 | If 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 Then Return -EEXIST |
2995 | data = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
2999 | ioapic_entry = entry |
3001 | If ret < 0 Then |
3003 | Return ret |
3007 | hwirq = ioapic_pin |
3008 | chip = If parent == x86_vector_domain Then ioapic_chip Else ioapic_ir_chip |
3011 | mp_irqdomain_get_attr(mp_pin_to_gsi(ioapic, pin), data, info) |
3014 | add_pin_to_irq_node(data, ioapic_alloc_attr_node(info), ioapic, pin) |
3016 | local_irq_save(flags) |
3017 | If ioapic_entry Then mp_setup_entry(cfg, data, ioapic_entry) |
3019 | mp_register_handler(virq, trigger) |
3020 | If virq < nr_legacy_irqs() Then 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 | Return 0 |
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 |