masayuki2009 edited a comment on issue #802:
URL: https://github.com/apache/incubator-nuttx/issues/802#issuecomment-616861005
@patacongo
> If you move the __err to _arm_doirq() after CURRENT_REGS is set, it may
work.
I've just revert the patch which @xiaoxiang781216 attached and added the
following code.
```
--- a/arch/arm/src/armv7-a/arm_doirq.c
+++ b/arch/arm/src/armv7-a/arm_doirq.c
@@ -91,6 +91,14 @@ static inline uint32_t *_arm_doirq(int irq, uint32_t
*regs)
CURRENT_REGS = regs;
+#if 1
+ int cpu = up_cpu_index();
+ if (cpu != 0)
+ {
+ _err("cpu = %d, irq %d.\n", cpu, irq);
+ }
+#endif
+
/* Deliver the IRQ */
```
Actually hello app works on qemu. (smp and ostest apps also work)
```
qemu-system-arm -M sabrelite -smp 4 -kernel ./nuttx/nuttx -nographic -s
ABCDGHIJKNOPQ
NuttShell (NSH) NuttX-8.2.0
nsh> dmesg
_arm_doirq: cpu = 1, irq 1.
_arm_doirq: cpu = 2, irq 1.
_arm_doirq: cpu = 3, irq 1.
nsh> hello
Hello, World!!
nsh> dmesg
_arm_doirq: cpu = 1, irq 2.
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]