Skip to content

Commit bfdc2e4

Browse files
committed
virtio_config.h: Clarify that disallowing RPMSG_BUFFER_SIZE is valid only when Linux enabled
1 parent 6d2cccc commit bfdc2e4

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

cores/arduino/stm32/OpenAMP/virtio_config.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
#ifndef __OPENAMP_VIRTIO_CONFIG_H
22
#define __OPENAMP_VIRTIO_CONFIG_H
33

4-
// Size of buffer of each vring buffers
5-
#ifdef RPMSG_BUFFER_SIZE
6-
#warning "RPMSG_BUFFER_SIZE should be aligned with the kernel definition."
7-
#warning "Reference: https://elixir.bootlin.com/linux/v5.5.2/source/drivers/rpmsg/virtio_rpmsg_bus.c#L137"
8-
#else
4+
#ifndef RPMSG_BUFFER_SIZE
5+
/**
6+
* @brief Size of buffer of each vring buffers
7+
* @note If the host processor is Linux, RPMSG_BUFFER_SIZE must be aligned
8+
* with the kernel definition.
9+
* Reference: https://elixir.bootlin.com/linux/v5.5.2/source/drivers/rpmsg/virtio_rpmsg_bus.c#L137
10+
*/
911
#define RPMSG_BUFFER_SIZE (512)
1012
#endif
1113

12-
// Size of the vqueue message in the buffer
14+
/** Size of header of a vqueue message */
1315
#define RPMSG_VRING_HEADER_SIZE (16)
16+
/** Available size of payload of a vqueue message */
1417
#define RPMSG_VRING_PAYLOAD_SIZE (RPMSG_BUFFER_SIZE - RPMSG_VRING_HEADER_SIZE)
1518

1619
/**

0 commit comments

Comments
 (0)