mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Mian Yousaf Kaukab <yousaf.kaukab@suse.com>, linux-acpi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	rafael.j.wysocki@intel.com, Sudeep Holla <sudeep.holla@arm.com>,
	catalin.marinas@arm.com, lorenzo.pieralisi@arm.com
Subject: Re: [PATCH] ACPI: processor: fix LPI when built as module
Date: Tue, 23 May 2017 14:08:06 +0100	[thread overview]
Message-ID: <314aff9d-6c24-e533-ef08-c16bc0816474@arm.com> (raw)
In-Reply-To: <20170519092837.30991-1-yousaf.kaukab@suse.com>



On 19/05/17 10:28, Mian Yousaf Kaukab wrote:
> Low Power Idle(LPI) support added acpi_processor_ffh_lpi_probe() and
> acpi_processor_ffh_lpi_enter() as __weak functions and arch code is
> supposed to provide the actual callbacks. This breaks if
> ACPI_PROCESSOR is configured as a module.
> 
> Add CONFIG_ARCH_HAS_ACPI_LPI configuration option to fix this.
> 

Rafael didn't like the extra Kconfig option when I first posted
LPI patches.

> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@suse.com>
> ---
>  arch/arm64/Kconfig            | 1 +
>  arch/arm64/kernel/cpuidle.c   | 2 ++
>  drivers/acpi/Kconfig          | 3 +++
>  drivers/acpi/processor_idle.c | 9 +++++++--
>  4 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 848a34116c67..de2f2779cdf5 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -10,6 +10,7 @@ config ARM64
>  	select ARCH_HAS_DEBUG_VIRTUAL
>  	select ARCH_HAS_DEVMEM_IS_ALLOWED
>  	select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
> +	select ARCH_HAS_ACPI_LPI if ACPI
>  	select ARCH_HAS_ELF_RANDOMIZE
>  	select ARCH_HAS_GCOV_PROFILE_ALL
>  	select ARCH_HAS_GIGANTIC_PAGE if (MEMORY_ISOLATION && COMPACTION) || CMA
> diff --git a/arch/arm64/kernel/cpuidle.c b/arch/arm64/kernel/cpuidle.c
> index fd691087dc9a..002d9cb890bd 100644
> --- a/arch/arm64/kernel/cpuidle.c
> +++ b/arch/arm64/kernel/cpuidle.c
> @@ -51,9 +51,11 @@ int acpi_processor_ffh_lpi_probe(unsigned int cpu)
>  {
>  	return arm_cpuidle_init(cpu);
>  }
> +EXPORT_SYMBOL(acpi_processor_ffh_lpi_probe);
>  
>  int acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
>  {
>  	return CPU_PM_CPU_IDLE_ENTER(arm_cpuidle_suspend, lpi->index);
>  }
> +EXPORT_SYMBOL(acpi_processor_ffh_lpi_enter);

Won't these 2 export suffice ? I am just curious why that won't work.
Will weak function definitions be still picked when built as modules ?

-- 
Regards,
Sudeep

  reply	other threads:[~2017-05-23 13:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-19  9:28 Mian Yousaf Kaukab
2017-05-23 13:08 ` Sudeep Holla [this message]
2017-05-26 10:21   ` Mian Yousaf Kaukab

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=314aff9d-6c24-e533-ef08-c16bc0816474@arm.com \
    --to=sudeep.holla@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=yousaf.kaukab@suse.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

all inboxes | Powered by JetHome®