Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1409270

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

From Shreyas B Prabhu <shreyas@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 08/10] powerpc/powernv: Add platform support for stop instruction
Date 2016-05-30 18:30 +0200
Message-ID <rEyeJ-6B4-27@gated-at.bofh.it> (permalink)
References <rCkpz-3IP-3@gated-at.bofh.it> <rCkpA-3IP-9@gated-at.bofh.it> <rDzZg-1RC-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 00/10] powerpc/powernv/cpuidle: Add support for POWER ISA v3 idle states "Shreyas B. Prabhu" <shreyas@linux.vnet.ibm.com> - 2016-05-24 15:20 +0200
  [PATCH v4 01/10] powerpc/powernv: Use PNV_THREAD_WINKLE macro while requesting for winkle "Shreyas B. Prabhu" <shreyas@linux.vnet.ibm.com> - 2016-05-24 15:20 +0200
  [PATCH v4 04/10] powerpc/powernv: Rename reusable idle functions to hardware agnostic names "Shreyas B. Prabhu" <shreyas@linux.vnet.ibm.com> - 2016-05-24 15:20 +0200
  [PATCH v4 05/10] powerpc/powernv: Make pnv_powersave_common more generic "Shreyas B. Prabhu" <shreyas@linux.vnet.ibm.com> - 2016-05-24 15:20 +0200
  [PATCH v4 08/10] powerpc/powernv: Add platform support for stop instruction "Shreyas B. Prabhu" <shreyas@linux.vnet.ibm.com> - 2016-05-24 15:20 +0200
    Re: [PATCH v4 08/10] powerpc/powernv: Add platform support for stop  instruction Gautham R Shenoy <ego@linux.vnet.ibm.com> - 2016-05-25 07:10 +0200
    Re: [PATCH v4 08/10] powerpc/powernv: Add platform support for stop  instruction Ram Pai <linuxram@us.ibm.com> - 2016-05-28 02:10 +0200
      Re: [PATCH v4 08/10] powerpc/powernv: Add platform support for stop  instruction Shreyas B Prabhu <shreyas@linux.vnet.ibm.com> - 2016-05-30 18:30 +0200
  [PATCH v4 07/10] powerpc/powernv: set power_save func after the idle states are initialized "Shreyas B. Prabhu" <shreyas@linux.vnet.ibm.com> - 2016-05-24 15:20 +0200
  [PATCH v4 02/10] powerpc/kvm: make hypervisor state restore a function "Shreyas B. Prabhu" <shreyas@linux.vnet.ibm.com> - 2016-05-24 15:20 +0200
  [PATCH v4 03/10] powerpc/powernv: Rename idle_power7.S to idle_power_common.S "Shreyas B. Prabhu" <shreyas@linux.vnet.ibm.com> - 2016-05-24 15:20 +0200
  [PATCH v4 06/10] powerpc/powernv: abstraction for saving SPRs before entering deep idle states "Shreyas B. Prabhu" <shreyas@linux.vnet.ibm.com> - 2016-05-24 15:20 +0200
  [PATCH v4 09/10] cpuidle/powernv: Add support for POWER ISA v3 idle states "Shreyas B. Prabhu" <shreyas@linux.vnet.ibm.com> - 2016-05-24 15:20 +0200
    Re: [PATCH v4 09/10] cpuidle/powernv: Add support for POWER ISA v3  idle states Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-05-30 16:30 +0200

csiph-web