mem-cache: Squash prefetch queue entries by block address.

Prefetch queue entries were being squashed by comparing the address
of each queued prefetch against the block address of the demand
access. Only prefetches that happen to fall on a cache-line block
boundary would be squashed.

This patch converts the prefetch addresses to block addresses before
comparison.

Change-Id: I3a80a1e3d752f925595e33edebf5359d2cc67182
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
This commit is contained in:
Richard Cooper
2022-11-14 12:02:10 +00:00
parent 47f3ad45d3
commit 05f33fbef5

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2015, 2023 ARM Limited
* Copyright (c) 2014-2015, 2022-2023 Arm Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -180,7 +180,7 @@ Queued::notify(const CacheAccessProbeArg &acc, const PrefetchInfo &pfi)
if (queueSquash) {
auto itr = pfq.begin();
while (itr != pfq.end()) {
if (itr->pfInfo.getAddr() == blk_addr &&
if (blockAddress(itr->pfInfo.getAddr()) == blk_addr &&
itr->pfInfo.isSecure() == is_secure) {
DPRINTF(HWPrefetch, "Removing pf candidate addr: %#x "
"(cl: %#x), demand request going to the same addr\n",