nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

[BUG] rp2040: `up_cpu_pause` and `up_cpu_resume` are referenced (these functions were removed before)

Open sumpfralle opened this issue 8 months ago • 2 comments

Description / Steps to reproduce the issue

The functions up_cpu_pause and up_cpu_resume were removed in #13863 by @xiaoxiang781216.

But there are still two remaining calls of both functions left in rp2040_flash_mtd.c.

Thus compilation with enabled SMP support fails at the moment:

chip/rp2040_flash_mtd.c: In function 'rp2040_flash_erase':
chip/rp2040_flash_mtd.c:273:3: error: implicit declaration of function 'up_cpu_pause' [-Wimplicit-function-declaration]
  273 |   up_cpu_pause(OTHER_CPU);
      |   ^~~~~~~~~~~~
chip/rp2040_flash_mtd.c:280:3: error: implicit declaration of function 'up_cpu_resume' [-Wimplicit-function-declaration]
  280 |   up_cpu_resume(OTHER_CPU);
      |   ^~~~~~~~~~~~~

I tried to understand #13863, but I failed to derive the changes necessary to replace the above remaining calls.

Maybe someone can give me a hint?

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

Debian Trixie

NuttX Version

master

Issue Architecture

[Arch: arm]

Issue Area

[Area: File System]

Host information

No response

Verification

  • [x] I have verified before submitting the report.

sumpfralle avatar Apr 14 '25 20:04 sumpfralle

@hujun260 please take a look.

xiaoxiang781216 avatar Apr 15 '25 01:04 xiaoxiang781216

@sumpfralle If you really have to completely stop another CPU, you can adopt a strategy similar to one of those in the assert.

Image

hujun260 avatar Apr 15 '25 02:04 hujun260