habanalabs: send device activity in a proper context
PATCH 5/9 habanalabs: add support for new cpucp return codes
In reply to Oded GabbayFrom: Ofir Bitton <[email protected]>
Firmware now responds with a more detailed cpucp return codes. Driver can now distinguish between error and debug return codes.
--- drivers/misc/habanalabs/common/firmware_if.c | 34 +++++++++++++++++-- drivers/misc/habanalabs/common/habanalabs.h | 2 ++ drivers/misc/habanalabs/gaudi2/gaudi2.c | 2 ++ .../misc/habanalabs/include/common/cpucp_if.h | 17 +++++++++- 4 files changed, 51 insertions(+), 4 deletions(-)
drivers/misc/habanalabs/common/firmware_if.c +31 -3
@@ -252,7 +252,7 @@ int hl_fw_send_cpu_message(struct hl_device *hdev, u32 hw_queue_id, u32 *msg,struct cpucp_packet *pkt;dma_addr_t pkt_dma_addr;struct hl_bd *sent_bd; -u32 tmp, expected_ack_val, pi; +u32 tmp, expected_ack_val, pi, opcode;int rc; pkt =hl_cpu_accessible_dma_pool_alloc (hdev, len, &pkt_dma_addr);
@@ -319,8 +319,35 @@ int hl_fw_send_cpu_message(struct hl_device *hdev, u32 hw_queue_id, u32 *msg, rc = (tmp &CPUCP_PKT_CTL_RC_MASK ) >>CPUCP_PKT_CTL_RC_SHIFT ;if (rc) { -dev_dbg (hdev->dev,"F/W ERROR %d for CPU packet %d\n" , - rc, (tmp &CPUCP_PKT_CTL_OPCODE_MASK ) >>CPUCP_PKT_CTL_OPCODE_SHIFT ); + opcode = (tmp &CPUCP_PKT_CTL_OPCODE_MASK ) >>CPUCP_PKT_CTL_OPCODE_SHIFT ; + +if (!prop->supports_advanced_cpucp_rc) { +dev_dbg (hdev->dev,"F/W ERROR %d for CPU packet %d\n" , rc, opcode); + goto scrub_descriptor; + } + +switch (rc) { +case cpucp_packet_invalid: +dev_err (hdev->dev, +"CPU packet %d is not supported by F/W\n" , opcode); +break ; +case cpucp_packet_fault: +dev_err (hdev->dev, +"F/W failed processing CPU packet %d\n" , opcode); +break ; +case cpucp_packet_invalid_pkt: +dev_dbg (hdev->dev, +"CPU packet %d is not supported by F/W\n" , opcode); +break ; +case cpucp_packet_invalid_params: +dev_err (hdev->dev, +"F/W reports invalid parameters for CPU packet %d\n" , opcode); +break ; + +default : +dev_err (hdev->dev, +"Unknown F/W ERROR %d for CPU packet %d\n" , rc, opcode); + }/* propagate the return code from the f/w to the callers who want to check it */ if (result)
@@ -332,6 +359,7 @@ int hl_fw_send_cpu_message(struct hl_device *hdev, u32 hw_queue_id, u32 *msg, *result =le64_to_cpu (pkt->result); } +scrub_descriptor:/* Scrub previous buffer descriptor 'ctl' field which contains the * previous PI value written during packet submission. * We must do this or else F/W can read an old value upon queue wraparound.
drivers/misc/habanalabs/common/habanalabs.h +2 -0
@@ -678,6 +678,7 @@ struct hl_hints_range {* @set_max_power_on_device_init: true if need to set max power in F/W on device init. * @supports_user_set_page_size: true if user can set the allocation page size. * @dma_mask: the dma mask to be set for this device +* @supports_advanced_cpucp_rc: true if new cpucp opcodes are supported. */ struct asic_fixed_properties {struct hw_queue_properties *hw_queues_props;
@@ -785,6 +786,7 @@ struct asic_fixed_properties {u8 set_max_power_on_device_init;u8 supports_user_set_page_size;u8 dma_mask; +u8 supports_advanced_cpucp_rc; };/**
drivers/misc/habanalabs/gaudi2/gaudi2.c +2 -0
@@ -2721,6 +2721,8 @@ static int gaudi2_late_init(struct hl_device *hdev)struct gaudi2_device *gaudi2 = hdev->asic_specific;int rc; + hdev->asic_prop.supports_advanced_cpucp_rc = true; + rc =hl_fw_send_pci_access_msg (hdev,CPUCP_PACKET_ENABLE_PCI_ACCESS , gaudi2->virt_msix_db_dma_addr);if (rc) {
drivers/misc/habanalabs/include/common/cpucp_if.h +16 -1
@@ -824,10 +824,25 @@ enum cpucp_led_index { CPUCP_LED2_INDEX }; +/* +* enum cpucp_packet_rc - Error return code +* @cpucp_packet_success -> in case of success. +* @cpucp_packet_invalid -> this is to support Goya and Gaudi platform. +* @cpucp_packet_fault -> in case of processing error like failing to +* get device binding or semaphore etc. +* @cpucp_packet_invalid_pkt -> when cpucp packet is un-supported. This is +* supported Greco onwards. +* @cpucp_packet_invalid_params -> when checking parameter like length of buffer +* or attribute value etc. Supported Greco onwards. +* @cpucp_packet_rc_max -> It indicates size of enum so should be at last. +*/ enum cpucp_packet_rc { cpucp_packet_success, cpucp_packet_invalid, - cpucp_packet_fault + cpucp_packet_fault, + cpucp_packet_invalid_pkt, + cpucp_packet_invalid_params, + cpucp_packet_rc_max };/*
Signature · 1 line
2.25.1
PATCH 4/9 habanalabs/gaudi2: read F/W security indication after hard reset
In reply to Oded GabbayFrom: Tomer Tayar <[email protected]>
F/W security status might change after every reset.
Add the reading of the preboot status to the hard reset sequence, which among others reads this security indication.
As this preboot status reading includes the waiting for the preboot to be ready, it can be removed from the CPU init which is done in a later stage.
--- drivers/misc/habanalabs/common/device.c | 7 +++++++ drivers/misc/habanalabs/common/firmware_if.c | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/misc/habanalabs/common/device.c +7 -0
@@ -1585,6 +1585,13 @@ int hl_device_reset(struct hl_device *hdev, u32 flags)*/ hdev->disabled = false; +/* F/W security enabled indication might be updated after hard-reset */ +if (hard_reset) { + rc =hl_fw_read_preboot_status (hdev); +if (rc) + goto out_err; + } + rc = hdev->asic_funcs->hw_init (hdev);if (rc) {dev_err (hdev->dev,"failed to initialize the H/W after reset\n" );
drivers/misc/habanalabs/common/firmware_if.c +0 -7
@@ -2509,13 +2509,6 @@ static int hl_fw_dynamic_init_cpu(struct hl_device *hdev,*/ dyn_regs = &fw_loader->dynamic_loader.comm_desc.cpu_dyn_regs; -/* if no preboot loaded indication- wait for preboot */ -if (!(hdev->fw_loader.fw_comp_loaded &FW_TYPE_PREBOOT_CPU )) { - rc =hl_fw_wait_preboot_ready (hdev); -if (rc) -return -EIO ; - } - rc =hl_fw_dynamic_send_protocol_cmd (hdev, fw_loader,COMMS_RST_STATE ,0 , true, fw_loader->cpu_timeout);
Signature · 1 line
2.25.1
PATCH 7/9 habanalabs/gaudi2: free event irq if init fails
In reply to Oded GabbayIn case initialization fails after event irq was requested, we need to release that irq.
--- drivers/misc/habanalabs/gaudi2/gaudi2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/misc/habanalabs/gaudi2/gaudi2.c +5 -1
@@ -3581,7 +3581,7 @@ static int gaudi2_enable_msix(struct hl_device *hdev) rc =gaudi2_dec_enable_msix (hdev);if (rc) {dev_err (hdev->dev,"Failed to enable decoder IRQ" ); - goto free_completion_irq; + goto free_event_irq; } for (i = GAUDI2_IRQ_NUM_USER_FIRST, j = prop->user_dec_intr_count, user_irq_init_cnt = 0;
@@ -3612,6 +3612,10 @@ static int gaudi2_enable_msix(struct hl_device *hdev)gaudi2_dec_disable_msix (hdev,GAUDI2_IRQ_NUM_SHARED_DEC1_ABNRM +1 ); +free_event_irq: + irq =pci_irq_vector (hdev->pdev,GAUDI2_IRQ_NUM_EVENT_QUEUE ); +free_irq (irq, cq); + free_completion_irq: irq =pci_irq_vector (hdev->pdev,GAUDI2_IRQ_NUM_COMPLETION );free_irq (irq, cq);
Signature · 1 line
2.25.1
PATCH 8/9 habanalabs: new notifier events for device state
In reply to Oded GabbayFrom: Tal Cohen <[email protected]>
Add new notifier events that inform several device states. General H/W error raised on device general H/W error occurs. User engine error is raised when a device engine informs of an error.
--- drivers/misc/habanalabs/gaudi/gaudi.c | 39 +++++++++++++++--- drivers/misc/habanalabs/gaudi2/gaudi2.c | 54 ++++++++++++++++++++++++- include/uapi/misc/habanalabs.h | 4 ++ 3 files changed, 91 insertions(+), 6 deletions(-)
drivers/misc/habanalabs/gaudi/gaudi.c +34 -5
@@ -7685,6 +7685,7 @@ static void gaudi_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entr case GAUDI_EVENT_NIC0_CS_DBG_DERR ... GAUDI_EVENT_NIC4_CS_DBG_DERR:gaudi_print_irq_info (hdev, event_type, true);gaudi_handle_ecc_event (hdev, event_type, &eq_entry->ecc_data); + event_mask |=HL_NOTIFIER_EVENT_GENERAL_HW_ERR ; fw_fatal_err_flag =HL_DRV_RESET_FW_FATAL_ERR ; goto reset_device;
@@ -7694,6 +7695,7 @@ static void gaudi_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entr case GAUDI_EVENT_PLL0 ... GAUDI_EVENT_PLL17:gaudi_print_irq_info (hdev, event_type, false); fw_fatal_err_flag =HL_DRV_RESET_FW_FATAL_ERR ; + event_mask |=HL_NOTIFIER_EVENT_GENERAL_HW_ERR ; goto reset_device;case GAUDI_EVENT_HBM0_SPI_0 :
@@ -7705,6 +7707,7 @@ static void gaudi_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entrgaudi_hbm_event_to_dev (event_type), &eq_entry->hbm_ecc_data); fw_fatal_err_flag =HL_DRV_RESET_FW_FATAL_ERR ; + event_mask |=HL_NOTIFIER_EVENT_GENERAL_HW_ERR ; goto reset_device;case GAUDI_EVENT_HBM0_SPI_1 :
@@ -7716,6 +7719,7 @@ static void gaudi_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entrgaudi_hbm_event_to_dev (event_type), &eq_entry->hbm_ecc_data);hl_fw_unmask_irq (hdev, event_type); + event_mask |=HL_NOTIFIER_EVENT_GENERAL_HW_ERR ;break ;case GAUDI_EVENT_TPC0_DEC :
@@ -7730,6 +7734,7 @@ static void gaudi_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entr reset_required =gaudi_tpc_read_interrupts (hdev,tpc_dec_event_to_tpc_id (event_type),"AXI_SLV_DEC_Error" ); + event_mask |=HL_NOTIFIER_EVENT_USER_ENGINE_ERR ;if (reset_required) {dev_err (hdev->dev,"reset required due to %s\n" , gaudi_irq_map_table[event_type].name);
@@ -7738,6 +7743,7 @@ static void gaudi_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entr goto reset_device; }else {hl_fw_unmask_irq (hdev, event_type); + event_mask |=HL_NOTIFIER_EVENT_DEVICE_RESET ; }break ;
@@ -7753,6 +7759,7 @@ static void gaudi_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entr reset_required =gaudi_tpc_read_interrupts (hdev,tpc_krn_event_to_tpc_id (event_type),"KRN_ERR" ); + event_mask |=HL_NOTIFIER_EVENT_USER_ENGINE_ERR ;if (reset_required) {dev_err (hdev->dev,"reset required due to %s\n" , gaudi_irq_map_table[event_type].name);
@@ -7761,6 +7768,7 @@ static void gaudi_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entr goto reset_device; }else {hl_fw_unmask_irq (hdev, event_type); + event_mask |=HL_NOTIFIER_EVENT_DEVICE_RESET ; }break ;
@@ -7789,9 +7797,25 @@ static void gaudi_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entrgaudi_print_irq_info (hdev, event_type, true);gaudi_handle_ecc_event (hdev, event_type, &eq_entry->ecc_data);hl_fw_unmask_irq (hdev, event_type); + event_mask |=HL_NOTIFIER_EVENT_GENERAL_HW_ERR ;break ;case GAUDI_EVENT_PCIE_DEC : +case GAUDI_EVENT_CPU_AXI_SPLITTER : +case GAUDI_EVENT_PSOC_AXI_DEC : +case GAUDI_EVENT_PSOC_PRSTN_FALL : +gaudi_print_irq_info (hdev, event_type, true); +hl_fw_unmask_irq (hdev, event_type); + event_mask |=HL_NOTIFIER_EVENT_GENERAL_HW_ERR ; +break ; + +case GAUDI_EVENT_MMU_PAGE_FAULT : +case GAUDI_EVENT_MMU_WR_PERM : +gaudi_print_irq_info (hdev, event_type, true); +hl_fw_unmask_irq (hdev, event_type); + event_mask |=HL_NOTIFIER_EVENT_USER_ENGINE_ERR ; +break ; +case GAUDI_EVENT_MME0_WBC_RSP :case GAUDI_EVENT_MME0_SBAB0_RSP :case GAUDI_EVENT_MME1_WBC_RSP :
@@ -7800,11 +7824,6 @@ static void gaudi_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entrcase GAUDI_EVENT_MME2_SBAB0_RSP :case GAUDI_EVENT_MME3_WBC_RSP :case GAUDI_EVENT_MME3_SBAB0_RSP : -case GAUDI_EVENT_CPU_AXI_SPLITTER : -case GAUDI_EVENT_PSOC_AXI_DEC : -case GAUDI_EVENT_PSOC_PRSTN_FALL : -case GAUDI_EVENT_MMU_PAGE_FAULT : -case GAUDI_EVENT_MMU_WR_PERM :case GAUDI_EVENT_RAZWI_OR_ADC : case GAUDI_EVENT_MME0_QM ... GAUDI_EVENT_MME2_QM: case GAUDI_EVENT_DMA0_QM ... GAUDI_EVENT_DMA7_QM:
@@ -7824,10 +7843,12 @@ static void gaudi_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entrgaudi_print_irq_info (hdev, event_type, true);gaudi_handle_qman_err (hdev, event_type, &event_mask);hl_fw_unmask_irq (hdev, event_type); + event_mask |= (HL_NOTIFIER_EVENT_USER_ENGINE_ERR |HL_NOTIFIER_EVENT_DEVICE_RESET );break ;case GAUDI_EVENT_RAZWI_OR_ADC_SW :gaudi_print_irq_info (hdev, event_type, true); + event_mask |=HL_NOTIFIER_EVENT_USER_ENGINE_ERR ; goto reset_device;case GAUDI_EVENT_TPC0_BMON_SPMU :
@@ -7841,11 +7862,13 @@ static void gaudi_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entr case GAUDI_EVENT_DMA_BM_CH0 ... GAUDI_EVENT_DMA_BM_CH7:gaudi_print_irq_info (hdev, event_type, false);hl_fw_unmask_irq (hdev, event_type); + event_mask |=HL_NOTIFIER_EVENT_USER_ENGINE_ERR ;break ; case GAUDI_EVENT_NIC_SEI_0 ... GAUDI_EVENT_NIC_SEI_4:gaudi_print_nic_axi_irq_info (hdev, event_type, &data);hl_fw_unmask_irq (hdev, event_type); + event_mask |=HL_NOTIFIER_EVENT_USER_ENGINE_ERR ;break ; case GAUDI_EVENT_DMA_IF_SEI_0 ... GAUDI_EVENT_DMA_IF_SEI_3:
@@ -7853,6 +7876,7 @@ static void gaudi_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entrgaudi_print_sm_sei_info (hdev, event_type, &eq_entry->sm_sei_data); rc =hl_state_dump (hdev); + event_mask |=HL_NOTIFIER_EVENT_USER_ENGINE_ERR ;if (rc)dev_err (hdev->dev,"Error during system state dump %d\n" , rc);
@@ -7863,6 +7887,7 @@ static void gaudi_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entrbreak ; case GAUDI_EVENT_FIX_POWER_ENV_S ... GAUDI_EVENT_FIX_THERMAL_ENV_E: + event_mask |=HL_NOTIFIER_EVENT_USER_ENGINE_ERR ;gaudi_print_clk_change_info (hdev, event_type);hl_fw_unmask_irq (hdev, event_type);break ;
@@ -7872,20 +7897,24 @@ static void gaudi_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entrdev_err (hdev->dev,"Received high temp H/W interrupt %d (cause %d)\n" , event_type, cause); + event_mask |=HL_NOTIFIER_EVENT_USER_ENGINE_ERR ;break ;case GAUDI_EVENT_DEV_RESET_REQ :gaudi_print_irq_info (hdev, event_type, false); + event_mask |=HL_NOTIFIER_EVENT_GENERAL_HW_ERR ; goto reset_device;case GAUDI_EVENT_PKT_QUEUE_OUT_SYNC :gaudi_print_irq_info (hdev, event_type, false);gaudi_print_out_of_sync_info (hdev, &eq_entry->pkt_sync_err); + event_mask |=HL_NOTIFIER_EVENT_GENERAL_HW_ERR ; goto reset_device;case GAUDI_EVENT_FW_ALIVE_S :gaudi_print_irq_info (hdev, event_type, false);gaudi_print_fw_alive_info (hdev, &eq_entry->fw_alive); + event_mask |=HL_NOTIFIER_EVENT_GENERAL_HW_ERR ; goto reset_device;default :
drivers/misc/habanalabs/gaudi2/gaudi2.c +53 -1
283 lines not on this page · raw message
include/uapi/misc/habanalabs.h +4 -0
@@ -715,12 +715,16 @@ enum hl_server_type {* HL_NOTIFIER_EVENT_DEVICE_RESET - Indicates device requires a reset * HL_NOTIFIER_EVENT_CS_TIMEOUT - Indicates CS timeout error * HL_NOTIFIER_EVENT_DEVICE_UNAVAILABLE - Indicates device is unavailable +* HL_NOTIFIER_EVENT_USER_ENGINE_ERR - Indicates device engine in error state +* HL_NOTIFIER_EVENT_GENERAL_HW_ERR - Indicates device HW error */ #define HL_NOTIFIER_EVENT_TPC_ASSERT (1ULL << 0)#define HL_NOTIFIER_EVENT_UNDEFINED_OPCODE (1ULL << 1)#define HL_NOTIFIER_EVENT_DEVICE_RESET (1ULL << 2)#define HL_NOTIFIER_EVENT_CS_TIMEOUT (1ULL << 3)#define HL_NOTIFIER_EVENT_DEVICE_UNAVAILABLE (1ULL << 4) +#define HL_NOTIFIER_EVENT_USER_ENGINE_ERR (1ULL << 5) +#define HL_NOTIFIER_EVENT_GENERAL_HW_ERR (1ULL << 6)/* Opcode for management ioctl *
Signature · 1 line
2.25.1
PATCH 1/9 habanalabs: send device activity in a proper context
From: Ofir Bitton <[email protected]>
'Device activity open packet' should be sent outside of mutex as there is no real necessity for a lock.
In addition 'device activity close packet' should be sent upon an actual release of the device.
--- drivers/misc/habanalabs/common/device.c | 4 ++-- drivers/misc/habanalabs/common/habanalabs_drv.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/misc/habanalabs/common/device.c +2 -2
@@ -385,6 +385,8 @@ static void hpriv_release(struct kref *ref) hdev = hpriv->hdev; + hdev->asic_funcs->send_device_activity (hdev, false); +put_pid (hpriv->taskpid);hl_debugfs_remove_file (hpriv);
@@ -492,8 +494,6 @@ static int hl_device_release(struct inode *inode, struct file *filp) hdev->last_open_session_duration_jif = jiffies - hdev->last_successful_open_jif; - hdev->asic_funcs->send_device_activity (hdev, false); -return 0 ; }
drivers/misc/habanalabs/common/habanalabs_drv.c +2 -2
@@ -204,11 +204,11 @@ int hl_device_open(struct inode *inode, struct file *filp) goto out_err; } - rc = hdev->asic_funcs->send_device_activity (hdev, true); -list_add (&hpriv->dev_node, &hdev->fpriv_list);mutex_unlock (&hdev->fpriv_list_lock); + hdev->asic_funcs->send_device_activity (hdev, true); +hl_debugfs_add_file (hpriv);atomic_set (&hdev->last_error.cs_timeout.write_enable,1 );
Signature · 1 line
2.25.1
PATCH 3/9 habanalabs/gaudi: rename mme cfg error response print
From: Ofir Bitton <[email protected]>
Current description is misleading hence we rename it to a more suitable error description.
--- drivers/misc/habanalabs/gaudi2/gaudi2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/habanalabs/gaudi2/gaudi2.c +1 -1
@@ -616,7 +616,7 @@ static const char * const guadi2_mme_error_cause[GAUDI2_NUM_OF_MME_ERR_CAUSE] ="qman_axi_err" ,"wap sei (wbc axi err)" ,"arc sei" , -"mme_cfg_unalign_addr" , +"cfg access error" ,"qm_sw_err" ,"sbte_dbg_intr_0" , "sbte_dbg_intr_1",
Signature · 1 line
2.25.1
PATCH 2/9 habanalabs: fix possible hole in device va
In reply to Oded GabbayFrom: farah kassabri <[email protected]>
cb_map_mem() uses gen_pool_alloc() to get virtual address for mapping a CB.
The mapping is done in chunks of page size, so if the CB size is larger, it is possible that the allocated virtual addresses won't be consecutive.
User retrieves this device VA which returns the virtual address in the first va_block. If there is a "hole" in the virtual addresses, user can configure a HW block with a bad device VA.
--- .../misc/habanalabs/common/command_buffer.c | 99 +++---------------- drivers/misc/habanalabs/common/habanalabs.h | 7 +- 2 files changed, 20 insertions(+), 86 deletions(-)
drivers/misc/habanalabs/common/command_buffer.c +16 -83
@@ -18,11 +18,7 @@ static int cb_map_mem(struct hl_ctx *ctx, struct hl_cb *cb) {struct hl_device *hdev = ctx->hdev;struct asic_fixed_properties *prop = &hdev->asic_prop; -struct hl_vm_va_block *va_block, *tmp; -dma_addr_t bus_addr; -u64 virt_addr;u32 page_size = prop->pmmu.page_size; -s32 offset;int rc;if (!hdev->supports_cb_mapping) {
@@ -37,106 +33,45 @@ static int cb_map_mem(struct hl_ctx *ctx, struct hl_cb *cb)return -EINVAL ; } -INIT_LIST_HEAD (&cb->va_block_list); - -for (bus_addr = cb->bus_address; - bus_addr < cb->bus_address + cb->size; - bus_addr += page_size) { - - virt_addr = (u64 )gen_pool_alloc (ctx->cb_va_pool, page_size); -if (!virt_addr) { -dev_err (hdev->dev, -"Failed to allocate device virtual address for CB\n" ); - rc = -ENOMEM ; - goto err_va_pool_free; - } +if (cb->is_mmu_mapped) +return 0 ; - va_block =kzalloc (sizeof (*va_block),GFP_KERNEL ); -if (!va_block) { - rc = -ENOMEM ; -gen_pool_free (ctx->cb_va_pool, virt_addr, page_size); - goto err_va_pool_free; - } + cb->roundup_size =roundup (cb->size, page_size); - va_block->start = virt_addr; - va_block->end = virt_addr + page_size -1 ; - va_block->size = page_size; -list_add_tail (&va_block->node, &cb->va_block_list); + cb->virtual_addr = (u64 )gen_pool_alloc (ctx->cb_va_pool, cb->roundup_size); +if (!cb->virtual_addr) { +dev_err (hdev->dev,"Failed to allocate device virtual address for CB\n" ); +return -ENOMEM ; }mutex_lock (&ctx->mmu_lock); - - bus_addr = cb->bus_address; - offset =0 ; -list_for_each_entry (va_block, &cb->va_block_list, node) { - rc =hl_mmu_map_page (ctx, va_block->start, bus_addr, - va_block->size,list_is_last (&va_block->node, - &cb->va_block_list)); -if (rc) { -dev_err (hdev->dev,"Failed to map VA %#llx to CB\n" , - va_block->start); - goto err_va_umap; - } - - bus_addr += va_block->size; - offset += va_block->size; + rc =hl_mmu_map_contiguous (ctx, cb->virtual_addr, cb->bus_address, cb->roundup_size); +if (rc) { +dev_err (hdev->dev,"Failed to map VA %#llx to CB\n" , cb->virtual_addr); + goto err_va_umap; } - rc =hl_mmu_invalidate_cache (hdev, false,MMU_OP_USERPTR |MMU_OP_SKIP_LOW_CACHE_INV ); -mutex_unlock (&ctx->mmu_lock); cb->is_mmu_mapped = true; -return rc; err_va_umap: -list_for_each_entry (va_block, &cb->va_block_list, node) { -if (offset <=0 ) -break ; -hl_mmu_unmap_page (ctx, va_block->start, va_block->size, - offset <= va_block->size); - offset -= va_block->size; - } - - rc =hl_mmu_invalidate_cache (hdev, true,MMU_OP_USERPTR ); -mutex_unlock (&ctx->mmu_lock); - -err_va_pool_free: -list_for_each_entry_safe (va_block, tmp, &cb->va_block_list, node) { -gen_pool_free (ctx->cb_va_pool, va_block->start, va_block->size); -list_del (&va_block->node); -kfree (va_block); - } - +gen_pool_free (ctx->cb_va_pool, cb->virtual_addr, cb->roundup_size);return rc; }static void cb_unmap_mem (struct hl_ctx *ctx,struct hl_cb *cb) {struct hl_device *hdev = ctx->hdev; -struct hl_vm_va_block *va_block, *tmp;mutex_lock (&ctx->mmu_lock); - -list_for_each_entry (va_block, &cb->va_block_list, node) -if (hl_mmu_unmap_page (ctx, va_block->start, va_block->size, -list_is_last (&va_block->node, - &cb->va_block_list))) -dev_warn_ratelimited (hdev->dev, -"Failed to unmap CB's va 0x%llx\n" , - va_block->start); - +hl_mmu_unmap_contiguous (ctx, cb->virtual_addr, cb->roundup_size);hl_mmu_invalidate_cache (hdev, true,MMU_OP_USERPTR ); -mutex_unlock (&ctx->mmu_lock); -list_for_each_entry_safe (va_block, tmp, &cb->va_block_list, node) { -gen_pool_free (ctx->cb_va_pool, va_block->start, va_block->size); -list_del (&va_block->node); -kfree (va_block); - } +gen_pool_free (ctx->cb_va_pool, cb->virtual_addr, cb->roundup_size); }static void cb_fini (struct hl_device *hdev,struct hl_cb *cb)
@@ -378,7 +313,6 @@ int hl_cb_destroy(struct hl_mem_mgr *mmg, u64 cb_handle)static int hl_cb_info (struct hl_mem_mgr *mmg,u64 handle,u32 flags,u32 *usage_cnt,u64 *device_va) { -struct hl_vm_va_block *va_block;struct hl_cb *cb;int rc =0 ;
@@ -390,9 +324,8 @@ static int hl_cb_info(struct hl_mem_mgr *mmg, }if (flags &HL_CB_FLAGS_GET_DEVICE_VA ) { - va_block = list_first_entry(&cb->va_block_list, struct hl_vm_va_block, node); -if (va_block) { - *device_va = va_block->start; +if (cb->is_mmu_mapped) { + *device_va = cb->virtual_addr; }else {dev_err (mmg->dev,"CB is not mapped to the device's MMU\n" ); rc = -EINVAL ;
drivers/misc/habanalabs/common/habanalabs.h +4 -3
@@ -917,11 +917,11 @@ struct hl_mmap_mem_buf {* @buf: back pointer to the parent mappable memory buffer * @debugfs_list: node in debugfs list of command buffers. * @pool_list: node in pool list of command buffers. -* @va_block_list: list of virtual addresses blocks of the CB if it is mapped to -* the device's MMU. * @kernel_address: Holds the CB's kernel virtual address. +* @virtual_addr: Holds the CB's virtual address. * @bus_address: Holds the CB's DMA address. * @size: holds the CB's size. +* @roundup_size: holds the cb size after roundup to page size. * @cs_cnt: holds number of CS that this CB participates in. * @is_pool: true if CB was acquired from the pool, false otherwise. * @is_internal: internally allocated
@@ -933,10 +933,11 @@ struct hl_cb {struct hl_mmap_mem_buf *buf;struct list_head debugfs_list;struct list_head pool_list; -struct list_head va_block_list;void *kernel_address; +u64 virtual_addr;dma_addr_t bus_address;u32 size; +u32 roundup_size;atomic_t cs_cnt;u8 is_pool;u8 is_internal;
Signature · 1 line
2.25.1
PATCH 9/9 habanalabs: MMU invalidation h/w is per device
In reply to Oded GabbayThe code used the mmu mutex to protect access to the context's page tables and invalidation of the MMU cache. Because pgt are per context, the mmu mutex was a member of the context object.
The problem is that the device has a single MMU invalidation h/w (per MMU). Therefore, the mmu mutex should not be a property of the context but a property of the device.
--- .../misc/habanalabs/common/command_buffer.c | 10 ++++----- drivers/misc/habanalabs/common/habanalabs.h | 10 ++++++--- drivers/misc/habanalabs/common/memory.c | 14 ++++++------ drivers/misc/habanalabs/common/mmu/mmu.c | 22 +++++++++---------- drivers/misc/habanalabs/gaudi/gaudi.c | 8 +++---- drivers/misc/habanalabs/gaudi2/gaudi2.c | 16 +++++++------- 6 files changed, 42 insertions(+), 38 deletions(-)
drivers/misc/habanalabs/common/command_buffer.c +5 -5
@@ -44,20 +44,20 @@ static int cb_map_mem(struct hl_ctx *ctx, struct hl_cb *cb)return -ENOMEM ; } -mutex_lock (&ctx->mmu_lock); +mutex_lock (&hdev->mmu_lock); rc =hl_mmu_map_contiguous (ctx, cb->virtual_addr, cb->bus_address, cb->roundup_size);if (rc) {dev_err (hdev->dev,"Failed to map VA %#llx to CB\n" , cb->virtual_addr); goto err_va_umap; } rc =hl_mmu_invalidate_cache (hdev, false,MMU_OP_USERPTR |MMU_OP_SKIP_LOW_CACHE_INV ); -mutex_unlock (&ctx->mmu_lock); +mutex_unlock (&hdev->mmu_lock); cb->is_mmu_mapped = true;return rc; err_va_umap: -mutex_unlock (&ctx->mmu_lock); +mutex_unlock (&hdev->mmu_lock);gen_pool_free (ctx->cb_va_pool, cb->virtual_addr, cb->roundup_size);return rc; }
@@ -66,10 +66,10 @@ static void cb_unmap_mem(struct hl_ctx *ctx, struct hl_cb *cb) {struct hl_device *hdev = ctx->hdev; -mutex_lock (&ctx->mmu_lock); +mutex_lock (&hdev->mmu_lock);hl_mmu_unmap_contiguous (ctx, cb->virtual_addr, cb->roundup_size);hl_mmu_invalidate_cache (hdev, true,MMU_OP_USERPTR ); -mutex_unlock (&ctx->mmu_lock); +mutex_unlock (&hdev->mmu_lock);gen_pool_free (ctx->cb_va_pool, cb->virtual_addr, cb->roundup_size); }
drivers/misc/habanalabs/common/habanalabs.h +7 -3
@@ -1793,8 +1793,6 @@ struct hl_cs_outcome_store {* command submissions for a long time after CS id wraparound. * @va_range: holds available virtual addresses for host and dram mappings. * @mem_hash_lock: protects the mem_hash. -* @mmu_lock: protects the MMU page tables. Any change to the PGT, modifying the -* MMU hash or walking the PGT requires talking this lock. * @hw_block_list_lock: protects the HW block memory list. * @debugfs_list: node in debugfs list of contexts. * @hw_block_mem_list: list of HW block virtual mapped addresses.
@@ -1831,7 +1829,6 @@ struct hl_ctx {struct hl_cs_outcome_store outcome_store;struct hl_va_range *va_range[HL_VA_RANGE_TYPE_MAX ];struct mutex mem_hash_lock; -struct mutex mmu_lock;struct mutex hw_block_list_lock;struct list_head debugfs_list;struct list_head hw_block_mem_list;
@@ -3079,6 +3076,12 @@ struct hl_reset_info {* @asid_mutex: protects asid_bitmap. * @send_cpu_message_lock: enforces only one message in Host <-> CPU-CP queue. * @debug_lock: protects critical section of setting debug mode for device +* @mmu_lock: protects the MMU page tables and invalidation h/w. Although the +* page tables are per context, the invalidation h/w is per MMU. +* Therefore, we can't allow multiple contexts (we only have two, +* user and kernel) to access the invalidation h/w at the same time. +* In addition, any change to the PGT, modifying the MMU hash or +* walking the PGT requires talking this lock. * @asic_prop: ASIC specific immutable properties. * @asic_funcs: ASIC specific functions. * @asic_specific: ASIC specific information to use only from ASIC files.
@@ -3244,6 +3247,7 @@ struct hl_device {struct mutex asid_mutex;struct mutex send_cpu_message_lock;struct mutex debug_lock; +struct mutex mmu_lock;struct asic_fixed_properties asic_prop;const struct hl_asic_funcs *asic_funcs;void *asic_specific;
drivers/misc/habanalabs/common/memory.c +7 -7
@@ -1210,18 +1210,18 @@ static int map_device_va(struct hl_ctx *ctx, struct hl_mem_in *args, u64 *device goto va_block_err; } -mutex_lock (&ctx->mmu_lock); +mutex_lock (&hdev->mmu_lock); rc =map_phys_pg_pack (ctx, ret_vaddr, phys_pg_pack);if (rc) {dev_err (hdev->dev,"mapping page pack failed for handle %u\n" , handle); -mutex_unlock (&ctx->mmu_lock); +mutex_unlock (&hdev->mmu_lock); goto map_err; } rc =hl_mmu_invalidate_cache_range (hdev, false, *vm_type |MMU_OP_SKIP_LOW_CACHE_INV , ctx->asid, ret_vaddr, phys_pg_pack->total_size); -mutex_unlock (&ctx->mmu_lock); +mutex_unlock (&hdev->mmu_lock);if (rc) goto map_err;
@@ -1362,7 +1362,7 @@ static int unmap_device_va(struct hl_ctx *ctx, struct hl_mem_in *args,else vaddr &= ~(((u64 ) phys_pg_pack->page_size) -1 ); -mutex_lock (&ctx->mmu_lock); +mutex_lock (&hdev->mmu_lock);unmap_phys_pg_pack (ctx, vaddr, phys_pg_pack);
@@ -1375,7 +1375,7 @@ static int unmap_device_va(struct hl_ctx *ctx, struct hl_mem_in *args, rc =hl_mmu_invalidate_cache_range (hdev, true, *vm_type, ctx->asid, vaddr, phys_pg_pack->total_size); -mutex_unlock (&ctx->mmu_lock); +mutex_unlock (&hdev->mmu_lock);/* * If the context is closing we don't need to check for the MMU cache
@@ -2771,13 +2771,13 @@ void hl_vm_ctx_fini(struct hl_ctx *ctx)unmap_device_va (ctx, &args, true); } -mutex_lock (&ctx->mmu_lock); +mutex_lock (&hdev->mmu_lock);/* invalidate the cache once after the unmapping loop */ hl_mmu_invalidate_cache (hdev, true,MMU_OP_USERPTR );hl_mmu_invalidate_cache (hdev, true,MMU_OP_PHYS_PACK ); -mutex_unlock (&ctx->mmu_lock); +mutex_unlock (&hdev->mmu_lock);INIT_LIST_HEAD (&free_list);
drivers/misc/habanalabs/common/mmu/mmu.c +11 -11
@@ -47,6 +47,8 @@ int hl_mmu_init(struct hl_device *hdev)if (!hdev->mmu_enable)return 0 ; +mutex_init (&hdev->mmu_lock); +if (hdev->mmu_func[MMU_DR_PGT ].init !=NULL ) { rc = hdev->mmu_func[MMU_DR_PGT ].init (hdev);if (rc)
@@ -88,6 +90,8 @@ void hl_mmu_fini(struct hl_device *hdev)if (hdev->mmu_func[MMU_HR_PGT ].fini !=NULL ) hdev->mmu_func[MMU_HR_PGT ].fini (hdev); + +mutex_destroy (&hdev->mmu_lock); }/**
@@ -106,8 +110,6 @@ int hl_mmu_ctx_init(struct hl_ctx *ctx)if (!hdev->mmu_enable)return 0 ; -mutex_init (&ctx->mmu_lock); -if (hdev->mmu_func[MMU_DR_PGT ].ctx_init !=NULL ) { rc = hdev->mmu_func[MMU_DR_PGT ].ctx_init (ctx);if (rc)
@@ -151,8 +153,6 @@ void hl_mmu_ctx_fini(struct hl_ctx *ctx)if (hdev->mmu_func[MMU_HR_PGT ].ctx_fini !=NULL ) hdev->mmu_func[MMU_HR_PGT ].ctx_fini (ctx); - -mutex_destroy (&ctx->mmu_lock); }/*
@@ -609,9 +609,9 @@ int hl_mmu_get_tlb_info(struct hl_ctx *ctx, u64 virt_addr, pgt_residency = mmu_prop->host_resident ?MMU_HR_PGT :MMU_DR_PGT ; mmu_funcs =hl_mmu_get_funcs (hdev, pgt_residency, is_dram_addr); -mutex_lock (&ctx->mmu_lock); +mutex_lock (&hdev->mmu_lock); rc = mmu_funcs->get_tlb_info (ctx, virt_addr, hops); -mutex_unlock (&ctx->mmu_lock); +mutex_unlock (&hdev->mmu_lock);if (rc)return rc;
@@ -701,16 +701,16 @@ static void hl_mmu_prefetch_work_function(struct work_struct *work) { struct hl_prefetch_work *pfw = container_of(work, struct hl_prefetch_work, pf_work);struct hl_ctx *ctx = pfw->ctx; +struct hl_device *hdev = ctx->hdev; -if (!hl_device_operational (ctx->hdev,NULL )) +if (!hl_device_operational (hdev,NULL )) goto put_ctx; -mutex_lock (&ctx->mmu_lock); +mutex_lock (&hdev->mmu_lock); - ctx->hdev->asic_funcs->mmu_prefetch_cache_range (ctx, pfw->flags, pfw->asid, - pfw->va, pfw->size); + hdev->asic_funcs->mmu_prefetch_cache_range (ctx, pfw->flags, pfw->asid, pfw->va, pfw->size); -mutex_unlock (&ctx->mmu_lock); +mutex_unlock (&hdev->mmu_lock); put_ctx:/*
drivers/misc/habanalabs/gaudi/gaudi.c +4 -4
@@ -8405,13 +8405,13 @@ static int gaudi_internal_cb_pool_init(struct hl_device *hdev, goto destroy_internal_cb_pool; } -mutex_lock (&ctx->mmu_lock); +mutex_lock (&hdev->mmu_lock); rc =hl_mmu_map_contiguous (ctx, hdev->internal_cb_va_base, hdev->internal_cb_pool_dma_addr,HOST_SPACE_INTERNAL_CB_SZ );hl_mmu_invalidate_cache (hdev, false,MMU_OP_USERPTR ); -mutex_unlock (&ctx->mmu_lock); +mutex_unlock (&hdev->mmu_lock);if (rc) goto unreserve_internal_cb_pool;
@@ -8438,13 +8438,13 @@ static void gaudi_internal_cb_pool_fini(struct hl_device *hdev,if (!(gaudi->hw_cap_initialized &HW_CAP_MMU ))return ; -mutex_lock (&ctx->mmu_lock); +mutex_lock (&hdev->mmu_lock);hl_mmu_unmap_contiguous (ctx, hdev->internal_cb_va_base,HOST_SPACE_INTERNAL_CB_SZ );hl_unreserve_va_block (hdev, ctx, hdev->internal_cb_va_base,HOST_SPACE_INTERNAL_CB_SZ );hl_mmu_invalidate_cache (hdev, true,MMU_OP_USERPTR ); -mutex_unlock (&ctx->mmu_lock); +mutex_unlock (&hdev->mmu_lock);gen_pool_destroy (hdev->internal_cb_pool);
drivers/misc/habanalabs/gaudi2/gaudi2.c +8 -8
@@ -9302,12 +9302,12 @@ static int gaudi2_debugfs_read_dma(struct hl_device *hdev, u64 addr, u32 size, v }/* Create mapping on asic side */ -mutex_lock (&ctx->mmu_lock); +mutex_lock (&hdev->mmu_lock); rc =hl_mmu_map_contiguous (ctx, reserved_va_base, host_mem_dma_addr,SZ_2M );hl_mmu_invalidate_cache_range (hdev, false,MMU_OP_USERPTR |MMU_OP_SKIP_LOW_CACHE_INV , ctx->asid, reserved_va_base,SZ_2M ); -mutex_unlock (&ctx->mmu_lock); +mutex_unlock (&hdev->mmu_lock);if (rc) {dev_err (hdev->dev,"Failed to create mapping on asic mmu\n" ); goto unreserve_va;
@@ -9340,11 +9340,11 @@ static int gaudi2_debugfs_read_dma(struct hl_device *hdev, u64 addr, u32 size, vgaudi2_kdma_set_mmbp_asid (hdev, true,HL_KERNEL_ASID_ID ); -mutex_lock (&ctx->mmu_lock); +mutex_lock (&hdev->mmu_lock);hl_mmu_unmap_contiguous (ctx, reserved_va_base,SZ_2M );hl_mmu_invalidate_cache_range (hdev, false,MMU_OP_USERPTR , ctx->asid, reserved_va_base,SZ_2M ); -mutex_unlock (&ctx->mmu_lock); +mutex_unlock (&hdev->mmu_lock); unreserve_va:hl_unreserve_va_block (hdev, ctx, reserved_va_base,SZ_2M ); free_data_buffer:
@@ -9397,11 +9397,11 @@ static int gaudi2_internal_cb_pool_init(struct hl_device *hdev, struct hl_ctx *c goto destroy_internal_cb_pool; } -mutex_lock (&ctx->mmu_lock); +mutex_lock (&hdev->mmu_lock); rc =hl_mmu_map_contiguous (ctx, hdev->internal_cb_va_base, hdev->internal_cb_pool_dma_addr,HOST_SPACE_INTERNAL_CB_SZ );hl_mmu_invalidate_cache (hdev, false,MMU_OP_USERPTR ); -mutex_unlock (&ctx->mmu_lock); +mutex_unlock (&hdev->mmu_lock);if (rc) goto unreserve_internal_cb_pool;
@@ -9426,11 +9426,11 @@ static void gaudi2_internal_cb_pool_fini(struct hl_device *hdev, struct hl_ctx *if (!(gaudi2->hw_cap_initialized &HW_CAP_PMMU ))return ; -mutex_lock (&ctx->mmu_lock); +mutex_lock (&hdev->mmu_lock);hl_mmu_unmap_contiguous (ctx, hdev->internal_cb_va_base,HOST_SPACE_INTERNAL_CB_SZ );hl_unreserve_va_block (hdev, ctx, hdev->internal_cb_va_base,HOST_SPACE_INTERNAL_CB_SZ );hl_mmu_invalidate_cache (hdev, true,MMU_OP_USERPTR ); -mutex_unlock (&ctx->mmu_lock); +mutex_unlock (&hdev->mmu_lock);gen_pool_destroy (hdev->internal_cb_pool);
Signature · 1 line
2.25.1
PATCH 6/9 habanalabs: fix resetting the DRAM BAR
In reply to Oded GabbayFrom: Ohad Sharabi <[email protected]>
Current code does not takes into account the new DRAM region base and so calculated address is wrong and can lead to crush.
--- drivers/misc/habanalabs/common/device.c | 41 +++++++++++++------------ 1 file changed, 22 insertions(+), 19 deletions(-)
drivers/misc/habanalabs/common/device.c +22 -19
@@ -28,8 +28,9 @@ enum dma_alloc_type {/* * hl_set_dram_bar- sets the bar to allow later access to address * -* @hdev: pointer to habanalabs device structure +* @hdev: pointer to habanalabs device structure. * @addr: the address the caller wants to access. +* @region: the PCI region. * * @return: the old BAR base address on success, U64_MAX for failure. * The caller should set it back to the old address after use.
@@ -39,10 +40,10 @@ enum dma_alloc_type {* This function can be called also if the bar doesn't need to be set, * in that case it just won't change the base. */ -static uint64_t hl_set_dram_bar (struct hl_device *hdev,u64 addr) +static u64 hl_set_dram_bar (struct hl_device *hdev,u64 addr,struct pci_mem_region *region) {struct asic_fixed_properties *prop = &hdev->asic_prop; -u64 bar_base_addr; +u64 bar_base_addr, old_base;if (is_power_of_2 (prop->dram_pci_bar_size)) bar_base_addr = addr & ~(prop->dram_pci_bar_size -0x1ull );
@@ -50,51 +51,53 @@ static uint64_t hl_set_dram_bar(struct hl_device *hdev, u64 addr) bar_base_addr =DIV_ROUND_DOWN_ULL (addr, prop->dram_pci_bar_size) * prop->dram_pci_bar_size; -return hdev->asic_funcs->set_dram_bar_base (hdev, bar_base_addr); -} + old_base = hdev->asic_funcs->set_dram_bar_base (hdev, bar_base_addr); +/* in case of success we need to update the new BAR base */ +if (old_base !=U64_MAX ) + region->region_base = bar_base_addr; + +return old_base; +}static int hl_access_sram_dram_region (struct hl_device *hdev,u64 addr,u64 *val,enum debugfs_access_type acc_type,enum pci_region region_type) {struct pci_mem_region *region = &hdev->pci_mem_region[region_type]; +void __iomem *acc_addr;u64 old_base =0 , rc;if (region_type ==PCI_REGION_DRAM ) { - old_base =hl_set_dram_bar (hdev, addr); + old_base =hl_set_dram_bar (hdev, addr, region);if (old_base ==U64_MAX )return -EIO ; } + acc_addr = hdev->pcie_bar[region->bar_id] + addr - region->region_base + + region->offset_in_bar;switch (acc_type) {case DEBUGFS_READ8 : - *val =readb (hdev->pcie_bar[region->bar_id] + - addr - region->region_base + region->offset_in_bar); + *val =readb (acc_addr);break ;case DEBUGFS_WRITE8 : -writeb (*val, hdev->pcie_bar[region->bar_id] + - addr - region->region_base + region->offset_in_bar); +writeb (*val, acc_addr);break ;case DEBUGFS_READ32 : - *val =readl (hdev->pcie_bar[region->bar_id] + - addr - region->region_base + region->offset_in_bar); + *val =readl (acc_addr);break ;case DEBUGFS_WRITE32 : -writel (*val, hdev->pcie_bar[region->bar_id] + - addr - region->region_base + region->offset_in_bar); +writel (*val, acc_addr);break ;case DEBUGFS_READ64 : - *val =readq (hdev->pcie_bar[region->bar_id] + - addr - region->region_base + region->offset_in_bar); + *val =readq (acc_addr);break ;case DEBUGFS_WRITE64 : -writeq (*val, hdev->pcie_bar[region->bar_id] + - addr - region->region_base + region->offset_in_bar); +writeq (*val, acc_addr);break ; }if (region_type ==PCI_REGION_DRAM ) { - rc =hl_set_dram_bar (hdev, old_base); + rc =hl_set_dram_bar (hdev, old_base, region);if (rc ==U64_MAX )return -EIO ; }
Signature · 1 line
2.25.1