public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Double fb_console_init call during do_initcalls
@ 2004-02-20 12:12 Jonathan Brown
  2004-02-20 18:38 ` Randy.Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Brown @ 2004-02-20 12:12 UTC (permalink / raw)
  To: linux-kernel

fb_console_init gets called twice during do_initcalls. Should it be 
called from vty_init or as its own initcall? If it should be its own 
initcall then can it be moved up the list to occur sooner? I think it 
looks better if the fb kicks in as early as possible.


  [<c01d09cc>] take_over_console+0x14a/0x1c9
  [<c031e4c5>] fb_console_init+0x2b/0x59
  [<c031cde4>] vty_init+0xc9/0xd3
  [<c031c5b1>] tty_init+0x234/0x23c
  [<c0310610>] do_initcalls+0x32/0x80
  [<c01050a6>] init+0x2f/0x109
  [<c0105077>] init+0x0/0x109
  [<c0106a81>] kernel_thread_helper+0x5/0xb
Console: switching to colour frame buffer device 128x48


  [<c01d09cc>] take_over_console+0x14a/0x1c9
  [<c031e4c5>] fb_console_init+0x2b/0x59
  [<c0310610>] do_initcalls+0x32/0x80
  [<c01050a6>] init+0x2f/0x109
  [<c0105077>] init+0x0/0x109
  [<c0106a81>] kernel_thread_helper+0x5/0xb
Console: switching to colour frame buffer device 128x48


Jonathan Brown
http://emergence.uk.net/

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

* Re: Double fb_console_init call during do_initcalls
  2004-02-20 12:12 Double fb_console_init call during do_initcalls Jonathan Brown
@ 2004-02-20 18:38 ` Randy.Dunlap
  2004-02-20 19:21   ` James Simmons
  0 siblings, 1 reply; 4+ messages in thread
From: Randy.Dunlap @ 2004-02-20 18:38 UTC (permalink / raw)
  To: Jonathan Brown; +Cc: linux-kernel, jsimmons

On Fri, 20 Feb 2004 12:12:30 +0000 Jonathan Brown <jbrown@emergence.uk.net> wrote:

| fb_console_init gets called twice during do_initcalls. Should it be 
| called from vty_init or as its own initcall? If it should be its own 
| initcall then can it be moved up the list to occur sooner? I think it 
| looks better if the fb kicks in as early as possible.
| 
| 
|   [<c01d09cc>] take_over_console+0x14a/0x1c9
|   [<c031e4c5>] fb_console_init+0x2b/0x59
|   [<c031cde4>] vty_init+0xc9/0xd3
|   [<c031c5b1>] tty_init+0x234/0x23c
|   [<c0310610>] do_initcalls+0x32/0x80
|   [<c01050a6>] init+0x2f/0x109
|   [<c0105077>] init+0x0/0x109
|   [<c0106a81>] kernel_thread_helper+0x5/0xb
| Console: switching to colour frame buffer device 128x48
| 
| 
|   [<c01d09cc>] take_over_console+0x14a/0x1c9
|   [<c031e4c5>] fb_console_init+0x2b/0x59
|   [<c0310610>] do_initcalls+0x32/0x80
|   [<c01050a6>] init+0x2f/0x109
|   [<c0105077>] init+0x0/0x109
|   [<c0106a81>] kernel_thread_helper+0x5/0xb
| Console: switching to colour frame buffer device 128x48
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Ugh.  fb_console_init() can be called by
drivers/char/vt.c (one initcall) or drivers/video/fbmem.c or
drivers/video/console/fbcon.c (<-- module_init/initcall).

It definitely wants to be cleaned up, but changing initcall
order can be "fragile".  Have you tried/tested it?

Or maybe James Simmons has some updates for this.

--
~Randy

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

* Re: Double fb_console_init call during do_initcalls
  2004-02-20 18:38 ` Randy.Dunlap
@ 2004-02-20 19:21   ` James Simmons
  2004-02-20 23:02     ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: James Simmons @ 2004-02-20 19:21 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Jonathan Brown, linux-kernel


> Ugh.  fb_console_init() can be called by
> drivers/char/vt.c (one initcall) or drivers/video/fbmem.c or
> drivers/video/console/fbcon.c (<-- module_init/initcall).
> 
> It definitely wants to be cleaned up, but changing initcall
> order can be "fragile".  Have you tried/tested it?
> 
> Or maybe James Simmons has some updates for this.

I seen the report and begain to create a patch. The module_init fix is 
easy. Just place module_init and module_exit under #ifdef MODULE. I 
realize alot of fbdev drivers do this wrong. I will make patches by the 
end of the day. As for the fbmem.c call on fb_console_init. Well that is 
tricker to deal with. I will have to figure out a way.



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

* Re: Double fb_console_init call during do_initcalls
  2004-02-20 19:21   ` James Simmons
@ 2004-02-20 23:02     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2004-02-20 23:02 UTC (permalink / raw)
  To: James Simmons; +Cc: Randy.Dunlap, Jonathan Brown, Linux Kernel list


> I seen the report and begain to create a patch. The module_init fix is 
> easy. Just place module_init and module_exit under #ifdef MODULE. I 
> realize alot of fbdev drivers do this wrong. I will make patches by the 
> end of the day. As for the fbmem.c call on fb_console_init. Well that is 
> tricker to deal with. I will have to figure out a way.

You can also use the fb_registered_client static I added and rename
it to fbcon_initialized ;) Dunno if we actually _need_ the second call
to take_over_console at this point, so i left it called twice, but
I needed the static to protect against registering the notifier twice

(That was what was causing the notifier list to get corrupted and
mode changes to lockup in early implementations)

Ben.



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

end of thread, other threads:[~2004-02-20 23:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-20 12:12 Double fb_console_init call during do_initcalls Jonathan Brown
2004-02-20 18:38 ` Randy.Dunlap
2004-02-20 19:21   ` James Simmons
2004-02-20 23:02     ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox