Commit 538eafc6 authored by Huacai Chen's avatar Huacai Chen

LoongArch: Combine acpi_boot_table_init() and acpi_boot_init()

Combine acpi_boot_table_init() and acpi_boot_init() since they are very
simple, and we don't need to check the return value of acpi_boot_init().
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 83f638bc
...@@ -56,23 +56,6 @@ void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size) ...@@ -56,23 +56,6 @@ void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
return ioremap_cache(phys, size); return ioremap_cache(phys, size);
} }
void __init acpi_boot_table_init(void)
{
/*
* If acpi_disabled, bail out
*/
if (acpi_disabled)
return;
/*
* Initialize the ACPI boot-time table parser.
*/
if (acpi_table_init()) {
disable_acpi();
return;
}
}
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
static int set_processor_mask(u32 id, u32 flags) static int set_processor_mask(u32 id, u32 flags)
{ {
...@@ -156,13 +139,21 @@ static void __init acpi_process_madt(void) ...@@ -156,13 +139,21 @@ static void __init acpi_process_madt(void)
loongson_sysconf.nr_cpus = num_processors; loongson_sysconf.nr_cpus = num_processors;
} }
int __init acpi_boot_init(void) void __init acpi_boot_table_init(void)
{ {
/* /*
* If acpi_disabled, bail out * If acpi_disabled, bail out
*/ */
if (acpi_disabled) if (acpi_disabled)
return -1; return;
/*
* Initialize the ACPI boot-time table parser.
*/
if (acpi_table_init()) {
disable_acpi();
return;
}
loongson_sysconf.boot_cpu_id = read_csr_cpuid(); loongson_sysconf.boot_cpu_id = read_csr_cpuid();
...@@ -173,8 +164,6 @@ int __init acpi_boot_init(void) ...@@ -173,8 +164,6 @@ int __init acpi_boot_init(void)
/* Do not enable ACPI SPCR console by default */ /* Do not enable ACPI SPCR console by default */
acpi_parse_spcr(earlycon_acpi_spcr_enable, false); acpi_parse_spcr(earlycon_acpi_spcr_enable, false);
return 0;
} }
#ifdef CONFIG_ACPI_NUMA #ifdef CONFIG_ACPI_NUMA
......
...@@ -257,7 +257,6 @@ void __init platform_init(void) ...@@ -257,7 +257,6 @@ void __init platform_init(void)
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
acpi_gbl_use_default_register_widths = false; acpi_gbl_use_default_register_widths = false;
acpi_boot_table_init(); acpi_boot_table_init();
acpi_boot_init();
#endif #endif
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment