diff options
author | Aleksey Makarov <aleksey.makarov@linaro.org> | 2016-06-20 12:56:10 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-06-22 01:16:14 +0200 |
commit | da3d3f98d28bc071a2d566aefc8c461bd564be35 (patch) | |
tree | 3ce07af1409696129b7d4fabcb1e088442aae160 /drivers/acpi/tables.c | |
parent | ACPI / tables: table upgrade: use cacheable map for tables (diff) | |
download | linux-da3d3f98d28bc071a2d566aefc8c461bd564be35.tar.xz linux-da3d3f98d28bc071a2d566aefc8c461bd564be35.zip |
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 @@ #include <linux/bootmem.h> #include <linux/earlycpio.h> #include <linux/memblock.h> +#include <linux/initrd.h> #include "internal.h" #ifdef CONFIG_ACPI_CUSTOM_DSDT @@ -481,8 +482,10 @@ static DECLARE_BITMAP(acpi_initrd_installed, NR_ACPI_INITRD_TABLES); #define MAP_CHUNK_SIZE (NR_FIX_BTMAPS << PAGE_SHIFT) -static void __init acpi_table_initrd_init(void *data, size_t size) +void __init acpi_table_upgrade(void) { + void *data = (void *)initrd_start; + size_t size = initrd_end - initrd_start; int sig, no, table_nr = 0, total_offset = 0; long offset = 0; struct acpi_table_header *table; @@ -696,10 +699,6 @@ next_table: } } #else -static void __init acpi_table_initrd_init(void *data, size_t size) -{ -} - static acpi_status acpi_table_initrd_override(struct acpi_table_header *existing_table, acpi_physical_address *address, @@ -742,11 +741,6 @@ acpi_os_table_override(struct acpi_table_header *existing_table, return AE_OK; } -void __init early_acpi_table_init(void *data, size_t size) -{ - acpi_table_initrd_init(data, size); -} - /* * acpi_table_init() * |