]> git.baikalelectronics.ru Git - kernel.git/commitdiff
habanalabs: set default value for memory_scrub
authorDafna Hirschfeld <dhirschfeld@habana.ai>
Thu, 12 May 2022 13:16:25 +0000 (16:16 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Tue, 12 Jul 2022 06:09:25 +0000 (09:09 +0300)
Set a default value for memory scrubbing

Signed-off-by: Dafna Hirschfeld <dhirschfeld@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/device.c

index 1a4f3eb941a9bbfed092c88311cbef0e67fb169e..34ba521e2d1a280f2b5e30228ef7339a3bfab5f9 100644 (file)
@@ -15,6 +15,8 @@
 
 #define HL_RESET_DELAY_USEC            10000   /* 10ms */
 
+#define MEM_SCRUB_DEFAULT_VAL 0x1122334455667788
+
 /*
  * hl_set_dram_bar- sets the bar to allow later access to address
  *
@@ -1727,6 +1729,7 @@ int hl_device_init(struct hl_device *hdev, struct class *hclass)
 
        hdev->asic_funcs->state_dump_init(hdev);
 
+       hdev->memory_scrub_val = MEM_SCRUB_DEFAULT_VAL;
        hl_debugfs_add_device(hdev);
 
        /* debugfs nodes are created in hl_ctx_init so it must be called after