On Wed, Aug 07, 2024 at 02:36:12PM +0800, Miao Wang via B4 Relay wrote: > From: Miao Wang <shankerwangmiao@xxxxxxxxx> > > To avoid arch-specific code in general ACPI initialization flow, > we introduce a weak symbol acpi_arch_init. Currently, arm64 can > utillize this to insert its specific flow. In the future, > other architectures can also have chance to define their own > arch-specific acpi initialization process if necessary. > > Signed-off-by: Miao Wang <shankerwangmiao@xxxxxxxxx> > --- > Changes from v1 > - Change acpi_arch_init from a static inline stub to a weak function > according to Haijun Guo's advice > --- > drivers/acpi/arm64/init.c | 2 +- > drivers/acpi/bus.c | 4 +++- > include/linux/acpi.h | 6 +----- > 3 files changed, 5 insertions(+), 7 deletions(-) > > diff --git a/drivers/acpi/arm64/init.c b/drivers/acpi/arm64/init.c > index d0c8aed90fd1..7a47d8095a7d 100644 > --- a/drivers/acpi/arm64/init.c > +++ b/drivers/acpi/arm64/init.c > @@ -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(); > diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c > index 284bc2e03580..b47541e45a5a 100644 > --- a/drivers/acpi/bus.c > +++ b/drivers/acpi/bus.c > @@ -1431,6 +1431,8 @@ static int __init acpi_bus_init(void) > struct kobject *acpi_kobj; > EXPORT_SYMBOL_GPL(acpi_kobj); > > +void __weak acpi_arch_init(void) { } > + Why is __init dropped or not needed above ? Otherwise looks good. With the above __init fixed, you can add Reviewed-by: Sudeep Holla <sudeep.holla@xxxxxxx> -- Regards, Sudeep