From afed3bd11737b6a1b958d22ff0da2343a6895592 Mon Sep 17 00:00:00 2001 From: Arnaud Pouliquen Date: Fri, 20 May 2022 16:47:09 +0200 Subject: [PATCH] Terminology: Replace potentially offensive terms in documentation In line with the terminology changes proposed by the OpenAMP Technical Steering committee. Suppress "master and "slave" terms in comments and documentations. Signed-off-by: Arnaud Pouliquen --- README.md | 16 ++++----- apps/examples/echo/rpmsg-echo.c | 4 +-- apps/examples/echo/rpmsg-ping.c | 2 +- apps/examples/linux_rpc_demo/README.md | 6 ++-- apps/examples/linux_rpc_demo/linux_rpc_demo.c | 14 ++++---- .../examples/linux_rpc_demo/linux_rpc_demod.c | 4 +-- .../matrix_multiply/matrix_multiply.c | 4 +-- .../matrix_multiply/matrix_multiplyd.c | 6 ++-- apps/examples/nocopy_echo/rpmsg-nocopy-echo.c | 4 +-- apps/examples/rpc_demo/rpc_demo.c | 14 ++++---- apps/examples/rpc_demo/rpc_demod.c | 4 +-- .../rpmsg_sample_echo/rpmsg-sample-echo.c | 4 +-- .../microblaze_generic/platform_info.c | 4 +-- .../microblaze_generic/platform_info.h | 2 +- apps/machine/microblaze_generic/rsc_table.c | 2 +- apps/machine/microblaze_generic/rsc_table.h | 2 +- apps/machine/zynq7/platform_info.c | 4 +-- apps/machine/zynq7/platform_info.h | 2 +- .../zynq7/platform_info_remoteproc_master.c | 16 ++++----- apps/machine/zynq7/rsc_table.c | 2 +- apps/machine/zynq7/rsc_table.h | 2 +- apps/machine/zynqmp/platform_info.c | 4 +-- apps/machine/zynqmp/platform_info.h | 4 +-- apps/machine/zynqmp_r5/platform_info.c | 4 +-- apps/machine/zynqmp_r5/platform_info.h | 2 +- apps/machine/zynqmp_r5/rsc_table.c | 2 +- apps/machine/zynqmp_r5/rsc_table.h | 2 +- .../linux/machine/generic/platform_info.c | 4 +-- .../linux/machine/generic/platform_info.h | 4 +-- apps/system/linux/machine/generic/rsc_table.c | 2 +- apps/system/linux/machine/generic/rsc_table.h | 2 +- apps/tests/msg/rpmsg-ping.c | 2 +- apps/tests/msg/rpmsg-update.c | 4 +-- docs/apps/echo_test/README.md | 4 +-- docs/apps/matrix_multiply/README.md | 4 +-- docs/img-src/coprocessor-rpmsg-ns-dynamic.gv | 18 +++++----- docs/img-src/coprocessor-rpmsg-ns.gv | 18 +++++----- docs/img-src/coprocessor-rpmsg-static-ep.gv | 18 +++++----- docs/rpmsg-design.md | 2 +- lib/include/openamp/remoteproc_virtio.h | 2 +- lib/remoteproc/remoteproc_virtio.c | 10 +++--- lib/remoteproc/rsc_table_parser.c | 2 +- lib/rpmsg/rpmsg_virtio.c | 6 ++-- lib/virtio/virtqueue.c | 36 +++++++++---------- 44 files changed, 137 insertions(+), 137 deletions(-) diff --git a/README.md b/README.md index df1df130a..41582e3c1 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,9 @@ enable development of software applications for Asymmetric Multiprocessing environments 3. Compatibility with upstream Linux remoteproc and rpmsg components 4. Following AMP configurations supported - a. Linux master/Generic(Baremetal) remote - b. Generic(Baremetal) master/Linux remote -5. Proxy infrastructure and supplied demos showcase ability of proxy on master + a. Linux host/Generic(Baremetal) remote + b. Generic(Baremetal) host/Linux remote +5. Proxy infrastructure and supplied demos showcase ability of proxy on host to handle printf, scanf, open, close, read, write calls from Bare metal based remote contexts. @@ -96,7 +96,7 @@ library for it project: enabled on buffers. * **RPMSG_BUFFER_SIZE** (default 512): adjust the size of the RPMsg buffers. The default value of the RPMsg size is compatible with the Linux Kernel hard - coded value. If you AMP configuration is Linux kernel master/ OpenAMP remote, + coded value. If you AMP configuration is Linux kernel host/ OpenAMP remote, this option must not be used. ### Example to compile OpenAMP for Zephyr @@ -264,11 +264,11 @@ The OpenAMP version follows the set of rule proposed in [Semantic Versioning spe ## Supported System and Machines For now, it supports: -* Zynq generic slave -* Zynq UltraScale+ MPSoC R5 generic slave +* Zynq generic remote +* Zynq UltraScale+ MPSoC R5 generic remote * Linux host OpenAMP between Linux userspace processes -* Linux userspace OpenAMP RPMsg master -* Linux userspace OpenAMP RPMsg slave +* Linux userspace OpenAMP RPMsg host +* Linux userspace OpenAMP RPMsg remote * Linux userspace OpenAMP RPMsg and MicroBlaze bare metal remote ## Known Limitations: diff --git a/apps/examples/echo/rpmsg-echo.c b/apps/examples/echo/rpmsg-echo.c index d004a9c47..f3981e19c 100644 --- a/apps/examples/echo/rpmsg-echo.c +++ b/apps/examples/echo/rpmsg-echo.c @@ -5,7 +5,7 @@ /* * This is a sample demonstration application that showcases usage of rpmsg * This application is meant to run on the remote CPU running baremetal code. - * This application echoes back data that was sent to it by the master core. + * This application echoes back data that was sent to it by the host core. */ #include @@ -41,7 +41,7 @@ static int rpmsg_endpoint_cb(struct rpmsg_endpoint *ept, void *data, size_t len, return RPMSG_SUCCESS; } - /* Send data back to master */ + /* Send data back to host */ if (rpmsg_send(ept, data, len) < 0) { LPERROR("rpmsg_send failed\r\n"); } diff --git a/apps/examples/echo/rpmsg-ping.c b/apps/examples/echo/rpmsg-ping.c index 77ca3d8cf..ce4d694ef 100644 --- a/apps/examples/echo/rpmsg-ping.c +++ b/apps/examples/echo/rpmsg-ping.c @@ -5,7 +5,7 @@ /* * This is a sample demonstration application that showcases usage of rpmsg * This application is meant to run on the remote CPU running baremetal code. - * This application echoes back data that was sent to it by the master core. + * This application echoes back data that was sent to it by the host core. */ #include diff --git a/apps/examples/linux_rpc_demo/README.md b/apps/examples/linux_rpc_demo/README.md index 40deb9d46..3533c5500 100644 --- a/apps/examples/linux_rpc_demo/README.md +++ b/apps/examples/linux_rpc_demo/README.md @@ -1,8 +1,8 @@ # linux_rpc_demo This readme is about the OpenAMP linux_rpc_demo. -The linux_rpc_demo is about remote procedure calls between linux master and linux -slave using rpmsg to perform +The linux_rpc_demo is about remote procedure calls between linux host and linux +remote using rpmsg to perform 1. File operations such as open, read, write and close 2. I/O operation such as printf, scanf @@ -51,7 +51,7 @@ generated to `build/usr/local/bin` directory. $ sudo LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib \ build-openamp/usr/local/bin/linux_rpc_demo-shared 1 ``` -Enter the inputs on the master side the same gets printed on the remote side. You will see communication between the master and remote process using rpmsg calls. +Enter the inputs on the host side the same gets printed on the remote side. You will see communication between the host and remote process using rpmsg calls. ## Note: `sudo` is required to run the OpenAMP demos between Linux processes, as it doesn't work on diff --git a/apps/examples/linux_rpc_demo/linux_rpc_demo.c b/apps/examples/linux_rpc_demo/linux_rpc_demo.c index 67ef41ba1..86baaa101 100644 --- a/apps/examples/linux_rpc_demo/linux_rpc_demo.c +++ b/apps/examples/linux_rpc_demo/linux_rpc_demo.c @@ -8,7 +8,7 @@ /*This is a sample demonstration application that showcases usage of proxy *from the remote core. *This application is meant to run on the remote CPU running linux. - *This application can print to the master console and perform file I/O through + *This application can print to the host console and perform file I/O through *rpmsg channels. */ @@ -482,10 +482,10 @@ int app(struct rpmsg_device *rdev, void *priv) printf("\nRemote>Rpmsg based retargetting to proxy initialized..\r\n"); - /* Remote performing file IO on Master */ + /* Remote performing file IO on Host */ printf("\nRemote>FileIO demo ..\r\n"); - printf("\nRemote>Creating a file on master and writing to it..\r\n"); + printf("\nRemote>Creating a file on host and writing to it..\r\n"); rpmsg_open(fname, REDEF_O_CREAT | REDEF_O_WRONLY | REDEF_O_APPEND, S_IRUSR | S_IWUSR); printf("\nRemote>Opened file '%s' with fd = %d\r\n", fname, fd); @@ -496,8 +496,8 @@ int app(struct rpmsg_device *rdev, void *priv) rpmsg_close(fd); printf("\nRemote>Closed fd = %d\r\n", fd); - /* Remote performing file IO on Master */ - printf("\nRemote>Reading a file on master and displaying its " + /* Remote performing file IO on Host */ + printf("\nRemote>Reading a file on host and displaying its " "contents..\r\n"); rpmsg_open(fname, REDEF_O_RDONLY, S_IRUSR | S_IWUSR); printf("\nRemote>Opened file '%s' with fd = %d\r\n", fname, fd); @@ -509,10 +509,10 @@ int app(struct rpmsg_device *rdev, void *priv) printf("\nRemote>Closed fd = %d\r\n", fd); while (1) { - /* Remote performing STDIO on Master */ + /* Remote performing STDIO on Host */ printf("\nRemote>Remote firmware using scanf and printf .." "\r\n"); - printf("\nRemote>Scanning user input from master..\r\n"); + printf("\nRemote>Scanning user input from host..\r\n"); printf("\nRemote>Enter name\r\n"); rpmsg_input(ubuff, sizeof(ubuff)); ret = bytes_read; diff --git a/apps/examples/linux_rpc_demo/linux_rpc_demod.c b/apps/examples/linux_rpc_demo/linux_rpc_demod.c index c05e0e02a..84249b6ca 100644 --- a/apps/examples/linux_rpc_demo/linux_rpc_demod.c +++ b/apps/examples/linux_rpc_demo/linux_rpc_demod.c @@ -8,7 +8,7 @@ /*This is a sample demonstration application that showcases usage of proxy *from the remote core. *This application is meant to run on the remote CPU running linux. - *This application can print to the master console and perform file I/O through + *This application can print to the host console and perform file I/O through *rpmsg channels. */ @@ -32,7 +32,7 @@ #define REDEF_O_ACCMODE 3 #define raw_printf(format, ...) printf(format, ##__VA_ARGS__) -#define LPRINTF(format, ...) raw_printf("Master> " format, ##__VA_ARGS__) +#define LPRINTF(format, ...) raw_printf("Host> " format, ##__VA_ARGS__) #define LPERROR(format, ...) LPRINTF("ERROR: " format, ##__VA_ARGS__) static void *platform; diff --git a/apps/examples/matrix_multiply/matrix_multiply.c b/apps/examples/matrix_multiply/matrix_multiply.c index 13e769387..1a74d0f05 100644 --- a/apps/examples/matrix_multiply/matrix_multiply.c +++ b/apps/examples/matrix_multiply/matrix_multiply.c @@ -5,8 +5,8 @@ /* * This is a sample demonstration application that showcases usage of remoteproc * and rpmsg APIs on the remote core. This application is meant to run on the remote CPU - * running baremetal code. This applicationr receives two matrices from the master, - * multiplies them and returns the result to the master core. + * running baremetal code. This applicationr receives two matrices from the host, + * multiplies them and returns the result to the host core. */ #include diff --git a/apps/examples/matrix_multiply/matrix_multiplyd.c b/apps/examples/matrix_multiply/matrix_multiplyd.c index 994d1d1ca..3045a11fb 100644 --- a/apps/examples/matrix_multiply/matrix_multiplyd.c +++ b/apps/examples/matrix_multiply/matrix_multiplyd.c @@ -5,8 +5,8 @@ /* * This is a sample demonstration application that showcases usage of remoteproc * and rpmsg APIs on the remote core. This application is meant to run on the remote CPU - * running baremetal code. This applicationr receives two matrices from the master, - * multiplies them and returns the result to the master core. + * running baremetal code. This applicationr receives two matrices from the host, + * multiplies them and returns the result to the host core. */ #include @@ -76,7 +76,7 @@ static int rpmsg_endpoint_cb(struct rpmsg_endpoint *ept, void *data, size_t len, /* Process received data and multiple matrices. */ Matrix_Multiply(&matrix_array[0], &matrix_array[1], &matrix_result); - /* Send the result of matrix multiplication back to master. */ + /* Send the result of matrix multiplication back to host. */ if (rpmsg_send(ept, &matrix_result, sizeof(matrix)) < 0) { LPERROR("rpmsg_send failed\r\n"); } diff --git a/apps/examples/nocopy_echo/rpmsg-nocopy-echo.c b/apps/examples/nocopy_echo/rpmsg-nocopy-echo.c index 5e173fee7..5b378f2a1 100644 --- a/apps/examples/nocopy_echo/rpmsg-nocopy-echo.c +++ b/apps/examples/nocopy_echo/rpmsg-nocopy-echo.c @@ -7,7 +7,7 @@ /* * This is a sample demonstration application that showcases usage of rpmsg * This application is meant to run on the remote CPU running baremetal code. - * This application echoes back data that was sent to it by the master core. + * This application echoes back data that was sent to it by the host core. */ #include @@ -111,7 +111,7 @@ int app(struct rpmsg_device *rdev, void *priv) break; } while (rpmsg_list) { - /* Send data back to master */ + /* Send data back to host */ ret = rpmsg_send(rpmsg_list->ept, rpmsg_list->data, rpmsg_list->len); if (ret < 0) { diff --git a/apps/examples/rpc_demo/rpc_demo.c b/apps/examples/rpc_demo/rpc_demo.c index d9b033875..6d2e48273 100644 --- a/apps/examples/rpc_demo/rpc_demo.c +++ b/apps/examples/rpc_demo/rpc_demo.c @@ -5,7 +5,7 @@ /* * This is a sample demonstration application that showcases usage of proxy from the remote core. * This application is meant to run on the remote CPU running baremetal. - * This application can print to the master console and perform file I/O using proxy mechanism. + * This application can print to the host console and perform file I/O using proxy mechanism. */ #include @@ -69,10 +69,10 @@ int app(struct rpmsg_device *rdev, void *priv) printf("\nRemote>Rpmsg based retargetting to proxy initialized..\r\n"); - /* Remote performing file IO on Master */ + /* Remote performing file IO on Host */ printf("\nRemote>FileIO demo ..\r\n"); - printf("\nRemote>Creating a file on master and writing to it..\r\n"); + printf("\nRemote>Creating a file on host and writing to it..\r\n"); fd = open(fname, REDEF_O_CREAT | REDEF_O_WRONLY | REDEF_O_APPEND, S_IRUSR | S_IWUSR); printf("\nRemote>Opened file '%s' with fd = %d\r\n", fname, fd); @@ -84,8 +84,8 @@ int app(struct rpmsg_device *rdev, void *priv) close(fd); printf("\nRemote>Closed fd = %d\r\n", fd); - /* Remote performing file IO on Master */ - printf("\nRemote>Reading a file on master and displaying its contents..\r\n"); + /* Remote performing file IO on Host */ + printf("\nRemote>Reading a file on host and displaying its contents..\r\n"); fd = open(fname, REDEF_O_RDONLY, S_IRUSR | S_IWUSR); printf("\nRemote>Opened file '%s' with fd = %d\r\n", fname, fd); bytes_read = read(fd, rbuff, 1024); @@ -96,9 +96,9 @@ int app(struct rpmsg_device *rdev, void *priv) printf("\nRemote>Closed fd = %d\r\n", fd); while (1) { - /* Remote performing STDIO on Master */ + /* Remote performing STDIO on Host */ printf("\nRemote>Remote firmware using scanf and printf ..\r\n"); - printf("\nRemote>Scanning user input from master..\r\n"); + printf("\nRemote>Scanning user input from host..\r\n"); printf("\nRemote>Enter name\r\n"); ret = scanf("%s", ubuff); if (ret) { diff --git a/apps/examples/rpc_demo/rpc_demod.c b/apps/examples/rpc_demo/rpc_demod.c index ca210406e..3f5f40781 100644 --- a/apps/examples/rpc_demo/rpc_demod.c +++ b/apps/examples/rpc_demo/rpc_demod.c @@ -5,7 +5,7 @@ /* * This is a sample demonstration application that showcases usage of proxy from the remote core. * This application is meant to run on the remote CPU running baremetal. - * This applicationr can print to to master console and perform file I/O using proxy mechanism. + * This applicationr can print to to host console and perform file I/O using proxy mechanism. */ #include @@ -29,7 +29,7 @@ #define REDEF_O_ACCMODE 3 #define raw_printf(format, ...) printf(format, ##__VA_ARGS__) -#define LPRINTF(format, ...) raw_printf("Master> " format, ##__VA_ARGS__) +#define LPRINTF(format, ...) raw_printf("Host> " format, ##__VA_ARGS__) #define LPERROR(format, ...) LPRINTF("ERROR: " format, ##__VA_ARGS__) static void *platform; diff --git a/apps/examples/rpmsg_sample_echo/rpmsg-sample-echo.c b/apps/examples/rpmsg_sample_echo/rpmsg-sample-echo.c index d06711c56..e2bdc5994 100644 --- a/apps/examples/rpmsg_sample_echo/rpmsg-sample-echo.c +++ b/apps/examples/rpmsg_sample_echo/rpmsg-sample-echo.c @@ -6,7 +6,7 @@ * This is a sample demonstration application that showcases usage of rpmsg * This application is meant to run on the remote CPU running baremetal code. * This application allows to check the compatibility with linux OS running on - * the master CPU. For this it echo MSG_LIMIT time message sent by the rpmsg + * the host CPU. For this it echo MSG_LIMIT time message sent by the rpmsg * sample client available in linux kernel distribution. */ @@ -36,7 +36,7 @@ static int rpmsg_endpoint_cb(struct rpmsg_endpoint *ept, void *data, size_t len, static uint32_t count = 0; char payload[RPMSG_BUFFER_SIZE]; - /* Send data back MSG_LIMIT time to master */ + /* Send data back MSG_LIMIT time to host */ memset(payload, 0, RPMSG_BUFFER_SIZE); memcpy(payload, data, len); if (++count <= MSG_LIMIT) { diff --git a/apps/machine/microblaze_generic/platform_info.c b/apps/machine/microblaze_generic/platform_info.c index 68128c6fa..d4044957a 100644 --- a/apps/machine/microblaze_generic/platform_info.c +++ b/apps/machine/microblaze_generic/platform_info.c @@ -153,14 +153,14 @@ platform_create_rpmsg_vdev(void *platform, unsigned int vdev_index, xil_printf("initializing rpmsg shared buffer pool\r\n"); /* - * Only RPMsg virtio master needs to initialize the shared buffers + * Only RPMsg virtio driver needs to initialize the shared buffers * pool */ rpmsg_virtio_init_shm_pool(&shpool, shbuf, (SHARED_MEM_SIZE - SHARED_BUF_OFFSET)); xil_printf("initializing rpmsg vdev\r\n"); - /* RPMsg virtio slave can set shared buffers pool argument to NULL */ + /* RPMsg virtio device can set shared buffers pool argument to NULL */ ret = rpmsg_init_vdev(rpmsg_vdev, vdev, ns_bind_cb, shbuf_io, &shpool); diff --git a/apps/machine/microblaze_generic/platform_info.h b/apps/machine/microblaze_generic/platform_info.h index 7e8f0dc5d..edfde5c83 100644 --- a/apps/machine/microblaze_generic/platform_info.h +++ b/apps/machine/microblaze_generic/platform_info.h @@ -55,7 +55,7 @@ int platform_init(int argc, char *argv[], void **platform); * @platform: pointer to the private data * @vdev_index: index of the virtio device, there can more than one vdev * on the platform. - * @role: virtio master or virtio slave of the vdev + * @role: virtio driver or virtio device of the vdev * @rst_cb: virtio device reset callback * @ns_bind_cb: rpmsg name service bind callback * diff --git a/apps/machine/microblaze_generic/rsc_table.c b/apps/machine/microblaze_generic/rsc_table.c index 2348a83a0..851a4b530 100644 --- a/apps/machine/microblaze_generic/rsc_table.c +++ b/apps/machine/microblaze_generic/rsc_table.c @@ -6,7 +6,7 @@ /* * This file populates resource table for BM remote - * for use by the Linux Master + * for use by the Linux host */ #include diff --git a/apps/machine/microblaze_generic/rsc_table.h b/apps/machine/microblaze_generic/rsc_table.h index c01858877..e6115d3a3 100644 --- a/apps/machine/microblaze_generic/rsc_table.h +++ b/apps/machine/microblaze_generic/rsc_table.h @@ -7,7 +7,7 @@ /* * Resource table declarations. Resource table is placed in a separate * section of a bare-metal binary or firmware. It's used to describe - * shared memory (virtIO devices) resources the remoteproc master should + * shared memory (virtIO devices) resources the remoteproc host should * initialize and / or use to communicate with the firmware. */ #ifndef RSC_TABLE_H_ diff --git a/apps/machine/zynq7/platform_info.c b/apps/machine/zynq7/platform_info.c index d9d73f8e5..a243d5004 100644 --- a/apps/machine/zynq7/platform_info.c +++ b/apps/machine/zynq7/platform_info.c @@ -198,14 +198,14 @@ platform_create_rpmsg_vdev(void *platform, unsigned int vdev_index, xil_printf("initializing rpmsg vdev\r\n"); if (role == VIRTIO_DEV_DRIVER) { - /* Only RPMsg virtio master needs to initialize the + /* Only RPMsg virtio driver needs to initialize the * shared buffers pool */ rpmsg_virtio_init_shm_pool(&shpool, shbuf, (SHARED_MEM_SIZE - SHARED_BUF_OFFSET)); - /* RPMsg virtio slave can set shared buffers pool + /* RPMsg virtio device can set shared buffers pool * argument to NULL */ ret = rpmsg_init_vdev(rpmsg_vdev, vdev, ns_bind_cb, diff --git a/apps/machine/zynq7/platform_info.h b/apps/machine/zynq7/platform_info.h index 3cb0c203d..bb259700b 100644 --- a/apps/machine/zynq7/platform_info.h +++ b/apps/machine/zynq7/platform_info.h @@ -72,7 +72,7 @@ int platform_init(int argc, char *argv[], void **platform); * @platform: pointer to the private data * @vdev_index: index of the virtio device, there can more than one vdev * on the platform. - * @role: virtio master or virtio slave of the vdev + * @role: virtio driver or virtio device of the vdev * @rst_cb: virtio device reset callback * @ns_bind_cb: rpmsg name service bind callback * diff --git a/apps/machine/zynq7/platform_info_remoteproc_master.c b/apps/machine/zynq7/platform_info_remoteproc_master.c index fc9fe744c..62513e31f 100644 --- a/apps/machine/zynq7/platform_info_remoteproc_master.c +++ b/apps/machine/zynq7/platform_info_remoteproc_master.c @@ -35,10 +35,10 @@ extern struct hil_platform_ops zynq_a9_proc_ops; #define REMOTE_CPU_ID 1 /** - * This array provdes defnition of CPU nodes for master and remote + * This array provdes defnition of CPU nodes for host and remote * context. It contains two nodes because the same file is intended - * to use with both master and remote configurations. On zynq platform - * only one node definition is required for master/remote as there + * to use with both host and remote configurations. On zynq platform + * only one node definition is required for host/remote as there * are only two cores present in the platform. * * Only platform specific info is populated here. Rest of information @@ -63,15 +63,15 @@ extern struct hil_platform_ops zynq_a9_proc_ops; * * * 1) First node in the array is intended for the remote contexts and it - * defines Master CPU ID, shared memory, interrupts info, number of channels + * defines Host CPU ID, shared memory, interrupts info, number of channels * and there names. This node defines only one channel * "rpmsg-openamp-demo-channel". * - * 2)Second node is required by the master and it defines remote CPU ID, + * 2)Second node is required by the host and it defines remote CPU ID, * shared memory and interrupts info. In general no channel info is required by the - * Master node, however in baremetal master and linux remote case the linux - * rpmsg bus driver behaves as master so the rpmsg driver on linux side still needs - * channel info. This information is not required by the masters for baremetal + * Host node, however in baremetal host and linux remote case the linux + * rpmsg bus driver behaves as host so the rpmsg driver on linux side still needs + * channel info. This information is not required by the hosts for baremetal * remotes. * */ diff --git a/apps/machine/zynq7/rsc_table.c b/apps/machine/zynq7/rsc_table.c index e4b108545..6b3202ef7 100644 --- a/apps/machine/zynq7/rsc_table.c +++ b/apps/machine/zynq7/rsc_table.c @@ -8,7 +8,7 @@ /* * This file populates resource table for BM remote - * for use by the Linux Master + * for use by the Linux host */ #include diff --git a/apps/machine/zynq7/rsc_table.h b/apps/machine/zynq7/rsc_table.h index 37464335a..a428024c6 100644 --- a/apps/machine/zynq7/rsc_table.h +++ b/apps/machine/zynq7/rsc_table.h @@ -8,7 +8,7 @@ /* * This file populates resource table for BM remote - * for use by the Linux Master + * for use by the Linux host */ #ifndef RSC_TABLE_H_ diff --git a/apps/machine/zynqmp/platform_info.c b/apps/machine/zynqmp/platform_info.c index 68409d96d..b55147602 100644 --- a/apps/machine/zynqmp/platform_info.c +++ b/apps/machine/zynqmp/platform_info.c @@ -212,11 +212,11 @@ platform_create_rpmsg_vdev(void *platform, unsigned int vdev_index, } printf("Successfully created virtio device.\r\n"); - /* Only RPMsg virtio master needs to initialize the shared buffers pool */ + /* Only RPMsg virtio driver needs to initialize the shared buffers pool */ rpmsg_virtio_init_shm_pool(&shpool, shbuf, SHARED_BUF_SIZE); printf("initializing rpmsg vdev\r\n"); - /* RPMsg virtio slave can set shared buffers pool argument to NULL */ + /* RPMsg virtio device can set shared buffers pool argument to NULL */ ret = rpmsg_init_vdev(rpmsg_vdev, vdev, ns_bind_cb, shbuf_io, &shpool); if (ret) { diff --git a/apps/machine/zynqmp/platform_info.h b/apps/machine/zynqmp/platform_info.h index 45d6c89e6..7e8d0f9e3 100644 --- a/apps/machine/zynqmp/platform_info.h +++ b/apps/machine/zynqmp/platform_info.h @@ -6,7 +6,7 @@ /* * This file populates resource table for BM remote - * for use by the Linux Master + * for use by the Linux host */ #ifndef PLATFORM_INFO_H_ @@ -74,7 +74,7 @@ int platform_init(int argc, char *argv[], void **platform); * @platform: pointer to the private data * @vdev_index: index of the virtio device, there can more than one vdev * on the platform. - * @role: virtio master or virtio slave of the vdev + * @role: virtio driver or virtio device of the vdev * @rst_cb: virtio device reset callback * @ns_bind_cb: rpmsg name service bind callback * diff --git a/apps/machine/zynqmp_r5/platform_info.c b/apps/machine/zynqmp_r5/platform_info.c index aa77c96a0..93ae8fe57 100644 --- a/apps/machine/zynqmp_r5/platform_info.c +++ b/apps/machine/zynqmp_r5/platform_info.c @@ -215,12 +215,12 @@ platform_create_rpmsg_vdev(void *platform, unsigned int vdev_index, } xil_printf("initializing rpmsg shared buffer pool\r\n"); - /* Only RPMsg virtio master needs to initialize the shared buffers pool */ + /* Only RPMsg virtio driver needs to initialize the shared buffers pool */ rpmsg_virtio_init_shm_pool(&shpool, shbuf, (SHARED_MEM_SIZE - SHARED_BUF_OFFSET)); xil_printf("initializing rpmsg vdev\r\n"); - /* RPMsg virtio slave can set shared buffers pool argument to NULL */ + /* RPMsg virtio device can set shared buffers pool argument to NULL */ ret = rpmsg_init_vdev(rpmsg_vdev, vdev, ns_bind_cb, shbuf_io, &shpool); diff --git a/apps/machine/zynqmp_r5/platform_info.h b/apps/machine/zynqmp_r5/platform_info.h index 4a2f1cc5f..075b69e2c 100644 --- a/apps/machine/zynqmp_r5/platform_info.h +++ b/apps/machine/zynqmp_r5/platform_info.h @@ -95,7 +95,7 @@ int platform_init(int argc, char *argv[], void **platform); * @platform: pointer to the private data * @vdev_index: index of the virtio device, there can more than one vdev * on the platform. - * @role: virtio master or virtio slave of the vdev + * @role: virtio driver or virtio device of the vdev * @rst_cb: virtio device reset callback * @ns_bind_cb: rpmsg name service bind callback * diff --git a/apps/machine/zynqmp_r5/rsc_table.c b/apps/machine/zynqmp_r5/rsc_table.c index 30f45e2a3..e065767cb 100644 --- a/apps/machine/zynqmp_r5/rsc_table.c +++ b/apps/machine/zynqmp_r5/rsc_table.c @@ -8,7 +8,7 @@ /* * This file populates resource table for BM remote - * for use by the Linux Master + * for use by the Linux host */ #include diff --git a/apps/machine/zynqmp_r5/rsc_table.h b/apps/machine/zynqmp_r5/rsc_table.h index 4a81db3fd..1d32bab36 100644 --- a/apps/machine/zynqmp_r5/rsc_table.h +++ b/apps/machine/zynqmp_r5/rsc_table.h @@ -9,7 +9,7 @@ /* * This file populates resource table for BM remote - * for use by the Linux Master + * for use by the Linux host */ #ifndef RSC_TABLE_H_ diff --git a/apps/system/linux/machine/generic/platform_info.c b/apps/system/linux/machine/generic/platform_info.c index 532a070ed..9afd65e54 100644 --- a/apps/system/linux/machine/generic/platform_info.c +++ b/apps/system/linux/machine/generic/platform_info.c @@ -497,11 +497,11 @@ platform_create_rpmsg_vdev(void *platform, unsigned int vdev_index, } printf("initializing rpmsg shared buffer pool\r\n"); - /* Only RPMsg virtio master needs to initialize the shared buffers pool */ + /* Only RPMsg virtio driver needs to initialize the shared buffers pool */ rpmsg_virtio_init_shm_pool(&shpool, shbuf, SHARED_BUF_SIZE); printf("initializing rpmsg vdev\r\n"); - /* RPMsg virtio slave can set shared buffers pool argument to NULL */ + /* RPMsg virtio device can set shared buffers pool argument to NULL */ ret = rpmsg_init_vdev(rpmsg_vdev, vdev, ns_bind_cb, shbuf_io, &shpool); diff --git a/apps/system/linux/machine/generic/platform_info.h b/apps/system/linux/machine/generic/platform_info.h index 833b58e22..82d242db8 100644 --- a/apps/system/linux/machine/generic/platform_info.h +++ b/apps/system/linux/machine/generic/platform_info.h @@ -6,7 +6,7 @@ /* * This file populates resource table for BM remote - * for use by the Linux Master + * for use by the Linux host */ #ifndef PLATFORM_INFO_H @@ -42,7 +42,7 @@ int platform_init(int argc, char *argv[], void **platform); * @platform: pointer to the private data * @vdev_index: index of the virtio device, there can more than one vdev * on the platform. - * @role: virtio master or virtio slave of the vdev + * @role: virtio driver or virtio device of the vdev * @rst_cb: virtio device reset callback * @ns_bind_cb: rpmsg name service bind callback * diff --git a/apps/system/linux/machine/generic/rsc_table.c b/apps/system/linux/machine/generic/rsc_table.c index 19a5c456f..244d7c140 100644 --- a/apps/system/linux/machine/generic/rsc_table.c +++ b/apps/system/linux/machine/generic/rsc_table.c @@ -8,7 +8,7 @@ /* * This file populates resource table for BM remote - * for use by the Linux Master + * for use by the Linux host */ #include diff --git a/apps/system/linux/machine/generic/rsc_table.h b/apps/system/linux/machine/generic/rsc_table.h index 006c7e243..5f9b38311 100644 --- a/apps/system/linux/machine/generic/rsc_table.h +++ b/apps/system/linux/machine/generic/rsc_table.h @@ -8,7 +8,7 @@ /* * This file populates resource table for BM remote - * for use by the Linux Master + * for use by the Linux host */ #ifndef RSC_TABLE_H_ diff --git a/apps/tests/msg/rpmsg-ping.c b/apps/tests/msg/rpmsg-ping.c index 73bcd0517..f3c9ae7ca 100644 --- a/apps/tests/msg/rpmsg-ping.c +++ b/apps/tests/msg/rpmsg-ping.c @@ -5,7 +5,7 @@ /* * This is a sample demonstration application that showcases usage of rpmsg * This application is meant to run on the remote CPU running baremetal code. - * This application echoes back data that was sent to it by the master core. + * This application echoes back data that was sent to it by the host core. */ #include diff --git a/apps/tests/msg/rpmsg-update.c b/apps/tests/msg/rpmsg-update.c index 7b7246ac5..89b6e543c 100644 --- a/apps/tests/msg/rpmsg-update.c +++ b/apps/tests/msg/rpmsg-update.c @@ -5,7 +5,7 @@ /* * This is a sample demonstration application that showcases usage of rpmsg * This application is meant to run on the remote CPU running baremetal code. - * This application echoes back data that was sent to it by the master core. + * This application echoes back data that was sent to it by the host core. */ #include @@ -43,7 +43,7 @@ static int rpmsg_endpoint_cb(struct rpmsg_endpoint *ept, void *data, size_t len, return RPMSG_SUCCESS; } - /* Send data back to master */ + /* Send data back to host */ while (1) { int ret; diff --git a/docs/apps/echo_test/README.md b/docs/apps/echo_test/README.md index 820e38252..1ae5e4b08 100644 --- a/docs/apps/echo_test/README.md +++ b/docs/apps/echo_test/README.md @@ -28,13 +28,13 @@ You will need to manually compile the following kernel modules with your Linux k #### Linux Userspace Compliation * Compile `obsolete/apps/echo_test/system/linux/userspace/echo_test` into your Linux OS. -* If you are running generic(baremetal) system as remoteproc slave, and Linux as remoteproc master, please also add the built generic `echo_test` executable to the firmware of your Linux OS. +* If you are running generic(baremetal) system as remoteproc remote, and Linux as remoteproc host, please also add the built generic `echo_test` executable to the firmware of your Linux OS. ## Run the Demo ### Load the Demo After Linux boots, -* Load the machine remoteproc. If Linux runs as remoteproc master, you will need to pass the other processor's echo_test binary as firmware argument to the remoteproc module. +* Load the machine remoteproc. If Linux runs as remoteproc host, you will need to pass the other processor's echo_test binary as firmware argument to the remoteproc module. * If you run the Linux kernel application demo, load the `rpmsg_echo_test_kern_app` module. You will see the kernel application send the message to remote and the remote reply back and the kernel application will verify the result. * If you run the userspace application demo, load the `rpmsg_user_dev_driver` module. * If you run the userspace application demo, you will see the similar output on the console: diff --git a/docs/apps/matrix_multiply/README.md b/docs/apps/matrix_multiply/README.md index 93889bb7f..e1e44c047 100644 --- a/docs/apps/matrix_multiply/README.md +++ b/docs/apps/matrix_multiply/README.md @@ -28,13 +28,13 @@ You will need to manually compile the following kernel modules with your Linux k #### Linux Userspace Compliation * Compile `obsolete/apps/matrix_multiply/system/linux/userspace/mat_mul_demo` into your Linux OS. -* If you are running generic(baremetal) system as remoteproc slave, and Linux as remoteproc master, please also add the built generic `matrix_multiply` executable to the firmware of your Linux OS. +* If you are running generic(baremetal) system as remoteproc remote, and Linux as remoteproc host, please also add the built generic `matrix_multiply` executable to the firmware of your Linux OS. ## Run the Demo ### Load the Demo After Linux boots, -* Load the machine remoteproc. If Linux runs as remoteproc master, you will need to pass the other processor's matrix_multiply binary as firmware argument to the remoteproc module. +* Load the machine remoteproc. If Linux runs as remoteproc host, you will need to pass the other processor's matrix_multiply binary as firmware argument to the remoteproc module. * If you run the Linux kernel application demo, load the `rpmsg_mat_mul_kern_app` module, you will see the kernel app will generate two matrices to the other processor, and output the result matrix returned by the other processor. * If you run the userspace application demo, load the `rpmsg_user_dev_driver` module. * If you run the userspace application demo `mat_mul_demo`, you will see the similar output on the console: diff --git a/docs/img-src/coprocessor-rpmsg-ns-dynamic.gv b/docs/img-src/coprocessor-rpmsg-ns-dynamic.gv index b9bf8720a..989e7f762 100644 --- a/docs/img-src/coprocessor-rpmsg-ns-dynamic.gv +++ b/docs/img-src/coprocessor-rpmsg-ns-dynamic.gv @@ -5,8 +5,8 @@ digraph G { subgraph roles { node [style="filled", fillcolor="lightblue"]; - master [label="Master"]; - slave [label="Slave"]; + host [label="Host"]; + remote [label="Remote"]; } subgraph m_comment_nodes { @@ -26,7 +26,7 @@ digraph G { m_remoteproc_init [label="rproc = remoteproc_init(&remoteproc_ops, &arg);"] m_remoteproc_load [label="calls remoteproc_load() to load application"]; m_remoteproc_boot [shape="box", label="ret=remoteproc_boot(&rproc)"]; - m_remoteproc_get_vdev [label="vdev=remoteproc_create_virtio(rproc, rpmsg_vdev_id, MASTER, NULL);"]; + m_remoteproc_get_vdev [label="vdev=remoteproc_create_virtio(rproc, rpmsg_vdev_id, VIRTIO_DEV_DRIVER, NULL);"]; m_rpmsg_shmpool_init[label="rpmsg_virtio_init_shm_pool(shpool, shbuf, shbuf_pool_size);"]; m_rpmsg_vdev_init [label="rpdev=rpmsg_init_vdev(rpvdev, vdev, ns_bind_cb, &shm_io, shpool);"]; m_rpmsg_ns_cb [label="\lrpmsg_ns_callback() will see if there is a local ep registered.\lIf yes, bind the ep; otherwise, call ns_bind_cb.\l"]; @@ -48,7 +48,7 @@ digraph G { s_remoteproc_init [label="rproc = remoteproc_init(&remoteproc_ops, &arg);"]; s_remoteproc_parse_rsc [label="ret = remoteproc_set_rsc_table(rproc, &rsc_table, rsc_size)"]; - s_remoteproc_get_vdev [label="vdev=remoteproc_create_virtio(rproc, rpmsg_vdev_id, SLAVE, rst_cb);"]; + s_remoteproc_get_vdev [label="vdev=remoteproc_create_virtio(rproc, rpmsg_vdev_id, VIRTIO_DEV_DEVICE, rst_cb);"]; s_rpmsg_vdev_init [label="rpdev=rpmsg_init_vdev(rpvdev, vdev, ns_bind_cb, &shm_io, NULL);"]; s_rpmsg_ns_cb [label="\lrpmsg_ns_callback() will see if there is a local ep registered.\lIf yes, bind the ep; otherwise, it will call ns_bind_cb()."]; s_rpmsg_ns_bind_cb [label="s_rpsmg_ns_bind_cb(ept_name, remote_addr)"]; @@ -69,12 +69,12 @@ digraph G { subgraph s_comment_nodes { node [group=s_comment, shape="note", style="filled", fillcolor="yellow"]; rank="same"; - s_rpmsg_vdev_init_comment [label="\l* If vdev supports name service, it will create name service endpoint;\l* It will not return until the master set status to DRIVER READY\l"]; + s_rpmsg_vdev_init_comment [label="\l* If vdev supports name service, it will create name service endpoint;\l* It will not return until the host set status to DRIVER READY\l"]; s_rpmsg_rx_cb_comment [label="\l* It will look for the endpoint which matches the destination address.\lIf the two endpoints hasn't binded yet,\lit will set the local endpoint's destination address with the source address in the message\l"]; } - master -> m_remoteproc_init [dir="none"]; - slave -> s_remoteproc_init [dir="none"]; + host -> m_remoteproc_init [dir="none"]; + remote -> s_remoteproc_init [dir="none"]; s_rpmsg_create_ep -> m_rpmsg_ns_cb [label="NS announcement"]; m_rpmsg_create_ep -> s_rpmsg_ns_cb [label="NS announcement"]; m_rpmsg_send -> s_rpmsg_rx_cb [label="RPMsg data"]; @@ -90,8 +90,8 @@ digraph G { s_rpmsg_vdev_init -> s_rpmsg_vdev_init_comment [dir="none"]; s_rpmsg_rx_cb -> s_rpmsg_rx_cb_comment [dir="none"]; - {rank=same; master; m_remoteproc_init} - {rank=same; slave; s_remoteproc_init} + {rank=same; host; m_remoteproc_init} + {rank=same; remote; s_remoteproc_init} } diff --git a/docs/img-src/coprocessor-rpmsg-ns.gv b/docs/img-src/coprocessor-rpmsg-ns.gv index bf6671364..169070397 100644 --- a/docs/img-src/coprocessor-rpmsg-ns.gv +++ b/docs/img-src/coprocessor-rpmsg-ns.gv @@ -5,8 +5,8 @@ digraph G { subgraph roles { node [style="filled", fillcolor="lightblue"]; - master [label="Master"]; - slave [label="Slave"]; + host [label="Host"]; + remote [label="Remote"]; } subgraph m_comment_nodes { @@ -26,7 +26,7 @@ digraph G { m_remoteproc_init [label="rproc = remoteproc_init(&remoteproc_ops, &arg);"] m_remoteproc_load [label="calls remoteproc_load() to load application"]; m_remoteproc_boot [shape="box", label="ret=remoteproc_boot(&rproc)"]; - m_remoteproc_get_vdev [label="vdev=remoteproc_create_virtio(rproc, rpmsg_vdev_id, MASTER, NULL);"]; + m_remoteproc_get_vdev [label="vdev=remoteproc_create_virtio(rproc, rpmsg_vdev_id, VIRTIO_DEV_DRIVER, NULL);"]; m_rpmsg_shmpool_init[label="rpmsg_virtio_init_shm_pool(shpool, shbuf, shbuf_pool_size);"]; m_rpmsg_vdev_init [label="rpdev=rpmsg_init_vdev(rpvdev, vdev, ns_bind_cb, &shm_io, shpool);"]; m_rpmsg_ns_cb [label="\lrpmsg_ns_callback() will see if there is a local ep registered.\lIf yes, bind the ep; otherwise, call ns_bind_cb.\l"]; @@ -48,7 +48,7 @@ digraph G { s_remoteproc_init [label="rproc = remoteproc_init(&remoteproc_ops, &arg);"]; s_remoteproc_parse_rsc [label="ret = remoteproc_set_rsc_table(rproc, &rsc_table, rsc_size)"]; - s_remoteproc_get_vdev [label="vdev=remoteproc_create_virtio(rproc, rpmsg_vdev_id, SLAVE, rst_cb);"]; + s_remoteproc_get_vdev [label="vdev=remoteproc_create_virtio(rproc, rpmsg_vdev_id, VIRTIO_DEV_DEVICE, rst_cb);"]; s_rpmsg_vdev_init [label="rpdev=rpmsg_init_vdev(rpvdev, vdev, ns_bind_cb, &shm_io, NULL);"]; s_rpmsg_create_ep [label="\lept=rpmsg_create_ept(ept, rdev, ept_name, ept_addr, dest_addr, \lendpoint_cb, ns_unbind_cb);\l"]; s_rpmsg_ns_cb [label="\lrpmsg_ns_callback() will see if there is a local ep registered.\lIf yes, bind the ep; otherwise, call ns_binc_cb.\l"]; @@ -67,12 +67,12 @@ digraph G { subgraph s_comment_nodes { node [group=s_comment, shape="note", style="filled", fillcolor="yellow"]; rank="same"; - s_rpmsg_vdev_init_comment [label="\l* If vdev supports name service, it will create name service endpoint;\l* It will not return until the master set status to DRIVER READY\l"]; + s_rpmsg_vdev_init_comment [label="\l* If vdev supports name service, it will create name service endpoint;\l* It will not return until the host set status to DRIVER READY\l"]; s_rpmsg_rx_cb_comment [label="\l* It will look for the endpoint which matches the destination address.\lIf the two endpoints hasn't binded yet,\lit will set the local endpoint's destination address with the source address in the message\l"]; } - master -> m_remoteproc_init [dir="none"]; - slave -> s_remoteproc_init [dir="none"]; + host -> m_remoteproc_init [dir="none"]; + remote -> s_remoteproc_init [dir="none"]; s_rpmsg_create_ep -> m_rpmsg_ns_cb [label="NS announcement"]; m_rpmsg_create_ep -> s_rpmsg_ns_cb [label="NS announcement"]; m_rpmsg_send -> s_rpmsg_rx_cb [label="RPMsg data"]; @@ -88,8 +88,8 @@ digraph G { s_rpmsg_vdev_init -> s_rpmsg_vdev_init_comment [dir="none"]; s_rpmsg_rx_cb -> s_rpmsg_rx_cb_comment [dir="none"]; - {rank=same; master; m_remoteproc_init} - {rank=same; slave; s_remoteproc_init} + {rank=same; host; m_remoteproc_init} + {rank=same; remote; s_remoteproc_init} } diff --git a/docs/img-src/coprocessor-rpmsg-static-ep.gv b/docs/img-src/coprocessor-rpmsg-static-ep.gv index 44f4839c0..1ee7fc01c 100644 --- a/docs/img-src/coprocessor-rpmsg-static-ep.gv +++ b/docs/img-src/coprocessor-rpmsg-static-ep.gv @@ -5,8 +5,8 @@ digraph G { subgraph roles { node [style="filled", fillcolor="lightblue"]; - master [label="Master"]; - slave [label="Slave"]; + host [label="Host"]; + remote [label="Remote"]; } subgraph m_comment_nodes { @@ -24,7 +24,7 @@ digraph G { m_remoteproc_init [label="rproc = remoteproc_init(&remoteproc_ops, &arg);"]; m_remoteproc_load [label="calls remoteproc_load() to load application"]; m_remoteproc_boot [shape="box", label="ret=remoteproc_boot(&rproc)"]; - m_remoteproc_get_vdev [label="vdev=remoteproc_create_virtio(rproc, rpmsg_vdev_id, MASTER, NULL);"]; + m_remoteproc_get_vdev [label="vdev=remoteproc_create_virtio(rproc, rpmsg_vdev_id, VIRTIO_DEV_DRIVER, NULL);"]; m_rpmsg_shmpool_init[label="rpmsg_virtio_init_shm_pool(shpool, shbuf, shbuf_pool_size);"]; m_rpmsg_vdev_init [label="rpdev=rpmsg_init_vdev(rpvdev, vdev, ns_bind_cb, &shm_io, shpool);"]; m_rpmsg_create_ep [label="\lept=rpmsg_create_ept(ept, rdev, ept_name, ept_addr, dest_addr, \lendpoint_cb, ns_unbind_cb);\l"]; @@ -45,7 +45,7 @@ digraph G { s_remoteproc_init [label="rproc = remoteproc_init(&remoteproc_ops, &arg);"]; s_remoteproc_parse_rsc [label="ret = remoteproc_set_rsc_table(rproc, &rsc_table, rsc_size)"]; - s_remoteproc_get_vdev [label="vdev=remoteproc_create_virtio(rproc, rpmsg_vdev_id, SLAVE, rst_cb);"]; + s_remoteproc_get_vdev [label="vdev=remoteproc_create_virtio(rproc, rpmsg_vdev_id, VIRTIO_DEV_DEVICE, rst_cb);"]; s_rpmsg_vdev_init [label="rpdev=rpmsg_init_vdev(rpvdev, vdev, ns_bind_cb, &shm_io, NULL);"]; s_rpmsg_create_ep [label="\lept=rpmsg_create_ept(ept, rdev, ept_name, ept_addr, dest_addr, \lendpoint_cb, ns_unbind_cb);\l"]; s_rpmsg_send [label="rpmsg_send(ept,data)"]; @@ -63,12 +63,12 @@ digraph G { subgraph s_comment_nodes { node [group=s_comment, shape="note", style="filled", fillcolor="yellow"]; rank="same"; - s_rpmsg_vdev_init_comment [label="\l* As vdev doesn't support name service, it will not create name service endpoint;\l* It will not return until the master set status to DRIVER READY\l"]; + s_rpmsg_vdev_init_comment [label="\l* As vdev doesn't support name service, it will not create name service endpoint;\l* It will not return until the host set status to DRIVER READY\l"]; s_rpmsg_rx_cb_comment [label="\l* It will look for the endpoint which matches the destination address.\lIf no endpoint has found, it will drop the message.\l"]; } - master -> m_remoteproc_init [dir="none"]; - slave -> s_remoteproc_init [dir="none"]; + host -> m_remoteproc_init [dir="none"]; + remote -> s_remoteproc_init [dir="none"]; m_rpmsg_send -> s_rpmsg_rx_cb [label="RPMsg data"]; s_rpmsg_send -> m_rpmsg_rx_cb [label="RPMsg data"]; @@ -80,8 +80,8 @@ digraph G { s_rpmsg_vdev_init -> s_rpmsg_vdev_init_comment [dir="none"]; s_rpmsg_rx_cb -> s_rpmsg_rx_cb_comment [dir="none"]; - {rank=same; master; m_remoteproc_init} - {rank=same; slave; s_remoteproc_init} + {rank=same; host; m_remoteproc_init} + {rank=same; remote; s_remoteproc_init} } diff --git a/docs/rpmsg-design.md b/docs/rpmsg-design.md index a8aa31fc6..f28b78294 100644 --- a/docs/rpmsg-design.md +++ b/docs/rpmsg-design.md @@ -14,7 +14,7 @@ running on two processors. ![Creating Endpoint Dynamically with Name Service](img/coprocessor-rpmsg-ns-dynamic.png) ## RPMsg User APIs -* RPMsg virtio master to initialize the shared buffers pool(RPMsg virtio slave +* RPMsg virtio driver to initialize the shared buffers pool(RPMsg virtio device doesn't need to use this API): ``` void rpmsg_virtio_init_shm_pool(struct rpmsg_virtio_shm_pool *shpool, diff --git a/lib/include/openamp/remoteproc_virtio.h b/lib/include/openamp/remoteproc_virtio.h index 70cff9771..a5c609308 100644 --- a/lib/include/openamp/remoteproc_virtio.h +++ b/lib/include/openamp/remoteproc_virtio.h @@ -46,7 +46,7 @@ struct remoteproc_virtio { * * Create rproc virtio vdev * - * @role: 0 - virtio master, 1 - virtio slave + * @role: VIRTIO_DEV_DRIVER or VIRTIO_DEV_DEVICE * @notifyid: virtio device notification id * @rsc: pointer to the virtio device resource * @rsc_io: pointer to the virtio device resource I/O region diff --git a/lib/remoteproc/remoteproc_virtio.c b/lib/remoteproc/remoteproc_virtio.c index cbfd96604..a623276ea 100644 --- a/lib/remoteproc/remoteproc_virtio.c +++ b/lib/remoteproc/remoteproc_virtio.c @@ -182,7 +182,7 @@ static const struct virtio_dispatch remoteproc_virtio_dispatch_funcs = { #ifndef VIRTIO_DEVICE_ONLY /* * We suppose here that the vdev is in a shared memory so that can - * be access only by one core: the master. In this case salve core has + * be access only by one core: the host. In this case salve core has * only read access right. */ .set_status = rproc_virtio_set_status, @@ -250,7 +250,7 @@ rproc_virtio_create_vdev(unsigned int role, unsigned int notifyid, #ifndef VIRTIO_DEVICE_ONLY if (role == VIRTIO_DEV_DRIVER) { uint32_t dfeatures = rproc_virtio_get_dfeatures(vdev); - /* Assume the master support all slave features */ + /* Assume the virtio driver support all remote features */ rproc_virtio_negotiate_features(vdev, dfeatures); } #endif @@ -336,9 +336,9 @@ void rproc_virtio_wait_remote_ready(struct virtio_device *vdev) uint8_t status; /* - * No status available for slave. As Master has not to wait - * slave action, we can return. Behavior should be updated - * in future if a slave status is added. + * No status available for remote. As virtio driver has not to wait + * remote action, we can return. Behavior should be updated + * in future if a remote status is added. */ if (vdev->role == VIRTIO_DEV_DRIVER) return; diff --git a/lib/remoteproc/rsc_table_parser.c b/lib/remoteproc/rsc_table_parser.c index 129f0a030..6ee7db6e9 100644 --- a/lib/remoteproc/rsc_table_parser.c +++ b/lib/remoteproc/rsc_table_parser.c @@ -169,7 +169,7 @@ int handle_trace_rsc(struct remoteproc *rproc, void *rsc) if (vdev_rsc->da != FW_RSC_U32_ADDR_ANY && vdev_rsc->len != 0) return 0; - /* FIXME: master should allocated a memory used by slave */ + /* FIXME: The host should allocated a memory used by remote */ return -RPROC_ERR_RSC_TAB_NS; } diff --git a/lib/rpmsg/rpmsg_virtio.c b/lib/rpmsg/rpmsg_virtio.c index 87d2ad708..cd08f40b7 100644 --- a/lib/rpmsg/rpmsg_virtio.c +++ b/lib/rpmsg/rpmsg_virtio.c @@ -260,7 +260,7 @@ static int _rpmsg_virtio_get_buffer_size(struct rpmsg_virtio_device *rvdev) #ifndef VIRTIO_DEVICE_ONLY if (role == RPMSG_HOST) { /* - * If device role is Master then buffers are provided by us, + * If device role is host then buffers are provided by us, * so just provide the macro. */ length = rvdev->config.h2r_buf_size - sizeof(struct rpmsg_hdr); @@ -270,7 +270,7 @@ static int _rpmsg_virtio_get_buffer_size(struct rpmsg_virtio_device *rvdev) #ifndef VIRTIO_DRIVER_ONLY if (role == RPMSG_REMOTE) { /* - * If other core is Master then buffers are provided by it, + * If other core is host then buffers are provided by it, * so get the buffer size from the virtqueue. */ length = @@ -676,7 +676,7 @@ int rpmsg_init_vdev_with_config(struct rpmsg_virtio_device *rvdev, #ifndef VIRTIO_DRIVER_ONLY if (role == RPMSG_REMOTE) { - /* wait synchro with the master */ + /* wait synchro with the host */ rpmsg_virtio_wait_remote_ready(rvdev); } #endif /*!VIRTIO_DRIVER_ONLY*/ diff --git a/lib/virtio/virtqueue.c b/lib/virtio/virtqueue.c index d9895334d..e53869234 100644 --- a/lib/virtio/virtqueue.c +++ b/lib/virtio/virtqueue.c @@ -99,7 +99,7 @@ int virtqueue_create(struct virtio_device *virt_dev, unsigned short id, /* * CACHE: nothing to be done here. Only desc.next is setup at this - * stage but that is only written by master, so no need to flush it. + * stage but that is only written by driver, so no need to flush it. */ return status; @@ -188,7 +188,7 @@ void *virtqueue_get_buffer(struct virtqueue *vq, uint32_t *len, uint16_t *idx) void *cookie; uint16_t used_idx, desc_idx; - /* Used.idx is updated by slave, so we need to invalidate */ + /* Used.idx is updated by the virtio device, so we need to invalidate */ VRING_INVALIDATE(vq->vq_ring.used->idx); if (!vq || vq->vq_used_cons_idx == vq->vq_ring.used->idx) @@ -201,7 +201,7 @@ void *virtqueue_get_buffer(struct virtqueue *vq, uint32_t *len, uint16_t *idx) atomic_thread_fence(memory_order_seq_cst); - /* Used.ring is written by slave, invalidate it */ + /* Used.ring is written by remote, invalidate it */ VRING_INVALIDATE(vq->vq_ring.used->ring[used_idx]); desc_idx = (uint16_t)uep->id; @@ -263,7 +263,7 @@ void *virtqueue_get_available_buffer(struct virtqueue *vq, uint16_t *avail_idx, atomic_thread_fence(memory_order_seq_cst); - /* Avail.idx is updated by master, invalidate it */ + /* Avail.idx is updated by driver, invalidate it */ VRING_INVALIDATE(vq->vq_ring.avail->idx); if (vq->vq_available_idx == vq->vq_ring.avail->idx) { return NULL; @@ -273,11 +273,11 @@ void *virtqueue_get_available_buffer(struct virtqueue *vq, uint16_t *avail_idx, head_idx = vq->vq_available_idx++ & (vq->vq_nentries - 1); - /* Avail.ring is updated by master, invalidate it */ + /* Avail.ring is updated by driver, invalidate it */ VRING_INVALIDATE(vq->vq_ring.avail->ring[head_idx]); *avail_idx = vq->vq_ring.avail->ring[head_idx]; - /* Invalidate the desc entry written by master before accessing it */ + /* Invalidate the desc entry written by driver before accessing it */ VRING_INVALIDATE(vq->vq_ring.desc[*avail_idx]); buffer = virtqueue_phys_to_virt(vq, vq->vq_ring.desc[*avail_idx].addr); *len = vq->vq_ring.desc[*avail_idx].len; @@ -308,20 +308,20 @@ int virtqueue_add_consumed_buffer(struct virtqueue *vq, uint16_t head_idx, VQUEUE_BUSY(vq); - /* CACHE: used is never written by master, so it's safe to directly access it */ + /* CACHE: used is never written by driver, so it's safe to directly access it */ used_idx = vq->vq_ring.used->idx & (vq->vq_nentries - 1); used_desc = &vq->vq_ring.used->ring[used_idx]; used_desc->id = head_idx; used_desc->len = len; - /* We still need to flush it because this is read by master */ + /* We still need to flush it because this is read by driver */ VRING_FLUSH(vq->vq_ring.used->ring[used_idx]); atomic_thread_fence(memory_order_seq_cst); vq->vq_ring.used->idx++; - /* Used.idx is read by master, so we need to flush it */ + /* Used.idx is read by driver, so we need to flush it */ VRING_FLUSH(vq->vq_ring.used->idx); /* Keep pending count until virtqueue_notify(). */ @@ -444,7 +444,7 @@ uint32_t virtqueue_get_desc_size(struct virtqueue *vq) uint16_t avail_idx = 0; uint32_t len = 0; - /* Avail.idx is updated by master, invalidate it */ + /* Avail.idx is updated by driver, invalidate it */ VRING_INVALIDATE(vq->vq_ring.avail->idx); if (vq->vq_available_idx == vq->vq_ring.avail->idx) { @@ -455,11 +455,11 @@ uint32_t virtqueue_get_desc_size(struct virtqueue *vq) head_idx = vq->vq_available_idx & (vq->vq_nentries - 1); - /* Avail.ring is updated by master, invalidate it */ + /* Avail.ring is updated by driver, invalidate it */ VRING_INVALIDATE(vq->vq_ring.avail->ring[head_idx]); avail_idx = vq->vq_ring.avail->ring[head_idx]; - /* Invalidate the desc entry written by master before accessing it */ + /* Invalidate the desc entry written by driver before accessing it */ VRING_INVALIDATE(vq->vq_ring.desc[avail_idx].len); len = vq->vq_ring.desc[avail_idx].len; @@ -495,7 +495,7 @@ static uint16_t vq_ring_add_buffer(struct virtqueue *vq, VQASSERT(vq, idx != VQ_RING_DESC_CHAIN_END, "premature end of free desc chain"); - /* CACHE: No need to invalidate desc because it is only written by master */ + /* CACHE: No need to invalidate desc because it is only written by driver */ dp = &desc[idx]; dp->addr = virtqueue_virt_to_phys(vq, buf_list[i].buf); dp->len = buf_list[i].len; @@ -532,7 +532,7 @@ static void vq_ring_free_chain(struct virtqueue *vq, uint16_t desc_idx) struct vring_desc *dp; struct vq_desc_extra *dxp; - /* CACHE: desc is never written by slave, no need to invalidate */ + /* CACHE: desc is never written by remote, no need to invalidate */ VQ_RING_ASSERT_VALID_IDX(vq, desc_idx); dp = &vq->vq_ring.desc[desc_idx]; dxp = &vq->vq_descx[desc_idx]; @@ -560,7 +560,7 @@ static void vq_ring_free_chain(struct virtqueue *vq, uint16_t desc_idx) * newly freed chain. If the virtqueue was completely used, then * head would be VQ_RING_DESC_CHAIN_END (ASSERTed above). * - * CACHE: desc.next is never read by slave, no need to flush it. + * CACHE: desc.next is never read by remote, no need to flush it. */ dp->next = vq->vq_desc_head_idx; vq->vq_desc_head_idx = desc_idx; @@ -608,7 +608,7 @@ static void vq_ring_update_avail(struct virtqueue *vq, uint16_t desc_idx) * currently running on another CPU, we can keep it processing the new * descriptor. * - * CACHE: avail is never written by slave, so it is safe to not invalidate here + * CACHE: avail is never written by remote, so it is safe to not invalidate here */ avail_idx = vq->vq_ring.avail->idx & (vq->vq_nentries - 1); vq->vq_ring.avail->ring[avail_idx] = desc_idx; @@ -778,7 +778,7 @@ static int virtqueue_nused(struct virtqueue *vq) { uint16_t used_idx, nused; - /* Used is written by slave */ + /* Used is written by remote */ VRING_INVALIDATE(vq->vq_ring.used->idx); used_idx = vq->vq_ring.used->idx; @@ -799,7 +799,7 @@ static int virtqueue_navail(struct virtqueue *vq) { uint16_t avail_idx, navail; - /* Avail is written by master */ + /* Avail is written by driver */ VRING_INVALIDATE(vq->vq_ring.avail->idx); avail_idx = vq->vq_ring.avail->idx;