@@ -875,19 +875,23 @@ int acl_kernel_if_update(const acl_device_def_autodiscovery_t &devdef,
875
875
kern->accel_csr = (acl_kernel_if_addr_range *)acl_malloc (
876
876
kern->num_accel * sizeof (acl_kernel_if_addr_range));
877
877
if (!(kern->accel_csr )) {
878
- ACL_KERNEL_IF_DEBUG_MSG (kern, " Failed to allocate memory for kernel csr.\n " );
878
+ ACL_KERNEL_IF_DEBUG_MSG (kern,
879
+ " Failed to allocate memory for kernel csr.\n " );
879
880
return 1 ;
880
881
}
881
882
kern->accel_perf_mon = (acl_kernel_if_addr_range *)acl_malloc (
882
883
kern->num_accel * sizeof (acl_kernel_if_addr_range));
883
884
if (!(kern->accel_perf_mon )) {
884
- ACL_KERNEL_IF_DEBUG_MSG (kern, " Failed to allocate memory for kernel performance monitor.\n " );
885
+ ACL_KERNEL_IF_DEBUG_MSG (
886
+ kern, " Failed to allocate memory for kernel performance monitor.\n " );
885
887
return 1 ;
886
888
}
887
889
kern->accel_num_printfs =
888
890
(unsigned int *)acl_malloc (kern->num_accel * sizeof (unsigned int ));
889
891
if (!(kern->accel_num_printfs )) {
890
- ACL_KERNEL_IF_DEBUG_MSG (kern, " Failed to allocate memory for kernel number of printf tracker.\n " );
892
+ ACL_KERNEL_IF_DEBUG_MSG (
893
+ kern,
894
+ " Failed to allocate memory for kernel number of printf tracker.\n " );
891
895
return 1 ;
892
896
}
893
897
@@ -959,27 +963,32 @@ int acl_kernel_if_update(const acl_device_def_autodiscovery_t &devdef,
959
963
kern->accel_job_ids =
960
964
(int volatile **)acl_malloc (kern->num_accel * sizeof (int *));
961
965
if (!(kern->accel_job_ids )) {
962
- ACL_KERNEL_IF_DEBUG_MSG (kern, " Failed to allocate memory for kernel id.\n " );
966
+ ACL_KERNEL_IF_DEBUG_MSG (kern,
967
+ " Failed to allocate memory for kernel id.\n " );
963
968
return 1 ;
964
969
}
965
970
966
971
kern->accel_invoc_queue_depth =
967
972
(unsigned int *)acl_malloc (kern->num_accel * sizeof (unsigned int ));
968
973
if (!(kern->accel_invoc_queue_depth )) {
969
- ACL_KERNEL_IF_DEBUG_MSG (kern, " Failed to allocate memory for kernel invocation queue depth.\n " );
974
+ ACL_KERNEL_IF_DEBUG_MSG (
975
+ kern,
976
+ " Failed to allocate memory for kernel invocation queue depth.\n " );
970
977
return 1 ;
971
978
}
972
979
973
980
// Kernel IRQ is a separate thread. Need to use circular buffer to make this
974
981
// multithread safe.
975
982
kern->accel_queue_front = (int *)acl_malloc (kern->num_accel * sizeof (int ));
976
983
if (!(kern->accel_queue_front )) {
977
- ACL_KERNEL_IF_DEBUG_MSG (kern, " Failed to allocate memory for kernel IRQ circular buffer.\n " );
984
+ ACL_KERNEL_IF_DEBUG_MSG (
985
+ kern, " Failed to allocate memory for kernel IRQ circular buffer.\n " );
978
986
return 1 ;
979
987
}
980
988
kern->accel_queue_back = (int *)acl_malloc (kern->num_accel * sizeof (int ));
981
989
if (!(kern->accel_queue_back )) {
982
- ACL_KERNEL_IF_DEBUG_MSG (kern, " Failed to allocate memory for kernel IRQ circular buffer.\n " );
990
+ ACL_KERNEL_IF_DEBUG_MSG (
991
+ kern, " Failed to allocate memory for kernel IRQ circular buffer.\n " );
983
992
return 1 ;
984
993
}
985
994
0 commit comments