diff options
author | Oded Gabbay <ogabbay@kernel.org> | 2020-11-09 10:48:31 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2020-11-30 11:47:34 +0300 |
commit | 7f070c913c361ed79dd29d9256b486b1b105d7f0 (patch) | |
tree | cb131b26d10b582e1c95970e21f4fba37af9cce9 /drivers/misc/habanalabs/common/memory.c | |
parent | be91b91fa40f5d2b1c8b79dbc34c1130de16f9e7 (diff) | |
download | linux-7f070c913c361ed79dd29d9256b486b1b105d7f0.tar.xz |
habanalabs: move asic property to correct structure
Whether an ASIC has MMU towards its DRAM is an ASIC property, so
move it to the asic fixed properties structure.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/common/memory.c')
-rw-r--r-- | drivers/misc/habanalabs/common/memory.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/misc/habanalabs/common/memory.c b/drivers/misc/habanalabs/common/memory.c index 01e93e83d3af..f27ca80d3c3c 100644 --- a/drivers/misc/habanalabs/common/memory.c +++ b/drivers/misc/habanalabs/common/memory.c @@ -1351,7 +1351,7 @@ int hl_mem_ioctl(struct hl_fpriv *hpriv, void *data) * the user's input, the driver can't ensure the validity * of this accounting. */ - if (!hdev->dram_supports_virtual_memory) { + if (!hdev->asic_prop.dram_supports_virtual_memory) { atomic64_add(args->in.alloc.mem_size, &ctx->dram_phys_mem); atomic64_add(args->in.alloc.mem_size, @@ -1380,7 +1380,7 @@ int hl_mem_ioctl(struct hl_fpriv *hpriv, void *data) * the user's input, the driver can't ensure the validity * of this accounting. */ - if (!hdev->dram_supports_virtual_memory) { + if (!hdev->asic_prop.dram_supports_virtual_memory) { atomic64_sub(args->in.alloc.mem_size, &ctx->dram_phys_mem); atomic64_sub(args->in.alloc.mem_size, @@ -1915,7 +1915,7 @@ void hl_vm_ctx_fini(struct hl_ctx *ctx) * because the user notifies us on allocations. If the user is no more, * all DRAM is available */ - if (!ctx->hdev->dram_supports_virtual_memory) + if (!ctx->hdev->asic_prop.dram_supports_virtual_memory) atomic64_set(&ctx->hdev->dram_used_mem, 0); } |