habanalabs: remove unused hash
diff mbox series

Message ID 20200707212954.26487-1-oshpigelman@habana.ai
State In Next
Commit 9158c47e2059967038b19d051a1afd87954fbba4
Headers show
Series
  • habanalabs: remove unused hash
Related show

Commit Message

Omer Shpigelman July 7, 2020, 9:29 p.m. UTC
Remove an old hash that is not in use anymore.

Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai>
---
 drivers/misc/habanalabs/habanalabs.h | 2 --
 drivers/misc/habanalabs/mmu.c        | 1 -
 2 files changed, 3 deletions(-)

Comments

Oded Gabbay July 10, 2020, 5:05 p.m. UTC | #1
On Wed, Jul 8, 2020 at 12:30 AM Omer Shpigelman <oshpigelman@habana.ai> wrote:
>
> Remove an old hash that is not in use anymore.
>
> Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai>
> ---
>  drivers/misc/habanalabs/habanalabs.h | 2 --
>  drivers/misc/habanalabs/mmu.c        | 1 -
>  2 files changed, 3 deletions(-)
>
> diff --git a/drivers/misc/habanalabs/habanalabs.h b/drivers/misc/habanalabs/habanalabs.h
> index a61aab09778c..ea0fd178accb 100644
> --- a/drivers/misc/habanalabs/habanalabs.h
> +++ b/drivers/misc/habanalabs/habanalabs.h
> @@ -780,7 +780,6 @@ struct hl_va_range {
>   * struct hl_ctx - user/kernel context.
>   * @mem_hash: holds mapping from virtual address to virtual memory area
>   *             descriptor (hl_vm_phys_pg_list or hl_userptr).
> - * @mmu_phys_hash: holds a mapping from physical address to pgt_info structure.
>   * @mmu_shadow_hash: holds a mapping from shadow address to pgt_info structure.
>   * @hpriv: pointer to the private (Kernel Driver) data of the process (fd).
>   * @hdev: pointer to the device structure.
> @@ -814,7 +813,6 @@ struct hl_va_range {
>   */
>  struct hl_ctx {
>         DECLARE_HASHTABLE(mem_hash, MEM_HASH_TABLE_BITS);
> -       DECLARE_HASHTABLE(mmu_phys_hash, MMU_HASH_TABLE_BITS);
>         DECLARE_HASHTABLE(mmu_shadow_hash, MMU_HASH_TABLE_BITS);
>         struct hl_fpriv         *hpriv;
>         struct hl_device        *hdev;
> diff --git a/drivers/misc/habanalabs/mmu.c b/drivers/misc/habanalabs/mmu.c
> index a290d6b49d78..04303950e630 100644
> --- a/drivers/misc/habanalabs/mmu.c
> +++ b/drivers/misc/habanalabs/mmu.c
> @@ -502,7 +502,6 @@ int hl_mmu_ctx_init(struct hl_ctx *ctx)
>                 return 0;
>
>         mutex_init(&ctx->mmu_lock);
> -       hash_init(ctx->mmu_phys_hash);
>         hash_init(ctx->mmu_shadow_hash);
>
>         return dram_default_mapping_init(ctx);
> --
> 2.17.1
>
This patch is:
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>

Patch
diff mbox series

diff --git a/drivers/misc/habanalabs/habanalabs.h b/drivers/misc/habanalabs/habanalabs.h
index a61aab09778c..ea0fd178accb 100644
--- a/drivers/misc/habanalabs/habanalabs.h
+++ b/drivers/misc/habanalabs/habanalabs.h
@@ -780,7 +780,6 @@  struct hl_va_range {
  * struct hl_ctx - user/kernel context.
  * @mem_hash: holds mapping from virtual address to virtual memory area
  *		descriptor (hl_vm_phys_pg_list or hl_userptr).
- * @mmu_phys_hash: holds a mapping from physical address to pgt_info structure.
  * @mmu_shadow_hash: holds a mapping from shadow address to pgt_info structure.
  * @hpriv: pointer to the private (Kernel Driver) data of the process (fd).
  * @hdev: pointer to the device structure.
@@ -814,7 +813,6 @@  struct hl_va_range {
  */
 struct hl_ctx {
 	DECLARE_HASHTABLE(mem_hash, MEM_HASH_TABLE_BITS);
-	DECLARE_HASHTABLE(mmu_phys_hash, MMU_HASH_TABLE_BITS);
 	DECLARE_HASHTABLE(mmu_shadow_hash, MMU_HASH_TABLE_BITS);
 	struct hl_fpriv		*hpriv;
 	struct hl_device	*hdev;
diff --git a/drivers/misc/habanalabs/mmu.c b/drivers/misc/habanalabs/mmu.c
index a290d6b49d78..04303950e630 100644
--- a/drivers/misc/habanalabs/mmu.c
+++ b/drivers/misc/habanalabs/mmu.c
@@ -502,7 +502,6 @@  int hl_mmu_ctx_init(struct hl_ctx *ctx)
 		return 0;
 
 	mutex_init(&ctx->mmu_lock);
-	hash_init(ctx->mmu_phys_hash);
 	hash_init(ctx->mmu_shadow_hash);
 
 	return dram_default_mapping_init(ctx);