In the original implementation, if wdog is not ACTIVE, -EINVAL will be returned. The rp2040 i2c driver relies on this semantics to correctly release the semaphore.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
Some app with same code runs on different cores in AMP mode,
need the physical core on which the function is called.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
1. Use critical_section to protect the fds array;
2. Use critical_section and sched lock to protect the poll notify, because
poll notify may cause context switch, delay the context swtich to
sched_unlock();
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
These two macros can be called in interrupt context and:
1. Do nothing when called in interrupt;
2. Same behavior as sched_lock/unlock when called in thread;
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This PR support Nested interrupt in armv6/7/8m:
There are two types of nested interrupt model:
Zero latency nested interrupt
Interrupt Priority Note
Data abort Highest
SVC 0x50
High irq1 0x60 ISR can't access system API
irq_save() 0x70
High irq2 0x80 ISR can't access system API
normal irq3 0xB0
We have already support this mode before this PR
Nested interrupt which interrupt level lower than up_irq_save()
Interrupt Priority Note
Data abort Highest
SVC 0x70
irq_save() 0x80
High irq1 0x90 ISR can access system API
High irq2 0xA0 ISR can access system API
normal irq3 0xB0
Now, this PR can support this mode
Signed-off-by: ligd <liguiding1@xiaomi.com>
And remove the virtio_alloc/free_buf implementation in virtio.c, because
these two apis has been moved to the OpenAMP
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
notify_wait has been remove in remoteproc ops and virtio_dispatch and
has been moved to the struct rpmsg_virtio_device in new OpenAMP,
so change the rptun too,
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
v9fs/virtio_9p.c:223:3: error: too few arguments to function 'virtio_negotiate_features'
223 | virtio_negotiate_features(vdev, 1 << VIRTIO_9P_MOUNT_TAG);
v9fs/virtio_9p.c:245:9: error: too few arguments to function 'virtio_create_virtqueues'
245 | ret = virtio_create_virtqueues(vdev, 0, 1, vqname, callback);
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
fix nuttx/openamp/libmetal/lib/cpu.h don't have <metal/processor/generic/cpu.h>
error, let's use generic/cpu.h for all arch in NuttX
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
New OpenAMP change the VIRTIO_DRIVER/DEVICE_ONLY to the
VIRTIO_DRIVER_DEVCE_SUPPORT, so upgrade the NuttX OpenAMP config too
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
Upgrade the openamp is a troublesome thing, so diretly sync the
open-amp and libmetal the newest commit.
We can update the commit and remove the patch when this patch has
been merged in the OpenAMP repo.
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Do not format immediately when calling sched_note_printf, but delay formatting until dump trace.
After turning on SYSTEM_NOTE, similar asynchronous syslog functions can be achieved.
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Rpmsg dev server always open the real char device with nonblock mode,
so let client try to read/wrtie the read device every read/write
operation.
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
The address needs to be reset only when comparing addition, subtraction, multiplication and division addresses. Otherwise, the original address is always returned or saved.
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>