All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] drivers/mt7621: Fix build error ERROR: modpost:
@ 2021-10-27 11:31 ` Yanteng Si
  0 siblings, 0 replies; 21+ messages in thread
From: Yanteng Si @ 2021-10-27 11:31 UTC (permalink / raw)
  To: sergio.paracuellos
  Cc: Yanteng Si, lorenzo.pieralisi, robh, kw, bhelgaas, matthias.bgg,
	p.zabel, linux-pci, linux-arm-kernel, linux-mediatek, tsbogend,
	linux-mips, chenhuacai, sterlingteng

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(+)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 0/2] drivers/mt7621: Fix build error ERROR: modpost:
@ 2021-10-27 11:31 ` Yanteng Si
  0 siblings, 0 replies; 21+ messages in thread
From: Yanteng Si @ 2021-10-27 11:31 UTC (permalink / raw)
  To: sergio.paracuellos
  Cc: Yanteng Si, lorenzo.pieralisi, robh, kw, bhelgaas, matthias.bgg,
	p.zabel, linux-pci, linux-arm-kernel, linux-mediatek, tsbogend,
	linux-mips, chenhuacai, sterlingteng

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(+)

-- 
2.27.0


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 0/2] drivers/mt7621: Fix build error ERROR: modpost:
@ 2021-10-27 11:31 ` Yanteng Si
  0 siblings, 0 replies; 21+ messages in thread
From: Yanteng Si @ 2021-10-27 11:31 UTC (permalink / raw)
  To: sergio.paracuellos
  Cc: Yanteng Si, lorenzo.pieralisi, robh, kw, bhelgaas, matthias.bgg,
	p.zabel, linux-pci, linux-arm-kernel, linux-mediatek, tsbogend,
	linux-mips, chenhuacai, sterlingteng

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(+)

-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 1/2] PCI: mt7621: Add MODULE_* macros to MT7621 PCIe host controller driver
  2021-10-27 11:31 ` Yanteng Si
  (?)
@ 2021-10-27 11:31   ` Yanteng Si
  -1 siblings, 0 replies; 21+ messages in thread
From: Yanteng Si @ 2021-10-27 11:31 UTC (permalink / raw)
  To: sergio.paracuellos
  Cc: Yanteng Si, lorenzo.pieralisi, robh, kw, bhelgaas, matthias.bgg,
	p.zabel, linux-pci, linux-arm-kernel, linux-mediatek, tsbogend,
	linux-mips, chenhuacai, sterlingteng

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.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
 drivers/pci/controller/pcie-mt7621.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
index b60dfb45ef7b..668b737f86fb 100644
--- a/drivers/pci/controller/pcie-mt7621.c
+++ b/drivers/pci/controller/pcie-mt7621.c
@@ -598,3 +598,5 @@ static struct platform_driver mt7621_pci_driver = {
 	},
 };
 builtin_platform_driver(mt7621_pci_driver);
+
+MODULE_LICENSE("GPL v2");
\ No newline at end of file
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 1/2] PCI: mt7621: Add MODULE_* macros to MT7621 PCIe host controller driver
@ 2021-10-27 11:31   ` Yanteng Si
  0 siblings, 0 replies; 21+ messages in thread
From: Yanteng Si @ 2021-10-27 11:31 UTC (permalink / raw)
  To: sergio.paracuellos
  Cc: Yanteng Si, lorenzo.pieralisi, robh, kw, bhelgaas, matthias.bgg,
	p.zabel, linux-pci, linux-arm-kernel, linux-mediatek, tsbogend,
	linux-mips, chenhuacai, sterlingteng

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.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
 drivers/pci/controller/pcie-mt7621.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
index b60dfb45ef7b..668b737f86fb 100644
--- a/drivers/pci/controller/pcie-mt7621.c
+++ b/drivers/pci/controller/pcie-mt7621.c
@@ -598,3 +598,5 @@ static struct platform_driver mt7621_pci_driver = {
 	},
 };
 builtin_platform_driver(mt7621_pci_driver);
+
+MODULE_LICENSE("GPL v2");
\ No newline at end of file
-- 
2.27.0


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 1/2] PCI: mt7621: Add MODULE_* macros to MT7621 PCIe host controller driver
@ 2021-10-27 11:31   ` Yanteng Si
  0 siblings, 0 replies; 21+ messages in thread
From: Yanteng Si @ 2021-10-27 11:31 UTC (permalink / raw)
  To: sergio.paracuellos
  Cc: Yanteng Si, lorenzo.pieralisi, robh, kw, bhelgaas, matthias.bgg,
	p.zabel, linux-pci, linux-arm-kernel, linux-mediatek, tsbogend,
	linux-mips, chenhuacai, sterlingteng

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.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
 drivers/pci/controller/pcie-mt7621.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
index b60dfb45ef7b..668b737f86fb 100644
--- a/drivers/pci/controller/pcie-mt7621.c
+++ b/drivers/pci/controller/pcie-mt7621.c
@@ -598,3 +598,5 @@ static struct platform_driver mt7621_pci_driver = {
 	},
 };
 builtin_platform_driver(mt7621_pci_driver);
+
+MODULE_LICENSE("GPL v2");
\ No newline at end of file
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 2/2] PCI: mt7621: Export mips_cm/cpc/gcr_* to modules
  2021-10-27 11:31 ` Yanteng Si
  (?)
@ 2021-10-27 11:31   ` Yanteng Si
  -1 siblings, 0 replies; 21+ messages in thread
From: Yanteng Si @ 2021-10-27 11:31 UTC (permalink / raw)
  To: sergio.paracuellos
  Cc: Yanteng Si, lorenzo.pieralisi, robh, kw, bhelgaas, matthias.bgg,
	p.zabel, linux-pci, linux-arm-kernel, linux-mediatek, tsbogend,
	linux-mips, chenhuacai, sterlingteng

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 <siyanteng@loongson.cn>
---
 arch/mips/kernel/mips-cm.c  | 5 +++++
 arch/mips/kernel/mips-cpc.c | 1 +
 2 files changed, 6 insertions(+)

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);
+
 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)
 {
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);
 
 static DEFINE_PER_CPU_ALIGNED(spinlock_t, cpc_core_lock);
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 2/2] PCI: mt7621: Export mips_cm/cpc/gcr_* to modules
@ 2021-10-27 11:31   ` Yanteng Si
  0 siblings, 0 replies; 21+ messages in thread
From: Yanteng Si @ 2021-10-27 11:31 UTC (permalink / raw)
  To: sergio.paracuellos
  Cc: Yanteng Si, lorenzo.pieralisi, robh, kw, bhelgaas, matthias.bgg,
	p.zabel, linux-pci, linux-arm-kernel, linux-mediatek, tsbogend,
	linux-mips, chenhuacai, sterlingteng

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 <siyanteng@loongson.cn>
---
 arch/mips/kernel/mips-cm.c  | 5 +++++
 arch/mips/kernel/mips-cpc.c | 1 +
 2 files changed, 6 insertions(+)

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);
+
 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)
 {
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);
 
 static DEFINE_PER_CPU_ALIGNED(spinlock_t, cpc_core_lock);
 
-- 
2.27.0


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 2/2] PCI: mt7621: Export mips_cm/cpc/gcr_* to modules
@ 2021-10-27 11:31   ` Yanteng Si
  0 siblings, 0 replies; 21+ messages in thread
From: Yanteng Si @ 2021-10-27 11:31 UTC (permalink / raw)
  To: sergio.paracuellos
  Cc: Yanteng Si, lorenzo.pieralisi, robh, kw, bhelgaas, matthias.bgg,
	p.zabel, linux-pci, linux-arm-kernel, linux-mediatek, tsbogend,
	linux-mips, chenhuacai, sterlingteng

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 <siyanteng@loongson.cn>
---
 arch/mips/kernel/mips-cm.c  | 5 +++++
 arch/mips/kernel/mips-cpc.c | 1 +
 2 files changed, 6 insertions(+)

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);
+
 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)
 {
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);
 
 static DEFINE_PER_CPU_ALIGNED(spinlock_t, cpc_core_lock);
 
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH 2/2] PCI: mt7621: Export mips_cm/cpc/gcr_* to modules
  2021-10-27 11:31   ` Yanteng Si
  (?)
@ 2021-10-27 11:45     ` Sergio Paracuellos
  -1 siblings, 0 replies; 21+ messages in thread
From: Sergio Paracuellos @ 2021-10-27 11:45 UTC (permalink / raw)
  To: Yanteng Si
  Cc: Yanteng Si, Lorenzo Pieralisi, Rob Herring, kw, Bjorn Helgaas,
	Matthias Brugger, Philipp Zabel, linux-pci, linux-arm-kernel,
	moderated list:ARM/Mediatek SoC support, Thomas Bogendoerfer,
	open list:MIPS, chenhuacai, sterlingteng

Hi,

On Wed, Oct 27, 2021 at 1:32 PM Yanteng Si <siyanteng01@gmail.com> wrote:
>
> 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 <siyanteng@loongson.cn>
> ---
>  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 :).

>
> 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?

> +
>  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.

>
>  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.

>
>  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.

>
>  static DEFINE_PER_CPU_ALIGNED(spinlock_t, cpc_core_lock);
>
> --
> 2.27.0
>

Thanks,
    Sergio Paracuellos

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 2/2] PCI: mt7621: Export mips_cm/cpc/gcr_* to modules
@ 2021-10-27 11:45     ` Sergio Paracuellos
  0 siblings, 0 replies; 21+ messages in thread
From: Sergio Paracuellos @ 2021-10-27 11:45 UTC (permalink / raw)
  To: Yanteng Si
  Cc: Yanteng Si, Lorenzo Pieralisi, Rob Herring, kw, Bjorn Helgaas,
	Matthias Brugger, Philipp Zabel, linux-pci, linux-arm-kernel,
	moderated list:ARM/Mediatek SoC support, Thomas Bogendoerfer,
	open list:MIPS, chenhuacai, sterlingteng

Hi,

On Wed, Oct 27, 2021 at 1:32 PM Yanteng Si <siyanteng01@gmail.com> wrote:
>
> 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 <siyanteng@loongson.cn>
> ---
>  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 :).

>
> 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?

> +
>  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.

>
>  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.

>
>  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.

>
>  static DEFINE_PER_CPU_ALIGNED(spinlock_t, cpc_core_lock);
>
> --
> 2.27.0
>

Thanks,
    Sergio Paracuellos

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 2/2] PCI: mt7621: Export mips_cm/cpc/gcr_* to modules
@ 2021-10-27 11:45     ` Sergio Paracuellos
  0 siblings, 0 replies; 21+ messages in thread
From: Sergio Paracuellos @ 2021-10-27 11:45 UTC (permalink / raw)
  To: Yanteng Si
  Cc: Yanteng Si, Lorenzo Pieralisi, Rob Herring, kw, Bjorn Helgaas,
	Matthias Brugger, Philipp Zabel, linux-pci, linux-arm-kernel,
	moderated list:ARM/Mediatek SoC support, Thomas Bogendoerfer,
	open list:MIPS, chenhuacai, sterlingteng

Hi,

On Wed, Oct 27, 2021 at 1:32 PM Yanteng Si <siyanteng01@gmail.com> wrote:
>
> 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 <siyanteng@loongson.cn>
> ---
>  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 :).

>
> 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?

> +
>  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.

>
>  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.

>
>  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.

>
>  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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/2] PCI: mt7621: Add MODULE_* macros to MT7621 PCIe host controller driver
  2021-10-27 11:31   ` Yanteng Si
  (?)
@ 2021-10-27 11:59     ` Sergio Paracuellos
  -1 siblings, 0 replies; 21+ messages in thread
From: Sergio Paracuellos @ 2021-10-27 11:59 UTC (permalink / raw)
  To: Yanteng Si
  Cc: Yanteng Si, Lorenzo Pieralisi, Rob Herring, kw, Bjorn Helgaas,
	Matthias Brugger, Philipp Zabel, linux-pci, linux-arm-kernel,
	moderated list:ARM/Mediatek SoC support, Thomas Bogendoerfer,
	open list:MIPS, chenhuacai, sterlingteng

Hi,

On Wed, Oct 27, 2021 at 1:32 PM Yanteng Si <siyanteng01@gmail.com> wrote:
>
> 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.
>
> Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> ---
>  drivers/pci/controller/pcie-mt7621.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
> index b60dfb45ef7b..668b737f86fb 100644
> --- a/drivers/pci/controller/pcie-mt7621.c
> +++ b/drivers/pci/controller/pcie-mt7621.c
> @@ -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?

Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Thanks,
    Sergio Paracuellos

> \ No newline at end of file
> --
> 2.27.0
>

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/2] PCI: mt7621: Add MODULE_* macros to MT7621 PCIe host controller driver
@ 2021-10-27 11:59     ` Sergio Paracuellos
  0 siblings, 0 replies; 21+ messages in thread
From: Sergio Paracuellos @ 2021-10-27 11:59 UTC (permalink / raw)
  To: Yanteng Si
  Cc: Yanteng Si, Lorenzo Pieralisi, Rob Herring, kw, Bjorn Helgaas,
	Matthias Brugger, Philipp Zabel, linux-pci, linux-arm-kernel,
	moderated list:ARM/Mediatek SoC support, Thomas Bogendoerfer,
	open list:MIPS, chenhuacai, sterlingteng

Hi,

On Wed, Oct 27, 2021 at 1:32 PM Yanteng Si <siyanteng01@gmail.com> wrote:
>
> 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.
>
> Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> ---
>  drivers/pci/controller/pcie-mt7621.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
> index b60dfb45ef7b..668b737f86fb 100644
> --- a/drivers/pci/controller/pcie-mt7621.c
> +++ b/drivers/pci/controller/pcie-mt7621.c
> @@ -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?

Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Thanks,
    Sergio Paracuellos

> \ No newline at end of file
> --
> 2.27.0
>

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/2] PCI: mt7621: Add MODULE_* macros to MT7621 PCIe host controller driver
@ 2021-10-27 11:59     ` Sergio Paracuellos
  0 siblings, 0 replies; 21+ messages in thread
From: Sergio Paracuellos @ 2021-10-27 11:59 UTC (permalink / raw)
  To: Yanteng Si
  Cc: Yanteng Si, Lorenzo Pieralisi, Rob Herring, kw, Bjorn Helgaas,
	Matthias Brugger, Philipp Zabel, linux-pci, linux-arm-kernel,
	moderated list:ARM/Mediatek SoC support, Thomas Bogendoerfer,
	open list:MIPS, chenhuacai, sterlingteng

Hi,

On Wed, Oct 27, 2021 at 1:32 PM Yanteng Si <siyanteng01@gmail.com> wrote:
>
> 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.
>
> Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> ---
>  drivers/pci/controller/pcie-mt7621.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
> index b60dfb45ef7b..668b737f86fb 100644
> --- a/drivers/pci/controller/pcie-mt7621.c
> +++ b/drivers/pci/controller/pcie-mt7621.c
> @@ -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?

Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Thanks,
    Sergio Paracuellos

> \ No newline at end of file
> --
> 2.27.0
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/2] PCI: mt7621: Add MODULE_* macros to MT7621 PCIe host controller driver
  2021-10-27 11:59     ` Sergio Paracuellos
  (?)
@ 2021-10-28  1:45       ` yanteng si
  -1 siblings, 0 replies; 21+ messages in thread
From: yanteng si @ 2021-10-28  1:45 UTC (permalink / raw)
  To: Sergio Paracuellos
  Cc: Yanteng Si, Lorenzo Pieralisi, Rob Herring, kw, Bjorn Helgaas,
	Matthias Brugger, Philipp Zabel, linux-pci, linux-arm-kernel,
	moderated list:ARM/Mediatek SoC support, Thomas Bogendoerfer,
	open list:MIPS, Huacai Chen, sterling

Sergio Paracuellos <sergio.paracuellos@gmail.com> 于2021年10月27日周三 下午8:00写道:
>
> Hi,
>
> On Wed, Oct 27, 2021 at 1:32 PM Yanteng Si <siyanteng01@gmail.com> wrote:
> >
> > 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.
> >
> > Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> > ---
> >  drivers/pci/controller/pcie-mt7621.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
> > index b60dfb45ef7b..668b737f86fb 100644
> > --- a/drivers/pci/controller/pcie-mt7621.c
> > +++ b/drivers/pci/controller/pcie-mt7621.c
> > @@ -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?
yeah!
>
> Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Thank you very much!

Thanks,
yanteng

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/2] PCI: mt7621: Add MODULE_* macros to MT7621 PCIe host controller driver
@ 2021-10-28  1:45       ` yanteng si
  0 siblings, 0 replies; 21+ messages in thread
From: yanteng si @ 2021-10-28  1:45 UTC (permalink / raw)
  To: Sergio Paracuellos
  Cc: Yanteng Si, Lorenzo Pieralisi, Rob Herring, kw, Bjorn Helgaas,
	Matthias Brugger, Philipp Zabel, linux-pci, linux-arm-kernel,
	moderated list:ARM/Mediatek SoC support, Thomas Bogendoerfer,
	open list:MIPS, Huacai Chen, sterling

Sergio Paracuellos <sergio.paracuellos@gmail.com> 于2021年10月27日周三 下午8:00写道:
>
> Hi,
>
> On Wed, Oct 27, 2021 at 1:32 PM Yanteng Si <siyanteng01@gmail.com> wrote:
> >
> > 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.
> >
> > Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> > ---
> >  drivers/pci/controller/pcie-mt7621.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
> > index b60dfb45ef7b..668b737f86fb 100644
> > --- a/drivers/pci/controller/pcie-mt7621.c
> > +++ b/drivers/pci/controller/pcie-mt7621.c
> > @@ -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?
yeah!
>
> Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Thank you very much!

Thanks,
yanteng

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/2] PCI: mt7621: Add MODULE_* macros to MT7621 PCIe host controller driver
@ 2021-10-28  1:45       ` yanteng si
  0 siblings, 0 replies; 21+ messages in thread
From: yanteng si @ 2021-10-28  1:45 UTC (permalink / raw)
  To: Sergio Paracuellos
  Cc: Yanteng Si, Lorenzo Pieralisi, Rob Herring, kw, Bjorn Helgaas,
	Matthias Brugger, Philipp Zabel, linux-pci, linux-arm-kernel,
	moderated list:ARM/Mediatek SoC support, Thomas Bogendoerfer,
	open list:MIPS, Huacai Chen, sterling

Sergio Paracuellos <sergio.paracuellos@gmail.com> 于2021年10月27日周三 下午8:00写道:
>
> Hi,
>
> On Wed, Oct 27, 2021 at 1:32 PM Yanteng Si <siyanteng01@gmail.com> wrote:
> >
> > 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.
> >
> > Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> > ---
> >  drivers/pci/controller/pcie-mt7621.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
> > index b60dfb45ef7b..668b737f86fb 100644
> > --- a/drivers/pci/controller/pcie-mt7621.c
> > +++ b/drivers/pci/controller/pcie-mt7621.c
> > @@ -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?
yeah!
>
> Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Thank you very much!

Thanks,
yanteng

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 2/2] PCI: mt7621: Export mips_cm/cpc/gcr_* to modules
  2021-10-27 11:45     ` Sergio Paracuellos
  (?)
@ 2021-10-28  1:58       ` yanteng si
  -1 siblings, 0 replies; 21+ messages in thread
From: yanteng si @ 2021-10-28  1:58 UTC (permalink / raw)
  To: Sergio Paracuellos
  Cc: Yanteng Si, Lorenzo Pieralisi, Rob Herring, kw, Bjorn Helgaas,
	Matthias Brugger, Philipp Zabel, linux-pci, linux-arm-kernel,
	moderated list:ARM/Mediatek SoC support, Thomas Bogendoerfer,
	open list:MIPS, Huacai Chen, sterling

Sergio Paracuellos <sergio.paracuellos@gmail.com> 于2021年10月27日周三 下午7:45写道:
>
> Hi,
>
> On Wed, Oct 27, 2021 at 1:32 PM Yanteng Si <siyanteng01@gmail.com> wrote:
> >
> > 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 <siyanteng@loongson.cn>
> > ---
> >  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. >_<
>
> >
> > 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!
>
> > +
> >  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!
>
> >
> >  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!
>
> >
> >  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
>
> >
> >  static DEFINE_PER_CPU_ALIGNED(spinlock_t, cpc_core_lock);
> >
> > --
> > 2.27.0
> >
>
> Thanks,
>     Sergio Paracuellos

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 2/2] PCI: mt7621: Export mips_cm/cpc/gcr_* to modules
@ 2021-10-28  1:58       ` yanteng si
  0 siblings, 0 replies; 21+ messages in thread
From: yanteng si @ 2021-10-28  1:58 UTC (permalink / raw)
  To: Sergio Paracuellos
  Cc: Yanteng Si, Lorenzo Pieralisi, Rob Herring, kw, Bjorn Helgaas,
	Matthias Brugger, Philipp Zabel, linux-pci, linux-arm-kernel,
	moderated list:ARM/Mediatek SoC support, Thomas Bogendoerfer,
	open list:MIPS, Huacai Chen, sterling

Sergio Paracuellos <sergio.paracuellos@gmail.com> 于2021年10月27日周三 下午7:45写道:
>
> Hi,
>
> On Wed, Oct 27, 2021 at 1:32 PM Yanteng Si <siyanteng01@gmail.com> wrote:
> >
> > 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 <siyanteng@loongson.cn>
> > ---
> >  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. >_<
>
> >
> > 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!
>
> > +
> >  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!
>
> >
> >  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!
>
> >
> >  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
>
> >
> >  static DEFINE_PER_CPU_ALIGNED(spinlock_t, cpc_core_lock);
> >
> > --
> > 2.27.0
> >
>
> Thanks,
>     Sergio Paracuellos

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 2/2] PCI: mt7621: Export mips_cm/cpc/gcr_* to modules
@ 2021-10-28  1:58       ` yanteng si
  0 siblings, 0 replies; 21+ messages in thread
From: yanteng si @ 2021-10-28  1:58 UTC (permalink / raw)
  To: Sergio Paracuellos
  Cc: Yanteng Si, Lorenzo Pieralisi, Rob Herring, kw, Bjorn Helgaas,
	Matthias Brugger, Philipp Zabel, linux-pci, linux-arm-kernel,
	moderated list:ARM/Mediatek SoC support, Thomas Bogendoerfer,
	open list:MIPS, Huacai Chen, sterling

Sergio Paracuellos <sergio.paracuellos@gmail.com> 于2021年10月27日周三 下午7:45写道:
>
> Hi,
>
> On Wed, Oct 27, 2021 at 1:32 PM Yanteng Si <siyanteng01@gmail.com> wrote:
> >
> > 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 <siyanteng@loongson.cn>
> > ---
> >  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. >_<
>
> >
> > 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!
>
> > +
> >  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!
>
> >
> >  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!
>
> >
> >  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
>
> >
> >  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

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2021-10-28  2:00 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 11:31 [PATCH 0/2] drivers/mt7621: Fix build error ERROR: modpost: Yanteng Si
2021-10-27 11:31 ` Yanteng Si
2021-10-27 11:31 ` Yanteng Si
2021-10-27 11:31 ` [PATCH 1/2] PCI: mt7621: Add MODULE_* macros to MT7621 PCIe host controller driver Yanteng Si
2021-10-27 11:31   ` Yanteng Si
2021-10-27 11:31   ` Yanteng Si
2021-10-27 11:59   ` Sergio Paracuellos
2021-10-27 11:59     ` Sergio Paracuellos
2021-10-27 11:59     ` Sergio Paracuellos
2021-10-28  1:45     ` yanteng si
2021-10-28  1:45       ` yanteng si
2021-10-28  1:45       ` yanteng si
2021-10-27 11:31 ` [PATCH 2/2] PCI: mt7621: Export mips_cm/cpc/gcr_* to modules Yanteng Si
2021-10-27 11:31   ` Yanteng Si
2021-10-27 11:31   ` Yanteng Si
2021-10-27 11:45   ` Sergio Paracuellos
2021-10-27 11:45     ` Sergio Paracuellos
2021-10-27 11:45     ` Sergio Paracuellos
2021-10-28  1:58     ` yanteng si
2021-10-28  1:58       ` yanteng si
2021-10-28  1:58       ` yanteng si

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.