diff options
Diffstat (limited to 'kernel/ethosu_cancel_inference.c')
-rw-r--r-- | kernel/ethosu_cancel_inference.c | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/kernel/ethosu_cancel_inference.c b/kernel/ethosu_cancel_inference.c index e2acb22..c1d31b3 100644 --- a/kernel/ethosu_cancel_inference.c +++ b/kernel/ethosu_cancel_inference.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Arm Limited. + * Copyright 2022-2023 Arm Limited and/or its affiliates * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software @@ -61,25 +61,6 @@ static void ethosu_cancel_inference_fail(struct ethosu_mailbox_msg *msg) complete(&cancellation->done); } -static int ethosu_cancel_inference_complete(struct ethosu_mailbox_msg *msg) -{ - struct ethosu_cancel_inference *cancellation = - container_of(msg, typeof(*cancellation), msg); - - if (completion_done(&cancellation->done)) - return 0; - - cancellation->errno = 0; - cancellation->uapi->status = - cancellation->inf->done && - cancellation->inf->status != ETHOSU_UAPI_STATUS_OK ? - ETHOSU_UAPI_STATUS_OK : - ETHOSU_UAPI_STATUS_ERROR; - complete(&cancellation->done); - - return 0; -} - int ethosu_cancel_inference_request(struct ethosu_inference *inf, struct ethosu_uapi_cancel_inference_status *uapi) { @@ -111,10 +92,6 @@ int ethosu_cancel_inference_request(struct ethosu_inference *inf, init_completion(&cancellation->done); cancellation->msg.fail = ethosu_cancel_inference_fail; - /* Never resend messages but always complete, since we have restart the - * whole firmware and marked the inference as aborted */ - cancellation->msg.resend = ethosu_cancel_inference_complete; - ret = ethosu_mailbox_register(&cancellation->edev->mailbox, &cancellation->msg); if (ret < 0) @@ -151,15 +128,6 @@ int ethosu_cancel_inference_request(struct ethosu_inference *inf, goto deregister; } - /* if cancellation failed and the inference did not complete then reset - * the firmware */ - if (cancellation->uapi->status == ETHOSU_UAPI_STATUS_ERROR && - !cancellation->inf->done) { - ret = ethosu_firmware_reset(cancellation->edev); - if (ret) - goto deregister; - } - deregister: ethosu_mailbox_deregister(&cancellation->edev->mailbox, &cancellation->msg); |