Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137903928
D19844.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D19844.diff
View Options
Index: head/sys/arm64/arm64/gic_v3.c
===================================================================
--- head/sys/arm64/arm64/gic_v3.c
+++ head/sys/arm64/arm64/gic_v3.c
@@ -1185,6 +1185,7 @@
("Invalid pointer to per-CPU redistributor"));
/* Copy res contents to its final destination */
sc->gic_redists.pcpu[cpuid]->res = r_res;
+ sc->gic_redists.pcpu[cpuid]->lpi_enabled = false;
if (bootverbose) {
device_printf(sc->dev,
"CPU%u Re-Distributor has been found\n",
Index: head/sys/arm64/arm64/gic_v3_var.h
===================================================================
--- head/sys/arm64/arm64/gic_v3_var.h
+++ head/sys/arm64/arm64/gic_v3_var.h
@@ -41,8 +41,9 @@
struct gic_v3_irqsrc;
struct redist_pcpu {
- struct resource res;
+ struct resource res; /* mem resource for redist */
vm_offset_t pend_base;
+ bool lpi_enabled; /* redist LPI configured? */
};
struct gic_redists {
Index: head/sys/arm64/arm64/gicv3_its.c
===================================================================
--- head/sys/arm64/arm64/gicv3_its.c
+++ head/sys/arm64/arm64/gicv3_its.c
@@ -672,11 +672,16 @@
if ((gic_r_read_4(gicv3, GICR_TYPER) & GICR_TYPER_PLPIS) == 0)
return (ENXIO);
- its_init_cpu_lpi(dev, sc);
+ rpcpu = gicv3_get_redist(dev);
+ /* Do per-cpu LPI init once */
+ if (!rpcpu->lpi_enabled) {
+ its_init_cpu_lpi(dev, sc);
+ rpcpu->lpi_enabled = true;
+ }
+
if ((gic_its_read_8(sc, GITS_TYPER) & GITS_TYPER_PTA) != 0) {
/* This ITS wants the redistributor physical address */
- rpcpu = gicv3_get_redist(dev);
target = vtophys(rman_get_virtual(&rpcpu->res));
} else {
/* This ITS wants the unique processor number */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 28, 1:43 AM (4 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26270655
Default Alt Text
D19844.diff (1 KB)
Attached To
Mode
D19844: gicv3_its: do LPI init only once per CPU
Attached
Detach File
Event Timeline
Log In to Comment