When using the device memory allocation API the user ought to know what is the default allocation page size.
Unified · Split
| @@ -76,6 +76,7 @@ static int hw_ip_info(struct hl_device *hdev, struct hl_info_args *args) · 75 unmodified lines | |||
| 76 | if (hw_ip.dram_size > PAGE_SIZE) | 76 | if (hw_ip.dram_size > PAGE_SIZE) |
| 77 | hw_ip.dram_enabled = 1; | 77 | hw_ip.dram_enabled = 1; |
| 78 | hw_ip.dram_page_size = prop->dram_page_size; | 78 | hw_ip.dram_page_size = prop->dram_page_size; |
| 79 | hw_ip.device_mem_alloc_default_page_size = prop->device_mem_alloc_default_page_size; | ||
| 79 | hw_ip.num_of_events = prop->num_of_events; | 80 | hw_ip.num_of_events = prop->num_of_events; |
| 80 | 81 | ||
| 81 | memcpy(hw_ip.cpucp_version, prop->cpucp_info.cpucp_version, | 82 | memcpy(hw_ip.cpucp_version, prop->cpucp_info.cpucp_version, |
| @@ -409,6 +409,7 @@ enum hl_server_type { · 408 unmodified lines | |||
| 409 | * @dram_page_size: The DRAM physical page size. | 409 | * @dram_page_size: The DRAM physical page size. |
| 410 | * @number_of_user_interrupts: The number of interrupts that are available to the userspace | 410 | * @number_of_user_interrupts: The number of interrupts that are available to the userspace |
| 411 | * application to use. Relevant for Gaudi2 and later. | 411 | * application to use. Relevant for Gaudi2 and later. |
| 412 | * @device_mem_alloc_default_page_size: default page size used in device memory allocation. | ||
| 412 | */ | 413 | */ |
| 413 | struct hl_info_hw_ip_info { | 414 | struct hl_info_hw_ip_info { |
| 414 | __u64 sram_base_address; | 415 | __u64 sram_base_address; |
| @@ -436,6 +437,8 @@ struct hl_info_hw_ip_info { · 21 unmodified lines | |||
| 436 | __u32 reserved3; | 437 | __u32 reserved3; |
| 437 | __u16 number_of_user_interrupts; | 438 | __u16 number_of_user_interrupts; |
| 438 | __u16 pad2; | 439 | __u16 pad2; |
| 440 | __u64 reserved4; | ||
| 441 | __u64 device_mem_alloc_default_page_size; | ||
| 439 | }; | 442 | }; |
| 440 | 443 | ||
| 441 | struct hl_info_dram_usage { | 444 | struct hl_info_dram_usage { |