Letux Kernel

Issue 474: dbus crashing with SIGBUS after suspend/resume

Reported by Nikolaus Schaller, Aug 6, 2013

There is some code we have (but not the mainline kernel):

I noticed something suspicious in the diff that seems to align with 
the 
2 calls part.

It may just be that I'm too unfamiliar with this code to see 
something 
obvious, but in the arch/arm/mach-omap2/pm34xx.c file there's this 
part:

+		if (strcmp(pwrst->pwrdm->name, "core_pwrdm") == 
0) {
+			static int times = 0;
+			times++;
+			if (times == 1)
+				pwrst->next_state = PWRDM_POWER_RET;
+			if (times == 2)
+				pwrst->next_state = PWRDM_POWER_OFF;
+		}

which adds a static int, and increments it on every call - but never 

resets it, and only does anything the first two times (which aligns 
with 
only 2 calls working properly).

This is as intended.  I needed to ensure that on the first suspend 
attempt
the state only goes to 'RETain'.  On second and later attempts it is 
safe to
go to "OFF".
So set to RET the first time, then set to OFF and leave it there.

I don't remember exactly why this works.... or even if I ever 
discovered why
it works. But it does (except for the SIGBUS thing).


> Just some wild guessing: AFAIR there are shadow registers for 
some
> controls in the OMAP that are control GPIO states in OFF mode. 
And
> they could be initialized by RETain.

There are such registers: 
http://processors.wiki.ti.com/index.php/Optimizing_OMAP35x_and_AM/DM3
7x_OFF_mode_PAD_configuration

Maybe these can help to save a few additional mA during suspend?

Comment 1 by Nikolaus Schaller, Jun 7, 2016

This was reported by someone on the mailing list and it may be 
spurious. We have no means of testing.
Status: WontFix

Created: 8 years 9 months ago by Nikolaus Schaller

Updated: 5 years 11 months ago

Status: WontFix

Labels:
Type:Defect
Priority:Critical

This issue is related to
512 - Sus... may not work completely