Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\irq\manage.c
Create Date:2022-07-28 10:09:50
Last Modify:2020-03-12 14:18:49
Copyright©Brick
home page
Tree

Name:register an interrupt

Proto:static int 雷竞技app下载官方版ray-雷竞技官网下载(unsigned int irq, struct irq_desc *desc, struct irqaction *new)

Type:int

Parameter:

TypeParameterName
unsigned int
irq
struct irq_desc *
desc
>request_mutex Provides serialization against a concurrent free_irq()
struct irqaction *
new
1276
 
1277
 
shared = 0
1279
 
1282
 
1284
 
If Not try_module_get(owner) Then Return -ENODEV
1287
 
irq = irq
1293
 
1300
 
1301
 
If nested Then
1302
 
If Not thread_fn Then
1303
 
ret = -EINVAL
1304
 
Go to out_mput
1312
 
Else
1315
 
If ret Then Go to out_mput
1325
 
If thread_fn && Not nested Then
1326
 
1327
 
If ret Then Go to out_mput
1329
 
If secondary Then
1330
 
1331
 
If ret Then Go to out_thread
1345
 
1355
 
1362
 
1365
 
If Not IRQ action list Then
1367
 
If ret Then
1368
 
pr_err("Failed to request resources for %s (irq %d) on irqchip %s\n", name, irq, interrupt' name)
1370
 
1380
 
1381
 
1382
 
1383
 
If old Then
1394
 
If istate & IRQS_NMI Then
1395
 
pr_err("Invalid attempt to share NMI for %s (irq %d) on irqchip %s.\n", name, irq, interrupt' name)
1397
 
ret = -EINVAL
1398
 
Go to out_unlock
1405
 
1407
 
Else
1423
 
Do
1430
 
1431
 
1432
 
When old cycle
1433
 
shared = 1
1446
 
If thread_mask == ~0UL Then
1447
 
ret = -EBUSY
1448
 
Go to out_unlock
1489
 
pr_err("Threaded irq requested with handler=NULL and !ONESHOT for irq %d\n", irq)
1491
 
ret = -EINVAL
1492
 
Go to out_unlock
1495
 
If Not shared Then
1499
 
1503
 
If ret Then Go to out_unlock
1519
 
If ret Then Go to out_unlock
1526
 
1542
 
Else
1554
 
Else if flags & IRQF_TRIGGER_MASK Then
1558
 
If nmsk != omsk Then pr_warn("irq %d uses trigger mode %u; requested %u\n", irq, omsk, nmsk)
1564
 
1566
 
1569
 
1570
 
1576
 
1581
 
1582
 
1583
 
1585
 
1591
 
1593
 
1596
 
1597
 
dir = NULL
1598
 
1599
 
Return 0
1601
 
1603
 
pr_err("Flags mismatch irq %d. %08x (%s) vs. %08x (%s)\n", irq, flags, name, flags, name)
1609
 
ret = -EBUSY
1611
 
1612
 
1614
 
1616
 
1617
 
1618
 
1620
 
1621
 
If thread Then
1622
 
t = thread
1624
 
thread = NULL
1625
 
1626
 
1628
 
If secondary && thread Then
1629
 
t = thread
1631
 
thread = NULL
1632
 
1633
 
1635
 
1636
 
1637
 
Return ret
Caller
NameDescribe
setup_irq
setup_irq - setup an interrupt*@irq: Interrupt line to setup*@act: irqaction for the interrupt* Used to statically setup interrupts in the early boot process.
request_threaded_irq
quest_threaded_irq - allocate an interrupt line*@irq: Interrupt line to allocate*@handler: Function to be called when the IRQ occurs
request_nmi
quest_nmi - allocate an interrupt line for NMI delivery*@irq: Interrupt line to allocate*@handler: Function to be called when the IRQ occurs
setup_percpu_irq
setup_percpu_irq - setup a per-cpu interrupt*@irq: Interrupt line to setup*@act: irqaction for the interrupt* Used to statically setup per-cpu interrupts in the early boot process.
__request_percpu_irq
__request_percpu_irq - allocate a percpu interrupt line*@irq: Interrupt line to allocate*@handler: Function to be called when the IRQ occurs
request_percpu_nmi
quest_percpu_nmi - allocate a percpu interrupt line for NMI delivery*@irq: Interrupt line to allocate*@handler: Function to be called when the IRQ occurs