[PATCH -mm v2] 2.6.23-rc4-mm1: kgdboe link errors

Previous thread: hci_sock.c build failure by Andre Haupt on Wednesday, September 12, 2007 - 5:29 am. (12 messages)

Next thread: [PATCH] RDMA/CMA: Use neigh_event_send() to initiate neighbour discovery. by Steve Wise on Wednesday, September 12, 2007 - 6:00 am. (5 messages)
To: Andrew Morton <akpm@...>
Cc: Matt Mackall <mpm@...>, <jason.wessel@...>, <amitkale@...>, <kgdb-bugreport@...>, Linux kernel mailing list <linux-kernel@...>
Date: Wednesday, September 12, 2007 - 5:31 am

Hi,

randconfig [1] causes this link errors:
ERROR: "netpoll_cleanup" [drivers/net/kgdboe.ko] undefined!
ERROR: "netpoll_setup" [drivers/net/kgdboe.ko] undefined!
ERROR: "netpoll_parse_options" [drivers/net/kgdboe.ko] undefined!
ERROR: "netpoll_poll" [drivers/net/kgdboe.ko] undefined!
ERROR: "netpoll_send_udp" [drivers/net/kgdboe.ko] undefined!
ERROR: "netpoll_set_trap" [drivers/net/kgdboe.ko] undefined!
make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2
make: *** [all] Error 2

[1] http://www.fi.muni.cz/~xslaby/sklad/1.config

regards,
--
http://www.fi.muni.cz/~xslaby/ Jiri Slaby
faculty of informatics, masaryk university, brno, cz
-

To: Jiri Slaby <jirislaby@...>
Cc: Andrew Morton <akpm@...>, <kgdb-bugreport@...>, <amitkale@...>, <jason.wessel@...>, Linux kernel mailing list <linux-kernel@...>, Matt Mackall <mpm@...>
Date: Wednesday, September 12, 2007 - 1:15 pm

From: Randy Dunlap <randy.dunlap@oracle.com>

Fix kgdb build problems:
Building modules, stage 2.
ERROR: "netpoll_cleanup" [drivers/net/kgdboe.ko] undefined!
ERROR: "netpoll_setup" [drivers/net/kgdboe.ko] undefined!
ERROR: "netpoll_parse_options" [drivers/net/kgdboe.ko] undefined!
ERROR: "netpoll_poll" [drivers/net/kgdboe.ko] undefined!
ERROR: "netpoll_send_udp" [drivers/net/kgdboe.ko] undefined!
ERROR: "netpoll_set_trap" [drivers/net/kgdboe.ko] undefined!
make[1]: *** [__modpost] Error 1

Add 'select' for net-poll/console related config symbols, but
make KGDBOE 'depend on' NET. We don't want to 'select' CONFIG_NET,
but if it is already enabled, the 'select's will enable the rest
of the needed interfaces.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
lib/Kconfig.kgdb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

--- linux-2.6.23-rc4-mm1.orig/lib/Kconfig.kgdb
+++ linux-2.6.23-rc4-mm1/lib/Kconfig.kgdb
@@ -174,9 +174,11 @@ endchoice

config KGDBOE
tristate "KGDB: On ethernet" if !KGDBOE_NOMODULE
- depends on m && KGDB
+ depends on m && KGDB && NET
+ select NETCONSOLE
select NETPOLL
select NETPOLL_TRAP
+ select NET_POLL_CONTROLLER
help
Uses the NETPOLL API to communicate with the host GDB via UDP.
In order for this to work, the ethernet interface specified must
-

To: Randy Dunlap <randy.dunlap@...>
Cc: Jiri Slaby <jirislaby@...>, Andrew Morton <akpm@...>, <kgdb-bugreport@...>, <amitkale@...>, <jason.wessel@...>, Linux kernel mailing list <linux-kernel@...>
Date: Wednesday, September 12, 2007 - 2:15 pm

NETCONSOLE shouldn't be necessary. Otherwise this looks ok to my

--
Mathematics is the supreme nostalgia of our time.
-

To: Matt Mackall <mpm@...>
Cc: Jiri Slaby <jirislaby@...>, <kgdb-bugreport@...>, <amitkale@...>, Linux kernel mailing list <linux-kernel@...>, <jason.wessel@...>, Andrew Morton <akpm@...>
Date: Wednesday, September 12, 2007 - 2:22 pm

Correct. Patch corrected. Thanks.

---
From: Randy Dunlap <randy.dunlap@oracle.com>

Fix kgdb build problems:
Building modules, stage 2.
ERROR: "netpoll_cleanup" [drivers/net/kgdboe.ko] undefined!
ERROR: "netpoll_setup" [drivers/net/kgdboe.ko] undefined!
ERROR: "netpoll_parse_options" [drivers/net/kgdboe.ko] undefined!
ERROR: "netpoll_poll" [drivers/net/kgdboe.ko] undefined!
ERROR: "netpoll_send_udp" [drivers/net/kgdboe.ko] undefined!
ERROR: "netpoll_set_trap" [drivers/net/kgdboe.ko] undefined!
make[1]: *** [__modpost] Error 1

Add 'select' for net-poll related config symbols, but
make KGDBOE 'depend on' NET. We don't want to 'select' CONFIG_NET,
but if it is already enabled, the 'select's will enable the rest
of the needed interfaces.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
lib/Kconfig.kgdb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.23-rc4-mm1.orig/lib/Kconfig.kgdb
+++ linux-2.6.23-rc4-mm1/lib/Kconfig.kgdb
@@ -174,9 +174,10 @@ endchoice

config KGDBOE
tristate "KGDB: On ethernet" if !KGDBOE_NOMODULE
- depends on m && KGDB
+ depends on m && KGDB && NET
select NETPOLL
select NETPOLL_TRAP
+ select NET_POLL_CONTROLLER
help
Uses the NETPOLL API to communicate with the host GDB via UDP.
In order for this to work, the ethernet interface specified must
-

To: Randy Dunlap <randy.dunlap@...>
Cc: Matt Mackall <mpm@...>, Jiri Slaby <jirislaby@...>, <kgdb-bugreport@...>, <amitkale@...>, Linux kernel mailing list <linux-kernel@...>, Andrew Morton <akpm@...>
Date: Wednesday, September 12, 2007 - 3:17 pm

Randy,

This patch is fine, and I am committing it to the for_mm kgdb tree.

I am also adding the "depends on NET" to the KGDBOE_NOMODULE section,
which would otherwise to a select on KGDBOE. We have to cover the case
for KGDB as a module and not as a module.

Thanks,
Jason.

-

To: Randy Dunlap <randy.dunlap@...>
Cc: Jiri Slaby <jirislaby@...>, <kgdb-bugreport@...>, <amitkale@...>, Linux kernel mailing list <linux-kernel@...>, <jason.wessel@...>, Andrew Morton <akpm@...>
Date: Wednesday, September 12, 2007 - 2:50 pm

Looks good to me, but I'll leave the actual ack to the KGDB guys.

--
Mathematics is the supreme nostalgia of our time.
-

Previous thread: hci_sock.c build failure by Andre Haupt on Wednesday, September 12, 2007 - 5:29 am. (12 messages)

Next thread: [PATCH] RDMA/CMA: Use neigh_event_send() to initiate neighbour discovery. by Steve Wise on Wednesday, September 12, 2007 - 6:00 am. (5 messages)