All of lore.kernel.org
 help / color / mirror / Atom feed
* Linux fails to start secondary cores when system resumes from Suspend-to-RAM
@ 2016-12-15 15:18 ` Mason
  0 siblings, 0 replies; 12+ messages in thread
From: Mason @ 2016-12-15 15:18 UTC (permalink / raw)
  To: Linux ARM, linux-pm
  Cc: Rafael J. Wysocki, Len Brown, Pavel Machek, Mark Rutland,
	Robin Murphy, Will Deacon, Sebastian Frias, Thibaud Cornic,
	Thomas Gambier, Arnd Bergmann, Russell King, Thomas Petazzoni

Hello,

I'm playing with suspend-to-RAM on the tango platform:

  http://lxr.free-electrons.com/source/arch/arm/mach-tango/platsmp.c

When the system is suspended, the CPU is completely powered down
(receives no power whatsoever). When the system receives a wake-up
event, the CPU is powered up, and starts up exactly the same way
as for a cold boot (I think).

However, while Linux successfully starts the secondary cores when
the system first boots, it fails when the system resumes from "S3".

I added printascii() calls inside secondary_start_kernel() and I can
see that the following instruction are "properly" run:

	cpu_switch_mm(mm->pgd, mm);
	local_flush_bp_all();
	enter_lazy_tlb(mm, current);

but it seems local_flush_tlb_all(); never returns... :-(

  http://lxr.free-electrons.com/source/arch/arm/include/asm/tlbflush.h#L332


Looking more closely at that function, it seems to be failing in:

	tlb_op(TLB_V7_UIS_FULL, "c8, c7, 0", zero);

(meaning: I get a log before, but not after)

On my system, tlb_op(TLB_V7_UIS_FULL, "c8, c7, 0", zero);
resolves to:

c010ce18:       e3170602        tst     r7, #2097152    ; 0x200000
c010ce1c:       1e086f17        mcrne   15, 0, r6, cr8, cr7, {0}

What could be happening?
Can a core "hang" on this instruction?
Can a core "crash" on this instruction (meaning, an exception
is raised, and the core loops inside the exception code without
Linux noticing... that seems unlikely)

I'm stumped. Could someone throw me a clue?

Mark Rutland offered a guess about IPIs not working correctly.
Could this explain the behavior I'm seeing?

Regards.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-12-30 20:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-15 15:18 Linux fails to start secondary cores when system resumes from Suspend-to-RAM Mason
2016-12-15 15:18 ` Mason
2016-12-16  5:14 ` Yu Chen
2016-12-16  5:14   ` Yu Chen
2016-12-16  7:25   ` Mason
2016-12-16  7:25     ` Mason
2016-12-29 12:10     ` Mason
2016-12-29 12:10       ` Mason
2016-12-29 14:27       ` Mason
2016-12-29 14:27         ` Mason
2016-12-30 20:10         ` Pavel Machek
2016-12-30 20:10           ` Pavel Machek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.