Re: [RFC v2 02/39] ACPI: add dependency on HAS_IOPORT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 4, 2022 at 7:53 PM Bjorn Helgaas <helgaas@xxxxxxxxxx> 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



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux