* [PATCH v3 02/10] ACPI / x86: Use new `pm_suspend_preferred_s2idle`
[not found] <20220701023328.2783-1-mario.limonciello@amd.com>
@ 2022-07-01 2:33 ` Mario Limonciello
2022-07-13 18:33 ` Rafael J. Wysocki
2022-07-01 2:33 ` [PATCH v3 03/10] ACPI: LPIT: " Mario Limonciello
1 sibling, 1 reply; 4+ messages in thread
From: Mario Limonciello @ 2022-07-01 2:33 UTC (permalink / raw)
To: mario.limonciello, linux-kernel
Cc: linux-pm, Rafael J. Wysocki, Len Brown, linux-acpi
Drop the direct check from the FADT and use the helper instead.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/acpi/x86/s2idle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
index 2963229062f8..b1483d5092c1 100644
--- a/drivers/acpi/x86/s2idle.c
+++ b/drivers/acpi/x86/s2idle.c
@@ -369,7 +369,7 @@ static int lps0_device_attach(struct acpi_device *adev,
if (lps0_device_handle)
return 0;
- if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0))
+ if (!pm_suspend_preferred_s2idle())
return 0;
if (acpi_s2idle_vendor_amd()) {
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v3 03/10] ACPI: LPIT: Use new `pm_suspend_preferred_s2idle`
[not found] <20220701023328.2783-1-mario.limonciello@amd.com>
2022-07-01 2:33 ` [PATCH v3 02/10] ACPI / x86: Use new `pm_suspend_preferred_s2idle` Mario Limonciello
@ 2022-07-01 2:33 ` Mario Limonciello
2022-07-01 13:01 ` kernel test robot
1 sibling, 1 reply; 4+ messages in thread
From: Mario Limonciello @ 2022-07-01 2:33 UTC (permalink / raw)
To: mario.limonciello, Rafael J. Wysocki, Len Brown
Cc: linux-pm, linux-acpi, linux-kernel
Drop the direct check from the FADT and use the helper instead.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/acpi/acpi_lpit.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/acpi_lpit.c b/drivers/acpi/acpi_lpit.c
index 48e5059d67ca..31c49107c579 100644
--- a/drivers/acpi/acpi_lpit.c
+++ b/drivers/acpi/acpi_lpit.c
@@ -6,6 +6,7 @@
* Copyright (C) 2017 Intel Corporation. All rights reserved.
*/
+#include <linux/suspend.h>
#include <linux/cpu.h>
#include <linux/acpi.h>
#include <asm/msr.h>
@@ -109,7 +110,7 @@ static void lpit_update_residency(struct lpit_residency_info *info,
if (!info->iomem_addr)
return;
- if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0))
+ if (!pm_suspend_preferred_s2idle())
return;
/* Silently fail, if cpuidle attribute group is not present */
@@ -117,7 +118,7 @@ static void lpit_update_residency(struct lpit_residency_info *info,
&dev_attr_low_power_idle_system_residency_us.attr,
"cpuidle");
} else if (info->gaddr.space_id == ACPI_ADR_SPACE_FIXED_HARDWARE) {
- if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0))
+ if (!pm_suspend_preferred_s2idle())
return;
/* Silently fail, if cpuidle attribute group is not present */
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 03/10] ACPI: LPIT: Use new `pm_suspend_preferred_s2idle`
2022-07-01 2:33 ` [PATCH v3 03/10] ACPI: LPIT: " Mario Limonciello
@ 2022-07-01 13:01 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-07-01 13:01 UTC (permalink / raw)
To: Mario Limonciello, Rafael J. Wysocki, Len Brown
Cc: kbuild-all, linux-pm, linux-acpi, 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: x86_64-randconfig-a004 (https://download.01.org/0day-ci/archive/20220701/202207012033.3AjPSdQe-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/9603006925839aeb40b8a65adc7be87f4e89813f
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 9603006925839aeb40b8a65adc7be87f4e89813f
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
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/acpi/acpi_lpit.c: In function 'lpit_update_residency':
>> drivers/acpi/acpi_lpit.c:113:22: error: implicit declaration of function 'pm_suspend_preferred_s2idle'; did you mean 'pm_suspend_default_s2idle'? [-Werror=implicit-function-declaration]
113 | if (!pm_suspend_preferred_s2idle())
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| pm_suspend_default_s2idle
drivers/acpi/acpi_lpit.c: At top level:
drivers/acpi/acpi_lpit.c:149:6: warning: no previous prototype for 'acpi_init_lpit' [-Wmissing-prototypes]
149 | void acpi_init_lpit(void)
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +113 drivers/acpi/acpi_lpit.c
97
98 static void lpit_update_residency(struct lpit_residency_info *info,
99 struct acpi_lpit_native *lpit_native)
100 {
101 info->frequency = lpit_native->counter_frequency ?
102 lpit_native->counter_frequency : tsc_khz * 1000;
103 if (!info->frequency)
104 info->frequency = 1;
105
106 info->gaddr = lpit_native->residency_counter;
107 if (info->gaddr.space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) {
108 info->iomem_addr = ioremap(info->gaddr.address,
109 info->gaddr.bit_width / 8);
110 if (!info->iomem_addr)
111 return;
112
> 113 if (!pm_suspend_preferred_s2idle())
114 return;
115
116 /* Silently fail, if cpuidle attribute group is not present */
117 sysfs_add_file_to_group(&cpu_subsys.dev_root->kobj,
118 &dev_attr_low_power_idle_system_residency_us.attr,
119 "cpuidle");
120 } else if (info->gaddr.space_id == ACPI_ADR_SPACE_FIXED_HARDWARE) {
121 if (!pm_suspend_preferred_s2idle())
122 return;
123
124 /* Silently fail, if cpuidle attribute group is not present */
125 sysfs_add_file_to_group(&cpu_subsys.dev_root->kobj,
126 &dev_attr_low_power_idle_cpu_residency_us.attr,
127 "cpuidle");
128 }
129 }
130
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 02/10] ACPI / x86: Use new `pm_suspend_preferred_s2idle`
2022-07-01 2:33 ` [PATCH v3 02/10] ACPI / x86: Use new `pm_suspend_preferred_s2idle` Mario Limonciello
@ 2022-07-13 18:33 ` Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2022-07-13 18:33 UTC (permalink / raw)
To: Mario Limonciello
Cc: Linux Kernel Mailing List, Linux PM, Rafael J. Wysocki, Len Brown,
ACPI Devel Maling List
On Fri, Jul 1, 2022 at 4:33 AM Mario Limonciello
<mario.limonciello@amd.com> wrote:
>
> Drop the direct check from the FADT and use the helper instead.
>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> drivers/acpi/x86/s2idle.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
> index 2963229062f8..b1483d5092c1 100644
> --- a/drivers/acpi/x86/s2idle.c
> +++ b/drivers/acpi/x86/s2idle.c
> @@ -369,7 +369,7 @@ static int lps0_device_attach(struct acpi_device *adev,
> if (lps0_device_handle)
> return 0;
>
> - if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0))
> + if (!pm_suspend_preferred_s2idle())
This needs to be checked in a different place in this function.
Let me cut a patch for that.
> return 0;
>
> if (acpi_s2idle_vendor_amd()) {
> --
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-13 18:33 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 02/10] ACPI / x86: Use new `pm_suspend_preferred_s2idle` Mario Limonciello
2022-07-13 18:33 ` Rafael J. Wysocki
2022-07-01 2:33 ` [PATCH v3 03/10] ACPI: LPIT: " Mario Limonciello
2022-07-01 13:01 ` 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