2022-08-02 16:44:59 +08:00
|
|
|
From 57afc457bc16cca04762391f77d22b9219cb0e5f Mon Sep 17 00:00:00 2001
|
|
|
|
From: Guiding Li <liguiding1@xiaomi.com>
|
2021-11-01 14:49:10 +08:00
|
|
|
Date: Tue, 20 Jul 2021 17:52:13 +0800
|
2022-08-02 16:44:59 +08:00
|
|
|
Subject: [PATCH 01/12] openamp: add ns_unbind_notify support
|
2021-11-01 14:49:10 +08:00
|
|
|
|
|
|
|
This is for notify rdev unbind event
|
|
|
|
|
2022-08-02 16:44:59 +08:00
|
|
|
Signed-off-by: Guiding Li <liguiding1@xiaomi.com>
|
2021-11-01 14:49:10 +08:00
|
|
|
---
|
|
|
|
lib/include/openamp/rpmsg.h | 1 +
|
2022-08-02 16:44:59 +08:00
|
|
|
lib/rpmsg/rpmsg_virtio.c | 3 +++
|
|
|
|
2 files changed, 4 insertions(+)
|
2021-11-01 14:49:10 +08:00
|
|
|
|
|
|
|
diff --git a/lib/include/openamp/rpmsg.h open-amp/lib/include/openamp/rpmsg.h
|
2022-08-02 16:44:59 +08:00
|
|
|
index 8b8ec2e..e6acce8 100644
|
2021-11-01 14:49:10 +08:00
|
|
|
--- a/lib/include/openamp/rpmsg.h
|
|
|
|
+++ open-amp/lib/include/openamp/rpmsg.h
|
2022-08-02 16:44:59 +08:00
|
|
|
@@ -118,6 +118,7 @@ struct rpmsg_device {
|
2021-11-01 14:49:10 +08:00
|
|
|
unsigned long bitmap[metal_bitmap_longs(RPMSG_ADDR_BMP_SIZE)];
|
|
|
|
metal_mutex_t lock;
|
|
|
|
rpmsg_ns_bind_cb ns_bind_cb;
|
|
|
|
+ rpmsg_ns_bind_cb ns_unbind_cb;
|
|
|
|
struct rpmsg_device_ops ops;
|
|
|
|
bool support_ns;
|
2022-08-02 16:44:59 +08:00
|
|
|
};
|
2021-11-01 14:49:10 +08:00
|
|
|
diff --git a/lib/rpmsg/rpmsg_virtio.c open-amp/lib/rpmsg/rpmsg_virtio.c
|
2022-08-02 16:44:59 +08:00
|
|
|
index 57a2083..d5f168c 100644
|
2021-11-01 14:49:10 +08:00
|
|
|
--- a/lib/rpmsg/rpmsg_virtio.c
|
|
|
|
+++ open-amp/lib/rpmsg/rpmsg_virtio.c
|
2022-08-02 16:44:59 +08:00
|
|
|
@@ -585,6 +585,9 @@ static int rpmsg_virtio_ns_callback(struct rpmsg_endpoint *ept, void *data,
|
2021-11-01 14:49:10 +08:00
|
|
|
metal_mutex_release(&rdev->lock);
|
|
|
|
if (_ept && _ept->ns_unbind_cb)
|
|
|
|
_ept->ns_unbind_cb(_ept);
|
|
|
|
+ if (rdev->ns_unbind_cb)
|
|
|
|
+ rdev->ns_unbind_cb(rdev, name, dest);
|
2022-08-02 16:44:59 +08:00
|
|
|
+
|
|
|
|
} else {
|
2021-11-01 14:49:10 +08:00
|
|
|
if (!_ept) {
|
|
|
|
/*
|
|
|
|
--
|
|
|
|
2.25.1
|
|
|
|
|