All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] initcall and setup
@ 2000-01-14 22:48 Matthew Wilcox
  2000-01-15  1:13 ` Grant Grundler
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2000-01-14 22:48 UTC (permalink / raw)
  To: parisc-linux


One of the things which has changed during 2.3 development is
initialisation.  We used to have files full of:

#ifdef CONFIG_FOO
	init_foo();
#endif

#ifdef CONFIG_BAR
	init_bar();
#endif

#ifdef CONFIG_QUUX
	init_quux();
#endif

which was pretty ugly stuff.

Instead, we have declarations like:

__setup("video=", video_setup);
__setup("wd33c93", wd33c93_setup);
__setup("es1370=", es1370_setup);

in each driver and then a loop in init/main.c which goes through and
calls all the __setup functions.  Much prettier, more modular, less
dependent on CONFIG_, etc.

Unfortunately, we can't take advantage of this, because we don't yet have
ELF tools.  This is implemented through an ELF section called __initcall
which contains the address of the function to call.  We could try to hack
something together with SOM, but I'd really rather not put the work in
that will just be dumped later.


This explains why we get some of the warnings on compilation;' eg:

init/main.c:170: warning: `__setup_profile_setup' defined but not used

and why if you diff our kernel against Linus', you will find that we have
reinserted some of the explicit calls to the setup routines that have
been eliminated from the mainline tree.  It also explains why sometimes
a driver may not be called even though you compiled it in.

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

* Re: [parisc-linux] initcall and setup
  2000-01-14 22:48 [parisc-linux] initcall and setup Matthew Wilcox
@ 2000-01-15  1:13 ` Grant Grundler
  2000-01-15  2:41   ` Alex deVries
  0 siblings, 1 reply; 3+ messages in thread
From: Grant Grundler @ 2000-01-15  1:13 UTC (permalink / raw)
  To: parisc-linux

Matthew Wilcox wrote:
> 
> One of the things which has changed during 2.3 development is
> initialisation.
...
> Unfortunately, we can't take advantage of this, because we don't yet have
> ELF tools.  This is implemented through an ELF section called __initcall
> which contains the address of the function to call.  We could try to hack
> something together with SOM, but I'd really rather not put the work in
> that will just be dumped later.

Just a clarification: The kernel will use ELF once the tool chain is
in place. The kernel is SOM now only because of our dependency
on HP-UX ld. Any forcasts for when we can switch to ELF?


...
> and why if you diff our kernel against Linus', you will find that we have
> reinserted some of the explicit calls to the setup routines that have
> been eliminated from the mainline tree.  It also explains why sometimes
> a driver may not be called even though you compiled it in.

Any general rules on where to reinsert stuff? (eg tulip_probe)
In the same place it's in the linux-2.2?
Is someone making a note to make sure the reinserted code gets
dropped when we migrate to either the next 2.3 (or possibly 2.4) release?

thanks,
grant

Grant Grundler
Unix Development Lab
+1.408.447.7253

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

* Re: [parisc-linux] initcall and setup
  2000-01-15  1:13 ` Grant Grundler
@ 2000-01-15  2:41   ` Alex deVries
  0 siblings, 0 replies; 3+ messages in thread
From: Alex deVries @ 2000-01-15  2:41 UTC (permalink / raw)
  To: Grant Grundler; +Cc: parisc-linux

Grant Grundler wrote:
> Just a clarification: The kernel will use ELF once the tool chain is
> in place. The kernel is SOM now only because of our dependency
> on HP-UX ld. Any forcasts for when we can switch to ELF?

Yup.  The 64 bit parisc GCC package will be released shortly.  We've
been busy packaging it up in the last couple of days.

After that, we'll have to start looking at making a 32 bit ELF
toolchain.

- Alex

-- 
Alex deVries
Director of Professional Services
The Puffins at Linuxcare

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

end of thread, other threads:[~2000-01-15  3:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-01-14 22:48 [parisc-linux] initcall and setup Matthew Wilcox
2000-01-15  1:13 ` Grant Grundler
2000-01-15  2:41   ` Alex deVries

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.