···7575 struct rpmsg_endpoint *ns_ept;7676};77777878+/* The feature bitmap for virtio rpmsg */7979+#define VIRTIO_RPMSG_F_NS 0 /* RP supports name service notifications */8080+8181+/**8282+ * struct rpmsg_hdr - common header for all rpmsg messages8383+ * @src: source address8484+ * @dst: destination address8585+ * @reserved: reserved for future use8686+ * @len: length of payload (in bytes)8787+ * @flags: message flags8888+ * @data: @len bytes of message payload data8989+ *9090+ * Every message sent(/received) on the rpmsg bus begins with this header.9191+ */9292+struct rpmsg_hdr {9393+ u32 src;9494+ u32 dst;9595+ u32 reserved;9696+ u16 len;9797+ u16 flags;9898+ u8 data[0];9999+} __packed;100100+101101+/**102102+ * struct rpmsg_ns_msg - dynamic name service announcement message103103+ * @name: name of remote service that is published104104+ * @addr: address of remote service that is published105105+ * @flags: indicates whether service is created or destroyed106106+ *107107+ * This message is sent across to publish a new service, or announce108108+ * about its removal. When we receive these messages, an appropriate109109+ * rpmsg channel (i.e device) is created/destroyed. In turn, the ->probe()110110+ * or ->remove() handler of the appropriate rpmsg driver will be invoked111111+ * (if/as-soon-as one is registered).112112+ */113113+struct rpmsg_ns_msg {114114+ char name[RPMSG_NAME_SIZE];115115+ u32 addr;116116+ u32 flags;117117+} __packed;118118+119119+/**120120+ * enum rpmsg_ns_flags - dynamic name service announcement flags121121+ *122122+ * @RPMSG_NS_CREATE: a new remote service was just created123123+ * @RPMSG_NS_DESTROY: a known remote service was just destroyed124124+ */125125+enum rpmsg_ns_flags {126126+ RPMSG_NS_CREATE = 0,127127+ RPMSG_NS_DESTROY = 1,128128+};129129+78130/**79131 * @vrp: the remote processor this channel belongs to80132 */
-52
include/linux/rpmsg.h
···4141#include <linux/kref.h>4242#include <linux/mutex.h>43434444-/* The feature bitmap for virtio rpmsg */4545-#define VIRTIO_RPMSG_F_NS 0 /* RP supports name service notifications */4646-4747-/**4848- * struct rpmsg_hdr - common header for all rpmsg messages4949- * @src: source address5050- * @dst: destination address5151- * @reserved: reserved for future use5252- * @len: length of payload (in bytes)5353- * @flags: message flags5454- * @data: @len bytes of message payload data5555- *5656- * Every message sent(/received) on the rpmsg bus begins with this header.5757- */5858-struct rpmsg_hdr {5959- u32 src;6060- u32 dst;6161- u32 reserved;6262- u16 len;6363- u16 flags;6464- u8 data[0];6565-} __packed;6666-6767-/**6868- * struct rpmsg_ns_msg - dynamic name service announcement message6969- * @name: name of remote service that is published7070- * @addr: address of remote service that is published7171- * @flags: indicates whether service is created or destroyed7272- *7373- * This message is sent across to publish a new service, or announce7474- * about its removal. When we receive these messages, an appropriate7575- * rpmsg channel (i.e device) is created/destroyed. In turn, the ->probe()7676- * or ->remove() handler of the appropriate rpmsg driver will be invoked7777- * (if/as-soon-as one is registered).7878- */7979-struct rpmsg_ns_msg {8080- char name[RPMSG_NAME_SIZE];8181- u32 addr;8282- u32 flags;8383-} __packed;8484-8585-/**8686- * enum rpmsg_ns_flags - dynamic name service announcement flags8787- *8888- * @RPMSG_NS_CREATE: a new remote service was just created8989- * @RPMSG_NS_DESTROY: a known remote service was just destroyed9090- */9191-enum rpmsg_ns_flags {9292- RPMSG_NS_CREATE = 0,9393- RPMSG_NS_DESTROY = 1,9494-};9595-9644#define RPMSG_ADDR_ANY 0xFFFFFFFF97459846struct rpmsg_device;