From eb3d73073ffb76a14af5746baecca51d6fd5763c Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Sun, 14 Jan 2024 10:49:57 +0200 Subject: [PATCH] intel/aux_map: fix fallback unmapping range on failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lionel Landwerlin Fixes: 7c6faa1efe ("intel/aux_map: introduce ref count of L1 entries") Reviewed-by: Tapani Pälli Part-of: (cherry picked from commit ff6041afdf2df9f048aa192f602c191e96ce92fd) --- .pick_status.json | 2 +- src/intel/common/intel_aux_map.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 299775cafc5..87db2a82970 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -64,7 +64,7 @@ "description": "intel/aux_map: fix fallback unmapping range on failure", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "7c6faa1efe8f50263bfc1f71cb1c4a1c2302b5df", "notes": null diff --git a/src/intel/common/intel_aux_map.c b/src/intel/common/intel_aux_map.c index 3040d25d6dc..2804e30ec77 100644 --- a/src/intel/common/intel_aux_map.c +++ b/src/intel/common/intel_aux_map.c @@ -728,7 +728,7 @@ intel_aux_map_add_mapping(struct intel_aux_map_context *ctx, uint64_t main_addre if (!success && (main_inc_addr - main_address) > 0) { /* If the mapping failed, remove the mapped portion. */ remove_mapping_locked(ctx, main_address, - main_size_B - (main_inc_addr - main_address), + main_inc_addr - main_address, false /* reset_refcount */, &state_changed); } pthread_mutex_unlock(&ctx->mutex);