Commit graph

51290 commits

Author SHA1 Message Date
Ville Juven
8fdb56b5f2 riscv/addrenv: Fix the user VMA end address
The end address was off by 1, making it overflow to 0 (u32 value).
2023-10-18 11:02:40 +08:00
Ville Juven
0cb54c1959 kmm_map: Add function to map a single page of kernel memory
Mapping a physical page to a kernel virtual page is very simple and does
not need the kernel vma list, just get the kernel addressable virtual
address for the page.
2023-10-18 09:59:18 +08:00
Ville Juven
2603ddd01b kmm_map.c: Remember to free the temporary 'pages' variable
The temp variable was freed only in error cases, but it needs to be freed
in the happy case as well.
2023-10-18 09:59:18 +08:00
Ville Juven
8e5ab446cd kmm_map.c: Add way to test if addr is within kmap area or not
is_kmap_vaddr is added and used to test that a given (v)addr is actually
inside the kernel map area. This gives a speed optimization for kmm_unmap,
as it is no longer necessary to take the mm_map_lock to check if such a
mapping exists; obviously if the address is not within the kmap area, it
won't be in the list either.
2023-10-18 09:59:18 +08:00
Ville Juven
a5fdf7734b kmm_map: Fix incorrect function name field 2023-10-18 09:59:18 +08:00
Ville Juven
92baeea676 kmm_map.c: Fix user page mapping
User pages are mapped from the currently active address environment. If
the process is running on a borrowed address environment, then the
mapping should be created from there.

This happens during (new) process creation only.
2023-10-18 09:59:18 +08:00
Ville Juven
3a4abdee7d kmm_map.c: Fix call to gran_alloc
Provide the handle to gran_alloc, not pointer to handle.
2023-10-18 09:59:18 +08:00
Alan Carvalho de Assis
ddfaa97601 boards: Update all boards that were using CONFIG_NET_LL_GUARDSIZE=50 2023-10-18 00:31:08 +08:00
Alan Carvalho de Assis
ed31f3c1d2 net: Fix RNDIS compilation error
The minimum value to CONFIG_NET_LL_GUARDSIZE work
with USB RNDIS support is 50.
2023-10-18 00:31:08 +08:00
simbit18
20c95a9615 Update Fix more generic for platforms that do not have execinfo.h
Improve multiplatform code with __has_include.
2023-10-18 00:07:48 +08:00
Carlos Sanchez
e2a9773142 arch/arm/src/stm32h7/stm32_oneshot.c: Fix format warnings.
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-10-18 00:07:37 +08:00
Ville Juven
35cd7d7232 mpfs/mpfs_entrypoints.c: Fix potential R_RISCV_JAL linker error
Change bgtz t0, mpfs_opensbi_prepare_hart to tail-call to ensure there
will be no link time error due to the jump offset being too large.
2023-10-18 00:02:36 +08:00
Ville Juven
87334674cb mpfs_ethernet.c: Release tx descriptor and rx buffer properly
Instead of releasing rx descriptor twice and tx buffer twice.
2023-10-18 00:02:18 +08:00
Ville Juven
cc423c4c0f mpfs_ethernet.c: Fix possible NULL de-reference
Fix case where NULL is de-referenced via tx/rx buffer or descriptor. Only
1 queue is currently set up for each, so the indices 1,2,3 are not valid
and should not be handled.
2023-10-18 00:02:18 +08:00
chenrun1
ee985d8d10 filemtd:Fix teardown return error number EINVAL
In previous versions, during the teardown phase, the "open_blockdriver" would call the "mtd proxy" causing the "file mtd" node to be registered in the ftl. " node is registered in ftl.
Therefore, we changed the behavior to find the corresponding inode by node name.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-10-18 00:01:29 +08:00
TaiJuWu
dfcf4c6217 cpu_pause.c: fix typo
Signed-off-by: TaiJuWu <tjwu1217@gmail.com>
2023-10-18 00:01:18 +08:00
Simon Piriou
f32e721d9f arch: x86_64: Fix idle stack assignment 2023-10-18 00:01:07 +08:00
hujun5
b4a691885c Fix some typos in comments
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-10-18 00:00:55 +08:00
TaiJu Wu
9c5e9b4cbe fix: TreeNode has same attribute with NodeMixin
NodeMixin have attrubute called size and it is set property.
Overwrite this property by _size but it will make report incompatible.

Create a new class NuttxDictExporter to renaming _size into size.
2023-10-18 00:00:43 +08:00
nuttxs
1e63401fb1 esp32s3: fix the halt issue when esp32s3 wlan has high-speed or long time data transmission.
The spin_lock in the wlan_recvframe() function that receives
RX data packets from the wireless network card and the critical
section lock in the iob_remove_queue() processing are nested,
which causes the interrupt to be disabled for a longer period
of time, resulting in a risk of deadlock.
2023-10-18 00:00:33 +08:00
raiden00pl
b656fdbc86 libds/lib_misc: use b16abs() 2023-10-18 00:00:16 +08:00
raiden00pl
0e4f4a8b67 libdsp/lib_observe: fix typo and use b16sign() 2023-10-18 00:00:16 +08:00
raiden00pl
98c5993a73 fixedmath: add abs and sign operations 2023-10-18 00:00:16 +08:00
Tiago Medicci Serrano
2e9c896e18 esp32/ble: Fix task_create_wrapper CPU core ID passed as argument
The registered `task_create_wrapper` receives the `core_id`, but
the current implementation ignores this parameter while calling
`esp_task_create_pinned_to_core`. This commit fix this.
2023-10-17 23:59:59 +08:00
Tiago Medicci Serrano
e66ae3968c esp32/irq: Fix erroneous interrupt allocation for each CPU core
When allocating a CPU interrupt, make sure to select the correct
CPU core to query for it. Simply checking for the current CPU does
not satisfy this requirement because the CPU allocation thread may
be executed by the other core: it's necessary to stick with the
intended CPU passed as an argument of the `esp32_setup_irq`.
2023-10-17 23:59:52 +08:00
raiden00pl
b259311d1b samv7/adc: always increase initialization counter when adc_setup called 2023-10-17 23:59:42 +08:00
raiden00pl
8d4962ad21 imxrt/adc: always increase initialization counter when adc_setup called 2023-10-17 23:59:42 +08:00
raiden00pl
f64833b36d at32/adc: always increase initialization counter when adc_setup called 2023-10-17 23:59:42 +08:00
raiden00pl
14fe9978a7 stm32{f7}/adc: always increase initialization counter when adc_setup called 2023-10-17 23:59:42 +08:00
Carlos Sanchez
41dfcecc7f arch/arm/src/s32k1xx: Fix LPUART inversion warnings & config. 2023-10-17 23:59:34 +08:00
Carlos Sanchez
cd5b30eee3 arch/arm/src/s32k1xx: Fix warnings in PWM code. 2023-10-17 23:59:23 +08:00
Ville Juven
5d5bd29f60 mm/kmap: Fix bug in kmm_unmap
Searching the current process mappings for kmappings is quite futile,
do the search in the kernel's mappings instead.
2023-10-17 23:59:03 +08:00
Ville Juven
1d59d24216 mm/kmap: Change kmm_user_map to kmm_map_user
Naming consistency wrt kmm_map_user_page
2023-10-17 23:59:03 +08:00
Daniel P. Carvalho
af61e943fc Fixes compilation warnings. 2023-10-17 23:58:47 +08:00
raiden00pl
6c070330b2 arch/nrf{52|53|91}: fix timer for small intervals and correct CC overflow check 2023-10-17 23:58:35 +08:00
Ville Juven
3ef23f594c risc-v/riscv_addrenv.c: Fix bug where SHM area page tables are not freed
The SHM physically backed memory does not belong to the user process,
but the page table containing the mapping does -> delete the page table
memory regardless.
2023-10-17 23:58:21 +08:00
Ville Juven
fcfb090f42 risc-v/pgalloc.h: Add SHM area to riscv_uservaddr query
If the vaddr resides within the user's SHM, it is a user memory mapping.
2023-10-17 23:58:21 +08:00
liqinhui
86bacce7a1 net/local: Allow the local udp socketpair function to use the local_release_fifos interface.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-10-17 23:58:04 +08:00
Petteri Aimonen
598a78186f Fix dependencies of CONFIG_SCHED_CPULOAD_ settings
CONFIG_SCHED_CPULOAD_EXTCLK doesn't actually require tickless mode.
As long as the platform provides external call to nxsched_process_cpuload(),
it will work in either tickless or ticking mode.
Removed Kconfig dependency.

Instead, CONFIG_SCHED_CPULOAD_SYSCLK does require ticking mode to work,
as documented in CONFIG_SCHED_CPULOAD help text.
Added the dependency to Kconfig also.
2023-10-17 23:56:57 +08:00
Petteri Aimonen
473f8b271f stm32_eth: Fix excessively long critical section in ifdown handler
stm32_ifdown() holds critical section when calling stm32_ethreset().
That function used to call up_mdelay(10) while waiting for the ethernet
peripheral reset to complete. This resulted in excessively long
critical section time with interrupts disabled.

The actual expected delay is a few clock ticks of the 50 MHz clock domain.
This commit changes polling interval to 1us and maximum to 10us.
2023-10-17 23:56:46 +08:00
SPRESENSE
00c5fa60af libxx: Use gnu++20 option only if using libcxx
Fix an issue that gnu++20 option is always used.
Essentially, when cxx is not used, gnu++17 should be retained.
2023-10-12 16:53:29 +03:00
Alin Jerpelea
1d349a2a32 Documentation: add NuttX-12.3.0 release notes
Add release notes for 12.3.0 release

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2023-10-06 15:22:27 +02:00
Alin Jerpelea
0f568eb419 Documentation: split the ReleaseNotes
Our releases contain links to github PR and lots of text so we
are splitting the release notes to individual files
This change should
- improve readability
- reduce the ReleaseNotes file for each release.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2023-09-27 20:08:21 +08:00
Alin Jerpelea
1d88be09d2 Documentation: move ReleaseNotes
Move the release notes under Documentation folder for future cleanup

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2023-09-27 20:08:21 +08:00
Xiang Xiao
2acd975435 assert: Skip to include arch/board/board.h if CONFIG_ARCH_LEDS=n
follow up the change: https://github.com/apache/nuttx/pull/10553

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-26 15:41:35 +08:00
Xiang Xiao
167c4ae2a4 arch/arm: Fix error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'}
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-26 15:03:59 +08:00
anjiahao
5d6f6f2d47 mm:fix warning
mm_heap/mm_initialize.c:69:11: warning: array subscript -1 is outside array bounds of 'void[2147483647]' [-Warray-bounds]
   69 |       node->pid = MM_BACKTRACE_MEMPOOL_PID;
      |           ^~
mm_heap/mm_initialize.c:64:9: note: at offset -16 into object of size [0, 2147483647] allocated by 'mm_memalign'
   64 |   ret = mm_memalign(arg, alignment, size);

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-09-26 14:12:59 +08:00
hujun5
b6693065e7 pthread_once: g_lock may lead deadlock
For programs with the dependencies logic in pthread_once callback , using global locks may cause deadlock:

task A
pthread_once()
|
|-> nxrmutex_lock(&g_lock);
 -> init_routine(); // callback to wait task B
                                                  task B
                                                  pthread_once()
                                                  |
                                                   ->nxrmutex_lock(&g_lock); // Deadlock
                                                   ->init_routine(); // hold resource to wake up task A

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-09-26 10:13:00 +08:00
Xiang Xiao
f02ad03124 Fix error: 'mmcsd_general_cmd_read' defined but not used
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-26 00:45:50 +03:00
ligd
dc096f951e list: update list.h
The function name comes from list.h inside Linux,
but rewrite from scratch to avoid the copyright issue.
Since many developers are familiar with Linux list API.

Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-09-26 00:15:21 +08:00