lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 6 May 2022 12:04:29 +0200
From:   Hans de Goede <hdegoede@...hat.com>
To:     Mario Limonciello <mario.limonciello@....com>,
        Mark Pearson <markpearson@...ovo.com>
Cc:     Henrique de Moraes Holschuh <hmh@....eng.br>,
        Mark Gross <mgross@...ux.intel.com>,
        "open list:THINKPAD ACPI EXTRAS DRIVER" 
        <ibm-acpi-devel@...ts.sourceforge.net>,
        "open list:THINKPAD ACPI EXTRAS DRIVER" 
        <platform-driver-x86@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] platform/x86: thinkpad_acpi: Fix compilation without
 CONFIG_SUSPEND

Hi,

On 5/3/22 03:27, Mario Limonciello wrote:
> When compiled without `CONFIG_SUSPEND` the extra s2idle quirk handling
> doesn't make any sense and causes a kernel build failure.
> 
> Disable the new code with `CONFIG_SUSPEND` not set.
> 
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@....com>

Thanks, since the original patch was still in my review-hans
branch (and not yet in for-next) I've squashed this fix into
the original patch.

Regards,

Hans




> ---
>  drivers/platform/x86/thinkpad_acpi.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index f385450af864..2833609fade7 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -4482,6 +4482,7 @@ static const struct dmi_system_id fwbug_list[] __initconst = {
>  	{}
>  };
>  
> +#ifdef CONFIG_SUSPEND
>  /*
>   * Lenovo laptops from a variety of generations run a SMI handler during the D3->D0
>   * transition that occurs specifically when exiting suspend to idle which can cause
> @@ -4517,6 +4518,7 @@ static void thinkpad_acpi_amd_s2idle_restore(void)
>  static struct acpi_s2idle_dev_ops thinkpad_acpi_s2idle_dev_ops = {
>  	.restore = thinkpad_acpi_amd_s2idle_restore,
>  };
> +#endif
>  
>  static const struct pci_device_id fwbug_cards_ids[] __initconst = {
>  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24F3) },
> @@ -11569,8 +11571,10 @@ static void thinkpad_acpi_module_exit(void)
>  
>  	tpacpi_lifecycle = TPACPI_LIFE_EXITING;
>  
> +#ifdef CONFIG_SUSPEND
>  	if (tp_features.quirks && tp_features.quirks->s2idle_bug_mmio)
>  		acpi_unregister_lps0_dev(&thinkpad_acpi_s2idle_dev_ops);
> +#endif
>  	if (tpacpi_hwmon)
>  		hwmon_device_unregister(tpacpi_hwmon);
>  	if (tp_features.sensors_pdrv_registered)
> @@ -11743,11 +11747,13 @@ static int __init thinkpad_acpi_module_init(void)
>  	dmi_id = dmi_first_match(fwbug_list);
>  	if (dmi_id) {
>  		tp_features.quirks = dmi_id->driver_data;
> +#ifdef CONFIG_SUSPEND
>  		if (tp_features.quirks->s2idle_bug_mmio) {
>  			if (!acpi_register_lps0_dev(&thinkpad_acpi_s2idle_dev_ops))
>  				pr_info("Using s2idle quirk to avoid %s platform firmware bug\n",
>  					dmi_id->ident ? dmi_id->ident : "");
>  		}
> +#endif
>  	}
>  
>  	return 0;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ