Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\apic\io_apic.c Create Date:2022-07-28 08:29:50
Last Modify:2020-03-16 21:24:45 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:mp_map_pin_to_irq

Proto:static int mp_map_pin_to_irq(unsigned int gsi, int idx, int ioapic, int pin, unsigned int flags, struct irq_alloc_info *info)

Type:int

Parameter:

TypeParameterName
unsigned intgsi
intidx
intioapic
intpin
unsigned intflags
struct irq_alloc_info *info
1038  bool legacy = false
1041  domain = mp_ioapic_irqdomain(ioapic)
1043  If Not domain Then Return -ENOSYS
1046  If idx >= 0 && st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then
1047  irq = srcbusirq
1048  legacy = mp_is_legacy_irq(irq)
1051  mutex_lock( & ioapic_mutex)
1052  If Not (flags & IOAPIC_MAP_ALLOC) Then
1053  If Not legacy Then
1055  If irq == 0 Then irq = -ENOENT
1058  Else
1059  ioapic_copy_alloc_attr( & tmp, info, gsi, ioapic, pin)
1060  If legacy Then irq = Need special handling for ISA IRQs because there may be multiple IOAPIC pins* sharing the same ISA IRQ number and irqdomain only supports 1:1 mapping* between IOAPIC pin and IRQ number. A typical IOAPIC has 24 pins, pin 0-15 are
1063  Else if (irq = 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 irq = alloc_irq_from_domain(domain, ioapic, gsi, & tmp)
1065  Else if Not mp_check_pin_attr(irq, & tmp) Then irq = -EBUSY
1067  If irq >= 0 Then
1069  count++
1072  mutex_unlock( & ioapic_mutex)
1074  Return irq
Caller
NameDescribe
pin_2_irq
mp_map_gsi_to_irq