Message ID | 20220701023328.2783-4-mario.limonciello@amd.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | [v3,01/10] PM: suspend: Introduce `pm_suspend_preferred_s2idle` | expand |
On 7/1/22 11:33, Mario Limonciello wrote: > Drop the direct check from the FADT and use the helper instead. Where is this helper defined ? Seeing that this is patch 4/10, I have no context for this patch. Please send the whole series next time. > > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> > --- > drivers/ata/ahci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c > index c1eca72b4575..3f79b732dd00 100644 > --- a/drivers/ata/ahci.c > +++ b/drivers/ata/ahci.c > @@ -1611,7 +1611,7 @@ static void ahci_update_initial_lpm_policy(struct ata_port *ap, > > #ifdef CONFIG_ACPI > if (policy > ATA_LPM_MED_POWER && > - (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)) { > + pm_suspend_preferred_s2idle()) { > if (hpriv->cap & HOST_CAP_PART) > policy = ATA_LPM_MIN_POWER_WITH_PARTIAL; > else if (hpriv->cap & HOST_CAP_SSC)
On 7/1/22 00:06, Damien Le Moal wrote: > On 7/1/22 11:33, Mario Limonciello wrote: >> Drop the direct check from the FADT and use the helper instead. > > Where is this helper defined ? Seeing that this is patch 4/10, I have no > context for this patch. Please send the whole series next time. > My apologies; I should have also included you at least on 1/10, but was trying to save your inbox for the other 8 patches that were not relevant to you. The whole series is on LKML here: https://lore.kernel.org/lkml/20220701023328.2783-1-mario.limonciello@amd.com/ If there's a v4 I'll include you on 1/10 (unless you also want to be on the others too). >> >> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> >> --- >> drivers/ata/ahci.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c >> index c1eca72b4575..3f79b732dd00 100644 >> --- a/drivers/ata/ahci.c >> +++ b/drivers/ata/ahci.c >> @@ -1611,7 +1611,7 @@ static void ahci_update_initial_lpm_policy(struct ata_port *ap, >> >> #ifdef CONFIG_ACPI >> if (policy > ATA_LPM_MED_POWER && >> - (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)) { >> + pm_suspend_preferred_s2idle()) { >> if (hpriv->cap & HOST_CAP_PART) >> policy = ATA_LPM_MIN_POWER_WITH_PARTIAL; >> else if (hpriv->cap & HOST_CAP_SSC) > >
Hi Mario, Thank you for the patch! Yet something to improve: [auto build test ERROR on rafael-pm/linux-next] [also build test ERROR on drm-misc/drm-misc-next hid/for-next linus/master v5.19-rc4 next-20220701] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/intel-lab-lkp/linux/commits/Mario-Limonciello/PM-suspend-Introduce-pm_suspend_preferred_s2idle/20220701-103534 base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next config: i386-randconfig-a011 (https://download.01.org/0day-ci/archive/20220702/202207021730.qxUxPlRq-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project bcd153485ebf07fe79e2b843ed5f1cb74997df1b) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/ceb90ecfef1f252424a29b31a547cfc80c8f5135 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Mario-Limonciello/PM-suspend-Introduce-pm_suspend_preferred_s2idle/20220701-103534 git checkout ceb90ecfef1f252424a29b31a547cfc80c8f5135 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/ata/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): >> drivers/ata/ahci.c:1614:6: error: call to undeclared function 'pm_suspend_preferred_s2idle'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] pm_suspend_preferred_s2idle()) { ^ drivers/ata/ahci.c:1614:6: note: did you mean 'pm_suspend_default_s2idle'? include/linux/suspend.h:343:20: note: 'pm_suspend_default_s2idle' declared here static inline bool pm_suspend_default_s2idle(void) { return false; } ^ 1 error generated. vim +/pm_suspend_preferred_s2idle +1614 drivers/ata/ahci.c 1595 1596 static void ahci_update_initial_lpm_policy(struct ata_port *ap, 1597 struct ahci_host_priv *hpriv) 1598 { 1599 int policy = CONFIG_SATA_MOBILE_LPM_POLICY; 1600 1601 1602 /* Ignore processing for chipsets that don't use policy */ 1603 if (!(hpriv->flags & AHCI_HFLAG_USE_LPM_POLICY)) 1604 return; 1605 1606 /* user modified policy via module param */ 1607 if (mobile_lpm_policy != -1) { 1608 policy = mobile_lpm_policy; 1609 goto update_policy; 1610 } 1611 1612 #ifdef CONFIG_ACPI 1613 if (policy > ATA_LPM_MED_POWER && > 1614 pm_suspend_preferred_s2idle()) { 1615 if (hpriv->cap & HOST_CAP_PART) 1616 policy = ATA_LPM_MIN_POWER_WITH_PARTIAL; 1617 else if (hpriv->cap & HOST_CAP_SSC) 1618 policy = ATA_LPM_MIN_POWER; 1619 } 1620 #endif 1621 1622 update_policy: 1623 if (policy >= ATA_LPM_UNKNOWN && policy <= ATA_LPM_MIN_POWER) 1624 ap->target_lpm_policy = policy; 1625 } 1626
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index c1eca72b4575..3f79b732dd00 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1611,7 +1611,7 @@ static void ahci_update_initial_lpm_policy(struct ata_port *ap, #ifdef CONFIG_ACPI if (policy > ATA_LPM_MED_POWER && - (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)) { + pm_suspend_preferred_s2idle()) { if (hpriv->cap & HOST_CAP_PART) policy = ATA_LPM_MIN_POWER_WITH_PARTIAL; else if (hpriv->cap & HOST_CAP_SSC)
Drop the direct check from the FADT and use the helper instead. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> --- drivers/ata/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)