Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2024.05.0 release fixes #596

Merged
merged 4 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VERSION_MAJOR = 1
VERSION_MINOR = 6
VERSION_PATCH = 0
VERSION_PATCH = 1
23 changes: 15 additions & 8 deletions lib/include/openamp/virtio.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,35 @@ extern "C" {
#define VIRTIO_DEV_DRIVER 0UL
#define VIRTIO_DEV_DEVICE 1UL

#if !defined(VIRTIO_DRIVER_SUPPORT) && !defined(VIRTIO_DEVICE_SUPPORT)
#ifdef VIRTIO_DRIVER_ONLY
#warning "VIRTIO_DRIVER_ONLY is deprecated, please use VIRTIO_DEVICE_SUPPORT=0"
#define VIRTIO_DRIVER_SUPPORT 1
#define VIRTIO_DEVICE_SUPPORT 0
#elif VIRTIO_DEVICE_ONLY
#endif /* VIRTIO_DRIVER_ONLY */

#ifdef VIRTIO_DEVICE_ONLY
#warning "VIRTIO_DEVICE_ONLY is deprecated, please use VIRTIO_DRIVER_SUPPORT=0"
#define VIRTIO_DRIVER_SUPPORT 0
#define VIRTIO_DEVICE_SUPPORT 1
#else
#warning "VIRTIO_DRIVER_SUPPORT and/or VIRTIO_DEVICE_SUPPORT should be defined"
#define VIRTIO_DRIVER_SUPPORT 1
#define VIRTIO_DEVICE_SUPPORT 1
#endif /* VIRTIO_DRIVER_ONLY */
#endif /*!defined(VIRTIO_DRIVER_SUPPORT) && !defined(VIRTIO_DEVICE_SUPPORT)*/
#endif /* VIRTIO_DEVICE_ONLY */

#define VIRTIO_ENABLED(option) (option == 1)

#ifdef VIRTIO_DRIVER_SUPPORT
#define VIRTIO_ROLE_IS_DRIVER(vdev) \
(VIRTIO_ENABLED(VIRTIO_DRIVER_SUPPORT) && (vdev->role) == VIRTIO_DEV_DRIVER)
#else
/* Default definition without code size optimization */
#define VIRTIO_ROLE_IS_DRIVER(vdev) (vdev->role == VIRTIO_DEV_DRIVER)
#endif

#ifdef VIRTIO_DEVICE_SUPPORT
#define VIRTIO_ROLE_IS_DEVICE(vdev) \
(VIRTIO_ENABLED(VIRTIO_DEVICE_SUPPORT) && (vdev->role) == VIRTIO_DEV_DEVICE)
#else
/* Default definition without code size optimization */
#define VIRTIO_ROLE_IS_DEVICE(vdev) (vdev->role == VIRTIO_DEV_DEVICE)
#endif

/** @brief Virtio device identifier. */
struct virtio_device_id {
Expand Down
2 changes: 1 addition & 1 deletion lib/rpmsg/rpmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ int rpmsg_create_ept(struct rpmsg_endpoint *ept, struct rpmsg_device *rdev,
*/
}

rpmsg_register_endpoint(rdev, ept, name, addr, dest, cb, unbind_cb, NULL);
rpmsg_register_endpoint(rdev, ept, name, addr, dest, cb, unbind_cb, ept->priv);
metal_mutex_release(&rdev->lock);

/* Send NS announcement to remote processor */
Expand Down