* [PATCH v3 04/10] ata: ahci: Use `pm_suspend_preferred_s2idle`
[not found] <20220701023328.2783-1-mario.limonciello@amd.com>
@ 2022-07-01 2:33 ` Mario Limonciello
2022-07-01 5:06 ` Damien Le Moal
2022-07-02 9:34 ` kernel test robot
0 siblings, 2 replies; 4+ messages in thread
From: Mario Limonciello @ 2022-07-01 2:33 UTC (permalink / raw)
To: mario.limonciello, Damien Le Moal; +Cc: linux-pm, linux-ide, linux-kernel
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(-)
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)
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 04/10] ata: ahci: Use `pm_suspend_preferred_s2idle`
2022-07-01 2:33 ` [PATCH v3 04/10] ata: ahci: Use `pm_suspend_preferred_s2idle` Mario Limonciello
@ 2022-07-01 5:06 ` Damien Le Moal
2022-07-01 18:01 ` Mario Limonciello
2022-07-02 9:34 ` kernel test robot
1 sibling, 1 reply; 4+ messages in thread
From: Damien Le Moal @ 2022-07-01 5:06 UTC (permalink / raw)
To: Mario Limonciello; +Cc: linux-pm, linux-ide, linux-kernel
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)
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 04/10] ata: ahci: Use `pm_suspend_preferred_s2idle`
2022-07-01 5:06 ` Damien Le Moal
@ 2022-07-01 18:01 ` Mario Limonciello
0 siblings, 0 replies; 4+ messages in thread
From: Mario Limonciello @ 2022-07-01 18:01 UTC (permalink / raw)
To: Damien Le Moal; +Cc: linux-pm, linux-ide, linux-kernel
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)
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 04/10] ata: ahci: Use `pm_suspend_preferred_s2idle`
2022-07-01 2:33 ` [PATCH v3 04/10] ata: ahci: Use `pm_suspend_preferred_s2idle` Mario Limonciello
2022-07-01 5:06 ` Damien Le Moal
@ 2022-07-02 9:34 ` kernel test robot
1 sibling, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-07-02 9:34 UTC (permalink / raw)
To: Mario Limonciello, Damien Le Moal
Cc: llvm, kbuild-all, linux-pm, linux-ide, linux-kernel
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
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-02 9:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220701023328.2783-1-mario.limonciello@amd.com>
2022-07-01 2:33 ` [PATCH v3 04/10] ata: ahci: Use `pm_suspend_preferred_s2idle` Mario Limonciello
2022-07-01 5:06 ` Damien Le Moal
2022-07-01 18:01 ` Mario Limonciello
2022-07-02 9:34 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox