Thread (16 messages) 16 messages, 4 authors, 2016-05-31

Re: [PATCH v4 08/10] powerpc/powernv: Add platform support for stop instruction

From: Shreyas B Prabhu <hidden>
Date: 2016-05-30 16:25:05

Hi Ram,

On 05/28/2016 05:36 AM, Ram Pai wrote:
On Tue, May 24, 2016 at 06:45:12PM +0530, Shreyas B. Prabhu wrote:
[snip]
quoted
@@ -230,11 +236,18 @@ static DEVICE_ATTR(fastsleep_workaround_applyonce, 0600,
 			show_fastsleep_workaround_applyonce,
 			store_fastsleep_workaround_applyonce);
 
+/*
+ * First deep stop state. Used to figure out when to save/restore
+ * hypervisor context.
+ */
+u64 pnv_first_deep_stop_state;
maybe this has to be intialized to some correct default value?

It there a gaurantee that OPAL_PM_STOP_INST_FAST is set only when
CPU_FTR_ARCH_300 is supported?
Stop instruction is newly introduced in POWER ISA v3.0. So it is
guaranteed that OPAL_PM_STOP_INST_FAST is set only when CPU_FTR_ARCH_300
is supported. So the scenario you've described below will not arise.
if cpu_has_feature(CPU_FTR_ARCH_300) is not true, than
pnv_first_deep_stop_state will be not be initialized.  

And if supported_cpuidle_states
has OPAL_PM_STOP_INST_FAST flag set, than power_stop0 is called which
will blindly use pnv_first_deep_stop_state thinking it is initialized to
something sane.
Thanks,
Shreyas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help