linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PSCI DISCUSS] How to implement standby and suspend-to-ram by PSCI
@ 2016-05-06 10:11 Hongbo Zhang
  2016-05-06 13:28 ` Sudeep Holla
  0 siblings, 1 reply; 9+ messages in thread
From: Hongbo Zhang @ 2016-05-06 10:11 UTC (permalink / raw)
  To: Lorenzo Pieralisi, Marc Zyngier, Sudeep Holla, Mark Rutland
  Cc: Daniel Lezcano, Chen-Yu Tsai, Hans de Goede, Frank Li, Peng Fan,
	Jan Kiszka, Tom Warren, Vincent Guittot, linux-pm@vger.kernel.org

Hi Guys,
We know in the legacy kernel suspend codes, a typical suspend_ops->enter 
callback is like this:

static int imx6q_pm_enter(suspend_state_t state)
{
	switch (state) {
	case PM_SUSPEND_STANDBY:
		do this;
		break;
	case PM_SUSPEND_MEM:
		do that;
		break;
	default:
		return -EINVAL;
	}
	return 0;
}

That means we implement standby and suspend-to-ram in one callback, and 
these two state can be identified by an input parameter 'state'.

While now PSCI is used for ARM to implement cores operations and power 
management, for the above suspend_ops->enter we choose SYSTEM_SUSPEND 
function, and this function is defined for suspend-to-ram, then here 
comes the problem:

How can we implement the standby state following the PSCI framework?

I couldn't find other PSCI function which fits for standby well.
In the spec there isn't such a 'state' parameter passed for 
SYSTEM_SUSPEND (only entry_point_address and context_id), can we change 
the spec a bit, e.g. using one more register to pass another 'state' 
parameter? is that acceptable? (similar like CPU_SUSPEND then)

Any other ideas, suggestions?

Thanks.

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

end of thread, other threads:[~2016-05-20  8:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-06 10:11 [PSCI DISCUSS] How to implement standby and suspend-to-ram by PSCI Hongbo Zhang
2016-05-06 13:28 ` Sudeep Holla
2016-05-12  9:42   ` Hongbo Zhang
2016-05-12 10:08     ` Sudeep Holla
2016-05-19  9:26       ` Hongbo Zhang
2016-05-17 11:53     ` Oliver Neukum
2016-05-19 10:27       ` Hongbo Zhang
2016-05-19 12:01         ` Oliver Neukum
2016-05-20  8:23           ` Hongbo Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).