[<prev] [next>] [day] [month] [year] [list]
Message-ID: <15983AF00027978D+20240108054016.1849-2-luming.yu@shingroup.cn>
Date: Mon, 8 Jan 2024 13:40:16 +0800
From: Luming Yu <luming.yu@...ngroup.cn>
To: linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org,
mpe@...erman.id.au,
npiggin@...il.com,
christophe.leroy@...roup.eu
Cc: luming.yu@...il.com,
ke.zhao@...ngroup.cn,
dawei.li@...ngroup.cn,
shenghui.qu@...ngroup.cn,
Luming Yu <luming.yu@...ngroup.cn>
Subject: [PATCH v2 1/1] powerpc/powernv: fix non-SMP kernel compile issues
Non-SMP 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
non-SMP kernel for pSerises as I've tried.
Signed-off-by: Luming Yu <luming.yu@...ngroup.cn>
---
v1->v2: solve powernv nx-common-powernv.c non-SMP kernel compile issue found by lkp bot.
v0->v1: solve powernv vas driver non-SMP kernel compile issue 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 ++++-
drivers/crypto/nx/nx-common-powernv.c | 1 +
7 files changed, 10 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,
diff --git a/drivers/crypto/nx/nx-common-powernv.c b/drivers/crypto/nx/nx-common-powernv.c
index 8c859872c183..58c42677b448 100644
--- a/drivers/crypto/nx/nx-common-powernv.c
+++ b/drivers/crypto/nx/nx-common-powernv.c
@@ -17,6 +17,7 @@
#include <asm/reg.h>
#include <asm/opal-api.h>
#include <asm/opal.h>
+#include <asm/smp.h>
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Dan Streetman <ddstreet@...e.org>");
--
2.42.0.windows.2
Powered by blists - more mailing lists