[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1375872736-4822-12-git-send-email-tangchen@cn.fujitsu.com>
Date: Wed, 7 Aug 2013 18:52:02 +0800
From: Tang Chen <tangchen@...fujitsu.com>
To: robert.moore@...el.com, lv.zheng@...el.com, rjw@...k.pl,
lenb@...nel.org, tglx@...utronix.de, mingo@...e.hu, hpa@...or.com,
akpm@...ux-foundation.org, tj@...nel.org, trenn@...e.de,
yinghai@...nel.org, jiang.liu@...wei.com, wency@...fujitsu.com,
laijs@...fujitsu.com, isimatu.yasuaki@...fujitsu.com,
izumi.taku@...fujitsu.com, mgorman@...e.de, minchan@...nel.org,
mina86@...a86.com, gong.chen@...ux.intel.com,
vasilis.liaskovitis@...fitbricks.com, lwoodman@...hat.com,
riel@...hat.com, jweiner@...hat.com, prarit@...hat.com,
zhangyanfei@...fujitsu.com, yanghy@...fujitsu.com
Cc: x86@...nel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-acpi@...r.kernel.org
Subject: [PATCH v3 11/25] x86, acpi: Split acpi_table_init() into two parts.
This patch splits acpi_table_init() into two steps.
Since acpi_table_init() is used not just in x86, also used in ia64,
we introduce two new functions:
acpi_table_init_firmware() and acpi_table_init_override(),
which work just the same as acpi_table_init() if they are called
in sequence. This will keep acpi_table_init() works as before on
other platforms, and we only call these new functions in Linux.
Signed-off-by: Tang Chen <tangchen@...fujitsu.com>
Reviewed-by: Zhang Yanfei <zhangyanfei@...fujitsu.com>
---
drivers/acpi/tables.c | 26 ++++++++++++++++++++------
include/linux/acpi.h | 2 ++
2 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index c8f2d01..4913a85 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -336,6 +336,23 @@ static void __init check_multiple_madt(void)
return;
}
+int __init acpi_table_init_firmware(void)
+{
+ acpi_status status;
+
+ status = acpi_initialize_tables_firmware(initial_tables,
+ ACPI_MAX_TABLES, 0);
+ if (ACPI_FAILURE(status))
+ return 1;
+
+ return 0;
+}
+
+void __init acpi_table_init_override(void)
+{
+ acpi_initialize_tables_override();
+}
+
/*
* acpi_table_init()
*
@@ -347,16 +364,13 @@ static void __init check_multiple_madt(void)
int __init acpi_table_init(void)
{
- acpi_status status;
-
- status = acpi_initialize_tables_firmware(initial_tables,
- ACPI_MAX_TABLES, 0);
- if (ACPI_FAILURE(status))
+ if (acpi_table_init_firmware())
return 1;
- acpi_initialize_tables_override();
+ acpi_table_init_override();
check_multiple_madt();
+
return 0;
}
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 353ba25..9704179 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -95,6 +95,8 @@ void acpi_boot_table_init (void);
int acpi_mps_check (void);
int acpi_numa_init (void);
+int acpi_table_init_firmware(void);
+void acpi_table_init_override(void);
int acpi_table_init (void);
int acpi_table_parse(char *id, acpi_tbl_table_handler handler);
int __init acpi_table_parse_entries(char *id, unsigned long table_size,
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists