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>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
ce0c1fcc73
commit
da3d3f98d2
@@ -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()
|
||||
*
|
||||
|
Reference in New Issue
Block a user