Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
eff65bd4
Commit
eff65bd4
authored
Sep 17, 2020
by
Marc Zyngier
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/irq/gic-retrigger' into irq/irqchip-next
Signed-off-by:
Marc Zyngier
<
maz@kernel.org
>
parents
7e62dd91
1b57d91b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
4 deletions
+41
-4
drivers/irqchip/irq-gic-v3-its.c
drivers/irqchip/irq-gic-v3-its.c
+6
-0
drivers/irqchip/irq-gic-v3.c
drivers/irqchip/irq-gic-v3.c
+11
-1
drivers/irqchip/irq-gic.c
drivers/irqchip/irq-gic.c
+11
-1
kernel/irq/resend.c
kernel/irq/resend.c
+13
-2
No files found.
drivers/irqchip/irq-gic-v3-its.c
View file @
eff65bd4
...
...
@@ -1720,6 +1720,11 @@ static int its_irq_set_irqchip_state(struct irq_data *d,
return
0
;
}
static
int
its_irq_retrigger
(
struct
irq_data
*
d
)
{
return
!
its_irq_set_irqchip_state
(
d
,
IRQCHIP_STATE_PENDING
,
true
);
}
/*
* Two favourable cases:
*
...
...
@@ -1971,6 +1976,7 @@ static struct irq_chip its_irq_chip = {
.
irq_set_affinity
=
its_set_affinity
,
.
irq_compose_msi_msg
=
its_irq_compose_msi_msg
,
.
irq_set_irqchip_state
=
its_irq_set_irqchip_state
,
.
irq_retrigger
=
its_irq_retrigger
,
.
irq_set_vcpu_affinity
=
its_irq_set_vcpu_affinity
,
};
...
...
drivers/irqchip/irq-gic-v3.c
View file @
eff65bd4
...
...
@@ -1221,6 +1221,11 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
#define gic_smp_init() do { } while(0)
#endif
static
int
gic_retrigger
(
struct
irq_data
*
data
)
{
return
!
gic_irq_set_irqchip_state
(
data
,
IRQCHIP_STATE_PENDING
,
true
);
}
#ifdef CONFIG_CPU_PM
static
int
gic_cpu_pm_notifier
(
struct
notifier_block
*
self
,
unsigned
long
cmd
,
void
*
v
)
...
...
@@ -1256,6 +1261,7 @@ static struct irq_chip gic_chip = {
.
irq_eoi
=
gic_eoi_irq
,
.
irq_set_type
=
gic_set_type
,
.
irq_set_affinity
=
gic_set_affinity
,
.
irq_retrigger
=
gic_retrigger
,
.
irq_get_irqchip_state
=
gic_irq_get_irqchip_state
,
.
irq_set_irqchip_state
=
gic_irq_set_irqchip_state
,
.
irq_nmi_setup
=
gic_irq_nmi_setup
,
...
...
@@ -1273,6 +1279,7 @@ static struct irq_chip gic_eoimode1_chip = {
.
irq_eoi
=
gic_eoimode1_eoi_irq
,
.
irq_set_type
=
gic_set_type
,
.
irq_set_affinity
=
gic_set_affinity
,
.
irq_retrigger
=
gic_retrigger
,
.
irq_get_irqchip_state
=
gic_irq_get_irqchip_state
,
.
irq_set_irqchip_state
=
gic_irq_set_irqchip_state
,
.
irq_set_vcpu_affinity
=
gic_irq_set_vcpu_affinity
,
...
...
@@ -1288,6 +1295,7 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
irq_hw_number_t
hw
)
{
struct
irq_chip
*
chip
=
&
gic_chip
;
struct
irq_data
*
irqd
=
irq_desc_get_irq_data
(
irq_to_desc
(
irq
));
if
(
static_branch_likely
(
&
supports_deactivate_key
))
chip
=
&
gic_eoimode1_chip
;
...
...
@@ -1312,7 +1320,7 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
irq_domain_set_info
(
d
,
irq
,
hw
,
chip
,
d
->
host_data
,
handle_fasteoi_irq
,
NULL
,
NULL
);
irq_set_probe
(
irq
);
irqd_set_single_target
(
irq
_desc_get_irq_data
(
irq_to_desc
(
irq
))
);
irqd_set_single_target
(
irq
d
);
break
;
case
LPI_RANGE
:
...
...
@@ -1326,6 +1334,8 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
return
-
EPERM
;
}
/* Prevents SW retriggers which mess up the ACK/EOI ordering */
irqd_set_handle_enforce_irqctx
(
irqd
);
return
0
;
}
...
...
drivers/irqchip/irq-gic.c
View file @
eff65bd4
...
...
@@ -326,6 +326,11 @@ static int gic_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu)
return
0
;
}
static
int
gic_retrigger
(
struct
irq_data
*
data
)
{
return
!
gic_irq_set_irqchip_state
(
data
,
IRQCHIP_STATE_PENDING
,
true
);
}
static
void
__exception_irq_entry
gic_handle_irq
(
struct
pt_regs
*
regs
)
{
u32
irqstat
,
irqnr
;
...
...
@@ -398,6 +403,7 @@ static const struct irq_chip gic_chip = {
.
irq_unmask
=
gic_unmask_irq
,
.
irq_eoi
=
gic_eoi_irq
,
.
irq_set_type
=
gic_set_type
,
.
irq_retrigger
=
gic_retrigger
,
.
irq_get_irqchip_state
=
gic_irq_get_irqchip_state
,
.
irq_set_irqchip_state
=
gic_irq_set_irqchip_state
,
.
flags
=
IRQCHIP_SET_TYPE_MASKED
|
...
...
@@ -996,6 +1002,7 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
irq_hw_number_t
hw
)
{
struct
gic_chip_data
*
gic
=
d
->
host_data
;
struct
irq_data
*
irqd
=
irq_desc_get_irq_data
(
irq_to_desc
(
irq
));
switch
(
hw
)
{
case
0
...
15
:
...
...
@@ -1013,9 +1020,12 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
irq_domain_set_info
(
d
,
irq
,
hw
,
&
gic
->
chip
,
d
->
host_data
,
handle_fasteoi_irq
,
NULL
,
NULL
);
irq_set_probe
(
irq
);
irqd_set_single_target
(
irq
_desc_get_irq_data
(
irq_to_desc
(
irq
))
);
irqd_set_single_target
(
irq
d
);
break
;
}
/* Prevents SW retriggers which mess up the ACK/EOI ordering */
irqd_set_handle_enforce_irqctx
(
irqd
);
return
0
;
}
...
...
kernel/irq/resend.c
View file @
eff65bd4
...
...
@@ -86,6 +86,18 @@ static int irq_sw_resend(struct irq_desc *desc)
}
#endif
static
int
try_retrigger
(
struct
irq_desc
*
desc
)
{
if
(
desc
->
irq_data
.
chip
->
irq_retrigger
)
return
desc
->
irq_data
.
chip
->
irq_retrigger
(
&
desc
->
irq_data
);
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
return
irq_chip_retrigger_hierarchy
(
&
desc
->
irq_data
);
#else
return
0
;
#endif
}
/*
* IRQ resend
*
...
...
@@ -113,8 +125,7 @@ int check_irq_resend(struct irq_desc *desc, bool inject)
desc
->
istate
&=
~
IRQS_PENDING
;
if
(
!
desc
->
irq_data
.
chip
->
irq_retrigger
||
!
desc
->
irq_data
.
chip
->
irq_retrigger
(
&
desc
->
irq_data
))
if
(
!
try_retrigger
(
desc
))
err
=
irq_sw_resend
(
desc
);
/* If the retrigger was successfull, mark it with the REPLAY bit */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment