mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-26 14:17:26 -04:00
rpmsg: add virtio-based remote processor messaging bus
Add a virtio-based inter-processor communication bus, which enables kernel drivers to communicate with entities, running on remote processors, over shared memory using a simple messaging protocol. Every pair of AMP processors share two vrings, which are used to send and receive the messages over shared memory. The header of every message sent on the rpmsg bus contains src and dst addresses, which make it possible to multiplex several rpmsg channels on the same vring. Every rpmsg channel is a device on this bus. When a channel is added, and an appropriate rpmsg driver is found and probed, it is also assigned a local rpmsg address, which is then bound to the driver's callback. When inbound messages carry the local address of a bound driver, its callback is invoked by the bus. This patch provides a kernel interface only; user space interfaces will be later exposed by kernel users of this rpmsg bus. Designed with Brian Swetland <swetland@google.com>. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Rusty Russell <rusty@rustcorp.com.au> (virtio_ids.h) Cc: Brian Swetland <swetland@google.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Tony Lindgren <tony@atomide.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Greg KH <greg@kroah.com> Cc: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
parent
34ed5a33b1
commit
bcabbccabf
10 changed files with 1739 additions and 0 deletions
|
@ -414,6 +414,15 @@ struct hv_vmbus_device_id {
|
|||
__attribute__((aligned(sizeof(kernel_ulong_t))));
|
||||
};
|
||||
|
||||
/* rpmsg */
|
||||
|
||||
#define RPMSG_NAME_SIZE 32
|
||||
#define RPMSG_DEVICE_MODALIAS_FMT "rpmsg:%s"
|
||||
|
||||
struct rpmsg_device_id {
|
||||
char name[RPMSG_NAME_SIZE];
|
||||
};
|
||||
|
||||
/* i2c */
|
||||
|
||||
#define I2C_NAME_SIZE 20
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue