fix(ufs): delete call to inv_dcache_range for utrd

The utrd struct is allocated on the stack by ufs_check_resp's caller.
Invalidating the utrd struct is unnecessary since it's only read from,
and can cause other values stored on the stack (e.g. link register) to
be inadvertently invalidated.

Change-Id: Icd455b52beb2677fafc083d68d0bfa0645b7194b
Signed-off-by: Wing Li <wingers@google.com>
This commit is contained in:
Wing Li 2021-12-23 11:32:08 -08:00
parent c8076a0e69
commit c5ee8588bf

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2017-2021, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -474,7 +474,6 @@ static int ufs_check_resp(utp_utrd_t *utrd, int trans_type)
hd = (utrd_header_t *)utrd->header;
resp = (resp_upiu_t *)utrd->resp_upiu;
inv_dcache_range((uintptr_t)hd, UFS_DESC_SIZE);
inv_dcache_range((uintptr_t)utrd, sizeof(utp_utrd_t));
do {
data = mmio_read_32(ufs_params.reg_base + IS);
if ((data & ~(UFS_INT_UCCS | UFS_INT_UTRCS)) != 0)