Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\apic\vector.c Create Date:2022-07-28 08:28:23
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:x86_vector_alloc_irqs

Proto:static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq, unsigned int nr_irqs, void *arg)

Type:int

Parameter:

TypeParameterName
struct irq_domain *domain
unsigned intvirq
unsigned intnr_irqs
void *arg
531  info = arg
536  If disable_apic Then Return -ENXIO
540  If flags & X86_IRQ_ALLOC_CONTIGUOUS_VECTORS && nr_irqs > 1 Then Return -ENOSYS
543  When i < nr_irqs cycle
544  irqd = q_domain_get_irq_data - Get irq_data associated with @virq and @domain*@domain: domain to match*@virq: IRQ number to get irq_data
545  BUG_ON(!irqd)
546  node = irq_data_get_node(irqd)
547  WARN_ON_ONCE(chip_data)
548  apicd = alloc_apic_chip_data(node)
549  If Not apicd Then
550  err = -ENOMEM
551  Go to error
554  irq = virq + i
555  chip = lapic_controller
556  chip_data = apicd
557  hwirq = virq + i
558  Must only be called of irqchip.irq_set_affinity() or low level* hieararchy domain allocation functions.
566  If flags & X86_IRQ_ALLOC_LEGACY Then
567  If Not vector_configure_legacy(virq + i, irqd, apicd) Then Continue
571  err = assign_irq_vector_policy(irqd, info)
572  trace_vector_setup(virq + i, TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., err)
573  If err Then
574  chip_data = NULL
576  Go to error
580  Return 0
582  error :
583  x86_vector_free_irqs(domain, virq, i)
584  Return err