habanalabs: remove redundant member from parser struct
authorDalit Ben Zoor <dbenzoor@habana.ai>
Wed, 1 May 2019 10:16:18 +0000 (13:16 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Wed, 1 May 2019 10:16:18 +0000 (13:16 +0300)
use_virt_addr member was used for telling whether to treat the
addresses in the CB as virtual during parsing. We disabled it only
when calling the parser from the driver memset device function,
and since this call had been removed, it should always be enabled.

Signed-off-by: Dalit Ben Zoor <dbenzoor@habana.ai>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/command_submission.c
drivers/misc/habanalabs/goya/goya.c
drivers/misc/habanalabs/habanalabs.h

index c4ab694b51b5818d76e9eb66f57bad044cca44dd..6fe785e26859769fc934d5ece519a0957dea0745 100644 (file)
@@ -93,7 +93,6 @@ static int cs_parser(struct hl_fpriv *hpriv, struct hl_cs_job *job)
        parser.user_cb_size = job->user_cb_size;
        parser.ext_queue = job->ext_queue;
        job->patched_cb = NULL;
-       parser.use_virt_addr = hdev->mmu_enable;
 
        rc = hdev->asic_funcs->cs_parser(hdev, &parser);
        if (job->ext_queue) {
index 31dc3b872f9e2b8a88cef729d14cf08586a9b9d6..ba6790f9ec6b797ae1869e13c0c01fce49e02286 100644 (file)
@@ -3903,7 +3903,7 @@ int goya_cs_parser(struct hl_device *hdev, struct hl_cs_parser *parser)
        if (!parser->ext_queue)
                return goya_parse_cb_no_ext_queue(hdev, parser);
 
-       if ((goya->hw_cap_initialized & HW_CAP_MMU) && parser->use_virt_addr)
+       if (goya->hw_cap_initialized & HW_CAP_MMU)
                return goya_parse_cb_mmu(hdev, parser);
        else
                return goya_parse_cb_no_mmu(hdev, parser);
index f08f71982585061c8eed4e4a165b35c1f6d78b29..0da80e8eab42485f3d210ace1307a0688cead932 100644 (file)
@@ -779,8 +779,6 @@ struct hl_cs_job {
  * @patched_cb_size: the size of the CB after parsing.
  * @ext_queue: whether the job is for external queue or internal queue.
  * @job_id: the id of the related job inside the related CS.
- * @use_virt_addr: whether to treat the addresses in the CB as virtual during
- *                     parsing.
  */
 struct hl_cs_parser {
        struct hl_cb            *user_cb;
@@ -793,7 +791,6 @@ struct hl_cs_parser {
        u32                     patched_cb_size;
        u8                      ext_queue;
        u8                      job_id;
-       u8                      use_virt_addr;
 };