mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 02:01:36 +03:00
platform: nvadsp: do not export da to va mappings
nvadsp_da_to_va_mappings API provides the ability to get the virtual address from the physical address. This API does not need to be exposed as there are no other modules using it and prevent prevent speculative load related leak. Bug 200381256 Change-Id: Ic94497ca40402101e4246b914f00e030551b0c4c Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1652771 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Laxman Dewangan
parent
e0ecbe2746
commit
5c63aad7c2
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* A device driver for ADSP and APE
|
||||
*
|
||||
* Copyright (C) 2014-2017, NVIDIA Corporation. All rights reserved.
|
||||
* Copyright (C) 2014-2018, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
@@ -282,7 +282,7 @@ static int __init nvadsp_probe(struct platform_device *pdev)
|
||||
goto out;
|
||||
}
|
||||
drv_data->base_regs[iter] = base;
|
||||
adsp_add_load_mappings(res->start, base,
|
||||
nvadsp_add_load_mappings(res->start, base,
|
||||
resource_size(res));
|
||||
}
|
||||
|
||||
|
||||
@@ -309,7 +309,7 @@ bool is_adsp_dram_addr(u64 addr)
|
||||
return false;
|
||||
}
|
||||
|
||||
int adsp_add_load_mappings(phys_addr_t pa, void *mapping, int len)
|
||||
int nvadsp_add_load_mappings(phys_addr_t pa, void *mapping, int len)
|
||||
{
|
||||
if (map_idx >= NM_LOAD_MAPPINGS)
|
||||
return -EINVAL;
|
||||
@@ -342,7 +342,6 @@ void *nvadsp_da_to_va_mappings(u64 da, int len)
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
EXPORT_SYMBOL(nvadsp_da_to_va_mappings);
|
||||
|
||||
void *nvadsp_alloc_coherent(size_t size, dma_addr_t *da, gfp_t flags)
|
||||
{
|
||||
@@ -623,7 +622,7 @@ static int allocate_memory_for_adsp_os(void)
|
||||
goto end;
|
||||
}
|
||||
#endif
|
||||
adsp_add_load_mappings(addr, dram_va, size);
|
||||
nvadsp_add_load_mappings(addr, dram_va, size);
|
||||
end:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* A header file containing data structures shared with ADSP OS
|
||||
*
|
||||
* Copyright (C) 2014-2017 NVIDIA Corporation. All rights reserved.
|
||||
* Copyright (C) 2014-2018 NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
@@ -160,7 +160,8 @@ static inline int nvadsp_os_init(struct platform_device *pdev)
|
||||
|
||||
int nvadsp_os_probe(struct platform_device *);
|
||||
int nvadsp_app_module_probe(struct platform_device *);
|
||||
int adsp_add_load_mappings(phys_addr_t, void *, int);
|
||||
void *nvadsp_da_to_va_mappings(u64 da, int len);
|
||||
int nvadsp_add_load_mappings(phys_addr_t pa, void *mapping, int len);
|
||||
struct elf32_shdr *nvadsp_get_section(const struct firmware *, char *);
|
||||
struct global_sym_info *find_global_symbol(const char *);
|
||||
void update_nvadsp_app_shared_ptr(void *);
|
||||
|
||||
Reference in New Issue
Block a user