summaryrefslogtreecommitdiff
path: root/gxp-dma-iommu.c
diff options
context:
space:
mode:
authorAurora zuma automerger <aurora-zuma-automerger@google.com>2023-03-09 14:01:01 +0000
committerCopybara-Service <copybara-worker@google.com>2023-03-09 22:31:08 -0800
commit19425405130ee51277b94acf9e5599f00b5c014a (patch)
tree9dc0cde488139285faa80ff8abe9194db691b127 /gxp-dma-iommu.c
parent7fd75e876ae0bcbd3d47f777b0de8774a165238f (diff)
downloadzuma-19425405130ee51277b94acf9e5599f00b5c014a.tar.gz
gxp: [Copybara Auto Merge] Merge branch 'zuma' into 'android14-gs-pixel-5.15'
gcip: Make gcip_pm_{get_count,is_powered} lockless Bug: 271756295 gcip: generalize mem_pool GCIP_HEADERS_REV_ID: 5ac83c6a2c630e09be378f657bd8be9bc0523b34 gxp: rollback GPL change for gsa_image_auth Bug: 271797962 gcip: Make gcip_pm_{get_count,is_powered} lockless Bug: 271756295 (repeat) gcip: generalize mem_pool gcip: utilize mock files on unittests Bug: 272216562 GCIP_MAIN_REV_ID: a5b6843ab58f30d6ce086016214cbf56a46610a8 gxp: use GPL-2.0-only license Bug: 271797962 (repeat) gxp: not program MCU iremap and doobell in TZ priv Bug: 260533620 gxp: authenticates firmware through GSA Bug: 260533620 (repeat) gxp: Enable debug dump for imageconfig 2. Bug: 271371895 gcip: use GPL-2.0-only license Bug: 271797962 (repeat) gcip: Remove gcip_pm_put_async Bug: 271756295 (repeat) gcip: Only call .power_up if needed GCIP_MAIN_REV_ID: 210c9f18b07dff1f6eee8deadb571619c9d8d864 gcip: use GPL-2.0-only license Bug: 271797962 (repeat) gcip: Remove gcip_pm_put_async Bug: 271756295 (repeat) gcip: Add gcip_pm_trylock Bug: 271756295 (repeat) GCIP_HEADERS_REV_ID: 97eb89f481a48030259ec90691ff4b5126a463c2 gxp: Add size check while loading image to memory Bug: 265105909 gxp: refactor MCU firmware life cycle Bug: 233159020 gxp: Create a function for gxp_core_boot Bug: 271716712 gxp: Increase UCI command timeout to 2 seconds Bug: 271622596 gxp: minor style fixes gxp: fix memory leak of eventfd Bug: 270657146 gxp: remove checks of data_mgr gxp: skip mapping core resources in MCU mode gxp: add gxp_firmware_loader module gcip: Print GCIP_FW_LOG_LEVEL_FATAL as error message Bug: 271596603 gcip: Postfix gcip_firmware_tracing_restore gcip: fix undefined variable on !THERMAL gcip: always return NULL on domain alloc error GCIP_MAIN_REV_ID: 92addd19b0b6f01ca127402d29f862d26895add4 gcip: Add level -3 (FATAL) for firmware log Bug: 271596603 (repeat) gcip: Update outdated comments gcip: Postfix gcip_firmware_tracing_restore GCIP_HEADERS_REV_ID: 3e296e62e800e70f68fa4bd63504394dce0f2e75 GitOrigin-RevId: b83c2bc8112562304e23fd28c0dbd3c97e076476 Change-Id: I9ebcdf6b813d321ab467a7a23a95e897c504dca0
Diffstat (limited to 'gxp-dma-iommu.c')
-rw-r--r--gxp-dma-iommu.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gxp-dma-iommu.c b/gxp-dma-iommu.c
index 87bb649..ad1111b 100644
--- a/gxp-dma-iommu.c
+++ b/gxp-dma-iommu.c
@@ -81,7 +81,7 @@ static int gxp_dma_ssmt_program(struct gxp_dev *gxp,
uint core;
/* Program VID only when cores are managed by us. */
- if (gxp_is_direct_mode(gxp) || gxp_core_boot) {
+ if (gxp_is_direct_mode(gxp) || gxp_core_boot(gxp)) {
pasid = iommu_aux_get_pasid(domain, gxp->dev);
for (core = 0; core < GXP_NUM_CORES; core++)
if (BIT(core) & core_list) {
@@ -322,6 +322,9 @@ int gxp_dma_map_core_resources(struct gxp_dev *gxp,
uint i;
struct iommu_domain *domain = gdomain->domain;
+ if (!gxp_is_direct_mode(gxp))
+ return 0;
+
ret = gxp_map_csrs(gxp, domain, &gxp->regs);
if (ret)
goto err;
@@ -376,6 +379,9 @@ void gxp_dma_unmap_core_resources(struct gxp_dev *gxp,
uint i;
struct iommu_domain *domain = gdomain->domain;
+ if (!gxp_is_direct_mode(gxp))
+ return;
+
/* Only unmap the TPU mailboxes if they were found on probe */
if (gxp->tpu_dev.mbx_paddr) {
for (i = 0; i < GXP_NUM_CORES; i++) {