2024-04-04 18:35:46

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v2 0/4] ACPI: x86: Move x86 stuff into dedicated folder


Move x86 related modules (which are solely for x86) to the dedicated
folder.
Note, there are more modules, but they are related to tables and
potentially might be used for other architectures in the future.
Hence touched only non-table related code.

In v2:
- fixed acpi_lpss_init() stub visibility (LKP)

Andy Shevchenko (4):
ACPI: x86: Introduce a Makefile
ACPI: x86: Move acpi_cmos_rtc to x86 folder
ACPI: x86: Move blacklist to x86 folder
ACPI: x86: Move LPSS to x86 folder

drivers/acpi/Makefile | 7 +------
drivers/acpi/internal.h | 3 ++-
drivers/acpi/x86/Makefile | 8 ++++++++
drivers/acpi/{ => x86}/blacklist.c | 2 +-
drivers/acpi/{acpi_cmos_rtc.c => x86/cmos_rtc.c} | 2 +-
drivers/acpi/{acpi_lpss.c => x86/lpss.c} | 2 +-
6 files changed, 14 insertions(+), 10 deletions(-)
create mode 100644 drivers/acpi/x86/Makefile
rename drivers/acpi/{ => x86}/blacklist.c (99%)
rename drivers/acpi/{acpi_cmos_rtc.c => x86/cmos_rtc.c} (98%)
rename drivers/acpi/{acpi_lpss.c => x86/lpss.c} (99%)

--
2.43.0.rc1.1.gbec44491f096



2024-04-04 18:35:57

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v2 4/4] ACPI: x86: Move LPSS to x86 folder

LPSS is built solely for x86, move it to the respective folder.

Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/acpi/Makefile | 1 -
drivers/acpi/internal.h | 3 ++-
drivers/acpi/x86/Makefile | 1 +
drivers/acpi/{acpi_lpss.c => x86/lpss.c} | 2 +-
4 files changed, 4 insertions(+), 3 deletions(-)
rename drivers/acpi/{acpi_lpss.c => x86/lpss.c} (99%)

diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index 6f4187a34f41..39ea5cfa8326 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -45,7 +45,6 @@ acpi-y += ec.o
acpi-$(CONFIG_ACPI_DOCK) += dock.o
acpi-$(CONFIG_PCI) += pci_root.o pci_link.o pci_irq.o
obj-$(CONFIG_ACPI_MCFG) += pci_mcfg.o
-acpi-$(CONFIG_PCI) += acpi_lpss.o
acpi-y += acpi_apd.o
acpi-y += acpi_platform.o
acpi-y += acpi_pnp.o
diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h
index ca72a0dc5715..60c483836756 100644
--- a/drivers/acpi/internal.h
+++ b/drivers/acpi/internal.h
@@ -69,7 +69,8 @@ void acpi_debugfs_init(void);
#else
static inline void acpi_debugfs_init(void) { return; }
#endif
-#ifdef CONFIG_PCI
+
+#if defined(CONFIG_X86) && defined(CONFIG_PCI)
void acpi_lpss_init(void);
#else
static inline void acpi_lpss_init(void) {}
diff --git a/drivers/acpi/x86/Makefile b/drivers/acpi/x86/Makefile
index 1f3c5fa84f9e..63c99509ed9d 100644
--- a/drivers/acpi/x86/Makefile
+++ b/drivers/acpi/x86/Makefile
@@ -1,6 +1,7 @@
obj-$(CONFIG_ACPI) += acpi-x86.o
acpi-x86-y += apple.o
acpi-x86-y += cmos_rtc.o
+acpi-x86-$(CONFIG_PCI) += lpss.o
acpi-x86-y += s2idle.o
acpi-x86-y += utils.o

diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/x86/lpss.c
similarity index 99%
rename from drivers/acpi/acpi_lpss.c
rename to drivers/acpi/x86/lpss.c
index a3d2d94be5c0..148e29c2c526 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/x86/lpss.c
@@ -25,7 +25,7 @@
#include <linux/suspend.h>
#include <linux/delay.h>

-#include "internal.h"
+#include "../internal.h"

#ifdef CONFIG_X86_INTEL_LPSS

--
2.43.0.rc1.1.gbec44491f096


2024-04-05 15:20:51

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v2 0/4] ACPI: x86: Move x86 stuff into dedicated folder

On Fri, Apr 05, 2024 at 07:45:29AM -0700, Kuppuswamy Sathyanarayanan wrote:
>
> On 4/4/24 11:23 AM, Andy Shevchenko wrote:
> > Move x86 related modules (which are solely for x86) to the dedicated
> > folder.
> > Note, there are more modules, but they are related to tables and
> > potentially might be used for other architectures in the future.
> > Hence touched only non-table related code.
>
> Except the blacklisted patch Nit, rest looks good to me.

Not sure how that related (see my reply).

> Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]>

Thank you!

--
With Best Regards,
Andy Shevchenko



Subject: Re: [PATCH v2 0/4] ACPI: x86: Move x86 stuff into dedicated folder


On 4/4/24 11:23 AM, Andy Shevchenko wrote:
> Move x86 related modules (which are solely for x86) to the dedicated
> folder.
> Note, there are more modules, but they are related to tables and
> potentially might be used for other architectures in the future.
> Hence touched only non-table related code.

Except the blacklisted patch Nit, rest looks good to me.

Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]>
>
> In v2:
> - fixed acpi_lpss_init() stub visibility (LKP)
>
> Andy Shevchenko (4):
> ACPI: x86: Introduce a Makefile
> ACPI: x86: Move acpi_cmos_rtc to x86 folder
> ACPI: x86: Move blacklist to x86 folder
> ACPI: x86: Move LPSS to x86 folder
>
> drivers/acpi/Makefile | 7 +------
> drivers/acpi/internal.h | 3 ++-
> drivers/acpi/x86/Makefile | 8 ++++++++
> drivers/acpi/{ => x86}/blacklist.c | 2 +-
> drivers/acpi/{acpi_cmos_rtc.c => x86/cmos_rtc.c} | 2 +-
> drivers/acpi/{acpi_lpss.c => x86/lpss.c} | 2 +-
> 6 files changed, 14 insertions(+), 10 deletions(-)
> create mode 100644 drivers/acpi/x86/Makefile
> rename drivers/acpi/{ => x86}/blacklist.c (99%)
> rename drivers/acpi/{acpi_cmos_rtc.c => x86/cmos_rtc.c} (98%)
> rename drivers/acpi/{acpi_lpss.c => x86/lpss.c} (99%)
>
--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer