From 23fadb7260475fe411e180b405d31c840525810d Mon Sep 17 00:00:00 2001 From: Matthew Poremba Date: Mon, 25 Jul 2022 14:57:13 -0700 Subject: [PATCH] dev-hsa: Don't set _aqlComplete in setRdIdx method This code is unnecessary as the read index is already correct. Furthermore, it can cause hangs in some situations where the packet SHOULD be marked as not complete. This causes a bug where the read index is incremented by 1 multiple times, causing the packet processor to read an invalid packet, followed by a hang after it does nothing. Change-Id: Iceda3c9606e018f60f8902770a2d9762c1c14304 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61650 Maintainer: Jason Lowe-Power Reviewed-by: Matt Sinclair Tested-by: kokoro Maintainer: Matt Sinclair --- src/dev/hsa/hsa_packet_processor.cc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/dev/hsa/hsa_packet_processor.cc b/src/dev/hsa/hsa_packet_processor.cc index 518dd9c732..d0afcf816f 100644 --- a/src/dev/hsa/hsa_packet_processor.cc +++ b/src/dev/hsa/hsa_packet_processor.cc @@ -608,14 +608,6 @@ void AQLRingBuffer::setRdIdx(uint64_t value) { _rdIdx = value; - - // Mark entries below the previous doorbell value as complete. This will - // cause the next call to freeEntry on the queue to increment the read - // index to the next value which will be written to the doorbell. - for (int i = 0; i <= value; ++i) { - _aqlComplete[i] = true; - DPRINTF(HSAPacketProcessor, "Marking _aqlComplete[%d] true\n", i); - } } void