Summary:
- I thought this cs is needed to avoid data corruption
- For example, while executing uart_xmitchar() in the interrupt
handler on CPU0, an application running on CPU1 can call
uart_putxmitchar() via write()->uart_write().
- In this case, taking xmit.sem in uart_write() will wait for CPU0
to finish uart_xmitchar() because CPU0 has already taken a cs
in uart_xmitchar() then nxsem_wait() on CPU0 takes a new cs
inside (and release the cs when returning but it's OK)
- Then uart_write() on CPU1 disables UART TX, so uart_xmitchar()
on CPU0 will not be called while executing uart_write() on CPU1.
- So this critical section in uart_putxmitchar() can be removed.
Impact:
- None
Testing:
- Tested with spresense:wifi_smp, esp32-devkitc:smp
Reported-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- This commit converts data to the physical address for DMA transfer.
Impact:
- cxd56.c only
Testing
- Tested with nxplayer and nxrecorder
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
The patch is related to: commit 5f7c98b6e1
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date: Mon May 17 22:38:22 2021 +0800
drivers/syslog: Remove emergstream implementation and caller
since emergstream always call syslog_force, but syslog_force is designed
for the interrupt context, and then doesn't mean any emergency thing.
On the other hand, emergstream has other bad side effect:
1.Can't output to file or dev channel
2.Can't work well with the interrupt buffer
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
by ramlog_initbuf();
Algorithm: Scan the entire ramlog buffer, the position of the head
is the first byte is not empty and second byte is empty. The position
of the tail is the first byte is empty and second byte is not empty.
Change-Id: Ieb9161bd670481cd335e9a901287cd5e589f0849
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Summary:
- During Wi-Fi stress test, sometimes ASSERT() happens in gs2200m.c
- This commit removes the ASSERT() but calls _remove_all_pkt()
for a workaround.
Impact:
- None
Testing:
- Tested with spresense:wifi_smp
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
When creating the next chain of directory entries, (1) add the position
of next entry to the current sector, and then (2) update the sector of
next entry. If the power is turned off between (1) and (2), the next
entry will not be found, and the chain of directory entries will break.
It causes the SmartFS file system corruption, and we will not be able
to add files.
To avoid this issue, in checking the filesystem by smart_fsck_directory,
if the sector of next entry does not exist, update the sector of
directory entry to invalidate the field of next entry.
since emergstream always call syslog_force, but syslog_force is designed
for the interrupt context, and then doesn't mean any emergency thing.
On the other hand, emergstream has other bad side effect:
1.Can't output to file or dev channel
2.Can't work well with the interrupt buffer
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
specified the name of remote proc(rpmsg server)
Change-Id: I0086bb43727a2bbb5e68f88907b5e4608182ef9c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
N/A
specified the name of remote proc(rpmsg server)
Change-Id: Ie270d651071e87a40a80ab489597ae18db9814f0
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
since the console is normally opened three time as stdin, stdout and
stderr and remove the dependence on STANDARD_SERIAL because other type
of serial drivers also support the poll through the same codebase.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie68322c4647cc838b295491329969869d6ba310b
This is addressing an issue where Rx interrupts were not restored for
cdcacm after the buffer had been filled (in a burst).
The Rx interrupts were only restored after the watchdog timeout of 200ms
fired.
This happened because CONFIG_SERIAL_RXDMA was set, however, for the
cdcacm driver this does not actually matter as it is relying on
uart_enablerxint to be called via the ops table.
This patch makes sure that uart_enablerxint and uart_disablerxint are
always called, independent of CONFIG_SERIAL_RXDMA, relying on the ops
table to be correct for the case where it should be only a no-op.