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:
Miao Wang
2024-11-21 22:25:21 +08:00
committed by Rafael J. Wysocki
parent 4e9ad033b4
commit 9d8a2b033d
4 changed files with 6 additions and 15 deletions
+1 -11
View File
@@ -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);