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] [thread-next>] [day] [month] [year] [list]
Date: Sun, 25 Feb 2024 22:44:14 -0800
From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>
To: Bjorn Helgaas <helgaas@...nel.org>, linux-pci@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
 Mika Westerberg <mika.westerberg@...ux.intel.com>,
 "David E . Box" <david.e.box@...ux.intel.com>,
 Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
 "Rafael J . Wysocki" <rafael@...nel.org>,
 Tasev Nikola <tasev.stefanoska@...net.be>,
 Mark Enriquez <enriquezmark36@...il.com>, Thomas Witt <kernel@...t.link>,
 Werner Sembach <wse@...edocomputers.com>, Vidya Sagar <vidyas@...dia.com>,
 Kai-Heng Feng <kai.heng.feng@...onical.com>, Ricky Wu
 <ricky_wu@...ltek.com>, Mario Limonciello <mario.limonciello@....com>,
 Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH v7 2/5] PCI/ASPM: Always build aspm.c


On 2/23/24 12:58 PM, Bjorn Helgaas wrote:
> From: "David E. Box" <david.e.box@...ux.intel.com>
>
> Some ASPM-related tasks, such as save and restore of LTR and L1SS
> capabilities, still need to be performed when CONFIG_PCIEASPM is not
> enabled. To prepare for these changes, wrap the current code in aspm.c
> with an #ifdef and always build the file.

Since save/restore needs to be called even if CONFIG_PCIEASPM is
not set, why not just leave it in pci.c?

>
> Link: https://lore.kernel.org/r/20240128233212.1139663-2-david.e.box@linux.intel.com
> Signed-off-by: David E. Box <david.e.box@...ux.intel.com>
> [bhelgaas: split build change from function moves]
> Signed-off-by: Bjorn Helgaas <bhelgaas@...gle.com>
> ---
>  drivers/pci/pcie/Makefile | 2 +-
>  drivers/pci/pcie/aspm.c   | 4 ++++
>  2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pcie/Makefile b/drivers/pci/pcie/Makefile
> index 8de4ed5f98f1..6461aa93fe76 100644
> --- a/drivers/pci/pcie/Makefile
> +++ b/drivers/pci/pcie/Makefile
> @@ -6,7 +6,7 @@ pcieportdrv-y			:= portdrv.o rcec.o
>  
>  obj-$(CONFIG_PCIEPORTBUS)	+= pcieportdrv.o
>  
> -obj-$(CONFIG_PCIEASPM)		+= aspm.o
> +obj-y				+= aspm.o
>  obj-$(CONFIG_PCIEAER)		+= aer.o err.o
>  obj-$(CONFIG_PCIEAER_INJECT)	+= aer_inject.o
>  obj-$(CONFIG_PCIE_PME)		+= pme.o
> diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
> index d1538f73f2f9..d50c0f83430f 100644
> --- a/drivers/pci/pcie/aspm.c
> +++ b/drivers/pci/pcie/aspm.c
> @@ -24,6 +24,8 @@
>  
>  #include "../pci.h"
>  
> +#ifdef CONFIG_PCIEASPM
> +
>  #ifdef MODULE_PARAM_PREFIX
>  #undef MODULE_PARAM_PREFIX
>  #endif
> @@ -1517,3 +1519,5 @@ bool pcie_aspm_support_enabled(void)
>  {
>  	return aspm_support_enabled;
>  }
> +
> +#endif /* CONFIG_PCIEASPM */

-- 
Sathyanarayanan Kuppuswamy
Linux Kernel Developer


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ