@@ -44,8 +44,8 @@ void irq_dealloc(ocxl_afu * afu, ocxl_irq * irq)
4444{
4545 if (irq -> addr ) {
4646 if (munmap (irq -> addr , afu -> page_size )) {
47- errmsg (afu , OCXL_INTERNAL_ERROR , "Could not unmap IRQ page for AFU '%s' : %d: '%s'" ,
48- afu -> identifier . afu_name , errno , strerror (errno ));
47+ errmsg (afu , OCXL_INTERNAL_ERROR , "Could not unmap IRQ page: %d: '%s'" ,
48+ errno , strerror (errno ));
4949 }
5050 irq -> addr = NULL ;
5151 }
@@ -108,8 +108,7 @@ static ocxl_err irq_allocate(ocxl_afu * afu, ocxl_irq * irq, void *info)
108108
109109 int fd = eventfd (0 , EFD_CLOEXEC );
110110 if (fd < 0 ) {
111- errmsg (afu , ret , "Could not open eventfd for AFU '%s': %d: '%s'" ,
112- afu -> identifier .afu_name , errno , strerror (errno ));
111+ errmsg (afu , ret , "Could not open eventfd : %d: '%s'" , errno , strerror (errno ));
113112 goto errend ;
114113 }
115114 irq -> event .eventfd = fd ;
@@ -129,17 +128,16 @@ static ocxl_err irq_allocate(ocxl_afu * afu, ocxl_irq * irq, void *info)
129128 irq -> addr = mmap (NULL , afu -> page_size , PROT_WRITE , MAP_SHARED ,
130129 my_afu -> fd , irq -> event .irq_offset );
131130 if (irq -> addr == MAP_FAILED ) {
132- errmsg (afu , ret , "mmap for IRQ for AFU '%s' : %d: '%s'" , afu -> identifier . afu_name , errno , strerror (errno ));
131+ errmsg (afu , ret , "mmap for IRQ failed : %d: '%s'" , errno , strerror (errno ));
133132 goto errend ;
134133 }
135134
136135 struct epoll_event ev ;
137136 ev .events = EPOLLIN ;
138137 ev .data .ptr = & irq -> fd_info ;
139138 if (epoll_ctl (my_afu -> epoll_fd , EPOLL_CTL_ADD , irq -> event .eventfd , & ev ) == -1 ) {
140- errmsg (afu , ret , "Could not add IRQ fd %d to epoll fd %d for AFU '%s': %d: '%s'" ,
141- irq -> event .eventfd , my_afu -> epoll_fd , my_afu -> identifier .afu_name ,
142- errno , strerror (errno ));
139+ errmsg (afu , ret , "Could not add IRQ fd %d to epoll fd %d: %d: '%s'" ,
140+ irq -> event .eventfd , my_afu -> epoll_fd , errno , strerror (errno ));
143141 goto errend ;
144142 }
145143
@@ -166,14 +164,14 @@ ocxl_err ocxl_irq_alloc(ocxl_afu_h afu, void *info, ocxl_irq_h * irq)
166164 if (my_afu -> irq_count == my_afu -> irq_max_count ) {
167165 ocxl_err rc = grow_buffer (my_afu , (void * * )& my_afu -> irqs , & my_afu -> irq_max_count , sizeof (ocxl_irq ), INITIAL_IRQ_COUNT );
168166 if (rc != OCXL_OK ) {
169- errmsg (my_afu , rc , "Could not grow IRQ buffer for AFU '%s'" , my_afu -> identifier . afu_name );
167+ errmsg (my_afu , rc , "Could not grow IRQ buffer" );
170168 return rc ;
171169 }
172170 }
173171
174172 ocxl_err rc = irq_allocate (my_afu , & my_afu -> irqs [my_afu -> irq_count ], info );
175173 if (rc != OCXL_OK ) {
176- errmsg (my_afu , rc , "Could not allocate IRQ for AFU '%s'" , my_afu -> identifier . afu_name );
174+ errmsg (my_afu , rc , "Could not allocate IRQ" );
177175 return rc ;
178176 }
179177 my_afu -> irqs [my_afu -> irq_count ].irq_number = my_afu -> irq_count ;
@@ -327,12 +325,11 @@ static ocxl_event_action read_afu_event(ocxl_afu_h afu, uint16_t event_api_versi
327325 return OCXL_EVENT_ACTION_NONE ;
328326 }
329327
330- errmsg (afu , OCXL_INTERNAL_ERROR , "read of event header from fd %d for AFU '%s' failed: %d: %s" ,
331- my_afu -> fd , my_afu -> identifier . afu_name , errno , strerror (errno ));
328+ errmsg (afu , OCXL_INTERNAL_ERROR , "read of event header from fd %d failed: %d: %s" ,
329+ my_afu -> fd , errno , strerror (errno ));
332330 return OCXL_EVENT_ACTION_FAIL ;
333331 } else if (buf_used < sizeof (ocxl_kernel_event_header )) {
334- errmsg (afu , OCXL_INTERNAL_ERROR , "short read of event header from fd %d for AFU '%s'" ,
335- my_afu -> fd , my_afu -> identifier .afu_name );
332+ errmsg (afu , OCXL_INTERNAL_ERROR , "short read of event header from fd %d" , my_afu -> fd );
336333 return OCXL_EVENT_ACTION_FAIL ;
337334 }
338335
@@ -401,8 +398,8 @@ int ocxl_afu_event_check_versioned(ocxl_afu_h afu, int timeout, ocxl_event *even
401398
402399 int count ;
403400 if ((count = epoll_wait (my_afu -> epoll_fd , my_afu -> epoll_events , event_count , timeout )) == -1 ) {
404- errmsg (my_afu , OCXL_INTERNAL_ERROR , "epoll_wait failed waiting for AFU events on AFU '%s' : %d: '%s'" ,
405- my_afu -> identifier . afu_name , errno , strerror (errno ));
401+ errmsg (my_afu , OCXL_INTERNAL_ERROR , "epoll_wait failed waiting for AFU events: %d: '%s'" ,
402+ errno , strerror (errno ));
406403 return -1 ;
407404 }
408405
@@ -434,9 +431,8 @@ int ocxl_afu_event_check_versioned(ocxl_afu_h afu, int timeout, ocxl_event *even
434431
435432 case EPOLL_SOURCE_IRQ :
436433 if (read (info -> irq -> event .eventfd , & count , sizeof (count )) < 0 ) {
437- errmsg (my_afu , OCXL_INTERNAL_ERROR , "read of eventfd %d for AFU '%s' IRQ %d failed: %d: %s" ,
438- info -> irq -> event .eventfd , my_afu -> identifier .afu_name ,
439- info -> irq -> irq_number , errno , strerror (errno ));
434+ errmsg (my_afu , OCXL_INTERNAL_ERROR , "read of eventfd %d IRQ %d failed: %d: %s" ,
435+ info -> irq -> event .eventfd , info -> irq -> irq_number , errno , strerror (errno ));
440436 continue ;
441437 }
442438 events [triggered ].type = OCXL_EVENT_IRQ ;
0 commit comments