Double fb_console_init call during do_initcalls
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/
On Fri, 20 Feb 2004 12:12:30 +0000 Jonathan Brown <[email protected]> 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
Quoted 9 lines
Ugh.
fb_console_init()can be called bydrivers/char/vt.c(one initcall) ordrivers/video/fbmem.cordrivers/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.
Quoted 6 lines
I seen the report and begain to create a patch. The
module_initfix is easy. Just placemodule_initandmodule_exitunder #ifdef MODULE. I realize alot of fbdev drivers do this wrong. I will make patches by the end of the day. As for thefbmem.ccall onfb_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.