On 20.06.2009 2:56 Uhr, ron minnich wrote:
it's more than spinlock.
you must also fix the use of the console_drivers struct. There are several things you need to get right to make this work.
I am not sure I see the point. You're going to make lots of changes and in the end, using cpp magic, have a unified function which acts differently depending on how it's compiled. eek.
The point is to have a single version of a printk like function. Two printk like functions would work nicely, too. But at the moment there's what, 6 implementations times 10 log levels? There's a lot of layers that we don't really need.
It makes the most sense to me to have a RAM printk and a ROM printk which are for different purposes. They already share the most important common piece, which is vtxprintf.
Yes. And a non-CAR printk, which is print, which works in romcc ;)
But if you insist on unifying them you need to read the two parallel functions carefully and I guess do the #ifdef dance.
that was never the discussion. at least from my side. The idea is to drop the macros that look like
#define printk_debug(foo...) do_printk(BIOS_DEBUG, foo)
and replace them by
#define printk(x...) do_printk(x)
and start using printk(BIOS_DEBUG, "%x\n", var); in stage 2 code. That also works nicely for the CAR case.
Just the ROMCC case needs to stay old, but that's fine. It's only there for old and broken architectures that can't do CAR, so it is allowed to look ugly.