aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Olsson <mikael.olsson@arm.com>2023-06-21 14:46:01 +0200
committerMikael Olsson <mikael.olsson@arm.com>2023-07-31 14:07:31 +0200
commiteb5a328174ba3987d99ab74fdbf181e9f1632b03 (patch)
tree9d8eaf1ef80c6abddc9b51e8d9c382e97783f563
parent09965b094429c45f4da273bb5c11f1c177acf9fd (diff)
downloadethos-u-linux-driver-stack-eb5a328174ba3987d99ab74fdbf181e9f1632b03.tar.gz
Change NPU kernel driver to use async probing
If the rpmsg channel to communicate with the subsystem is not available until after the NPU kernel driver has been registered, the driver's probe function will be called from the rpmsg message receive callback and block handling of any other messages until the probing is done. To avoid blocking the callback while performing the probing and to allow the probe to communicate with the subsystem, the kernel driver will now request that its probe function is called asynchronously. Change-Id: Iaeaa4a2322f6a76c0acd202e69b91a8beeb6114b Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
-rw-r--r--kernel/ethosu_driver.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/kernel/ethosu_driver.c b/kernel/ethosu_driver.c
index 342f501..f35c5e5 100644
--- a/kernel/ethosu_driver.c
+++ b/kernel/ethosu_driver.c
@@ -93,14 +93,15 @@ static struct rpmsg_device_id ethosu_rpmsg_driver_id_table[] = {
MODULE_DEVICE_TABLE(rpmsg, ethosu_rpmsg_driver_id_table);
static struct rpmsg_driver ethosu_rpmsg_driver = {
- .drv = {
- .name = ETHOSU_DRIVER_NAME,
- .owner = THIS_MODULE,
+ .drv = {
+ .name = ETHOSU_DRIVER_NAME,
+ .owner = THIS_MODULE,
+ .probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
- .id_table = ethosu_rpmsg_driver_id_table,
- .probe = ethosu_rpmsg_probe,
- .callback = ethosu_rpmsg_cb,
- .remove = ethosu_rpmsg_remove,
+ .id_table = ethosu_rpmsg_driver_id_table,
+ .probe = ethosu_rpmsg_probe,
+ .callback = ethosu_rpmsg_cb,
+ .remove = ethosu_rpmsg_remove,
};
/****************************************************************************