cnss2: Use IOMMU_CACHE flag for audio smmu mappings
WLAN IOMMU mappings have cached attribute set whereas ADSP IOMMU mappings do not have cached attribute set. This is resulting in an inconsistent memory view between ADSP SS and WLAN SS. ADSP writes to a DDR location and WLAN HW reads from the same location but since access is cached from WLAN side, there is a possibility of reading incorrect values. Fix is to use IOMMU_CACHE flag for audio smmu mappings. Change-Id: Ife97bee34bc8224fd2d0d2bb45b606efeea5aa53 CRs-Fixed: 3375521
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
@@ -494,7 +494,8 @@ int cnss_audio_smmu_map(struct device *dev, phys_addr_t paddr,
|
|||||||
paddr -= page_offset;
|
paddr -= page_offset;
|
||||||
|
|
||||||
return iommu_map(plat_priv->audio_iommu_domain, iova, paddr,
|
return iommu_map(plat_priv->audio_iommu_domain, iova, paddr,
|
||||||
roundup(size, PAGE_SIZE), IOMMU_READ | IOMMU_WRITE);
|
roundup(size, PAGE_SIZE), IOMMU_READ | IOMMU_WRITE |
|
||||||
|
IOMMU_CACHE);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(cnss_audio_smmu_map);
|
EXPORT_SYMBOL(cnss_audio_smmu_map);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user