Skip to content

Commit 379bb04

Browse files
committed
Merge tag 'rpmsg-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc
Pull rpmsg updates from Bjorn Andersson: "This contains updates to make the rpmsg sample driver more useful, fixes the naming of GLINK devices to avoid naming collisions and a few minor bug fixes. It also updates MAINTAINERS to reflect the move to kernel.org" * tag 'rpmsg-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: rpmsg: glink-smem: Name the edge based on parent remoteproc rpmsg: glink: Use struct_size() helper rpmsg: virtio_rpmsg_bus: replace "%p" with "%pK" MAINTAINERS: rpmsg: fix git tree location rpmsg: core: fix comments samples/rpmsg: Introduce a module parameter for message count samples/rpmsg: Replace print_hex_dump() with print_hex_dump_debug()
2 parents 28de978 + 9fe69a7 commit 379bb04

File tree

7 files changed

+17
-14
lines changed

7 files changed

+17
-14
lines changed

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13761,7 +13761,7 @@ REMOTE PROCESSOR MESSAGING (RPMSG) SUBSYSTEM
1376113761
M: Ohad Ben-Cohen <[email protected]>
1376213762
M: Bjorn Andersson <[email protected]>
1376313763
13764-
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ohad/rpmsg.git
13764+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc.git rpmsg-next
1376513765
S: Maintained
1376613766
F: drivers/rpmsg/
1376713767
F: Documentation/rpmsg.txt

drivers/rpmsg/qcom_glink_native.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ static void qcom_glink_handle_intent(struct qcom_glink *glink,
892892
struct intent_pair intents[];
893893
} __packed * msg;
894894

895-
const size_t msglen = sizeof(*msg) + sizeof(struct intent_pair) * count;
895+
const size_t msglen = struct_size(msg, intents, count);
896896
int ret;
897897
int i;
898898
unsigned long flags;

drivers/rpmsg/qcom_glink_smem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ struct qcom_glink *qcom_glink_smem_register(struct device *parent,
201201
dev->parent = parent;
202202
dev->of_node = node;
203203
dev->release = qcom_glink_smem_release;
204-
dev_set_name(dev, "%pOFn:%pOFn", node->parent, node);
204+
dev_set_name(dev, "%s:%pOFn", dev_name(parent->parent), node);
205205
ret = device_register(dev);
206206
if (ret) {
207207
pr_err("failed to register glink edge\n");

drivers/rpmsg/rpmsg_core.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
* equals to the src address of their rpmsg channel), the driver's handler
4747
* is invoked to process it.
4848
*
49-
* That said, more complicated drivers might do need to allocate
49+
* That said, more complicated drivers might need to allocate
5050
* additional rpmsg addresses, and bind them to different rx callbacks.
5151
* To accomplish that, those drivers need to call this function.
5252
*
@@ -177,7 +177,7 @@ int rpmsg_send_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst,
177177
EXPORT_SYMBOL(rpmsg_send_offchannel);
178178

179179
/**
180-
* rpmsg_send() - send a message across to the remote processor
180+
* rpmsg_trysend() - send a message across to the remote processor
181181
* @ept: the rpmsg endpoint
182182
* @data: payload of message
183183
* @len: length of payload
@@ -205,7 +205,7 @@ int rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len)
205205
EXPORT_SYMBOL(rpmsg_trysend);
206206

207207
/**
208-
* rpmsg_sendto() - send a message across to the remote processor, specify dst
208+
* rpmsg_trysendto() - send a message across to the remote processor, specify dst
209209
* @ept: the rpmsg endpoint
210210
* @data: payload of message
211211
* @len: length of payload
@@ -253,7 +253,7 @@ __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp,
253253
EXPORT_SYMBOL(rpmsg_poll);
254254

255255
/**
256-
* rpmsg_send_offchannel() - send a message using explicit src/dst addresses
256+
* rpmsg_trysend_offchannel() - send a message using explicit src/dst addresses
257257
* @ept: the rpmsg endpoint
258258
* @src: source address
259259
* @dst: destination address

drivers/rpmsg/rpmsg_internal.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/**
2222
* struct rpmsg_device_ops - indirection table for the rpmsg_device operations
23-
* @create_ept: create backend-specific endpoint, requried
23+
* @create_ept: create backend-specific endpoint, required
2424
* @announce_create: announce presence of new channel, optional
2525
* @announce_destroy: announce destruction of channel, optional
2626
*
@@ -39,13 +39,14 @@ struct rpmsg_device_ops {
3939

4040
/**
4141
* struct rpmsg_endpoint_ops - indirection table for rpmsg_endpoint operations
42-
* @destroy_ept: destroy the given endpoint, required
42+
* @destroy_ept: see @rpmsg_destroy_ept(), required
4343
* @send: see @rpmsg_send(), required
4444
* @sendto: see @rpmsg_sendto(), optional
4545
* @send_offchannel: see @rpmsg_send_offchannel(), optional
4646
* @trysend: see @rpmsg_trysend(), required
4747
* @trysendto: see @rpmsg_trysendto(), optional
4848
* @trysend_offchannel: see @rpmsg_trysend_offchannel(), optional
49+
* @poll: see @rpmsg_poll(), optional
4950
*
5051
* Indirection table for the operations that a rpmsg backend should implement.
5152
* In addition to @destroy_ept, the backend must at least implement @send and

drivers/rpmsg/virtio_rpmsg_bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ static int rpmsg_probe(struct virtio_device *vdev)
920920
goto vqs_del;
921921
}
922922

923-
dev_dbg(&vdev->dev, "buffers: va %p, dma %pad\n",
923+
dev_dbg(&vdev->dev, "buffers: va %pK, dma %pad\n",
924924
bufs_va, &vrp->bufs_dma);
925925

926926
/* half of the buffers is dedicated for RX */

samples/rpmsg/rpmsg_client_sample.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
#include <linux/rpmsg.h>
1515

1616
#define MSG "hello world!"
17-
#define MSG_LIMIT 100
17+
18+
static int count = 100;
19+
module_param(count, int, 0644);
1820

1921
struct instance_data {
2022
int rx_count;
@@ -29,11 +31,11 @@ static int rpmsg_sample_cb(struct rpmsg_device *rpdev, void *data, int len,
2931
dev_info(&rpdev->dev, "incoming msg %d (src: 0x%x)\n",
3032
++idata->rx_count, src);
3133

32-
print_hex_dump(KERN_DEBUG, __func__, DUMP_PREFIX_NONE, 16, 1,
33-
data, len, true);
34+
print_hex_dump_debug(__func__, DUMP_PREFIX_NONE, 16, 1, data, len,
35+
true);
3436

3537
/* samples should not live forever */
36-
if (idata->rx_count >= MSG_LIMIT) {
38+
if (idata->rx_count >= count) {
3739
dev_info(&rpdev->dev, "goodbye!\n");
3840
return 0;
3941
}

0 commit comments

Comments
 (0)