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 
2 calls part.

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

+		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 
only 2 calls working properly).

This is as intended.  I needed to ensure that on the first suspend 
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 
> controls in the OMAP that are control GPIO states in OFF mode. 
> they could be initialized by RETain.

There are such registers: 

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: 10 years 9 months ago by Nikolaus Schaller

Updated: 7 years 11 months ago

Status: WontFix


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