Commit Graph

46316 Commits

Author SHA1 Message Date
ligd
2cc3ec57ef queue: add dq_rmafter support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-09-08 15:03:54 +02:00
Neale Ferguson
213b954a90 * Squash round() commits
- Add check in roundx() functions for infinite or NaN cases
  - Add block to avoid style warnings
  - Define long double constants and macros for infinity and nan
  - Correct return syntax to match NuttX style
  - Make c89 compliant
  - Fix definitions of INFINITY_L/NAN_L

* include/nuttx/lib/math.h - match standard naming conventions
  - Rename isinf_l to isinfl
  - Rename isinf_f to isinff
  - Add finite()
  - Add finitel()
  - Add finitef()
  - Define isnanl and isnanf
  - Define isfinite() so that it uses the appropriate macro

* libs/libc/math/lib_asinf.c
  libs/libc/math/lib_asinl.c
  libs/libc/math/lib_roundf.c
  libs/libc/math/lib_roundl.c
  libs/libc/math/lib_sqrtf.c
  libs/libc/math/lib_sqrtl.c
  - Use renamed macros
  - Use correct NAN_x or INFINIT_x macro on returns
2022-09-08 20:57:27 +08:00
Amir Melzer
5e22dcb73b modify clock config 2022-09-08 20:55:53 +08:00
chao an
7c6e4a7204 drivers/ipcc: enter/leave critical section should in pairs
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-08 19:37:18 +08:00
chao an
b6e76966b9 net/procfs: interface index should begin from 1
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-08 18:09:43 +09:00
chao an
66d9397320 netdev/ioctl: netlock/unlock() should in pairs
fix regression by:

commit fd53db56b6
Author: chao an <anchao@xiaomi.com>
Date:   Wed Sep 7 10:56:09 2022 +0800

    net/netdev: simplify handling of netdev ifr ioctl()

    1. call netdev_ifr_dev() only once
    2. unify the error code of ENODEV

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-08 15:50:45 +08:00
chao an
fd53db56b6 net/netdev: simplify handling of netdev ifr ioctl()
1. call netdev_ifr_dev() only once
2. unify the error code of ENODEV

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-08 11:05:13 +08:00
wangbowen6
4e1097280a telink: add custom setjmp implementation for tlsr82.
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-09-08 09:15:25 +08:00
chao an
4068b2eccc net/procfs: add entry mapping table
add entry mapping table to simplify new component registration

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-08 09:03:34 +08:00
chao an
3913ef2f2f net/inet: invalid addrlen length should return EINVAL
https://www.freebsd.org/cgi/man.cgi?connect

[EINVAL] The namelen argument is not a valid length for the address family.

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-08 09:02:30 +08:00
chao an
fc626543fd audio/audio: remove invalid assign of errno
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-08 09:02:15 +08:00
Nathan Hartman
de8d54781c fs: Fix symbol name in comments 2022-09-08 09:01:55 +08:00
Nathan Hartman
09a186727c fs/vfs/fs_open.c: Improve documentation blocks of functions 2022-09-08 09:01:36 +08:00
curuvar
05b19e02d9 Eliminate un-needed wait in rp2040 SMART filesystem 2022-09-08 09:00:52 +08:00
curuvar
d3b226aea1 Fix race condition in RaspberryPi Pico W WiFi 2022-09-08 09:00:33 +08:00
Xiang Xiao
e17b678a16 compiler.h: Rename inline_function to always_inline_function
reserve inline_function macro for inline keyword

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-07 10:24:04 +02:00
Nathan Hartman
b04ae46ea6 boards/arm/tiva: Add tm4c129e-launchpad
* boards/arm/tiva/tm4c129e-launchpad: New subdirectory providing
  board support for the Texas Instruments TM4C Crypto Connected
  LaunchPad, or more correctly the EK-TM4C129EXL.

* Documentation/introduction/detailed_support.rst,
  Documentation/introduction/supported_platforms.rst,
  boards/README.txt: Document the additional board support.

* boards/Kconfig:
  (ARCH_BOARD_TM4C129E_LAUNCHPAD): New config.
  (ARCH_BOARD): Add tm4c129e-launchpad.
  (Board-Specific Options): Source the board-specific Kconfig
   boards/arm/tiva/tm4c129e-launchpad/Kconfig when selected.
2022-09-07 14:15:48 +08:00
Masayuki Ishikawa
22a5cc0973 drivers: wireless: Add SIOCGIFFLAGS support to gs2200m.c
Summary:
- I noticed that the latest ifconfig command shows nothing
- Finally, I found that gs2200m.c needs to handle SIOCGIFFLAGS
- This commit fixes this issue

Impact:
- gs2200m only

Testing:
- Tested with spresense:wifi
- NOTE: gs2200m_main.c will be updated later

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-09-07 11:21:20 +08:00
ligd
3b04450808 sched: fix corner case wd_cancel assert crash
There one ways can caused this:
mq_timedreceive
   TIMER IRQ do wd_timer -> wd_func1 mq_send
                         -> wd_func2 nxmq_rcvtimeout -> crash

Resolve:
Stop the watchdog when mq_send

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-09-07 10:50:28 +08:00
zhanghongyu
9bff29d7e7 udp: add IPVx_PKTINFO related support
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-09-07 10:49:47 +08:00
ligd
94cf99f310 sim: fix signal crash in SMP mode
reproduce:
sim:smp
ostest

reason:
shouldn't do sim_sigdeliver() in irq handler

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-09-07 09:33:36 +09:00
Sebastien Lorquet
179d64d999 stm32h7: SPI is no more experimental 2022-09-06 19:34:40 -04:00
Sebastien Lorquet
3e16b6c9f1 update conditionals to select stm32h7 spi peripherals 2022-09-06 19:34:40 -04:00
chao an
54dba40f87 net/netdev/ioctl: correct the argument length of ioctl MII/PHY
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-07 03:33:41 +08:00
Xiang Xiao
9726be616a fs: Run the default action of FIONBIO/FIOCLEX/FIONCLEX in success path
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-06 23:16:15 +08:00
Eero Nurkkala
4df8b16060 risc-v/mpfs: usb: provide more endpoints
The underlying hardware supports 9 endpoints:
  - EP0
  - 4x IN EPs
  - 4x OUT EPs

Currently the driver assumes every EP number is unique. This limits
the amount of EPs to 1 + 4 = 5. Utilize the EPs in such a manner
that all may be used.

Also fix a few error handling related bugs. Update the composite
driver to match the current situation as well.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-09-06 23:10:30 +08:00
Xiang Xiao
e0bb281e7a net: Align the prototype of sock_intf_s::si_ioctl with file_operations::ioctl
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-06 22:46:37 +08:00
chao an
0978dcf88d net/mld/route: fix build warning
In file included from route/net_del_ramroute.c:30:
route/net_del_ramroute.c: In function ‘net_match_ipv4’:
route/net_del_ramroute.c:93:9: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘unsigned int’ [-Wformat=]
   93 |   ninfo("  target=%08lx netmask=%08lx\n",
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
route/net_del_ramroute.c:93:23: note: format string is defined here
   93 |   ninfo("  target=%08lx netmask=%08lx\n",
      |                   ~~~~^
      |                       |
      |                       long unsigned int
      |                   %08x

mld/mld_timer.c: In function ‘mld_gendog_work’:
mld/mld_timer.c:118:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  118 |   ifindex = (int)arg;
      |             ^
mld/mld_timer.c: In function ‘mld_v1dog_work’:
mld/mld_timer.c:237:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  237 |   ifindex = (int)arg;
      |             ^

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-06 18:24:20 +08:00
baggio63446333
e5e03b67c2 documentation: Fix links to pull requests in release notes
In the ReleaseNotes, fix link errors to each pull request.
2022-09-06 08:49:18 +02:00
curuvar
89d3ba44ca Fixes to RP2040 SMART flash and documentation 2022-09-06 13:13:00 +08:00
Alin Jerpelea
ac4af3ff49 documentation: Add release notes for 11.0.0 release
This is a local copy taken from the confluence notes
 https://cwiki.apache.org/confluence/display/NUTTX/NuttX+11.0.0

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-09-05 22:53:01 +08:00
anjiahao
1a5351edac libc:add timingsafe_bcmp to libc
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-09-05 22:27:05 +08:00
anjiahao
21934122d5 include:endian.h add openbsd style
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-09-05 10:39:36 -03:00
curuvar
9ad75fd95d Added SMART flash filesystem to RP2040 2022-09-05 10:38:56 -03:00
Juha Niskanen
fb852440af pthread: fix typo with CONFIG_PTHREAD_MUTEX_DEFAULT_PRIO_INHERIT
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2022-09-05 15:36:23 +02:00
xiangdong6
460d94729a mm: Check the function result with suitable macro.
The return value of function mm_takesemaphore will never below
than zero, DEBUGVERIFY make no effect to check it, use DEBUGASSERT
instead.

Signed-off-by: xiangdong6 <xiangdong6@xiaomi.com>
2022-09-05 21:11:01 +08:00
Junbo Zheng
74ab851ac4 nuttx/libs/libc/time: fix runtime error by UBSan
Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-09-05 14:55:25 +08:00
Michal Lenc
23b27419e2 imxrt/encoder: add support for index position capture
This commit enhances imxrt encoder driver with index capture support.
The index is captured when the index interrupt occurs and can be passed
to application layer with QEIOC_GETINDEX ioctl call.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2022-09-04 11:08:45 +08:00
Michal Lenc
8e2b4576bf sensors/qencoder: add QEIOC_GETINDEX ioctl
This IOCTL (QEIOC_GETINDEX) allows the application to get the actual
encoder position, the index last position and the index count with
one IOCTL call if supported by architecture specific level.

The position, index and count is passed to application level through
qe_index_s structure.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2022-09-04 11:08:45 +08:00
zhangyuan21
1a9252aec9 nuttx/queue: change some queue function to macro 2022-09-04 11:08:02 +08:00
chao an
1b9c013dad sched/wqueue: fix visual studio Compiler Error C2059
Designated initializers are a C99 (or newer) feature, and Visual Studio doesn't (part) support C99 (or newer).

D:\code\incubator-nuttx\sched\wqueue\kwork_thread.c(94,50): error C2059: syntax error : ','

Reference:
https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-160#c-standard-library-features-1
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2059?view=msvc-170

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-03 23:31:04 +08:00
Fotis Panagiotopoulos
985710665a Fixed pow() for negative bases. 2022-09-03 21:19:10 +08:00
xiangdong6
4cd4303c32 binfmt: Check return pointer.
Function builtin_for_index may return NULL.
We must check this to prevent visit invalid address.

Signed-off-by: xiangdong6 <xiangdong6@xiaomi.com>
2022-09-03 19:39:51 +08:00
Gustavo Henrique Nihei
c5785ee9d5 risc-v/esp32c3: Fix some UBSAN shift-out-of-bounds warnings
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-09-03 00:29:02 +08:00
Gustavo Henrique Nihei
a5b006a891 xtensa: Avoid including handlers when no coprocessor is available
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-09-02 23:43:16 +08:00
Huang Qi
274c085c4a UBSan: Minor typo fix to align with other place
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-09-02 19:07:09 +08:00
Huang Qi
32a21a1b67 UBSan: Allow custom the sanitizer in Kconfig
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-09-02 19:07:09 +08:00
Rajvinder Kaur
27fbca771f stm32h7\stm32_fdcan_sock: fix the FDCAN_LOOPBACK config macros 2022-09-02 10:42:08 +08:00
chao an
42d553c6d4 sim: add usrsocktest config to detect the regression issue
NuttShell (NSH) NuttX-10.4.0
nsh> usrsocktest
Starting unit-tests...
Testing group "char_dev" =>
	Group "char_dev": [OK]
Testing group "no_daemon" =>
	Group "no_daemon": [OK]
Testing group "basic_daemon" =>
	Group "basic_daemon": [OK]
Testing group "basic_connect" =>
	Group "basic_connect": [OK]
Testing group "basic_connect_delay" =>
	Group "basic_connect_delay": [OK]
Testing group "no_block_connect" =>
	Group "no_block_connect": [OK]
Testing group "basic_send" =>
	Group "basic_send": [OK]
Testing group "no_block_send" =>
	Group "no_block_send": [OK]
Testing group "block_send" =>
	Group "block_send": [OK]
Testing group "no_block_recv" =>
	Group "no_block_recv": [OK]
Testing group "block_recv" =>
	Group "block_recv": [OK]
Testing group "remote_disconnect" =>
	Group "remote_disconnect": [OK]
Testing group "basic_setsockopt" =>
	Group "basic_setsockopt": [OK]
Testing group "basic_getsockopt" =>
	Group "basic_getsockopt": [OK]
Testing group "basic_getsockname" =>
	Group "basic_getsockname": [OK]
Testing group "wake_with_signal" =>
	Group "wake_with_signal": [OK]
Testing group "multithread" =>
	Group "multithread": [OK]
Unit-test groups done... OK:17, FAILED:0, TOTAL:17
 -- number of checks made: 3589
HEAP BEFORE TESTS:
             total       used       free    largest
Mem:      67108368     283088   66825280   66825216
HEAP AFTER TESTS:
             total       used       free    largest
Mem:      67108368     623408   66484960   66483360

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-02 07:24:34 +09:00
Masayuki Ishikawa
fb0cb6f270 mm: umm_heap: Do not register Umem if CONFIG_BUILD_KERNEL=y
Summary:
- In the case of CONFIG_BUILD_KERNEL=y, showing Kmem and Page
  info is enough for free command

Impact:
- CONFIG_BUILD_KERNEL=y only

Testing:
- Tested with sabre-6quad:netknsh

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-09-01 23:25:53 +02:00