Skip to content

ACPI: Fixes and cleanups related to iomaps management (v2)

Rafael J. Wysocki linux-acpi linux-pm lkml platform-driver-x86 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8ACPI: Fix acpi_os_read_memory() and acpi_os_write_memory() (v2)drivers/acpi/osl.c+18 -70 replies
1/8ACPI: Fix acpi_os_read_memory() and acpi_os_write_memory() (v2)drivers/acpi/osl.c+18 -70 replies
2/8ACPI: Do not export functions that are only used in osl.cdrivers/acpi/osl.c include/linux/acpi_io.h+2 -70 replies
2/8ACPI: Do not export functions that are only used in osl.cdrivers/acpi/osl.c include/linux/acpi_io.h+2 -70 replies
3/8ACPI: Change acpi_ioremap_lock into a mutexdrivers/acpi/osl.c+9 -120 replies
3/8ACPI: Change acpi_ioremap_lock into a mutexdrivers/acpi/osl.c+9 -120 replies
4/8ACPI: Avoid walking the list of memory mappings in osl.c twice in a rowdrivers/acpi/osl.c+20 -130 replies
4/8ACPI: Avoid walking the list of memory mappings in osl.c twice in a rowdrivers/acpi/osl.c+20 -130 replies
5/8ACPI: Make acpi_os_map_memory() avoid creating unnecessary mappingsdrivers/acpi/osl.c+15 -130 replies
5/8ACPI: Make acpi_os_map_memory() avoid creating unnecessary mappingsdrivers/acpi/osl.c+15 -130 replies
6/8ACPI: Do not use krefs under a mutex in osl.cdrivers/acpi/osl.c+16 -200 replies
6/8ACPI: Do not use krefs under a mutex in osl.cdrivers/acpi/osl.c+16 -200 replies
7/8ACPI: Introduce acpi_os_get_iomem()drivers/acpi/osl.c include/linux/acpi_io.h+18 -00 replies
7/8ACPI: Introduce acpi_os_get_iomem()drivers/acpi/osl.c include/linux/acpi_io.h+18 -00 replies
8/8ACPI / PM: Use existing ACPI iomaps for NVS save/restore (v2)drivers/acpi/nvs.c+19 -30 replies
8/8ACPI / PM: Use existing ACPI iomaps for NVS save/restore (v2)drivers/acpi/nvs.c+19 -38 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/8] ACPI: Fixes and cleanups related to iomaps management (v2)

Hi Len,

The following series of patches implements some fixes of the ACPI iomaps management. I found the problems trying to resolve the issue of creating iomaps of regions that have been mapped already when we save the NVS region.

To me, they are not extremely urgent, because the related issues are generally long-standing, but some bugs addressed by them (especially [1/9]) may be actively hurting people right now, so they look suitable for .38 as well. This is your call, though.

[1/8] - Fix routines for reading and writing iomem (RCU bug; new version of the

        patch).

[2/8] - (cleanup) Do not export local functions in osl.c (this one is the same

        as https://patchwork.kernel.org/patch/491551/).

[3/8] - Use a mutex (instead of a spinlock) for the locking of iomap
manipulations in osl.c (same as
https://patchwork.kernel.org/patch/491751/).

[4/8] - Avoid unnecessary walks of the list of iomaps in osl.c (same as

        https://patchwork.kernel.org/patch/491671/).

[5/8] - Avoid creating iomaps for regions that have been mapped already (same

         as https://patchwork.kernel.org/patch/491741/).

[6/8] - Replace krefs used for iomap refcounting with simple reference
counters (they are manipulated under a lock anyway; same as
https://patchwork.kernel.org/patch/491681/).

[7/8] - Introduce function for getting a reference to an ACPI iomap (to be
used by the NVS save/restore code; same as
https://patchwork.kernel.org/patch/491701/).

[8/8] - Make the NVS code use existing iomaps if possible (new version).

The patches have been tested on HP nx6325, Toshiba Portege R500 and Acer Ferrari One without causing any visible problems to happen.

Thanks,
Rafael