[gem5-dev] Change in gem5/gem5[develop]: cpu-o3: Add Data Abort handler for Atomic Instructions

2021-09-17 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/35295 )


Change subject: cpu-o3: Add Data Abort handler for Atomic Instructions
..

cpu-o3: Add Data Abort handler for Atomic Instructions

Bug fixing patch for Data Abort exception when executing an
atomic instruction. You can see the details in this JIRA ticket:
https://gem5.atlassian.net/browse/GEM5-784

Change-Id: I79e7113efd8157fba61b6d4a0b0c09bc6f85ec29
Signed-off-by: Víctor Soria 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35295
Reviewed-by: Giacomo Travaglini 
Maintainer: Giacomo Travaglini 
Tested-by: kokoro 
---
M src/cpu/o3/lsq_unit.cc
1 file changed, 11 insertions(+), 0 deletions(-)

Approvals:
  Giacomo Travaglini: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/cpu/o3/lsq_unit.cc b/src/cpu/o3/lsq_unit.cc
index 039184d..34f65b9 100644
--- a/src/cpu/o3/lsq_unit.cc
+++ b/src/cpu/o3/lsq_unit.cc
@@ -700,6 +700,17 @@
 DPRINTF(LSQUnit,"Fault on Store PC %s, [sn:%lli], Size = 0\n",
 store_inst->pcState(), store_inst->seqNum);

+if (store_inst->isAtomic()) {
+// If the instruction faulted, then we need to send it along
+// to commit without the instruction completing.
+if (!(store_inst->hasRequest() &&  
store_inst->strictlyOrdered()) ||

+store_inst->isAtCommit()) {
+store_inst->setExecuted();
+}
+iewStage->instToCommit(store_inst);
+iewStage->activityThisCycle();
+}
+
 return store_fault;
 }


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/35295
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: I79e7113efd8157fba61b6d4a0b0c09bc6f85ec29
Gerrit-Change-Number: 35295
Gerrit-PatchSet: 4
Gerrit-Owner: Victor Soria 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Jordi Vaquero 
Gerrit-Reviewer: Nikos Nikoleris 
Gerrit-Reviewer: Tiago Mück 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
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

[gem5-dev] Change in gem5/gem5[develop]: cpu-o3: Add Data Abort handler for Atomic Instructions

2020-09-29 Thread Victor Soria (Gerrit) via gem5-dev
Victor Soria has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/35295 )



Change subject: cpu-o3: Add Data Abort handler for Atomic Instructions
..

cpu-o3: Add Data Abort handler for Atomic Instructions

Change-Id: I79e7113efd8157fba61b6d4a0b0c09bc6f85ec29
---
M src/cpu/o3/lsq_unit_impl.hh
1 file changed, 12 insertions(+), 0 deletions(-)



diff --git a/src/cpu/o3/lsq_unit_impl.hh b/src/cpu/o3/lsq_unit_impl.hh
index 808a671..6fd33a4 100644
--- a/src/cpu/o3/lsq_unit_impl.hh
+++ b/src/cpu/o3/lsq_unit_impl.hh
@@ -708,6 +708,18 @@
 DPRINTF(LSQUnit,"Fault on Store PC %s, [sn:%lli], Size = 0\n",
 store_inst->pcState(), store_inst->seqNum);

+// If the instruction is atomic and had a fault then it may not  
have a mem req

+if (store_inst->isAtomic()) {
+// If the instruction faulted, then we need to send it along
+// to commit without the instruction completing.
+if (!(store_inst->hasRequest() &&  
store_inst->strictlyOrdered()) ||

+store_inst->isAtCommit()) {
+store_inst->setExecuted();
+}
+iewStage->instToCommit(store_inst);
+iewStage->activityThisCycle();
+}
+
 return store_fault;
 }


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/35295
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: I79e7113efd8157fba61b6d4a0b0c09bc6f85ec29
Gerrit-Change-Number: 35295
Gerrit-PatchSet: 1
Gerrit-Owner: Victor Soria 
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