linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: ralink: export rt_sysc_membase for rt2880_wdt.c
@ 2021-05-17  0:54 Randy Dunlap
  2021-05-17  5:06 ` Guenter Roeck
  2021-05-25 13:39 ` Thomas Bogendoerfer
  0 siblings, 2 replies; 4+ messages in thread
From: Randy Dunlap @ 2021-05-17  0:54 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Guenter Roeck, Wim Van Sebroeck, John Crispin,
	linux-mips, linux-watchdog

rt2880_wdt.c uses (well, attempts to use) rt_sysc_membase. However,
when this watchdog driver is built as a loadable module, there is a
build error since the rt_sysc_membase symbol is not exported.
Export it to quell the build error.

ERROR: modpost: "rt_sysc_membase" [drivers/watchdog/rt2880_wdt.ko] undefined!

Fixes: 473cf939ff34 ("watchdog: add ralink watchdog driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: John Crispin <john@phrozen.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-watchdog@vger.kernel.org
---
or make the Kconfig symbol RALINK_WDT bool instead of tristate?

 arch/mips/ralink/of.c |    2 ++
 1 file changed, 2 insertions(+)

--- linux-next-20210514.orig/arch/mips/ralink/of.c
+++ linux-next-20210514/arch/mips/ralink/of.c
@@ -8,6 +8,7 @@
 
 #include <linux/io.h>
 #include <linux/clk.h>
+#include <linux/export.h>
 #include <linux/init.h>
 #include <linux/sizes.h>
 #include <linux/of_fdt.h>
@@ -25,6 +26,7 @@
 
 __iomem void *rt_sysc_membase;
 __iomem void *rt_memc_membase;
+EXPORT_SYMBOL_GPL(rt_sysc_membase);
 
 __iomem void *plat_of_remap_node(const char *node)
 {

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

* Re: [PATCH] MIPS: ralink: export rt_sysc_membase for rt2880_wdt.c
  2021-05-17  0:54 [PATCH] MIPS: ralink: export rt_sysc_membase for rt2880_wdt.c Randy Dunlap
@ 2021-05-17  5:06 ` Guenter Roeck
  2021-05-17  6:31   ` Sergio Paracuellos
  2021-05-25 13:39 ` Thomas Bogendoerfer
  1 sibling, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2021-05-17  5:06 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: Wim Van Sebroeck, John Crispin, linux-mips, linux-watchdog

On 5/16/21 5:54 PM, Randy Dunlap wrote:
> rt2880_wdt.c uses (well, attempts to use) rt_sysc_membase. However,
> when this watchdog driver is built as a loadable module, there is a
> build error since the rt_sysc_membase symbol is not exported.
> Export it to quell the build error.
> 
> ERROR: modpost: "rt_sysc_membase" [drivers/watchdog/rt2880_wdt.ko] undefined!
> 
> Fixes: 473cf939ff34 ("watchdog: add ralink watchdog driver")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: Wim Van Sebroeck <wim@iguana.be>

Acked-by: Guenter Roeck <linux@roeck-us.net>

> Cc: John Crispin <john@phrozen.org>
> Cc: linux-mips@vger.kernel.org
> Cc: linux-watchdog@vger.kernel.org
> ---
> or make the Kconfig symbol RALINK_WDT bool instead of tristate?
> 

You'd have to change several other config symbols to boolean as well.

Example with PHY_MT7621_PCI=m:

ERROR: modpost: "rt_sysc_membase" [drivers/phy/ralink/phy-mt7621-pci.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:150: modules-only.symvers] Error 1

Same with MT7621_WDT=m.

ERROR: modpost: "rt_sysc_membase" [drivers/watchdog/mt7621_wdt.ko] undefined!

At that point I stopped looking.

Guenter

>   arch/mips/ralink/of.c |    2 ++
>   1 file changed, 2 insertions(+)
> 
> --- linux-next-20210514.orig/arch/mips/ralink/of.c
> +++ linux-next-20210514/arch/mips/ralink/of.c
> @@ -8,6 +8,7 @@
>   
>   #include <linux/io.h>
>   #include <linux/clk.h>
> +#include <linux/export.h>
>   #include <linux/init.h>
>   #include <linux/sizes.h>
>   #include <linux/of_fdt.h>
> @@ -25,6 +26,7 @@
>   
>   __iomem void *rt_sysc_membase;
>   __iomem void *rt_memc_membase;
> +EXPORT_SYMBOL_GPL(rt_sysc_membase);
>   
>   __iomem void *plat_of_remap_node(const char *node)
>   {
> 


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

* Re: [PATCH] MIPS: ralink: export rt_sysc_membase for rt2880_wdt.c
  2021-05-17  5:06 ` Guenter Roeck
@ 2021-05-17  6:31   ` Sergio Paracuellos
  0 siblings, 0 replies; 4+ messages in thread
From: Sergio Paracuellos @ 2021-05-17  6:31 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Randy Dunlap, linux-kernel, Wim Van Sebroeck, John Crispin,
	open list:MIPS, linux-watchdog

Hi Guenter,

On Mon, May 17, 2021 at 8:23 AM Guenter Roeck <linux@roeck-us.net> wrote:
>
> On 5/16/21 5:54 PM, Randy Dunlap wrote:
> > rt2880_wdt.c uses (well, attempts to use) rt_sysc_membase. However,
> > when this watchdog driver is built as a loadable module, there is a
> > build error since the rt_sysc_membase symbol is not exported.
> > Export it to quell the build error.
> >
> > ERROR: modpost: "rt_sysc_membase" [drivers/watchdog/rt2880_wdt.ko] undefined!
> >
> > Fixes: 473cf939ff34 ("watchdog: add ralink watchdog driver")
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> > Cc: Guenter Roeck <linux@roeck-us.net>
> > Cc: Wim Van Sebroeck <wim@iguana.be>
>
> Acked-by: Guenter Roeck <linux@roeck-us.net>
>
> > Cc: John Crispin <john@phrozen.org>
> > Cc: linux-mips@vger.kernel.org
> > Cc: linux-watchdog@vger.kernel.org
> > ---
> > or make the Kconfig symbol RALINK_WDT bool instead of tristate?
> >
>
> You'd have to change several other config symbols to boolean as well.
>
> Example with PHY_MT7621_PCI=m:
>
> ERROR: modpost: "rt_sysc_membase" [drivers/phy/ralink/phy-mt7621-pci.ko] undefined!
> make[1]: *** [scripts/Makefile.modpost:150: modules-only.symvers] Error 1

This is already changed and not using this rt_* apis anymore. See:

https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git/commit/?h=next&id=60ece833ccd00c4fc9b10bbce2fa6291f61c6230
https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git/commit/?h=next&id=6eded551cefe3ef6e2b3ff76b6a77a2ecd4fa20a

>
> Same with MT7621_WDT=m.
>
> ERROR: modpost: "rt_sysc_membase" [drivers/watchdog/mt7621_wdt.ko] undefined!
>
> At that point I stopped looking.
>
> Guenter

Best regards,
    Sergio Paracuellos

>
> >   arch/mips/ralink/of.c |    2 ++
> >   1 file changed, 2 insertions(+)
> >
> > --- linux-next-20210514.orig/arch/mips/ralink/of.c
> > +++ linux-next-20210514/arch/mips/ralink/of.c
> > @@ -8,6 +8,7 @@
> >
> >   #include <linux/io.h>
> >   #include <linux/clk.h>
> > +#include <linux/export.h>
> >   #include <linux/init.h>
> >   #include <linux/sizes.h>
> >   #include <linux/of_fdt.h>
> > @@ -25,6 +26,7 @@
> >
> >   __iomem void *rt_sysc_membase;
> >   __iomem void *rt_memc_membase;
> > +EXPORT_SYMBOL_GPL(rt_sysc_membase);
> >
> >   __iomem void *plat_of_remap_node(const char *node)
> >   {
> >
>

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

* Re: [PATCH] MIPS: ralink: export rt_sysc_membase for rt2880_wdt.c
  2021-05-17  0:54 [PATCH] MIPS: ralink: export rt_sysc_membase for rt2880_wdt.c Randy Dunlap
  2021-05-17  5:06 ` Guenter Roeck
@ 2021-05-25 13:39 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2021-05-25 13:39 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Guenter Roeck, Wim Van Sebroeck, John Crispin,
	linux-mips, linux-watchdog

On Sun, May 16, 2021 at 05:54:17PM -0700, Randy Dunlap wrote:
> rt2880_wdt.c uses (well, attempts to use) rt_sysc_membase. However,
> when this watchdog driver is built as a loadable module, there is a
> build error since the rt_sysc_membase symbol is not exported.
> Export it to quell the build error.
> 
> ERROR: modpost: "rt_sysc_membase" [drivers/watchdog/rt2880_wdt.ko] undefined!
> 
> Fixes: 473cf939ff34 ("watchdog: add ralink watchdog driver")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: Wim Van Sebroeck <wim@iguana.be>
> Cc: John Crispin <john@phrozen.org>
> Cc: linux-mips@vger.kernel.org
> Cc: linux-watchdog@vger.kernel.org
> ---
> or make the Kconfig symbol RALINK_WDT bool instead of tristate?
> 
>  arch/mips/ralink/of.c |    2 ++
>  1 file changed, 2 insertions(+)

applied to mips-fixes.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

end of thread, other threads:[~2021-05-25 13:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17  0:54 [PATCH] MIPS: ralink: export rt_sysc_membase for rt2880_wdt.c Randy Dunlap
2021-05-17  5:06 ` Guenter Roeck
2021-05-17  6:31   ` Sergio Paracuellos
2021-05-25 13:39 ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).