Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'rpmsg-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux

Pull rpmsg updates from Bjorn Andersson:

- rpmsg ctrl and char driver locking is ensure ordering in cases where
the communication link is being torn down in parallel with calls to
open(2) or poll(2)

- The glink driver is refactored, to move rpm/smem-specifics out of the
common logic and better suite further improvements, such as
transports without a mailbox controller. The handling of remoteproc
shutdown is improved, to fail clients immediately instead of having
them to wait for timeouts. A driver_override memory leak is corrected
and a few spelling improvements are introduced

- glink_ssr is transitioned off strlcpy() and "gpr" is added as a valid
child node of the glink-edge DT binding

* tag 'rpmsg-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
rpmsg: glink: Release driver_override
rpmsg: glink: Avoid infinite loop on intent for missing channel
rpmsg: glink: Fix GLINK command prefix
rpmsg: glink: Fix spelling of peek
rpmsg: glink: Cancel pending intent requests at removal
rpmsg: glink: Fail qcom_glink_tx() once remove has been initiated
rpmsg: glink: Move irq and mbox handling to transports
rpmsg: glink: rpm: Wrap driver context
rpmsg: glink: smem: Wrap driver context
rpmsg: glink: Extract tx kick operation
rpmsg: glink: Include types in qcom_glink_native.h
rpmsg: ctrl: Add lock to rpmsg_ctrldev_remove
rpmsg: char: Add lock to avoid race when rpmsg device is released
rpmsg: move from strlcpy with unused retval to strscpy
dt-bindings: remoteproc: qcom,glink-edge: add GPR node

+315 -156
+2 -1
drivers/remoteproc/qcom_common.h
··· 6 6 #include "remoteproc_internal.h" 7 7 #include <linux/soc/qcom/qmi.h> 8 8 9 + struct qcom_glink_smem; 9 10 struct qcom_sysmon; 10 11 11 12 struct qcom_rproc_glink { ··· 16 15 17 16 struct device *dev; 18 17 struct device_node *node; 19 - struct qcom_glink *edge; 18 + struct qcom_glink_smem *edge; 20 19 }; 21 20 22 21 struct qcom_rproc_subdev {
+8
drivers/rpmsg/rpmsg_char.c
··· 75 75 struct rpmsg_eptdev *eptdev = dev_to_eptdev(dev); 76 76 77 77 mutex_lock(&eptdev->ept_lock); 78 + eptdev->rpdev = NULL; 78 79 if (eptdev->ept) { 79 80 /* The default endpoint is released by the rpmsg core */ 80 81 if (!eptdev->default_ept) ··· 127 126 if (eptdev->ept) { 128 127 mutex_unlock(&eptdev->ept_lock); 129 128 return -EBUSY; 129 + } 130 + 131 + if (!eptdev->rpdev) { 132 + mutex_unlock(&eptdev->ept_lock); 133 + return -ENETRESET; 130 134 } 131 135 132 136 get_device(dev); ··· 285 279 if (!skb_queue_empty(&eptdev->queue)) 286 280 mask |= EPOLLIN | EPOLLRDNORM; 287 281 282 + mutex_lock(&eptdev->ept_lock); 288 283 mask |= rpmsg_poll(eptdev->ept, filp, wait); 284 + mutex_unlock(&eptdev->ept_lock); 289 285 290 286 return mask; 291 287 }
+2
drivers/rpmsg/rpmsg_ctrl.c
··· 194 194 struct rpmsg_ctrldev *ctrldev = dev_get_drvdata(&rpdev->dev); 195 195 int ret; 196 196 197 + mutex_lock(&ctrldev->ctrl_lock); 197 198 /* Destroy all endpoints */ 198 199 ret = device_for_each_child(&ctrldev->dev, NULL, rpmsg_chrdev_eptdev_destroy); 199 200 if (ret) 200 201 dev_warn(&rpdev->dev, "failed to nuke endpoints: %d\n", ret); 202 + mutex_unlock(&ctrldev->ctrl_lock); 201 203 202 204 cdev_device_del(&ctrldev->cdev, &ctrldev->dev); 203 205 put_device(&ctrldev->dev);
+6 -6
include/linux/rpmsg/qcom_glink.h
··· 5 5 6 6 #include <linux/device.h> 7 7 8 - struct qcom_glink; 8 + struct qcom_glink_smem; 9 9 10 10 #if IS_ENABLED(CONFIG_RPMSG_QCOM_GLINK) 11 11 void qcom_glink_ssr_notify(const char *ssr_name); ··· 15 15 16 16 #if IS_ENABLED(CONFIG_RPMSG_QCOM_GLINK_SMEM) 17 17 18 - struct qcom_glink *qcom_glink_smem_register(struct device *parent, 19 - struct device_node *node); 20 - void qcom_glink_smem_unregister(struct qcom_glink *glink); 18 + struct qcom_glink_smem *qcom_glink_smem_register(struct device *parent, 19 + struct device_node *node); 20 + void qcom_glink_smem_unregister(struct qcom_glink_smem *glink); 21 21 22 22 #else 23 23 24 - static inline struct qcom_glink * 24 + static inline struct qcom_glink_smem * 25 25 qcom_glink_smem_register(struct device *parent, 26 26 struct device_node *node) 27 27 { 28 28 return NULL; 29 29 } 30 30 31 - static inline void qcom_glink_smem_unregister(struct qcom_glink *glink) {} 31 + static inline void qcom_glink_smem_unregister(struct qcom_glink_smem *glink) {} 32 32 #endif 33 33 34 34 #endif