LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* BLK_DEV_MD with CONFIG_NET
@ 2007-03-21 3:05 Randy Dunlap
2007-03-21 3:26 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2007-03-21 3:05 UTC (permalink / raw)
To: lkml; +Cc: linux-raid
drivers/md/md.c calls csum_partial().
IF CONFIG_NET=n and BLK_DEV_MD=y, if arch/*/lib/Makefile
puts csum-partial.o or checksum.o into lib-y, the function
is present. (Of course, if the function is placed in
obj-y, there is no problem.)
If CONFIG_NET=n and BLK_DEV_MD=n, if arch/*/lib/Makefile
puts csum-partial.o or checksum.o into lib-y, the function
is removed from the kernel image due to having no built-in
callers.
Build a kernel with CONFIG_NET-n and CONFIG_BLK_DEV_MD=m.
Unless csum_partial() is built and kept by some arch Makefile,
the result is:
ERROR: "csum_partial" [drivers/md/md-mod.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
Any suggested solutions?
Recorded for posterity here:
http://bugzilla.kernel.org/show_bug.cgi?id=8242
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: BLK_DEV_MD with CONFIG_NET
2007-03-21 3:05 BLK_DEV_MD with CONFIG_NET Randy Dunlap
@ 2007-03-21 3:26 ` David Miller
2007-03-21 12:02 ` Sam Ravnborg
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2007-03-21 3:26 UTC (permalink / raw)
To: randy.dunlap; +Cc: linux-kernel, linux-raid
From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Tue, 20 Mar 2007 20:05:38 -0700
> Build a kernel with CONFIG_NET-n and CONFIG_BLK_DEV_MD=m.
> Unless csum_partial() is built and kept by some arch Makefile,
> the result is:
> ERROR: "csum_partial" [drivers/md/md-mod.ko] undefined!
> make[1]: *** [__modpost] Error 1
> make: *** [modules] Error 2
>
>
> Any suggested solutions?
Anything which is every exported to modules, which ought to
be the situation in this case, should be obj-y not lib-y
right?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: BLK_DEV_MD with CONFIG_NET
2007-03-21 3:26 ` David Miller
@ 2007-03-21 12:02 ` Sam Ravnborg
2007-03-21 22:30 ` Arnd Bergmann
2007-03-21 22:59 ` Randy Dunlap
0 siblings, 2 replies; 6+ messages in thread
From: Sam Ravnborg @ 2007-03-21 12:02 UTC (permalink / raw)
To: David Miller; +Cc: randy.dunlap, linux-kernel, linux-raid
On Tue, Mar 20, 2007 at 08:26:21PM -0700, David Miller wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> Date: Tue, 20 Mar 2007 20:05:38 -0700
>
> > Build a kernel with CONFIG_NET-n and CONFIG_BLK_DEV_MD=m.
> > Unless csum_partial() is built and kept by some arch Makefile,
> > the result is:
> > ERROR: "csum_partial" [drivers/md/md-mod.ko] undefined!
> > make[1]: *** [__modpost] Error 1
> > make: *** [modules] Error 2
> >
> >
> > Any suggested solutions?
>
> Anything which is every exported to modules, which ought to
> be the situation in this case, should be obj-y not lib-y
> right?
That is also my understanding of lib-y - I should update makefiles.txt
to reflect this..
Sam
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: BLK_DEV_MD with CONFIG_NET
2007-03-21 12:02 ` Sam Ravnborg
@ 2007-03-21 22:30 ` Arnd Bergmann
2007-03-22 11:15 ` Adrian Bunk
2007-03-21 22:59 ` Randy Dunlap
1 sibling, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2007-03-21 22:30 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: David Miller, randy.dunlap, linux-kernel, linux-raid
On Wednesday 21 March 2007 13:02:46 Sam Ravnborg wrote:
> > Anything which is every exported to modules, which ought to
> > be the situation in this case, should be obj-y not lib-y
> > right?
>
> That is also my understanding of lib-y - I should update makefiles.txt
> to reflect this..
Strictly speaking, it could well be obj-m instead of obj-y if it
is _only_ used by modules. OTOH, it makes the Makefile a lot simpler
to not optimize for this case.
Arnd <><
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: BLK_DEV_MD with CONFIG_NET
2007-03-21 12:02 ` Sam Ravnborg
2007-03-21 22:30 ` Arnd Bergmann
@ 2007-03-21 22:59 ` Randy Dunlap
1 sibling, 0 replies; 6+ messages in thread
From: Randy Dunlap @ 2007-03-21 22:59 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: David Miller, linux-kernel, linux-raid
On Wed, 21 Mar 2007 13:02:46 +0100 Sam Ravnborg wrote:
> On Tue, Mar 20, 2007 at 08:26:21PM -0700, David Miller wrote:
> > From: Randy Dunlap <randy.dunlap@oracle.com>
> > Date: Tue, 20 Mar 2007 20:05:38 -0700
> >
> > > Build a kernel with CONFIG_NET-n and CONFIG_BLK_DEV_MD=m.
> > > Unless csum_partial() is built and kept by some arch Makefile,
> > > the result is:
> > > ERROR: "csum_partial" [drivers/md/md-mod.ko] undefined!
> > > make[1]: *** [__modpost] Error 1
> > > make: *** [modules] Error 2
> > >
> > >
> > > Any suggested solutions?
> >
> > Anything which is every exported to modules, which ought to
> > be the situation in this case, should be obj-y not lib-y
> > right?
> That is also my understanding of lib-y - I should update makefiles.txt
> to reflect this..
I concur, but there seems to be quite a bit of change needed in
Makefile*s for this. I'll begin with csum_partial() and trying
to use Arnd's suggestion as well.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: BLK_DEV_MD with CONFIG_NET
2007-03-21 22:30 ` Arnd Bergmann
@ 2007-03-22 11:15 ` Adrian Bunk
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2007-03-22 11:15 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Sam Ravnborg, David Miller, randy.dunlap, linux-kernel, linux-raid
On Wed, Mar 21, 2007 at 11:30:24PM +0100, Arnd Bergmann wrote:
> On Wednesday 21 March 2007 13:02:46 Sam Ravnborg wrote:
> > > Anything which is every exported to modules, which ought to
> > > be the situation in this case, should be obj-y not lib-y
> > > right?
> >
> > That is also my understanding of lib-y - I should update makefiles.txt
> > to reflect this..
>
> Strictly speaking, it could well be obj-m instead of obj-y if it
> is _only_ used by modules. OTOH, it makes the Makefile a lot simpler
> to not optimize for this case.
No, it is only used by modules only if CONFIG_BLK_DEV_MD=m and CONFIG_NET=n...
And except for some legacy drivers, there shouldn't be any module-only
code in the kernel.
The solution is either obj-y or obj-$(CONFIG_CSUM_PARIAL).
> Arnd
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-03-22 11:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-21 3:05 BLK_DEV_MD with CONFIG_NET Randy Dunlap
2007-03-21 3:26 ` David Miller
2007-03-21 12:02 ` Sam Ravnborg
2007-03-21 22:30 ` Arnd Bergmann
2007-03-22 11:15 ` Adrian Bunk
2007-03-21 22:59 ` Randy Dunlap
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).