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
44a987d0
Commit
44a987d0
authored
Apr 17, 2020
by
Marc Zyngier
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'irq/gic-v4.1-fixes-5.7' into irq/irqchip-5.7
parents
8f374923
4b2dfe1e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
4 deletions
+29
-4
drivers/irqchip/irq-gic-v3-its.c
drivers/irqchip/irq-gic-v3-its.c
+20
-0
drivers/irqchip/irq-gic-v3.c
drivers/irqchip/irq-gic-v3.c
+7
-4
include/linux/irqchip/arm-gic-v3.h
include/linux/irqchip/arm-gic-v3.h
+2
-0
No files found.
drivers/irqchip/irq-gic-v3-its.c
View file @
44a987d0
...
...
@@ -14,6 +14,7 @@
#include <linux/dma-iommu.h>
#include <linux/efi.h>
#include <linux/interrupt.h>
#include <linux/iopoll.h>
#include <linux/irqdomain.h>
#include <linux/list.h>
#include <linux/log2.h>
...
...
@@ -3672,6 +3673,20 @@ static int its_vpe_set_affinity(struct irq_data *d,
return
IRQ_SET_MASK_OK_DONE
;
}
static
void
its_wait_vpt_parse_complete
(
void
)
{
void
__iomem
*
vlpi_base
=
gic_data_rdist_vlpi_base
();
u64
val
;
if
(
!
gic_rdists
->
has_vpend_valid_dirty
)
return
;
WARN_ON_ONCE
(
readq_relaxed_poll_timeout
(
vlpi_base
+
GICR_VPENDBASER
,
val
,
!
(
val
&
GICR_VPENDBASER_Dirty
),
10
,
500
));
}
static
void
its_vpe_schedule
(
struct
its_vpe
*
vpe
)
{
void
__iomem
*
vlpi_base
=
gic_data_rdist_vlpi_base
();
...
...
@@ -3702,6 +3717,8 @@ static void its_vpe_schedule(struct its_vpe *vpe)
val
|=
vpe
->
idai
?
GICR_VPENDBASER_IDAI
:
0
;
val
|=
GICR_VPENDBASER_Valid
;
gicr_write_vpendbaser
(
val
,
vlpi_base
+
GICR_VPENDBASER
);
its_wait_vpt_parse_complete
();
}
static
void
its_vpe_deschedule
(
struct
its_vpe
*
vpe
)
...
...
@@ -3910,6 +3927,8 @@ static void its_vpe_4_1_schedule(struct its_vpe *vpe,
val
|=
FIELD_PREP
(
GICR_VPENDBASER_4_1_VPEID
,
vpe
->
vpe_id
);
gicr_write_vpendbaser
(
val
,
vlpi_base
+
GICR_VPENDBASER
);
its_wait_vpt_parse_complete
();
}
static
void
its_vpe_4_1_deschedule
(
struct
its_vpe
*
vpe
,
...
...
@@ -4035,6 +4054,7 @@ static int its_sgi_set_affinity(struct irq_data *d,
* not on the host (since they can only be targetting a vPE).
* Tell the kernel we've done whatever it asked for.
*/
irq_data_update_effective_affinity
(
d
,
mask_val
);
return
IRQ_SET_MASK_OK
;
}
...
...
drivers/irqchip/irq-gic-v3.c
View file @
44a987d0
...
...
@@ -873,6 +873,7 @@ static int __gic_update_rdist_properties(struct redist_region *region,
gic_data
.
rdists
.
has_rvpeid
&=
!!
(
typer
&
GICR_TYPER_RVPEID
);
gic_data
.
rdists
.
has_direct_lpi
&=
(
!!
(
typer
&
GICR_TYPER_DirectLPIS
)
|
gic_data
.
rdists
.
has_rvpeid
);
gic_data
.
rdists
.
has_vpend_valid_dirty
&=
!!
(
typer
&
GICR_TYPER_DIRTY
);
/* Detect non-sensical configurations */
if
(
WARN_ON_ONCE
(
gic_data
.
rdists
.
has_rvpeid
&&
!
gic_data
.
rdists
.
has_vlpis
))
{
...
...
@@ -893,10 +894,11 @@ static void gic_update_rdist_properties(void)
if
(
WARN_ON
(
gic_data
.
ppi_nr
==
UINT_MAX
))
gic_data
.
ppi_nr
=
0
;
pr_info
(
"%d PPIs implemented
\n
"
,
gic_data
.
ppi_nr
);
pr_info
(
"%sVLPI support, %sdirect LPI support, %sRVPEID support
\n
"
,
!
gic_data
.
rdists
.
has_vlpis
?
"no "
:
""
,
!
gic_data
.
rdists
.
has_direct_lpi
?
"no "
:
""
,
!
gic_data
.
rdists
.
has_rvpeid
?
"no "
:
""
);
if
(
gic_data
.
rdists
.
has_vlpis
)
pr_info
(
"GICv4 features: %s%s%s
\n
"
,
gic_data
.
rdists
.
has_direct_lpi
?
"DirectLPI "
:
""
,
gic_data
.
rdists
.
has_rvpeid
?
"RVPEID "
:
""
,
gic_data
.
rdists
.
has_vpend_valid_dirty
?
"Valid+Dirty "
:
""
);
}
/* Check whether it's single security state view */
...
...
@@ -1620,6 +1622,7 @@ static int __init gic_init_bases(void __iomem *dist_base,
gic_data
.
rdists
.
has_rvpeid
=
true
;
gic_data
.
rdists
.
has_vlpis
=
true
;
gic_data
.
rdists
.
has_direct_lpi
=
true
;
gic_data
.
rdists
.
has_vpend_valid_dirty
=
true
;
if
(
WARN_ON
(
!
gic_data
.
domain
)
||
WARN_ON
(
!
gic_data
.
rdists
.
rdist
))
{
err
=
-
ENOMEM
;
...
...
include/linux/irqchip/arm-gic-v3.h
View file @
44a987d0
...
...
@@ -243,6 +243,7 @@
#define GICR_TYPER_PLPIS (1U << 0)
#define GICR_TYPER_VLPIS (1U << 1)
#define GICR_TYPER_DIRTY (1U << 2)
#define GICR_TYPER_DirectLPIS (1U << 3)
#define GICR_TYPER_LAST (1U << 4)
#define GICR_TYPER_RVPEID (1U << 7)
...
...
@@ -686,6 +687,7 @@ struct rdists {
bool
has_vlpis
;
bool
has_rvpeid
;
bool
has_direct_lpi
;
bool
has_vpend_valid_dirty
;
};
struct
irq_domain
;
...
...
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