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

rpmsg: Move virtio specifics from public header

Move virtio rpmsg implementation details from the public header file to
the virtio rpmsg implementation.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

+52 -52
+52
drivers/rpmsg/virtio_rpmsg_bus.c
··· 75 75 struct rpmsg_endpoint *ns_ept; 76 76 }; 77 77 78 + /* The feature bitmap for virtio rpmsg */ 79 + #define VIRTIO_RPMSG_F_NS 0 /* RP supports name service notifications */ 80 + 81 + /** 82 + * struct rpmsg_hdr - common header for all rpmsg messages 83 + * @src: source address 84 + * @dst: destination address 85 + * @reserved: reserved for future use 86 + * @len: length of payload (in bytes) 87 + * @flags: message flags 88 + * @data: @len bytes of message payload data 89 + * 90 + * Every message sent(/received) on the rpmsg bus begins with this header. 91 + */ 92 + struct rpmsg_hdr { 93 + u32 src; 94 + u32 dst; 95 + u32 reserved; 96 + u16 len; 97 + u16 flags; 98 + u8 data[0]; 99 + } __packed; 100 + 101 + /** 102 + * struct rpmsg_ns_msg - dynamic name service announcement message 103 + * @name: name of remote service that is published 104 + * @addr: address of remote service that is published 105 + * @flags: indicates whether service is created or destroyed 106 + * 107 + * This message is sent across to publish a new service, or announce 108 + * about its removal. When we receive these messages, an appropriate 109 + * rpmsg channel (i.e device) is created/destroyed. In turn, the ->probe() 110 + * or ->remove() handler of the appropriate rpmsg driver will be invoked 111 + * (if/as-soon-as one is registered). 112 + */ 113 + struct rpmsg_ns_msg { 114 + char name[RPMSG_NAME_SIZE]; 115 + u32 addr; 116 + u32 flags; 117 + } __packed; 118 + 119 + /** 120 + * enum rpmsg_ns_flags - dynamic name service announcement flags 121 + * 122 + * @RPMSG_NS_CREATE: a new remote service was just created 123 + * @RPMSG_NS_DESTROY: a known remote service was just destroyed 124 + */ 125 + enum rpmsg_ns_flags { 126 + RPMSG_NS_CREATE = 0, 127 + RPMSG_NS_DESTROY = 1, 128 + }; 129 + 78 130 /** 79 131 * @vrp: the remote processor this channel belongs to 80 132 */
-52
include/linux/rpmsg.h
··· 41 41 #include <linux/kref.h> 42 42 #include <linux/mutex.h> 43 43 44 - /* The feature bitmap for virtio rpmsg */ 45 - #define VIRTIO_RPMSG_F_NS 0 /* RP supports name service notifications */ 46 - 47 - /** 48 - * struct rpmsg_hdr - common header for all rpmsg messages 49 - * @src: source address 50 - * @dst: destination address 51 - * @reserved: reserved for future use 52 - * @len: length of payload (in bytes) 53 - * @flags: message flags 54 - * @data: @len bytes of message payload data 55 - * 56 - * Every message sent(/received) on the rpmsg bus begins with this header. 57 - */ 58 - struct rpmsg_hdr { 59 - u32 src; 60 - u32 dst; 61 - u32 reserved; 62 - u16 len; 63 - u16 flags; 64 - u8 data[0]; 65 - } __packed; 66 - 67 - /** 68 - * struct rpmsg_ns_msg - dynamic name service announcement message 69 - * @name: name of remote service that is published 70 - * @addr: address of remote service that is published 71 - * @flags: indicates whether service is created or destroyed 72 - * 73 - * This message is sent across to publish a new service, or announce 74 - * about its removal. When we receive these messages, an appropriate 75 - * rpmsg channel (i.e device) is created/destroyed. In turn, the ->probe() 76 - * or ->remove() handler of the appropriate rpmsg driver will be invoked 77 - * (if/as-soon-as one is registered). 78 - */ 79 - struct rpmsg_ns_msg { 80 - char name[RPMSG_NAME_SIZE]; 81 - u32 addr; 82 - u32 flags; 83 - } __packed; 84 - 85 - /** 86 - * enum rpmsg_ns_flags - dynamic name service announcement flags 87 - * 88 - * @RPMSG_NS_CREATE: a new remote service was just created 89 - * @RPMSG_NS_DESTROY: a known remote service was just destroyed 90 - */ 91 - enum rpmsg_ns_flags { 92 - RPMSG_NS_CREATE = 0, 93 - RPMSG_NS_DESTROY = 1, 94 - }; 95 - 96 44 #define RPMSG_ADDR_ANY 0xFFFFFFFF 97 45 98 46 struct rpmsg_device;