Thread (7 messages) 7 messages, 2 authors, 2021-10-28

Re: [PATCH 2/2] PCI: mt7621: Export mips_cm/cpc/gcr_* to modules

From: yanteng si <hidden>
Date: 2021-10-28 02:00:03
Also in: linux-mediatek, linux-mips, linux-pci

Sergio Paracuellos [off-list ref] 于2021年10月27日周三 下午7:45写道:
Hi,

On Wed, Oct 27, 2021 at 1:32 PM Yanteng Si [off-list ref] wrote:
quoted
modpost complains once these drivers become modules.

ERROR: modpost: "mips_cm_unlock_other" [drivers/pci/controller/pcie-mt7621.ko] undefined!
ERROR: modpost: "mips_cpc_base" [drivers/pci/controller/pcie-mt7621.ko] undefined!
ERROR: modpost: "mips_cm_lock_other" [drivers/pci/controller/pcie-mt7621.ko] undefined!
ERROR: modpost: "mips_cm_is64" [drivers/pci/controller/pcie-mt7621.ko] undefined!
ERROR: modpost: "mips_gcr_base" [drivers/pci/controller/pcie-mt7621.ko] undefined!

Let's just export them.

Signed-off-by: Yanteng Si <redacted>
---
 arch/mips/kernel/mips-cm.c  | 5 +++++
 arch/mips/kernel/mips-cpc.c | 1 +
 2 files changed, 6 insertions(+)
This PATCH has the prefix "PCI: mt7621: " but the changes here are all
mips kernel things. So I guess it is better to have "MIPS: cm/cpc:
export some missing symbols to be able to use them from driver code"
OK,Thanks!
or something similar. I am not the best with words :).
Me too. >_<
quoted
diff --git a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c
index 90f1c3df1f0e..b07f20323132 100644
--- a/arch/mips/kernel/mips-cm.c
+++ b/arch/mips/kernel/mips-cm.c
@@ -12,8 +12,11 @@
 #include <asm/mipsregs.h>

 void __iomem *mips_gcr_base;
+EXPORT_SYMBOL(mips_gcr_base);
EXPORT_SYMBOL_GPL?
OK. Thanks!
quoted
+
 void __iomem *mips_cm_l2sync_base;
 int mips_cm_is64;
+EXPORT_SYMBOL(mips_cm_is64);

 static char *cm2_tr[8] = {
        "mem",  "gcr",  "gic",  "mmio",
@@ -353,6 +356,7 @@ void mips_cm_lock_other(unsigned int cluster, unsigned int core,
         */
        mb();
 }
+EXPORT_SYMBOL(mips_cm_lock_other);
ditto.
OK. Thanks!
quoted
 void mips_cm_unlock_other(void)
 {
@@ -369,6 +373,7 @@ void mips_cm_unlock_other(void)

        preempt_enable();
 }
+EXPORT_SYMBOL(mips_cm_unlock_other);
ditto.
OK. Thanks!
quoted
 void mips_cm_error_report(void)
 {
diff --git a/arch/mips/kernel/mips-cpc.c b/arch/mips/kernel/mips-cpc.c
index 8d2535123f11..dfd3d58fd412 100644
--- a/arch/mips/kernel/mips-cpc.c
+++ b/arch/mips/kernel/mips-cpc.c
@@ -13,6 +13,7 @@
 #include <asm/mips-cps.h>

 void __iomem *mips_cpc_base;
+EXPORT_SYMBOL(mips_cpc_base);
ditto.
OK. Thanks!

Thanks,
yanteng
quoted
 static DEFINE_PER_CPU_ALIGNED(spinlock_t, cpc_core_lock);

--
2.27.0
Thanks,
    Sergio Paracuellos
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help