diff options
author | Aleksey Makarov <aleksey.makarov@linaro.org> | 2016-06-20 06:56:10 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-06-21 19:16:14 -0400 |
commit | da3d3f98d28bc071a2d566aefc8c461bd564be35 (patch) | |
tree | 3ce07af1409696129b7d4fabcb1e088442aae160 /drivers/acpi/tables.c | |
parent | ce0c1fcc7357ef0ec93c5a1cd1a759729d27599a (diff) |
ACPI / tables: table upgrade: refactor function definitions
Refer initrd_start, initrd_end directly from drivers/acpi/tables.c.
This allows to use the table upgrade feature in architectures
other than x86. Also this simplifies header files.
The patch renames acpi_table_initrd_init() to acpi_table_upgrade()
(what reflects the purpose of the function) and removes the unneeded
wraps early_acpi_table_init() and early_initrd_acpi_init().
Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
Acked-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/tables.c')
-rw-r--r-- | drivers/acpi/tables.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index f829e6a2e663..b05df13bd79f 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/bootmem.h> | 34 | #include <linux/bootmem.h> |
35 | #include <linux/earlycpio.h> | 35 | #include <linux/earlycpio.h> |
36 | #include <linux/memblock.h> | 36 | #include <linux/memblock.h> |
37 | #include <linux/initrd.h> | ||
37 | #include "internal.h" | 38 | #include "internal.h" |
38 | 39 | ||
39 | #ifdef CONFIG_ACPI_CUSTOM_DSDT | 40 | #ifdef CONFIG_ACPI_CUSTOM_DSDT |
@@ -481,8 +482,10 @@ static DECLARE_BITMAP(acpi_initrd_installed, NR_ACPI_INITRD_TABLES); | |||
481 | 482 | ||
482 | #define MAP_CHUNK_SIZE (NR_FIX_BTMAPS << PAGE_SHIFT) | 483 | #define MAP_CHUNK_SIZE (NR_FIX_BTMAPS << PAGE_SHIFT) |
483 | 484 | ||
484 | static void __init acpi_table_initrd_init(void *data, size_t size) | 485 | void __init acpi_table_upgrade(void) |
485 | { | 486 | { |
487 | void *data = (void *)initrd_start; | ||
488 | size_t size = initrd_end - initrd_start; | ||
486 | int sig, no, table_nr = 0, total_offset = 0; | 489 | int sig, no, table_nr = 0, total_offset = 0; |
487 | long offset = 0; | 490 | long offset = 0; |
488 | struct acpi_table_header *table; | 491 | struct acpi_table_header *table; |
@@ -696,10 +699,6 @@ next_table: | |||
696 | } | 699 | } |
697 | } | 700 | } |
698 | #else | 701 | #else |
699 | static void __init acpi_table_initrd_init(void *data, size_t size) | ||
700 | { | ||
701 | } | ||
702 | |||
703 | static acpi_status | 702 | static acpi_status |
704 | acpi_table_initrd_override(struct acpi_table_header *existing_table, | 703 | acpi_table_initrd_override(struct acpi_table_header *existing_table, |
705 | acpi_physical_address *address, | 704 | acpi_physical_address *address, |
@@ -742,11 +741,6 @@ acpi_os_table_override(struct acpi_table_header *existing_table, | |||
742 | return AE_OK; | 741 | return AE_OK; |
743 | } | 742 | } |
744 | 743 | ||
745 | void __init early_acpi_table_init(void *data, size_t size) | ||
746 | { | ||
747 | acpi_table_initrd_init(data, size); | ||
748 | } | ||
749 | |||
750 | /* | 744 | /* |
751 | * acpi_table_init() | 745 | * acpi_table_init() |
752 | * | 746 | * |