drivers/mt7621: Fix build error ERROR: modpost:
Subsystems (5)
cover drivers/mt7621: Fix build error ERROR: modpost:
Since commit 2bdd5238e756 ("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver") the MT7621 PCIe host controller driver is built as a module but no MODULE_*() attributes were specified, causing a build error due to missing license information. At the same time, modpost complains once these drivers become modules.
ERROR: modpost: missing MODULE_LICENSE() in drivers/pci/controller/pcie-mt7621.o
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 fix them.
Yanteng Si (2):
PCI: mt7621: Add MODULE_* macros to MT7621 PCIe host controller driver
PCI: mt7621: Export mips_cm/cpc/gcr_* to modules
arch/mips/kernel/mips-cm.c | 5 +++++ arch/mips/kernel/mips-cpc.c | 1 + drivers/pci/controller/pcie-mt7621.c | 2 ++ 3 files changed, 8 insertions(+)
Signature · 1 line
2.27.0
PATCH 1/2 PCI: mt7621: Add MODULE_* macros to MT7621 PCIe host controller driver
Since commit 2bdd5238e756 ("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver") the MT7621 PCIe host controller driver is built as a module but no MODULE_*() attributes were specified, causing a build error due to missing license information.
ERROR: modpost: missing MODULE_LICENSE() in drivers/pci/controller/pcie-mt7621.o
Fix this by adding MODULE attributes to the driver.
--- drivers/pci/controller/pcie-mt7621.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/pci/controller/pcie-mt7621.c +2 -0
@@ -598,3 +598,5 @@ static struct platform_driver mt7621_pci_driver = { }, };builtin_platform_driver (mt7621_pci_driver); + +MODULE_LICENSE ("GPL v2" );
Signature · 1 line
2.27.0
Re: [PATCH 1/2] PCI: mt7621: Add MODULE_* macros to MT7621 PCIe host controller driver
Hi,
Quoted 19 lines · Yanteng Si
Since commit
2bdd5238e756("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver") the MT7621 PCIe host controller driver is built as a module but no MODULE_*() attributes were specified, causing a build error due to missing license information.ERROR: modpost: missing
MODULE_LICENSE()indrivers/pci/controller/pcie-mt7621.oFix this by adding MODULE attributes to the driver.
Signed-off-by Yanteng Si <[email protected]>--- drivers/pci/controller/pcie-mt7621.c | 2 ++ 1 file changed, 2 insertions(+)drivers/pci/controller/pcie-mt7621.c +0
-0
drivers/pci/controller/pcie-mt7621.c static struct platform_driver mt7621_pci_driver = { · line 602
Quoted 5 lines
drivers/pci/controller/pcie-mt7621.c +2
-0@@ -598,3 +598,5 @@ static struct platform_driver mt7621_pci_driver = { }, };builtin_platform_driver (mt7621_pci_driver); + +MODULE_LICENSE ("GPL v2" );
I guess this is needed for COMPILE_TEST scenarios?
Thanks,
Sergio Paracuellos
Quoted 4 lines
\ No newline at end of file
--
2.27.0
Re: [PATCH 1/2] PCI: mt7621: Add MODULE_* macros to MT7621 PCIe host controller driver
Quoted 18 lines · Sergio Paracuellos <[email protected]> 于2021年10月27日周三 下午8:00写道:
Hi,
Quoted 14 lines · Yanteng Si
Since commit
2bdd5238e756("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver") the MT7621 PCIe host controller driver is built as a module but no MODULE_*() attributes were specified, causing a build error due to missing license information.ERROR: modpost: missing
MODULE_LICENSE()indrivers/pci/controller/pcie-mt7621.oFix this by adding MODULE attributes to the driver.
Signed-off-by Yanteng Si <[email protected]>--- drivers/pci/controller/pcie-mt7621.c | 2 ++ 1 file changed, 2 insertions(+)
Quoted 12 lines
drivers/pci/controller/pcie-mt7621.c static struct platform_driver mt7621_pci_driver = { · line 602
Quoted 10 lines
drivers/pci/controller/pcie-mt7621.c +2
-0@@ -598,3 +598,5 @@ static struct platform_driver mt7621_pci_driver = { }, };builtin_platform_driver (mt7621_pci_driver); + +MODULE_LICENSE ("GPL v2" );I guess this is needed for
COMPILE_TESTscenarios?
yeah!
Quoted 2 lines
Thank you very much!
Thanks,
yanteng
PATCH 2/2 PCI: mt7621: Export mips_cm/cpc/gcr_* to modules
In reply to Yanteng Simodpost 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.
--- arch/mips/kernel/mips-cm.c | 5 +++++ arch/mips/kernel/mips-cpc.c | 1 + 2 files changed, 6 insertions(+)
arch/mips/kernel/mips-cm.c +5 -0
@@ -12,8 +12,11 @@#include <asm/mipsregs.h> void __iomem *mips_gcr_base; +EXPORT_SYMBOL (mips_gcr_base); +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);void mips_cm_unlock_other (void ) {
@@ -369,6 +373,7 @@ void mips_cm_unlock_other(void)preempt_enable (); } +EXPORT_SYMBOL (mips_cm_unlock_other);void mips_cm_error_report (void ) {
arch/mips/kernel/mips-cpc.c +1 -0
@@ -13,6 +13,7 @@#include <asm/mips-cps.h> void __iomem *mips_cpc_base; +EXPORT_SYMBOL (mips_cpc_base); static DEFINE_PER_CPU_ALIGNED(spinlock_t, cpc_core_lock);
Signature · 1 line
2.27.0
Sergio Paracuellos
maintainerRe: [PATCH 2/2] PCI: mt7621: Export mips_cm/cpc/gcr_* to modules
Hi,
Quoted 9 lines · Yanteng Si
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!
Quoted 7 lines
Let's just export them.
Signed-off-by Yanteng Si <[email protected]>--- 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" or something similar. I am not the best with words :).
arch/mips/kernel/mips-cm.c line 15
Quoted 10 lines
arch/mips/kernel/mips-cm.c +1
-0@@ -12,8 +12,11 @@#include <asm/mipsregs.h> void __iomem *mips_gcr_base; +EXPORT_SYMBOL (mips_gcr_base);
EXPORT_SYMBOL_GPL?
arch/mips/kernel/mips-cm.c void mips_cm_lock_other(unsigned int cluster, unsigned int core, · line 359
Quoted 12 lines
arch/mips/kernel/mips-cm.c +3
-0+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.
arch/mips/kernel/mips-cm.c void mips_cm_unlock_other(void) · line 376
Quoted 8 lines
arch/mips/kernel/mips-cm.c +1
-0void mips_cm_unlock_other (void ) {@@ -369,6 +373,7 @@ void mips_cm_unlock_other(void)preempt_enable (); } +EXPORT_SYMBOL (mips_cm_unlock_other);
ditto.
arch/mips/kernel/mips-cpc.c line 16
Quoted 12 lines
arch/mips/kernel/mips-cm.c +0
-0void mips_cm_error_report (void ) {arch/mips/kernel/mips-cpc.c +1
-0@@ -13,6 +13,7 @@#include <asm/mips-cps.h> void __iomem *mips_cpc_base; +EXPORT_SYMBOL (mips_cpc_base);
ditto.
Quoted 6 lines
arch/mips/kernel/mips-cpc.c +0
-1static DEFINE_PER_CPU_ALIGNED(spinlock_t, cpc_core_lock); --2.27.0
Thanks,
Sergio Paracuellos
Re: [PATCH 2/2] PCI: mt7621: Export mips_cm/cpc/gcr_* to modules
Quoted 21 lines · Sergio Paracuellos <[email protected]> 于2021年10月27日周三 下午7:45写道:
Hi,
Quoted 9 lines · Yanteng Si
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!Quoted 7 lines
Let's just export them.
Signed-off-by Yanteng Si <[email protected]>--- arch/mips/kernel/mips-cm.c | 5 +++++ arch/mips/kernel/mips-cpc.c | 1 + 2 files changed, 6 insertions(+)
Quoted 3 lines
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!
Quoted 1 line
or something similar. I am not the best with words :).
Me too. >_<
Quoted 9 lines
Quoted 9 lines
arch/mips/kernel/mips-cm.c +0
-0@@ -12,8 +12,11 @@#include <asm/mipsregs.h>
Quoted 4 lines
arch/mips/kernel/mips-cm.c line 15
Quoted 2 lines
arch/mips/kernel/mips-cm.c +1
-0void __iomem *mips_gcr_base; +EXPORT_SYMBOL (mips_gcr_base);
EXPORT_SYMBOL_GPL?
OK. Thanks!
Quoted 6 lines
Quoted 6 lines
arch/mips/kernel/mips-cm.c +2
-0+void __iomem *mips_cm_l2sync_base;int mips_cm_is64; +EXPORT_SYMBOL (mips_cm_is64);
Quoted 9 lines
arch/mips/kernel/mips-cm.c void mips_cm_lock_other(unsigned int cluster, unsigned int core, · line 359
Quoted 7 lines
arch/mips/kernel/mips-cm.c +1
-0static 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 11 lines
arch/mips/kernel/mips-cm.c void mips_cm_unlock_other(void) · line 376
Quoted 9 lines
arch/mips/kernel/mips-cm.c +1
-0void 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 11 lines
Quoted 11 lines
arch/mips/kernel/mips-cm.c +0
-0void mips_cm_error_report (void ) {arch/mips/kernel/mips-cpc.c +0
-0@@ -13,6 +13,7 @@#include <asm/mips-cps.h>
Quoted 4 lines
arch/mips/kernel/mips-cpc.c line 16
Quoted 2 lines
arch/mips/kernel/mips-cpc.c +1
-0void __iomem *mips_cpc_base; +EXPORT_SYMBOL (mips_cpc_base);ditto.
OK. Thanks!
Thanks,
yanteng
Quoted 10 lines
Quoted 7 lines
arch/mips/kernel/mips-cpc.c +0
-1static DEFINE_PER_CPU_ALIGNED(spinlock_t, cpc_core_lock); --2.27.0
Thanks,
Sergio Paracuellos