mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpuidle: stub out cpuidle_poll_state_init() without CONFIG_CPU_IDLE
Date: Tue, 20 Feb 2018 16:18:01 +0100	[thread overview]
Message-ID: <2227596.UD9Rb3uRxu@aspire.rjw.lan> (raw)
In-Reply-To: <20180220150559.3182304-1-arnd@arndb.de>

On Tuesday, February 20, 2018 4:05:44 PM CET Arnd Bergmann wrote:
> Calling cpuidle_poll_state_init() from apm_init() results in a link
> failure since that directory is never entered without CONFIG_CPU_IDLE:
> 
> arch/x86/kernel/apm_32.o: In function `apm_init':
> apm_32.c:(.init.text+0x62c): undefined reference to `cpuidle_poll_state_init'
> 
> CONFIG_ARCH_HAS_CPU_RELAX can be set without CONFIG_CPU_IDLE but has no
> effect then, so we should treat that configuration the same as
> if CONFIG_ARCH_HAS_CPU_RELAX was not set at all.
> 
> Fixes: 34c2f65b718d ("cpuidle: Move polling state initialization code to separate file")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  include/linux/cpuidle.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
> index 871f9e21810c..0b3fc229086c 100644
> --- a/include/linux/cpuidle.h
> +++ b/include/linux/cpuidle.h
> @@ -225,7 +225,7 @@ static inline void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev,
>  }
>  #endif
>  
> -#ifdef CONFIG_ARCH_HAS_CPU_RELAX
> +#if defined(CONFIG_CPU_IDLE) && defined(CONFIG_ARCH_HAS_CPU_RELAX)
>  void cpuidle_poll_state_init(struct cpuidle_driver *drv);
>  #else
>  static inline void cpuidle_poll_state_init(struct cpuidle_driver *drv) {}
> 

https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?h=pm-4.16-rc2&id=d7212cfb05ba802bea4dd6c90d61cfe6366ea224

is in the Linus' tree already.

Thanks,
Rafael

      reply	other threads:[~2018-02-20 15:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20 15:05 Arnd Bergmann
2018-02-20 15:18 ` Rafael J. Wysocki [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=2227596.UD9Rb3uRxu@aspire.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=arnd@arndb.de \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    /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®