[PATCH v2 1/2] ARM: Availability of psci_smp_available depends on CONFIG_SMP

Thierry Reding treding at nvidia.com
Tue Oct 6 01:11:24 PDT 2015


On Wed, Sep 23, 2015 at 08:39:43AM +0200, Jan Kiszka wrote:
> Ensure that we can use psci_smp_available without checking for
> CONFIG_SMP first.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
> ---
>  arch/arm/include/asm/psci.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h
> index 68ee3ce..ff956f4 100644
> --- a/arch/arm/include/asm/psci.h
> +++ b/arch/arm/include/asm/psci.h
> @@ -16,7 +16,7 @@
>  
>  extern struct smp_operations psci_smp_ops;
>  
> -#ifdef CONFIG_ARM_PSCI
> +#if defined(CONFIG_ARM_PSCI) && defined(CONFIG_SMP)
>  bool psci_smp_available(void);
>  #else
>  static inline bool psci_smp_available(void) { return false; }

Hi Will,

you had questions about this when this was first submitted back in
May[0], but discussion stalled. Can you take another look, please?

I think irrespective of what the series is trying to do this is a
correct fix. The arch/arm/kernel/psci_smp.c file is only compiled if
both ARM_PSCI and SMP are selected. Builds break if we don't mirror
that conditional in the header because for ARM_PSCI && !SMP no dummy
will be defined, but the implementation for the prototype won't be
available either, leading to a linker error.

Also Cc'ing Sebastian who sent this same patch yesterday.

[0]: http://patchwork.ozlabs.org/patch/469878/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151006/cda6c441/attachment.sig>


More information about the linux-arm-kernel mailing list