XenevaOS
Loading...
Searching...
No Matches
XenevaOS
BaseHdr
linux
irq.h
Go to the documentation of this file.
1
#ifndef __LINUX_IRQ_H__
2
#define __LINUX_IRQ_H__
3
4
/*
5
* DCL <linux/irq.h> -- the two helpers the serial code reads the interrupt
6
* state through. Mainline's header is the irq-domain/chip layer (thousands of
7
* lines of controller plumbing DCL does not have and does not call), so this
8
* one carries only the read side plus the registration API by including
9
* <linux/interrupt.h>.
10
*
11
* irq_get_irq_data() returns NULL: no wakeup source is ever armed here, and
12
* irqd_is_wakeup_set() is therefore truthfully 0. That is not a stub hiding a
13
* feature -- serial_core.c:2385 and 8250_port.c:1828 both test the result
14
* before acting, and "nothing is a wake source" is the exact answer.
15
*
16
* struct irq_data stays incomplete on purpose: those two sites only ever pass
17
* the pointer back to irqd_is_wakeup_set(), and an opaque type keeps anyone
18
* from reaching into a structure DCL does not maintain.
19
*/
20
21
#include <
linux/interrupt.h
>
22
23
struct
irq_data;
24
25
static
inline
struct
irq_data* irq_get_irq_data(
unsigned
int
irq) {
26
(void)irq;
27
return
0;
28
}
29
30
#define irqd_is_wakeup_set(d) (0)
31
32
33
/*
34
* irq_canonicalize() -- collapse an irq number to the canonical form a
35
* controller uses. Upstream it exists for x86's split ISA/IO-APIC vectors;
36
* arm64's GIC numbers lines directly and the identity function is what
37
* mainline itself gives an architecture without that split. The value walks
38
* straight through: serial_core.c:905 stores the result back into
39
* new_info->irq, so returning the input unchanged is what keeps a port's
40
* reported irq equal to the one it was configured with.
41
*/
42
#define irq_canonicalize(irq) (irq)
43
44
/*
45
* enable_irq_wake() / disable_irq_wake() -- mark an interrupt line as able to
46
* wake the system from sleep. Both are only called under
47
* device_may_wakeup(), which is 0 (see <linux/pm_runtime.h>), so neither
48
* reaches an interrupt controller that does not exist. They still have to
49
* *return* something the calling convention expects: 0 is mainline's "the
50
* line accepted the request", and a negative here would be read as "this
51
* device cannot wake the system" by the resume path at serial_core.c:2386,
52
* which is the answer that changes behaviour -- so the success value is the
53
* one that keeps every branch where it already is.
54
*/
55
static
inline
int
enable_irq_wake(
unsigned
int
irq)
56
{
57
(void)irq;
58
return
0;
59
}
60
61
static
inline
int
disable_irq_wake(
unsigned
int
irq)
62
{
63
(void)irq;
64
return
0;
65
}
66
#endif
/* __LINUX_IRQ_H__ */
interrupt.h
Generated by
1.9.8