Giacomo Travaglini has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/55704 )

Change subject: dev-arm: Use ArmISA::getAffinity in GICv3 redistributor
......................................................................

dev-arm: Use ArmISA::getAffinity in GICv3 redistributor

The GICv3 redistributor was reading the MPIDR value and manually
extracting the affinity numbers from it. This is not necessary as there
is already a getAffinity helper function

Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Change-Id: I6ef150937b51bb065575ed2f432f4f5f0bc38b07
---
M src/dev/arm/gic_v3_redistributor.cc
1 file changed, 15 insertions(+), 11 deletions(-)



diff --git a/src/dev/arm/gic_v3_redistributor.cc b/src/dev/arm/gic_v3_redistributor.cc
index 225e4cd..adfc5bc 100644
--- a/src/dev/arm/gic_v3_redistributor.cc
+++ b/src/dev/arm/gic_v3_redistributor.cc
@@ -1017,17 +1017,7 @@
 Gicv3Redistributor::getAffinity() const
 {
     ThreadContext *tc = gic->getSystem()->threads[cpuId];
-    uint64_t mpidr = getMPIDR(gic->getSystem(), tc);
-    /*
-     * Aff3 = MPIDR[39:32]
-     * (Note getMPIDR() returns uint32_t so Aff3 is always 0...)
-     * Aff2 = MPIDR[23:16]
-     * Aff1 = MPIDR[15:8]
-     * Aff0 = MPIDR[7:0]
-     * affinity = Aff3.Aff2.Aff1.Aff0
-     */
- uint64_t affinity = ((mpidr & 0xff00000000) >> 8) | (mpidr & (0xffffff));
-    return affinity;
+    return gem5::ArmISA::getAffinity(gic->getSystem(), tc);
 }

 bool

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/55704
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: I6ef150937b51bb065575ed2f432f4f5f0bc38b07
Gerrit-Change-Number: 55704
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to