]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ACPI / osl: Remove deprecated acpi_get_table_with_size()/early_acpi_os_unmap_memory()
authorLv Zheng <lv.zheng@intel.com>
Wed, 14 Dec 2016 07:04:46 +0000 (15:04 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 21 Dec 2016 01:36:38 +0000 (02:36 +0100)
Since all users are cleaned up, remove the 2 deprecated APIs due to no
users.
As a Linux variable rather than an ACPICA variable, acpi_gbl_permanent_mmap
is renamed to acpi_permanent_mmap to have a consistent coding style across
entire Linux ACPI subsystem.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
arch/arm64/include/asm/acpi.h
drivers/acpi/bus.c
drivers/acpi/osl.c
include/acpi/acpi_io.h
include/acpi/acpixf.h

index e517088d635fcc0c0f698418cf850b0541c8eb32..8957ff8b3dd466851d859f4490f0e2893b1db5c0 100644 (file)
@@ -28,7 +28,7 @@
 
 /* Basic configuration for ACPI */
 #ifdef CONFIG_ACPI
-/* ACPI table mapping after acpi_gbl_permanent_mmap is set */
+/* ACPI table mapping after acpi_permanent_mmap is set */
 static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys,
                                            acpi_size size)
 {
index 56190d00fd87042461f430c5aa1cdd82fb60dc8d..77468be75b3c284caa575a2d22bb084aecf121c5 100644 (file)
@@ -964,7 +964,7 @@ void __init acpi_early_init(void)
        if (!acpi_strict)
                acpi_gbl_enable_interpreter_slack = TRUE;
 
-       acpi_gbl_permanent_mmap = 1;
+       acpi_permanent_mmap = true;
 
        /*
         * If the machine falls into the DMI check table,
index 9316dfc19ceae3242e586997961cb18b7d69bd8f..8a7cab06e2712c63302884bdbe1fbd0a5a6e9f71 100644 (file)
@@ -76,6 +76,7 @@ static struct workqueue_struct *kacpi_notify_wq;
 static struct workqueue_struct *kacpi_hotplug_wq;
 static bool acpi_os_initialized;
 unsigned int acpi_sci_irq = INVALID_ACPI_IRQ;
+bool acpi_permanent_mmap = false;
 
 /*
  * This list of permanent mappings is for memory that may be accessed from
@@ -313,7 +314,7 @@ static void acpi_unmap(acpi_physical_address pg_off, void __iomem *vaddr)
  * virtual address).  If not found, map it, add it to that list and return a
  * pointer to it.
  *
- * During early init (when acpi_gbl_permanent_mmap has not been set yet) this
+ * During early init (when acpi_permanent_mmap has not been set yet) this
  * routine simply calls __acpi_map_table() to get the job done.
  */
 void __iomem *__ref
@@ -329,7 +330,7 @@ acpi_os_map_iomem(acpi_physical_address phys, acpi_size size)
                return NULL;
        }
 
-       if (!acpi_gbl_permanent_mmap)
+       if (!acpi_permanent_mmap)
                return __acpi_map_table((unsigned long)phys, size);
 
        mutex_lock(&acpi_ioremap_lock);
@@ -399,7 +400,7 @@ static void acpi_os_map_cleanup(struct acpi_ioremap *map)
  * mappings, drop a reference to it and unmap it if there are no more active
  * references to it.
  *
- * During early init (when acpi_gbl_permanent_mmap has not been set yet) this
+ * During early init (when acpi_permanent_mmap has not been set yet) this
  * routine simply calls __acpi_unmap_table() to get the job done.  Since
  * __acpi_unmap_table() is an __init function, the __ref annotation is needed
  * here.
@@ -408,7 +409,7 @@ void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size)
 {
        struct acpi_ioremap *map;
 
-       if (!acpi_gbl_permanent_mmap) {
+       if (!acpi_permanent_mmap) {
                __acpi_unmap_table(virt, size);
                return;
        }
@@ -433,47 +434,6 @@ void __ref acpi_os_unmap_memory(void *virt, acpi_size size)
 }
 EXPORT_SYMBOL_GPL(acpi_os_unmap_memory);
 
-/*******************************************************************************
- *
- * acpi_get_table_with_size()/early_acpi_os_unmap_memory():
- *
- * These 2 functions are traditionally used by Linux to map/unmap physical
- * addressed ACPI tables during the early stage.
- * They are deprectated now. Do not use them in the new code, but use
- * acpi_get_table()/acpi_put_table() instead.
- *
- ******************************************************************************/
-acpi_status
-acpi_get_table_with_size(char *signature,
-              u32 instance, struct acpi_table_header **out_table,
-              acpi_size *tbl_size)
-{
-       acpi_status status;
-
-       status = acpi_get_table(signature, instance, out_table);
-       if (ACPI_SUCCESS(status)) {
-               /*
-                * "tbl_size" is no longer used by
-                * early_acpi_os_unmap_memory(), but is still used by the
-                * ACPI table drivers. So sets it to the length of the
-                * table when the tbl_size is requested.
-                * "out_table" is not sanity checked as AE_BAD_PARAMETER
-                * is returned if it is NULL.
-                */
-               if (tbl_size && *out_table)
-                       *tbl_size = (*out_table)->length;
-       }
-
-       return (status);
-}
-
-ACPI_EXPORT_SYMBOL(acpi_get_table_with_size)
-
-void __init early_acpi_os_unmap_memory(void __iomem *virt, acpi_size size)
-{
-       acpi_put_table(ACPI_CAST_PTR(struct acpi_table_header, virt));
-}
-
 int acpi_os_map_generic_address(struct acpi_generic_address *gas)
 {
        u64 addr;
index d7d0f495a34e975d7c045efab5dd029d5f393687..303315b9693fc999022b192f91b4681505f3c571 100644 (file)
@@ -13,6 +13,8 @@ static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys,
 }
 #endif
 
+extern bool acpi_permanent_mmap;
+
 void __iomem *__ref
 acpi_os_map_iomem(acpi_physical_address phys, acpi_size size);
 void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size);
index 33828dd97fc5d9ca23b4ec030373ea5976412a82..f5e10dd8e86b712a4c0e97a206d36ff88fabe02f 100644 (file)
@@ -967,19 +967,6 @@ void acpi_terminate_debugger(void);
 /*
  * Divergences
  */
-ACPI_GLOBAL(u8, acpi_gbl_permanent_mmap);
-
-ACPI_EXTERNAL_RETURN_STATUS(acpi_status
-                           acpi_get_table_with_size(acpi_string signature,
-                                                    u32 instance,
-                                                    struct acpi_table_header
-                                                    **out_table,
-                                                    acpi_size *tbl_size))
-
-ACPI_EXTERNAL_RETURN_VOID(void
-                         early_acpi_os_unmap_memory(void __iomem * virt,
-                                                    acpi_size size))
-
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
                            acpi_get_data_full(acpi_handle object,
                                               acpi_object_handler handler,