Hi folks:
meets issues on dual core cortex-a7, SMP mode. and the crash log is this.
up_assert: Assertion failed CPU1 at file:irq/irq_csection.c line: 329 task: init
Bp_rengistexrdump:_ R0: s00000t001 00a000000r 0000t0000 0:00000 00 000C00001 P00000U000 00000000:0 0000 0000
up_reegistergdump:i R8n 00g 0d00 00o00000 00000000 00000000 00000001 40118620 40004734 40005b6c
up_registerdump: CPSR: 600001d3
pthread_mutex_init: mutex=0x0x400e0940
after tests, it was found that there are 3 assert check point would all can be failure, above only one of these.
1. | ¦ ¦ ¦ /* If we get here with irqcount == 0, then we know that the
¦ ¦ ¦ * current task running on this CPU is not in a critical
¦ ¦ ¦ * section. However other tasks on other CPUs may be in a
¦ ¦ ¦ * critical section. If so, we must wait until they release
¦ ¦ ¦ * the spinlock.
¦ ¦ ¦ */
¦ ¦ ¦ DEBUGASSERT((g_cpu_irqset & (1 << cpu)) == 0);
2. 542 ¦ ¦ ¦ /* Decrement our count on the lock. If all CPUs have
543 ¦ ¦ ¦ * released, then unlock the spinlock.
544 ¦ ¦ ¦ */
545
546 ¦ ¦ ¦ DEBUGASSERT(spin_islocked(&g_cpu_irqlock) &&
547 ¦ ¦ ¦ ¦ ¦ ¦ (g_cpu_irqset & (1 << cpu)) != 0);
3. 325 ¦ ¦ ¦ * NOTE: If irqcount > 0 then (1) we are in a critical section, and
326 ¦ ¦ ¦ * (2) this CPU should hold the lock.
327 ¦ ¦ ¦ */
328
329 ¦ ¦ ¦ DEBUGASSERT(spin_islocked(&g_cpu_irqlock) &&
330 ¦ ¦ ¦ ¦ ¦ ¦ (g_cpu_irqset & (1 << this_cpu())) != 0 &&
331 ¦ ¦ ¦ ¦ ¦ ¦ rtcb->irqcount < INT16_MAX);
332 ¦ ¦ ¦ rtcb->irqcount++;
the 3 crash sport all located in "enter_critical_section" and "leave_critical_sections"
so any suggestions for this?
thanks you!