mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
Revert "gpu: nvgpu: Move pd_cache declarations to new header"
This reverts commit 15603b9fd5.
Causes a build break in the PD cache unit test. Not sure how this
passed GVS - must have been a race or something? Unclear.
Change-Id: Ia484a801d098d69441326fa1dd40a1c86e2e23ce
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1966335
This commit is contained in:
@@ -28,7 +28,6 @@
|
||||
#include <nvgpu/list.h>
|
||||
#include <nvgpu/log2.h>
|
||||
#include <nvgpu/gk20a.h>
|
||||
#include <nvgpu/enabled.h>
|
||||
|
||||
#include "gk20a/mm_gk20a.h"
|
||||
|
||||
@@ -162,34 +161,6 @@ static u32 nvgpu_pd_cache_get_nr_entries(struct nvgpu_pd_mem_entry *pentry)
|
||||
return PAGE_SIZE / pentry->pd_size;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the _physical_ address of a page directory.
|
||||
*/
|
||||
u64 nvgpu_pd_gpu_addr(struct gk20a *g, struct nvgpu_gmmu_pd *pd)
|
||||
{
|
||||
u64 page_addr;
|
||||
|
||||
if (nvgpu_is_enabled(g, NVGPU_SUPPORT_NVLINK)) {
|
||||
page_addr = nvgpu_mem_get_phys_addr(g, pd->mem);
|
||||
} else {
|
||||
page_addr = nvgpu_mem_get_addr(g, pd->mem);
|
||||
}
|
||||
|
||||
return page_addr + pd->mem_offs;
|
||||
}
|
||||
|
||||
u32 nvgpu_pd_offset_from_index(const struct gk20a_mmu_level *l, u32 pd_idx)
|
||||
{
|
||||
return (pd_idx * l->entry_size) / U32(sizeof(u32));
|
||||
}
|
||||
|
||||
void nvgpu_pd_write(struct gk20a *g, struct nvgpu_gmmu_pd *pd,
|
||||
size_t w, u32 data)
|
||||
{
|
||||
nvgpu_mem_wr32(g, pd->mem,
|
||||
(u32)((pd->mem_offs / sizeof(u32)) + w), data);
|
||||
}
|
||||
|
||||
int nvgpu_pd_cache_init(struct gk20a *g)
|
||||
{
|
||||
struct nvgpu_pd_cache *cache;
|
||||
|
||||
Reference in New Issue
Block a user