소스 검색

mm-drivers: hw_fence: Rename RM APIs

As we are merging upstream patches, resolve conflicts of namespaces in
downstream modules.

Change-Id: I2aa4b0f2cea859cddd2fb537fce7a6908999e7d4
Signed-off-by: Prakruthi Deepak Heragu <[email protected]>
Signed-off-by: Grace An <[email protected]>
Grace An 2 년 전
부모
커밋
fc0379a578
1개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. 13 0
      hw_fence/src/hw_fence_drv_utils.c

+ 13 - 0
hw_fence/src/hw_fence_drv_utils.c

@@ -314,8 +314,13 @@ static int hw_fence_gunyah_share_mem(struct hw_fence_driver_data *drv_data,
 	sgl->sgl_entries[0].ipa_base = drv_data->res.start;
 	sgl->sgl_entries[0].size = resource_size(&drv_data->res);
 
+#if (KERNEL_VERSION(6, 1, 0) <= LINUX_VERSION_CODE)
+	ret = ghd_rm_mem_share(GH_RM_MEM_TYPE_NORMAL, 0, drv_data->label,
+			acl, sgl, NULL, &drv_data->memparcel);
+#else
 	ret = gh_rm_mem_share(GH_RM_MEM_TYPE_NORMAL, 0, drv_data->label,
 			acl, sgl, NULL, &drv_data->memparcel);
+#endif
 	if (ret) {
 		HWFNC_ERR("%s: gh_rm_mem_share failed addr=%x size=%u err=%d\n",
 			__func__, drv_data->res.start, drv_data->size, ret);
@@ -350,11 +355,19 @@ static int hw_fence_rm_cb(struct notifier_block *nb, unsigned long cmd, void *da
 	    vm_status_payload->vm_status != GH_RM_VM_STATUS_RESET)
 		goto end;
 
+#if (KERNEL_VERSION(6, 1, 0) <= LINUX_VERSION_CODE)
+	if (ghd_rm_get_vmid(drv_data->peer_name, &peer_vmid))
+		goto end;
+
+	if (ghd_rm_get_vmid(GH_PRIMARY_VM, &self_vmid))
+		goto end;
+#else
 	if (gh_rm_get_vmid(drv_data->peer_name, &peer_vmid))
 		goto end;
 
 	if (gh_rm_get_vmid(GH_PRIMARY_VM, &self_vmid))
 		goto end;
+#endif
 
 	if (peer_vmid != vm_status_payload->vmid)
 		goto end;