summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables.c
diff options
context:
space:
mode:
authorAleksey Makarov <aleksey.makarov@linaro.org>2016-06-20 13:56:10 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-06-22 01:16:14 +0200
commitda3d3f98d28bc071a2d566aefc8c461bd564be35 (patch)
tree3ce07af1409696129b7d4fabcb1e088442aae160 /drivers/acpi/tables.c
parentce0c1fcc7357ef0ec93c5a1cd1a759729d27599a (diff)
downloadlinux-stable-da3d3f98d28bc071a2d566aefc8c461bd564be35.tar.gz
linux-stable-da3d3f98d28bc071a2d566aefc8c461bd564be35.tar.bz2
linux-stable-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.c14
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()
*