This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push: new b9d4bd0 arch: esp32: Fix compile errors with CONFIG_SMP=y b9d4bd0 is described below commit b9d4bd0854c2619af8c0dc025d749c0c19490bdf Author: Masayuki Ishikawa <masayuki.ishik...@gmail.com> AuthorDate: Wed Jan 27 19:37:03 2021 +0900 arch: esp32: Fix compile errors with CONFIG_SMP=y Summary: - This commit fixes compile errors in esp32_spiflash.c and esp32_wifi_adapter.c with CONFIG_SMP=y Impact: - SMP only Testing: - Tested with esp32-devkitc:wapi - NOTE: the following configs need to be added. +CONFIG_SMP=y +CONFIG_SMP_IDLETHREAD_STACKSIZE=3072 +CONFIG_SMP_NCPUS=2 +CONFIG_SPINLOCK_IRQ=y Signed-off-by: Masayuki Ishikawa <masayuki.ishik...@jp.sony.com> --- arch/xtensa/src/esp32/esp32_spiflash.c | 2 +- arch/xtensa/src/esp32/esp32_wifi_adapter.c | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/xtensa/src/esp32/esp32_spiflash.c b/arch/xtensa/src/esp32/esp32_spiflash.c index 96c21ca..f019f01 100644 --- a/arch/xtensa/src/esp32/esp32_spiflash.c +++ b/arch/xtensa/src/esp32/esp32_spiflash.c @@ -616,8 +616,8 @@ static void IRAM_ATTR spiflash_flushmapped(size_t start, size_t size) Cache_Flush(0); #ifndef CONFIG_SMP Cache_Flush(1); - } #endif + } } } diff --git a/arch/xtensa/src/esp32/esp32_wifi_adapter.c b/arch/xtensa/src/esp32/esp32_wifi_adapter.c index cda5d93..b7abaa1 100644 --- a/arch/xtensa/src/esp32/esp32_wifi_adapter.c +++ b/arch/xtensa/src/esp32/esp32_wifi_adapter.c @@ -755,7 +755,7 @@ static void *esp_spin_lock_create(void) spinlock_t *lock; int tmp; - tmp = sizeof(struct spinlock_t); + tmp = sizeof(*lock); lock = kmm_malloc(tmp); if (!lock) { @@ -3901,11 +3901,7 @@ static unsigned long esp_random_ulong(void) uint32_t IRAM_ATTR esp_dport_access_reg_read(uint32_t reg) { -#ifdef CONFIG_SMP - DEBUGASSERT(0); -#else return getreg32(reg); -#endif } /****************************************************************************