linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: shankerwangmiao@gmail.com
Cc: Hanjun Guo <guohanjun@huawei.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>, Sunil V L <sunilvl@ventanamicro.com>,
	linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] ACPI: introduce acpi_arch_init
Date: Thu, 8 Aug 2024 09:46:44 +0100	[thread overview]
Message-ID: <ZrSF9C0m7w3EsUI6@bogus> (raw)
In-Reply-To: <20240807-intro-acpi-arch-init-v2-1-9231e23a7721@gmail.com>

On Wed, Aug 07, 2024 at 02:36:12PM +0800, Miao Wang via B4 Relay wrote:
> From: Miao Wang <shankerwangmiao@gmail.com>
> 
> 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@gmail.com>
> ---
> 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@arm.com>

--
Regards,
Sudeep


      parent reply	other threads:[~2024-08-08  8:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07  6:36 [PATCH v2] ACPI: introduce acpi_arch_init Miao Wang via B4 Relay
2024-08-07  9:28 ` Sunil V L
2024-08-08  8:46 ` Sudeep Holla [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZrSF9C0m7w3EsUI6@bogus \
    --to=sudeep.holla@arm.com \
    --cc=guohanjun@huawei.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=rafael@kernel.org \
    --cc=shankerwangmiao@gmail.com \
    --cc=sunilvl@ventanamicro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).