[PATCH v1 1/1] powerpc/powernv: fix up kernel compile issues

Christophe Leroy christophe.leroy at csgroup.eu
Wed Jan 3 23:44:59 AEDT 2024


Hi,

Le 02/01/2024 à 03:48, Luming Yu a écrit :
> [Vous ne recevez pas souvent de courriers de luming.yu at shingroup.cn. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
> 
> up kernel is quite useful to silicon validation, despite
> it is rare to be found in server productions. the fixes are
> obvious. Not like IBM pSeries, it may be not necessary
> to have powernv SMP forced. It is difficult to compile a
> up kernel for pSerises as I've tried.

You title and message are confusing. "fix up" has a standard meaning in 
english language, see 
https://www.collinsdictionary.com/dictionary/english/fix-up
"up" also has a meaning, see 
https://www.collinsdictionary.com/dictionary/english/up

Use "non-SMP" instead of "UP".

For instance, see commit 5657c1167835 ("sched/core: Fix NULL pointer 
access fault in sched_setaffinity() with non-SMP configs")

Christophe


> 
> Signed-off-by: Luming Yu <luming.yu at shingroup.cn>
> ---
> v0->v1: solve powernv vas up kernel compile issues found by lkp bot.
> ---
>   arch/powerpc/platforms/powernv/Kconfig    | 1 -
>   arch/powerpc/platforms/powernv/opal-imc.c | 1 +
>   arch/powerpc/platforms/powernv/vas.c      | 1 +
>   arch/powerpc/platforms/powernv/vas.h      | 1 +
>   arch/powerpc/sysdev/xive/common.c         | 2 ++
>   arch/powerpc/sysdev/xive/spapr.c          | 5 ++++-
>   6 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/powernv/Kconfig b/arch/powerpc/platforms/powernv/Kconfig
> index 70a46acc70d6..40b1a49379de 100644
> --- a/arch/powerpc/platforms/powernv/Kconfig
> +++ b/arch/powerpc/platforms/powernv/Kconfig
> @@ -15,7 +15,6 @@ config PPC_POWERNV
>          select CPU_FREQ
>          select PPC_DOORBELL
>          select MMU_NOTIFIER
> -       select FORCE_SMP
>          select ARCH_SUPPORTS_PER_VMA_LOCK
>          default y
> 
> diff --git a/arch/powerpc/platforms/powernv/opal-imc.c b/arch/powerpc/platforms/powernv/opal-imc.c
> index 828fc4d88471..6e9e2b0a5bdc 100644
> --- a/arch/powerpc/platforms/powernv/opal-imc.c
> +++ b/arch/powerpc/platforms/powernv/opal-imc.c
> @@ -13,6 +13,7 @@
>   #include <linux/of_address.h>
>   #include <linux/crash_dump.h>
>   #include <linux/debugfs.h>
> +#include <asm/smp.h>
>   #include <asm/opal.h>
>   #include <asm/io.h>
>   #include <asm/imc-pmu.h>
> diff --git a/arch/powerpc/platforms/powernv/vas.c b/arch/powerpc/platforms/powernv/vas.c
> index b65256a63e87..c1759135aca5 100644
> --- a/arch/powerpc/platforms/powernv/vas.c
> +++ b/arch/powerpc/platforms/powernv/vas.c
> @@ -18,6 +18,7 @@
>   #include <linux/interrupt.h>
>   #include <asm/prom.h>
>   #include <asm/xive.h>
> +#include <asm/smp.h>
> 
>   #include "vas.h"
> 
> diff --git a/arch/powerpc/platforms/powernv/vas.h b/arch/powerpc/platforms/powernv/vas.h
> index 08d9d3d5a22b..313a8f2c8c7d 100644
> --- a/arch/powerpc/platforms/powernv/vas.h
> +++ b/arch/powerpc/platforms/powernv/vas.h
> @@ -12,6 +12,7 @@
>   #include <linux/dcache.h>
>   #include <linux/mutex.h>
>   #include <linux/stringify.h>
> +#include <linux/interrupt.h>
> 
>   /*
>    * Overview of Virtual Accelerator Switchboard (VAS).
> diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
> index a289cb97c1d7..d49b12809c10 100644
> --- a/arch/powerpc/sysdev/xive/common.c
> +++ b/arch/powerpc/sysdev/xive/common.c
> @@ -1497,7 +1497,9 @@ static int xive_prepare_cpu(unsigned int cpu)
>                                    GFP_KERNEL, cpu_to_node(cpu));
>                  if (!xc)
>                          return -ENOMEM;
> +#ifdef CONFIG_SMP
>                  xc->hw_ipi = XIVE_BAD_IRQ;
> +#endif
>                  xc->chip_id = XIVE_INVALID_CHIP_ID;
>                  if (xive_ops->prepare_cpu)
>                          xive_ops->prepare_cpu(cpu, xc);
> diff --git a/arch/powerpc/sysdev/xive/spapr.c b/arch/powerpc/sysdev/xive/spapr.c
> index e45419264391..7298f57f8416 100644
> --- a/arch/powerpc/sysdev/xive/spapr.c
> +++ b/arch/powerpc/sysdev/xive/spapr.c
> @@ -81,6 +81,7 @@ static void xive_irq_bitmap_remove_all(void)
>          }
>   }
> 
> +#ifdef CONFIG_SMP
>   static int __xive_irq_bitmap_alloc(struct xive_irq_bitmap *xibm)
>   {
>          int irq;
> @@ -126,7 +127,7 @@ static void xive_irq_bitmap_free(int irq)
>                  }
>          }
>   }
> -
> +#endif
> 
>   /* Based on the similar routines in RTAS */
>   static unsigned int plpar_busy_delay_time(long rc)
> @@ -663,6 +664,7 @@ static void xive_spapr_sync_source(u32 hw_irq)
>          plpar_int_sync(0, hw_irq);
>   }
> 
> +#ifdef CONFIG_SMP
>   static int xive_spapr_debug_show(struct seq_file *m, void *private)
>   {
>          struct xive_irq_bitmap *xibm;
> @@ -680,6 +682,7 @@ static int xive_spapr_debug_show(struct seq_file *m, void *private)
> 
>          return 0;
>   }
> +#endif
> 
>   static const struct xive_ops xive_spapr_ops = {
>          .populate_irq_data      = xive_spapr_populate_irq_data,
> --
> 2.42.0.windows.2
> 


More information about the Linuxppc-dev mailing list