* [RFC v2 02/39] ACPI: add dependency on HAS_IOPORT
[not found] <20220429135108.2781579-1-schnelle@linux.ibm.com>
@ 2022-04-29 13:50 ` Niklas Schnelle
2022-05-04 13:23 ` Rafael J. Wysocki
2022-05-04 17:53 ` Bjorn Helgaas
2022-04-29 13:50 ` [PATCH 03/37] " Niklas Schnelle
` (2 subsequent siblings)
3 siblings, 2 replies; 11+ messages in thread
From: Niklas Schnelle @ 2022-04-29 13:50 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Greg Kroah-Hartman, linux-kernel, linux-arch, linux-pci,
Arnd Bergmann, Rafael J. Wysocki, open list:ACPI
In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
not being declared. As ACPI always uses I/O port access we simply depend
on HAS_IOPORT.
Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
drivers/acpi/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 1e34f846508f..8ad0d168004c 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -5,6 +5,7 @@
config ARCH_SUPPORTS_ACPI
bool
+ depends on HAS_IOPORT
menuconfig ACPI
bool "ACPI (Advanced Configuration and Power Interface) Support"
--
2.32.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 03/37] ACPI: add dependency on HAS_IOPORT
[not found] <20220429135108.2781579-1-schnelle@linux.ibm.com>
2022-04-29 13:50 ` [RFC v2 02/39] ACPI: add dependency on HAS_IOPORT Niklas Schnelle
@ 2022-04-29 13:50 ` Niklas Schnelle
2022-04-29 14:28 ` Niklas Schnelle
2022-04-29 13:50 ` [PATCH 23/37] pnp: add HAS_IOPORT dependencies Niklas Schnelle
2022-04-29 13:50 ` [RFC v2 27/39] " Niklas Schnelle
3 siblings, 1 reply; 11+ messages in thread
From: Niklas Schnelle @ 2022-04-29 13:50 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Greg Kroah-Hartman, linux-kernel, linux-arch, linux-pci,
Arnd Bergmann, Rafael J. Wysocki, open list:ACPI
In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
not being declared. As ACPI always uses I/O port access we simply depend
on HAS_IOPORT.
Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
drivers/acpi/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 1e34f846508f..c90c983db94c 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -9,6 +9,7 @@ config ARCH_SUPPORTS_ACPI
menuconfig ACPI
bool "ACPI (Advanced Configuration and Power Interface) Support"
depends on ARCH_SUPPORTS_ACPI
+ depends on HAS_IOPORT
select PNP
select NLS
select CRC32
--
2.32.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 23/37] pnp: add HAS_IOPORT dependencies
[not found] <20220429135108.2781579-1-schnelle@linux.ibm.com>
2022-04-29 13:50 ` [RFC v2 02/39] ACPI: add dependency on HAS_IOPORT Niklas Schnelle
2022-04-29 13:50 ` [PATCH 03/37] " Niklas Schnelle
@ 2022-04-29 13:50 ` Niklas Schnelle
2022-04-29 14:34 ` Niklas Schnelle
2022-04-29 13:50 ` [RFC v2 27/39] " Niklas Schnelle
3 siblings, 1 reply; 11+ messages in thread
From: Niklas Schnelle @ 2022-04-29 13:50 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Greg Kroah-Hartman, linux-kernel, linux-arch, linux-pci,
Arnd Bergmann, Jaroslav Kysela, Rafael J. Wysocki,
open list:PNP SUPPORT
In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
not being declared. We thus need to depend on HAS_IOPORT even when
compile testing only.
Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
drivers/pnp/isapnp/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pnp/isapnp/Kconfig b/drivers/pnp/isapnp/Kconfig
index d0479a563123..79bd48f1dd94 100644
--- a/drivers/pnp/isapnp/Kconfig
+++ b/drivers/pnp/isapnp/Kconfig
@@ -4,7 +4,7 @@
#
config ISAPNP
bool "ISA Plug and Play support"
- depends on ISA || COMPILE_TEST
+ depends on ISA || (HAS_IOPORT && COMPILE_TEST)
help
Say Y here if you would like support for ISA Plug and Play devices.
Some information is in <file:Documentation/driver-api/isapnp.rst>.
--
2.32.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [RFC v2 27/39] pnp: add HAS_IOPORT dependencies
[not found] <20220429135108.2781579-1-schnelle@linux.ibm.com>
` (2 preceding siblings ...)
2022-04-29 13:50 ` [PATCH 23/37] pnp: add HAS_IOPORT dependencies Niklas Schnelle
@ 2022-04-29 13:50 ` Niklas Schnelle
3 siblings, 0 replies; 11+ messages in thread
From: Niklas Schnelle @ 2022-04-29 13:50 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Greg Kroah-Hartman, linux-kernel, linux-arch, linux-pci,
Arnd Bergmann, Jaroslav Kysela, Rafael J. Wysocki,
open list:PNP SUPPORT
In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
not being declared. We thus need to depend on HAS_IOPORT even when
compile testing only.
Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
drivers/pnp/isapnp/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pnp/isapnp/Kconfig b/drivers/pnp/isapnp/Kconfig
index d0479a563123..79bd48f1dd94 100644
--- a/drivers/pnp/isapnp/Kconfig
+++ b/drivers/pnp/isapnp/Kconfig
@@ -4,7 +4,7 @@
#
config ISAPNP
bool "ISA Plug and Play support"
- depends on ISA || COMPILE_TEST
+ depends on ISA || (HAS_IOPORT && COMPILE_TEST)
help
Say Y here if you would like support for ISA Plug and Play devices.
Some information is in <file:Documentation/driver-api/isapnp.rst>.
--
2.32.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 03/37] ACPI: add dependency on HAS_IOPORT
2022-04-29 13:50 ` [PATCH 03/37] " Niklas Schnelle
@ 2022-04-29 14:28 ` Niklas Schnelle
0 siblings, 0 replies; 11+ messages in thread
From: Niklas Schnelle @ 2022-04-29 14:28 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Greg Kroah-Hartman, linux-kernel, linux-arch, linux-pci,
Arnd Bergmann, Rafael J. Wysocki, open list:ACPI
On Fri, 2022-04-29 at 15:50 +0200, Niklas Schnelle wrote:
> In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> not being declared. As ACPI always uses I/O port access we simply depend
> on HAS_IOPORT.
>
> Co-developed-by: Arnd Bergmann <arnd@kernel.org>
> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
> ---
Sorry everyone. I sent this as PATCH in error while preparing to sent
the same series as RFC. Since e-mail has no remote delete and I lack a
time machine let's just all pretend you only got the RFC.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 23/37] pnp: add HAS_IOPORT dependencies
2022-04-29 13:50 ` [PATCH 23/37] pnp: add HAS_IOPORT dependencies Niklas Schnelle
@ 2022-04-29 14:34 ` Niklas Schnelle
0 siblings, 0 replies; 11+ messages in thread
From: Niklas Schnelle @ 2022-04-29 14:34 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Greg Kroah-Hartman, linux-kernel, linux-arch, linux-pci,
Arnd Bergmann, Jaroslav Kysela, Rafael J. Wysocki,
open list:PNP SUPPORT
On Fri, 2022-04-29 at 15:50 +0200, Niklas Schnelle wrote:
> In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> not being declared. We thus need to depend on HAS_IOPORT even when
> compile testing only.
>
> Co-developed-by: Arnd Bergmann <arnd@kernel.org>
> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
> ---
Sorry everyone. I sent this as PATCH in error while preparing to sent
the same series as RFC. Since e-mail has no remote delete and I lack a
time machine let's just all pretend you only got the RFC.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFC v2 02/39] ACPI: add dependency on HAS_IOPORT
2022-04-29 13:50 ` [RFC v2 02/39] ACPI: add dependency on HAS_IOPORT Niklas Schnelle
@ 2022-05-04 13:23 ` Rafael J. Wysocki
2022-05-04 17:53 ` Bjorn Helgaas
1 sibling, 0 replies; 11+ messages in thread
From: Rafael J. Wysocki @ 2022-05-04 13:23 UTC (permalink / raw)
To: Niklas Schnelle
Cc: Arnd Bergmann, Greg Kroah-Hartman, Linux Kernel Mailing List,
linux-arch, Linux PCI, Arnd Bergmann, Rafael J. Wysocki,
open list:ACPI
On Fri, Apr 29, 2022 at 3:51 PM Niklas Schnelle <schnelle@linux.ibm.com> wrote:
>
> In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> not being declared. As ACPI always uses I/O port access we simply depend
> on HAS_IOPORT.
>
> Co-developed-by: Arnd Bergmann <arnd@kernel.org>
> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
> ---
> drivers/acpi/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
> index 1e34f846508f..8ad0d168004c 100644
> --- a/drivers/acpi/Kconfig
> +++ b/drivers/acpi/Kconfig
> @@ -5,6 +5,7 @@
>
> config ARCH_SUPPORTS_ACPI
> bool
> + depends on HAS_IOPORT
This and the analogous PNP change are both fine with me.
Thanks!
>
> menuconfig ACPI
> bool "ACPI (Advanced Configuration and Power Interface) Support"
> --
> 2.32.0
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFC v2 02/39] ACPI: add dependency on HAS_IOPORT
2022-04-29 13:50 ` [RFC v2 02/39] ACPI: add dependency on HAS_IOPORT Niklas Schnelle
2022-05-04 13:23 ` Rafael J. Wysocki
@ 2022-05-04 17:53 ` Bjorn Helgaas
2022-05-04 19:58 ` Arnd Bergmann
1 sibling, 1 reply; 11+ messages in thread
From: Bjorn Helgaas @ 2022-05-04 17:53 UTC (permalink / raw)
To: Niklas Schnelle
Cc: Arnd Bergmann, Greg Kroah-Hartman, linux-kernel, linux-arch,
linux-pci, Arnd Bergmann, Rafael J. Wysocki, open list:ACPI
On Fri, Apr 29, 2022 at 03:50:00PM +0200, Niklas Schnelle wrote:
> In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> not being declared. As ACPI always uses I/O port access we simply depend
> on HAS_IOPORT.
CONFIG_ACPI depends on ARCH_SUPPORTS_ACPI, which is only set by arm64,
ia64, and x86, all of which support I/O port access. So does this
actually solve a problem? I wouldn't think you'd be able to build
ACPI on s390 even without this patch.
"ACPI always uses I/O port access" is a pretty broad brush, and it
would be useful to know specifically what the dependencies are.
Many ACPI hardware accesses use acpi_hw_read()/acpi_hw_write(), which
use either MMIO or I/O port accesses depending on what the firmware
told us.
> Co-developed-by: Arnd Bergmann <arnd@kernel.org>
> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
> ---
> drivers/acpi/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
> index 1e34f846508f..8ad0d168004c 100644
> --- a/drivers/acpi/Kconfig
> +++ b/drivers/acpi/Kconfig
> @@ -5,6 +5,7 @@
>
> config ARCH_SUPPORTS_ACPI
> bool
> + depends on HAS_IOPORT
>
> menuconfig ACPI
> bool "ACPI (Advanced Configuration and Power Interface) Support"
> --
> 2.32.0
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFC v2 02/39] ACPI: add dependency on HAS_IOPORT
2022-05-04 17:53 ` Bjorn Helgaas
@ 2022-05-04 19:58 ` Arnd Bergmann
2022-05-05 8:20 ` Niklas Schnelle
0 siblings, 1 reply; 11+ messages in thread
From: Arnd Bergmann @ 2022-05-04 19:58 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Niklas Schnelle, Arnd Bergmann, Greg Kroah-Hartman,
Linux Kernel Mailing List, linux-arch, linux-pci,
Rafael J. Wysocki, open list:ACPI
On Wed, May 4, 2022 at 7:53 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
>
> On Fri, Apr 29, 2022 at 03:50:00PM +0200, Niklas Schnelle wrote:
> > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> > not being declared. As ACPI always uses I/O port access we simply depend
> > on HAS_IOPORT.
>
> CONFIG_ACPI depends on ARCH_SUPPORTS_ACPI, which is only set by arm64,
> ia64, and x86, all of which support I/O port access. So does this
> actually solve a problem? I wouldn't think you'd be able to build
> ACPI on s390 even without this patch.
> "ACPI always uses I/O port access" is a pretty broad brush, and it
> would be useful to know specifically what the dependencies are.
>
> Many ACPI hardware accesses use acpi_hw_read()/acpi_hw_write(), which
> use either MMIO or I/O port accesses depending on what the firmware
> told us.
I think this came from my original prototype of the series where I tested it
out on arm64 with HAS_IOPORT disabled. I would like to hide the definition
of inb()/outb() from include/asm-generic/io.h whenever CONFIG_HAS_IOPORT
is not set, and I was prototyping this on arm64.
There are uses of inb()/outb() in drivers/acpi/ec.c and drivers/acpi/osl.c,
which in turn are not optional in ACPI, so it seems that those are
required.
If we want to allow building arm64 without HAS_IOPORT for some reason,
that means either force-disabling ACPI as well, or changin ACPI to not
rely on port I/O. I think it's fine to leave that as a problem for whoever
wants to make HAS_IOPORT optional in the future, and drop the
dependency here.
Arnd
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFC v2 02/39] ACPI: add dependency on HAS_IOPORT
2022-05-04 19:58 ` Arnd Bergmann
@ 2022-05-05 8:20 ` Niklas Schnelle
2022-05-05 19:36 ` Bjorn Helgaas
0 siblings, 1 reply; 11+ messages in thread
From: Niklas Schnelle @ 2022-05-05 8:20 UTC (permalink / raw)
To: Arnd Bergmann, Bjorn Helgaas
Cc: Arnd Bergmann, Greg Kroah-Hartman, Linux Kernel Mailing List,
linux-arch, linux-pci, Rafael J. Wysocki, open list:ACPI
On Wed, 2022-05-04 at 21:58 +0200, Arnd Bergmann wrote:
> On Wed, May 4, 2022 at 7:53 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > On Fri, Apr 29, 2022 at 03:50:00PM +0200, Niklas Schnelle wrote:
> > > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> > > not being declared. As ACPI always uses I/O port access we simply depend
> > > on HAS_IOPORT.
> >
> > CONFIG_ACPI depends on ARCH_SUPPORTS_ACPI, which is only set by arm64,
> > ia64, and x86, all of which support I/O port access. So does this
> > actually solve a problem? I wouldn't think you'd be able to build
> > ACPI on s390 even without this patch.
> > "ACPI always uses I/O port access" is a pretty broad brush, and it
> > would be useful to know specifically what the dependencies are.
> >
> > Many ACPI hardware accesses use acpi_hw_read()/acpi_hw_write(), which
> > use either MMIO or I/O port accesses depending on what the firmware
> > told us.
>
> I think this came from my original prototype of the series where I tested it
> out on arm64 with HAS_IOPORT disabled. I would like to hide the definition
> of inb()/outb() from include/asm-generic/io.h whenever CONFIG_HAS_IOPORT
> is not set, and I was prototyping this on arm64.
>
> There are uses of inb()/outb() in drivers/acpi/ec.c and drivers/acpi/osl.c,
> which in turn are not optional in ACPI, so it seems that those are
> required.
>
> If we want to allow building arm64 without HAS_IOPORT for some reason,
> that means either force-disabling ACPI as well, or changin ACPI to not
> rely on port I/O. I think it's fine to leave that as a problem for whoever
> wants to make HAS_IOPORT optional in the future, and drop the
> dependency here.
>
> Arnd
I'll improve the commit message to make the dependency on HAS_IOPORT
more clear. I also agree with Arnd that since all architectures where
ACPI is useful have I/O ports making it work without I/O port access
compiled in is for another day.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFC v2 02/39] ACPI: add dependency on HAS_IOPORT
2022-05-05 8:20 ` Niklas Schnelle
@ 2022-05-05 19:36 ` Bjorn Helgaas
0 siblings, 0 replies; 11+ messages in thread
From: Bjorn Helgaas @ 2022-05-05 19:36 UTC (permalink / raw)
To: Niklas Schnelle
Cc: Arnd Bergmann, Arnd Bergmann, Greg Kroah-Hartman,
Linux Kernel Mailing List, linux-arch, linux-pci,
Rafael J. Wysocki, open list:ACPI
On Thu, May 05, 2022 at 10:20:28AM +0200, Niklas Schnelle wrote:
> On Wed, 2022-05-04 at 21:58 +0200, Arnd Bergmann wrote:
> > On Wed, May 4, 2022 at 7:53 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > > On Fri, Apr 29, 2022 at 03:50:00PM +0200, Niklas Schnelle wrote:
> > > > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> > > > not being declared. As ACPI always uses I/O port access we simply depend
> > > > on HAS_IOPORT.
> > >
> > > CONFIG_ACPI depends on ARCH_SUPPORTS_ACPI, which is only set by arm64,
> > > ia64, and x86, all of which support I/O port access. So does this
> > > actually solve a problem? I wouldn't think you'd be able to build
> > > ACPI on s390 even without this patch.
> > > "ACPI always uses I/O port access" is a pretty broad brush, and it
> > > would be useful to know specifically what the dependencies are.
> > >
> > > Many ACPI hardware accesses use acpi_hw_read()/acpi_hw_write(), which
> > > use either MMIO or I/O port accesses depending on what the firmware
> > > told us.
> >
> > I think this came from my original prototype of the series where I tested it
> > out on arm64 with HAS_IOPORT disabled. I would like to hide the definition
> > of inb()/outb() from include/asm-generic/io.h whenever CONFIG_HAS_IOPORT
> > is not set, and I was prototyping this on arm64.
> >
> > There are uses of inb()/outb() in drivers/acpi/ec.c and drivers/acpi/osl.c,
> > which in turn are not optional in ACPI, so it seems that those are
> > required.
> >
> > If we want to allow building arm64 without HAS_IOPORT for some reason,
> > that means either force-disabling ACPI as well, or changin ACPI to not
> > rely on port I/O. I think it's fine to leave that as a problem for whoever
> > wants to make HAS_IOPORT optional in the future, and drop the
> > dependency here.
>
> I'll improve the commit message to make the dependency on HAS_IOPORT
> more clear. I also agree with Arnd that since all architectures where
> ACPI is useful have I/O ports making it work without I/O port access
> compiled in is for another day.
I don't really see the point of including this patch at all. It
doesn't solve any existing problem.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-05-05 19:36 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220429135108.2781579-1-schnelle@linux.ibm.com>
2022-04-29 13:50 ` [RFC v2 02/39] ACPI: add dependency on HAS_IOPORT Niklas Schnelle
2022-05-04 13:23 ` Rafael J. Wysocki
2022-05-04 17:53 ` Bjorn Helgaas
2022-05-04 19:58 ` Arnd Bergmann
2022-05-05 8:20 ` Niklas Schnelle
2022-05-05 19:36 ` Bjorn Helgaas
2022-04-29 13:50 ` [PATCH 03/37] " Niklas Schnelle
2022-04-29 14:28 ` Niklas Schnelle
2022-04-29 13:50 ` [PATCH 23/37] pnp: add HAS_IOPORT dependencies Niklas Schnelle
2022-04-29 14:34 ` Niklas Schnelle
2022-04-29 13:50 ` [RFC v2 27/39] " Niklas Schnelle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox