diff options
author | Kristofer Jonsson <kristofer.jonsson@arm.com> | 2023-01-04 17:09:28 +0100 |
---|---|---|
committer | Kristofer Jonsson <kristofer.jonsson@arm.com> | 2023-02-02 16:11:45 +0100 |
commit | b42bc0b95dcc5fac60d52e956056fd46bfe2beb9 (patch) | |
tree | 3e739e1d609a669cdfef21ffb302fcfb92423ada /kernel/ethosu_cancel_inference.c | |
parent | a70bfde653b44763e2f4d230d30aa8382c1ac5f9 (diff) | |
download | ethos-u-linux-driver-stack-b42bc0b95dcc5fac60d52e956056fd46bfe2beb9.tar.gz |
Removing watchdog and reset
Removing watchdog and firmware reset as a preparations for the
migrations to rpmsg.
Change-Id: Ic1053e3f4301ecadbde8c59dbaed437625a0a5ea
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); |