Add L2 cache cleaning to generic CPU suspend
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 11 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 11 patches the cover letter announces are in this archive.
Reviews trailers per patch
| Patch | Shawn Guo |
|---|---|
| Series | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/11] Add L2 cache cleaning to generic CPU suspend
Quoted 16 lines · Shawn Guo
This is also the case on i.MX6Q, which L2 cache is retained during a suspend/resume cycle. Currently, I have to call into the following before calling generic
cpu_suspend()to clean/invalidate the entire L2 cache.outer_flush_all(); outer_disable();But there is a wired thing on using generic
cpu_resume(). I have to invalidate L1 before calling intocpu_resume()like below.
ENTRY(imx6q_cpu_resume)
blv7_invalidate_l1
bcpu_resumeENDPROC(imx6q_cpu_resume)
Quoted 8 lines
ENTRY(imx6q_secondary_startup)
blv7_invalidate_l1
bsecondary_startupENDPROC(imx6q_secondary_startup)The
v7_invalidate_l1()is the function copied frommach-tegra/headsmp.S, which has to be called before callingsecondary_startupto boot secondary cores (same situation between Tegra and i.MX6Q).
Presumably that's because your L1 cache contains randomized data with random validity (and presumably random dirtyness) at boot time - something which unfortunately the ARM ARM permits. I don't think we can go to the extent of dealing with this in the generic code as it would unnecessarily perturb those implementations which either the boot loader has already sorted out that issue, or which don't have the issue at all.
Quoted 4 lines
Before applying this patch series, I have something like below actually working.
Quoted 8 lines
outer_flush_all(); outer_disable(); imx_set_cpu_jump(0, imx6q_cpu_resume); /* Zzz ... */ cpu_suspend(0, imx6q_suspend_finish);I expect with you patches applied, I can still have it work with simply removing those two lines outer cache codes.
That should be the case.
Quoted 4 lines
But unfortunately, I'm
running into Oops when resuming back. And I also have Oops withimx_set_cpu_jump(0, cpu_resume)which means skipping thev7_invalidate_l1()and calling genericcpu_resume()only.
Do you have a copy of the oops?