[PATCH v4 3/3] rpmsg: ctrl: Introduce RPMSG_CREATE_EPT_FD_IOCTL uAPI

2025-06-09 Thread Dawei Li
- ioctl(fd, RPMSG_CREATE_EPT_FD_IOCTL, &info); - fd_ep = info.fd - operations on fd_ep(write, read, poll ioctl) - ioctl(fd_ep, RPMSG_DESTROY_EPT_IOCTL) - close(fd_ep) - close(fd) Signed-off-by: Dawei Li --- drivers/rpmsg/rpmsg_ctrl.c | 35 --- include/uapi/linu

[PATCH v4 0/3] rpmsg: Introduce RPMSG_CREATE_EPT_FD_IOCTL uAPI

2025-06-09 Thread Dawei Li
v/ Changes in v3: - s/anon/anonymous (Mathieu) - API naming adjustment (Mathieu) - __rpmsg_chrdev_eptdev_alloc -> rpmsg_eptdev_alloc - __rpmsg_chrdev_eptdev_add -> rpmsg_eptdev_add - Add parameter 'flags' to uAPI so user can specify file flags explicitly on creating anon

[PATCH v4 2/3] rpmsg: char: Implement eptdev based on anonymous inode

2025-06-09 Thread Dawei Li
Introduce new eptdev abstraction based on anonymous inode. The new API is exactly same with legacy one except: - It's anonymous and devnode/path free. - Its fops->open() is empty. Signed-off-by: Dawei Li --- drivers/rpmsg/rpmsg_char.c | 49 ++ drive

[PATCH v4 1/3] rpmsg: char: Reuse eptdev logic for anonymous device

2025-06-09 Thread Dawei Li
the fd to userspace. The legacy abstraction based on struct dev and struct cdev is honored for: - Avoid legacy uAPI break(RPMSG_CREATE_EPT_IOCTL) - Reuse existing logic: -- dev_err() and friends. -- Life cycle management of struct device. Signed-off-by: Dawei Li --- drivers/rpmsg/rpmsg_char.

Re: [PATCH v3 3/3] rpmsg: ctrl: Introduce RPMSG_CREATE_EPT_FD_IOCTL uAPI

2025-05-30 Thread Dawei Li
HI Beleswar, Thanks for reviewing. On Fri, May 30, 2025 at 03:15:28PM +0530, Beleswar Prasad Padhi wrote: > Hi Dawei, > > On 19/05/25 20:38, Dawei Li wrote: > > Implement RPMSG_CREATE_EPT_FD_IOCTL, new uAPI for rpmsg ctrl, which > > shares most of operations of RPMSG_CR

[PATCH v3 2/3] rpmsg: char: Implement eptdev based on anonymous inode

2025-05-19 Thread Dawei Li
Introduce new eptdev abstraction based on anonymous inode. The new API is exactly same with legacy one except: - It's anonymous and devnode/path free. - Its fops->open() is empty. Signed-off-by: Dawei Li --- drivers/rpmsg/rpmsg_char.c | 49 ++ drive

[PATCH v3 3/3] rpmsg: ctrl: Introduce RPMSG_CREATE_EPT_FD_IOCTL uAPI

2025-05-19 Thread Dawei Li
- ioctl(fd, RPMSG_CREATE_EPT_FD_IOCTL, &info); - fd_ep = info.fd - operations on fd_ep(write, read, poll ioctl) - ioctl(fd_ep, RPMSG_DESTROY_EPT_IOCTL) - close(fd_ep) - close(fd) Signed-off-by: Dawei Li --- drivers/rpmsg/rpmsg_ctrl.c | 38 ++ include/uapi/linu

[PATCH v3 0/3] rpmsg: Introduce RPMSG_CREATE_EPT_FD_IOCTL uAPI

2025-05-19 Thread Dawei Li
ecify file flags explicitly on creating anonymous inode. - Link to v2: https://lore.kernel.org/all/20250509155927.109258-1-dawei...@linux.dev/ Changes in v2: - Fix compilation error for !CONFIG_RPMSG_CHAR config(Test robot). - Link to v1: https://lore.kernel.org/all/20250507141712.4276-1-dawei...@

[PATCH v3 1/3] rpmsg: char: Reuse eptdev logic for anonymous device

2025-05-19 Thread Dawei Li
the fd to userspace. The legacy abstraction based on struct dev and struct cdev is honored for: - Avoid legacy uAPI break(RPMSG_CREATE_EPT_IOCTL) - Reuse existing logic: -- dev_err() and friends. -- Life cycle management of struct device. Signed-off-by: Dawei Li --- drivers/rpmsg/rpmsg_char.

Re: [PATCH v2 1/3] rpmsg: char: Reuse eptdev logic for anon device

2025-05-16 Thread Dawei Li
Hi Mathieu, Thanks for reviewing. On Thu, May 15, 2025 at 02:24:04PM -0600, Mathieu Poirier wrote: > Hi, > > On Fri, May 09, 2025 at 11:59:25PM +0800, Dawei Li wrote: > > Current uAPI implementation for rpmsg ctrl & char device manipulation is > > abstr

[PATCH v2 1/3] rpmsg: char: Reuse eptdev logic for anon device

2025-05-09 Thread Dawei Li
ce node and opening it, rpmsg code just make a anon inode representing eptdev and return the fd to userspace. The legacy abstraction based on struct dev and struct cdev is honored for: - Avoid legacy uAPI break(RPMSG_CREATE_EPT_IOCTL) - Reuse existing logic: -- dev_err() and friends. -- Life cy

[PATCH v2 2/3] rpmsg: char: Implement eptdev based on anon inode

2025-05-09 Thread Dawei Li
Introduce new eptdev abstraction based on anon inode. The new API is exactly same with legacy one except: - It's anonymous and devnode/path free. - Its fops->open() is empty. Signed-off-by: Dawei Li --- drivers/rpmsg/rpmsg_char.c | 44 ++ drive

[PATCH v2 3/3] rpmsg: ctrl: Introduce RPMSG_CREATE_EPT_FD_IOCTL uAPI

2025-05-09 Thread Dawei Li
- ioctl(fd, RPMSG_CREATE_EPT_FD_IOCTL, &info); - fd_ep = info.fd - operations on fd_ep(write, read, poll ioctl) - ioctl(fd_ep, RPMSG_DESTROY_EPT_IOCTL) - close(fd_ep) - close(fd) Signed-off-by: Dawei Li --- drivers/rpmsg/rpmsg_ctrl.c | 37 + include/uapi/linu

[PATCH v2 0/3] rpmsg: Introduce RPMSG_CREATE_EPT_FD_IOCTL uAPI

2025-05-09 Thread Dawei Li
261488 75.7 29 10 19719341 263299 74.8 30 10 19871390258465 76.8 # Changelog: Changes in v2: - Fix compilation error for !CONFIG_RPMSG_CHAR config(Test robot). - Link to v1: https://lore.kernel.org/all/20250507141712.427

[PATCH 3/3] rpmsg: ctrl: Introduce RPMSG_CREATE_EPT_FD_IOCTL uAPI

2025-05-07 Thread Dawei Li
- ioctl(fd, RPMSG_CREATE_EPT_FD_IOCTL, &info); - fd_ep = info.fd - operations on fd_ep(write, read, poll ioctl) - ioctl(fd_ep, RPMSG_DESTROY_EPT_IOCTL) - close(fd_ep) - close(fd) Signed-off-by: Dawei Li --- drivers/rpmsg/rpmsg_ctrl.c | 37 + include/uapi/linu

[PATCH 1/3] rpmsg: char: Reuse eptdev logic for anon device

2025-05-07 Thread Dawei Li
ce node and opening it, rpmsg code just make a anon inode representing eptdev and return the fd to userspace. The legacy abstraction based on struct dev and struct cdev is honored for: - Avoid legacy uAPI break(RPMSG_CREATE_EPT_IOCTL) - Reuse existing logic: -- dev_err() and friends. -- Life cy

[PATCH 2/3] rpmsg: char: Implement eptdev based on anon inode

2025-05-07 Thread Dawei Li
Introduce new eptdev abstraction based on anon inode. The new API is exactly same with legacy one except: - It's anonymous and devnode/path free. - Its fops->open() is empty. Signed-off-by: Dawei Li --- drivers/rpmsg/rpmsg_char.c | 44 ++ drive

[PATCH 0/3] rpmsg: Introduce RPMSG_CREATE_EPT_FD_IOCTL uAPI

2025-05-07 Thread Dawei Li
10 1976257199 76.9 25 10 19937663258865 77.0 26 10 19602512 256771 76.3 27 10 19599214257088 76.2 28 10 19795920261488 75.7 29

[PATCH] openrisc: Use asm-generic's version of fix_to_virt() & virt_to_fix()

2024-03-09 Thread Dawei Li
Openrisc's implementation of fix_to_virt() & virt_to_fix() share same functionality with ones of asm generic. Plus, generic version of fix_to_virt() can trap invalid index at compile time. Thus, Replace the arch-specific implementations with asm generic's ones. Signed-of