[PATCH kernel] powerpc/pseries: Fix compile of memory hotplug without CONFIG_MEMORY_HOTREMOVE

Nathan Fontenot nfont at linux.vnet.ibm.com
Wed Apr 15 04:40:48 AEST 2015


On 04/14/2015 02:01 AM, Alexey Kardashevskiy wrote:
> 51925fb3c5 "powerpc/pseries: Implement memory hotplug remove in the kernel"
> broke compile when CONFIG_MEMORY_HOTREMOVE is not defined due to missing
> symbols. This fixes the issue by adding the missing symbols.
> 
I think the real fix should be a more invasive patch so that these routines
are not used outside of CONFIG_MEMORY_HOPLUG. These symbols really
are only needed for memory remove.

I'm fine with this patch to correct the build break and will work
on a patch to move code aound when I return from vacation next week.

> Signed-off-by: Alexey Kardashevskiy <aik at ozlabs.ru>
Acked-by: Nathan Fontenot <nfont at linux.vnet.ibm.com>

> ---
> 
> This is made against ad30cb99465 (mpe/next) and can be squashed into 51925fb3c5
> if not too late.
> 
> 
> ---
>  arch/powerpc/platforms/pseries/hotplug-memory.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
> index 5cefcad..0ced387 100644
> --- a/arch/powerpc/platforms/pseries/hotplug-memory.c
> +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
> @@ -369,6 +369,19 @@ static inline int dlpar_memory_remove(struct pseries_hp_errorlog *hp_elog)
>  {
>  	return -EOPNOTSUPP;
>  }
> +static int dlpar_remove_lmb(struct of_drconf_cell *lmb)
> +{
> +	return -EOPNOTSUPP;
> +}
> +static int dlpar_memory_remove_by_count(u32 lmbs_to_remove,
> +					struct property *prop)
> +{
> +	return -EOPNOTSUPP;
> +}
> +static int dlpar_memory_remove_by_index(u32 drc_index, struct property *prop)
> +{
> +	return -EOPNOTSUPP;
> +}
> 
>  #endif /* CONFIG_MEMORY_HOTREMOVE */
> 



More information about the Linuxppc-dev mailing list