diff options
author | Lv Zheng <lv.zheng@intel.com> | 2016-12-14 02:04:46 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-12-20 20:36:38 -0500 |
commit | 8d3523fb3b727478ac528b307cb84460faa1c39e (patch) | |
tree | 7d86f7484dc10ecc9f2d57aa0f8e86796379e162 | |
parent | 6b11d1d677132816252004426ef220ccd3c92d2f (diff) |
ACPI / osl: Remove deprecated acpi_get_table_with_size()/early_acpi_os_unmap_memory()
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>
-rw-r--r-- | arch/arm64/include/asm/acpi.h | 2 | ||||
-rw-r--r-- | drivers/acpi/bus.c | 2 | ||||
-rw-r--r-- | drivers/acpi/osl.c | 50 | ||||
-rw-r--r-- | include/acpi/acpi_io.h | 2 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 13 |
5 files changed, 9 insertions, 60 deletions
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h index e517088d635f..8957ff8b3dd4 100644 --- a/arch/arm64/include/asm/acpi.h +++ b/arch/arm64/include/asm/acpi.h | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | /* Basic configuration for ACPI */ | 29 | /* Basic configuration for ACPI */ |
30 | #ifdef CONFIG_ACPI | 30 | #ifdef CONFIG_ACPI |
31 | /* ACPI table mapping after acpi_gbl_permanent_mmap is set */ | 31 | /* ACPI table mapping after acpi_permanent_mmap is set */ |
32 | static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys, | 32 | static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys, |
33 | acpi_size size) | 33 | acpi_size size) |
34 | { | 34 | { |
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 56190d00fd87..77468be75b3c 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -964,7 +964,7 @@ void __init acpi_early_init(void) | |||
964 | if (!acpi_strict) | 964 | if (!acpi_strict) |
965 | acpi_gbl_enable_interpreter_slack = TRUE; | 965 | acpi_gbl_enable_interpreter_slack = TRUE; |
966 | 966 | ||
967 | acpi_gbl_permanent_mmap = 1; | 967 | acpi_permanent_mmap = true; |
968 | 968 | ||
969 | /* | 969 | /* |
970 | * If the machine falls into the DMI check table, | 970 | * If the machine falls into the DMI check table, |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 9316dfc19cea..8a7cab06e271 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -76,6 +76,7 @@ static struct workqueue_struct *kacpi_notify_wq; | |||
76 | static struct workqueue_struct *kacpi_hotplug_wq; | 76 | static struct workqueue_struct *kacpi_hotplug_wq; |
77 | static bool acpi_os_initialized; | 77 | static bool acpi_os_initialized; |
78 | unsigned int acpi_sci_irq = INVALID_ACPI_IRQ; | 78 | unsigned int acpi_sci_irq = INVALID_ACPI_IRQ; |
79 | bool acpi_permanent_mmap = false; | ||
79 | 80 | ||
80 | /* | 81 | /* |
81 | * This list of permanent mappings is for memory that may be accessed from | 82 | * 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) | |||
313 | * virtual address). If not found, map it, add it to that list and return a | 314 | * virtual address). If not found, map it, add it to that list and return a |
314 | * pointer to it. | 315 | * pointer to it. |
315 | * | 316 | * |
316 | * During early init (when acpi_gbl_permanent_mmap has not been set yet) this | 317 | * During early init (when acpi_permanent_mmap has not been set yet) this |
317 | * routine simply calls __acpi_map_table() to get the job done. | 318 | * routine simply calls __acpi_map_table() to get the job done. |
318 | */ | 319 | */ |
319 | void __iomem *__ref | 320 | void __iomem *__ref |
@@ -329,7 +330,7 @@ acpi_os_map_iomem(acpi_physical_address phys, acpi_size size) | |||
329 | return NULL; | 330 | return NULL; |
330 | } | 331 | } |
331 | 332 | ||
332 | if (!acpi_gbl_permanent_mmap) | 333 | if (!acpi_permanent_mmap) |
333 | return __acpi_map_table((unsigned long)phys, size); | 334 | return __acpi_map_table((unsigned long)phys, size); |
334 | 335 | ||
335 | mutex_lock(&acpi_ioremap_lock); | 336 | mutex_lock(&acpi_ioremap_lock); |
@@ -399,7 +400,7 @@ static void acpi_os_map_cleanup(struct acpi_ioremap *map) | |||
399 | * mappings, drop a reference to it and unmap it if there are no more active | 400 | * mappings, drop a reference to it and unmap it if there are no more active |
400 | * references to it. | 401 | * references to it. |
401 | * | 402 | * |
402 | * During early init (when acpi_gbl_permanent_mmap has not been set yet) this | 403 | * During early init (when acpi_permanent_mmap has not been set yet) this |
403 | * routine simply calls __acpi_unmap_table() to get the job done. Since | 404 | * routine simply calls __acpi_unmap_table() to get the job done. Since |
404 | * __acpi_unmap_table() is an __init function, the __ref annotation is needed | 405 | * __acpi_unmap_table() is an __init function, the __ref annotation is needed |
405 | * here. | 406 | * here. |
@@ -408,7 +409,7 @@ void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size) | |||
408 | { | 409 | { |
409 | struct acpi_ioremap *map; | 410 | struct acpi_ioremap *map; |
410 | 411 | ||
411 | if (!acpi_gbl_permanent_mmap) { | 412 | if (!acpi_permanent_mmap) { |
412 | __acpi_unmap_table(virt, size); | 413 | __acpi_unmap_table(virt, size); |
413 | return; | 414 | return; |
414 | } | 415 | } |
@@ -433,47 +434,6 @@ void __ref acpi_os_unmap_memory(void *virt, acpi_size size) | |||
433 | } | 434 | } |
434 | EXPORT_SYMBOL_GPL(acpi_os_unmap_memory); | 435 | EXPORT_SYMBOL_GPL(acpi_os_unmap_memory); |
435 | 436 | ||
436 | /******************************************************************************* | ||
437 | * | ||
438 | * acpi_get_table_with_size()/early_acpi_os_unmap_memory(): | ||
439 | * | ||
440 | * These 2 functions are traditionally used by Linux to map/unmap physical | ||
441 | * addressed ACPI tables during the early stage. | ||
442 | * They are deprectated now. Do not use them in the new code, but use | ||
443 | * acpi_get_table()/acpi_put_table() instead. | ||
444 | * | ||
445 | ******************************************************************************/ | ||
446 | acpi_status | ||
447 | acpi_get_table_with_size(char *signature, | ||
448 | u32 instance, struct acpi_table_header **out_table, | ||
449 | acpi_size *tbl_size) | ||
450 | { | ||
451 | acpi_status status; | ||
452 | |||
453 | status = acpi_get_table(signature, instance, out_table); | ||
454 | if (ACPI_SUCCESS(status)) { | ||
455 | /* | ||
456 | * "tbl_size" is no longer used by | ||
457 | * early_acpi_os_unmap_memory(), but is still used by the | ||
458 | * ACPI table drivers. So sets it to the length of the | ||
459 | * table when the tbl_size is requested. | ||
460 | * "out_table" is not sanity checked as AE_BAD_PARAMETER | ||
461 | * is returned if it is NULL. | ||
462 | */ | ||
463 | if (tbl_size && *out_table) | ||
464 | *tbl_size = (*out_table)->length; | ||
465 | } | ||
466 | |||
467 | return (status); | ||
468 | } | ||
469 | |||
470 | ACPI_EXPORT_SYMBOL(acpi_get_table_with_size) | ||
471 | |||
472 | void __init early_acpi_os_unmap_memory(void __iomem *virt, acpi_size size) | ||
473 | { | ||
474 | acpi_put_table(ACPI_CAST_PTR(struct acpi_table_header, virt)); | ||
475 | } | ||
476 | |||
477 | int acpi_os_map_generic_address(struct acpi_generic_address *gas) | 437 | int acpi_os_map_generic_address(struct acpi_generic_address *gas) |
478 | { | 438 | { |
479 | u64 addr; | 439 | u64 addr; |
diff --git a/include/acpi/acpi_io.h b/include/acpi/acpi_io.h index d7d0f495a34e..303315b9693f 100644 --- a/include/acpi/acpi_io.h +++ b/include/acpi/acpi_io.h | |||
@@ -13,6 +13,8 @@ static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys, | |||
13 | } | 13 | } |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | extern bool acpi_permanent_mmap; | ||
17 | |||
16 | void __iomem *__ref | 18 | void __iomem *__ref |
17 | acpi_os_map_iomem(acpi_physical_address phys, acpi_size size); | 19 | acpi_os_map_iomem(acpi_physical_address phys, acpi_size size); |
18 | void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size); | 20 | void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size); |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 33828dd97fc5..f5e10dd8e86b 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -967,19 +967,6 @@ void acpi_terminate_debugger(void); | |||
967 | /* | 967 | /* |
968 | * Divergences | 968 | * Divergences |
969 | */ | 969 | */ |
970 | ACPI_GLOBAL(u8, acpi_gbl_permanent_mmap); | ||
971 | |||
972 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status | ||
973 | acpi_get_table_with_size(acpi_string signature, | ||
974 | u32 instance, | ||
975 | struct acpi_table_header | ||
976 | **out_table, | ||
977 | acpi_size *tbl_size)) | ||
978 | |||
979 | ACPI_EXTERNAL_RETURN_VOID(void | ||
980 | early_acpi_os_unmap_memory(void __iomem * virt, | ||
981 | acpi_size size)) | ||
982 | |||
983 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status | 970 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
984 | acpi_get_data_full(acpi_handle object, | 971 | acpi_get_data_full(acpi_handle object, |
985 | acpi_object_handler handler, | 972 | acpi_object_handler handler, |