Giacomo Travaglini has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/65174?usp=email )
Change subject: arch-arm: Setup ISA::gicv3CpuInterface on demand only
......................................................................
arch-arm: Setup ISA::gicv3CpuInterface on demand only
This is aligning with what we are already doing with the CoreTimers:
rather than setting up the interface at ISA::startup, we set it
up on the first time the GIC cpu interface is actually required
by the ISA
Change-Id: Iec29b2098ea29ca2886a69c5db8a2bc8d2f6f71e
Signed-off-by: Giacomo Travaglini <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65174
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
Reviewed-by: Andreas Sandberg <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/arm/isa.cc
1 file changed, 30 insertions(+), 8 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/arm/isa.cc b/src/arch/arm/isa.cc
index 3aabb56..fd19f72 100644
--- a/src/arch/arm/isa.cc
+++ b/src/arch/arm/isa.cc
@@ -523,13 +523,6 @@
return;
selfDebug->init(tc);
-
- Gicv3 *gicv3 = dynamic_cast<Gicv3 *>(system->getGIC());
- if (!gicv3)
- return;
-
- if (!gicv3CpuInterface)
- gicv3CpuInterface.reset(gicv3->getCPUInterface(tc->contextId()));
}
void
@@ -2005,7 +1998,15 @@
BaseISADevice &
ISA::getGICv3CPUInterface()
{
- panic_if(!gicv3CpuInterface, "GICV3 cpu interface is not registered!");
+ if (gicv3CpuInterface)
+ return *gicv3CpuInterface.get();
+
+ assert(system);
+ Gicv3 *gicv3 = dynamic_cast<Gicv3 *>(system->getGIC());
+ panic_if(!gicv3, "The system does not have a GICv3 irq controller\n");
+
+ gicv3CpuInterface.reset(gicv3->getCPUInterface(tc->contextId()));
+
return *gicv3CpuInterface.get();
}
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/65174?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Iec29b2098ea29ca2886a69c5db8a2bc8d2f6f71e
Gerrit-Change-Number: 65174
Gerrit-PatchSet: 7
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]