mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-28 16:56:26 +00:00
ACPI: introduce acpi_arch_init()
To avoid arch-specific code in general ACPI initialization flow, introduce a weak symbol acpi_arch_init(). Currently, arm64 and riscv can utillize this to insert their arch-specific flow. In the future, other architectures can also have a chance to define their own arch-specific ACPI initialization process if necessary. Reviewed-by: Sunil V L <sunilvl@ventanamicro.com> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> Acked-by: Hanjun Guo <guohanjun@huawei.com> Signed-off-by: Miao Wang <shankerwangmiao@gmail.com> Link: https://patch.msgid.link/20241121-intro-acpi-arch-init-v4-1-b1fb517e7d8b@gmail.com [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
4e9ad033b4
commit
9d8a2b033d
@ -2,7 +2,7 @@
|
||||
#include <linux/acpi.h>
|
||||
#include "init.h"
|
||||
|
||||
void __init acpi_arm_init(void)
|
||||
void __init acpi_arch_init(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_ACPI_AGDI))
|
||||
acpi_agdi_init();
|
||||
|
@ -1434,6 +1434,8 @@ static int __init acpi_bus_init(void)
|
||||
struct kobject *acpi_kobj;
|
||||
EXPORT_SYMBOL_GPL(acpi_kobj);
|
||||
|
||||
void __weak __init acpi_arch_init(void) { }
|
||||
|
||||
static int __init acpi_init(void)
|
||||
{
|
||||
int result;
|
||||
@ -1461,8 +1463,7 @@ static int __init acpi_init(void)
|
||||
acpi_viot_early_init();
|
||||
acpi_hest_init();
|
||||
acpi_ghes_init();
|
||||
acpi_arm_init();
|
||||
acpi_riscv_init();
|
||||
acpi_arch_init();
|
||||
acpi_scan_init();
|
||||
acpi_ec_init();
|
||||
acpi_debugfs_init();
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <linux/acpi.h>
|
||||
#include "init.h"
|
||||
|
||||
void __init acpi_riscv_init(void)
|
||||
void __init acpi_arch_init(void)
|
||||
{
|
||||
riscv_acpi_init_gsi_mapping();
|
||||
}
|
||||
|
@ -1530,17 +1530,7 @@ static inline int find_acpi_cpu_topology_hetero_id(unsigned int cpu)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARM64
|
||||
void acpi_arm_init(void);
|
||||
#else
|
||||
static inline void acpi_arm_init(void) { }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RISCV
|
||||
void acpi_riscv_init(void);
|
||||
#else
|
||||
static inline void acpi_riscv_init(void) { }
|
||||
#endif
|
||||
void acpi_arch_init(void);
|
||||
|
||||
#ifdef CONFIG_ACPI_PCC
|
||||
void acpi_init_pcc(void);
|
||||
|
Loading…
Reference in New Issue
Block a user