Giacomo Travaglini has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/18595 )
Change subject: dev-arm: Take LPIs into account when interacting with CPUIF
regs
......................................................................
dev-arm: Take LPIs into account when interacting with CPUIF regs
Previous code was not handling LPIs when it came to
activation/deactivation of interrupts.
Change-Id: Ie38f83c66afdc42132679d7e2e5823990f1710d0
Signed-off-by: Giacomo Travaglini <[email protected]>
Reviewed-by: Andreas Sandberg <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18595
Maintainer: Andreas Sandberg <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/dev/arm/gic_v3_cpu_interface.cc
M src/dev/arm/gic_v3_redistributor.cc
2 files changed, 15 insertions(+), 6 deletions(-)
Approvals:
Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/dev/arm/gic_v3_cpu_interface.cc
b/src/dev/arm/gic_v3_cpu_interface.cc
index 577442e..3598f34 100644
--- a/src/dev/arm/gic_v3_cpu_interface.cc
+++ b/src/dev/arm/gic_v3_cpu_interface.cc
@@ -409,7 +409,8 @@
int_id = getHPPIR0();
// avoid activation for special interrupts
- if (int_id < Gicv3::INTID_SECURE) {
+ if (int_id < Gicv3::INTID_SECURE ||
+ int_id >= Gicv3Redistributor::SMALLEST_LPI_ID) {
activateIRQ(int_id, hppi.group);
}
} else {
@@ -464,7 +465,8 @@
int_id = getHPPIR1();
// avoid activation for special interrupts
- if (int_id < Gicv3::INTID_SECURE) {
+ if (int_id < Gicv3::INTID_SECURE ||
+ int_id >= Gicv3Redistributor::SMALLEST_LPI_ID) {
activateIRQ(int_id, hppi.group);
}
} else {
@@ -778,7 +780,8 @@
int int_id = val & 0xffffff;
// avoid activation for special interrupts
- if (int_id >= Gicv3::INTID_SECURE) {
+ if (int_id >= Gicv3::INTID_SECURE &&
+ int_id <= Gicv3::INTID_SPURIOUS) {
return;
}
@@ -847,7 +850,8 @@
int int_id = val & 0xffffff;
// avoid deactivation for special interrupts
- if (int_id >= Gicv3::INTID_SECURE) {
+ if (int_id >= Gicv3::INTID_SECURE &&
+ int_id <= Gicv3::INTID_SPURIOUS) {
return;
}
@@ -1770,6 +1774,9 @@
// SPI, distributor
distributor->activateIRQ(int_id);
distributor->updateAndInformCPUInterfaces();
+ } else if (int_id >= Gicv3Redistributor::SMALLEST_LPI_ID) {
+ // LPI, Redistributor
+ redistributor->setClrLPI(int_id, false);
}
}
@@ -1806,7 +1813,8 @@
distributor->deactivateIRQ(int_id);
distributor->updateAndInformCPUInterfaces();
} else {
- return;
+ // LPI, redistributor, shouldn't deactivate
+ redistributor->updateAndInformCPUInterface();
}
}
diff --git a/src/dev/arm/gic_v3_redistributor.cc
b/src/dev/arm/gic_v3_redistributor.cc
index e22d830..79de7d5 100644
--- a/src/dev/arm/gic_v3_redistributor.cc
+++ b/src/dev/arm/gic_v3_redistributor.cc
@@ -854,7 +854,8 @@
}
if (!new_hppi && cpuInterface->hppi.prio != 0xff &&
- cpuInterface->hppi.intid < Gicv3::SGI_MAX + Gicv3::PPI_MAX) {
+ (cpuInterface->hppi.intid < Gicv3::SGI_MAX + Gicv3::PPI_MAX ||
+ cpuInterface->hppi.intid > SMALLEST_LPI_ID)) {
distributor->fullUpdate();
}
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/18595
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Ie38f83c66afdc42132679d7e2e5823990f1710d0
Gerrit-Change-Number: 18595
Gerrit-PatchSet: 2
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev