[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201605301625.u4UGOGxK039753@mx0a-001b2d01.pphosted.com>
Date: Mon, 30 May 2016 21:54:04 +0530
From: Shreyas B Prabhu <shreyas@...ux.vnet.ibm.com>
To: Ram Pai <linuxram@...ibm.com>
CC: mpe@...erman.id.au, ego@...ux.vnet.ibm.com, mikey@...ling.org,
maddy@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v4 08/10] powerpc/powernv: Add platform support for stop
instruction
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]
>> @@ -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
Powered by blists - more mailing lists