Re: [RFC] arm: Defer lookup of machine_type and vet of atags to setup.c

From: Nicolas Pitre
Date: Wed Jan 12 2011 - 11:53:45 EST


On Wed, 12 Jan 2011, Grant Likely wrote:

> Actually it looks like the real problem is that the mmu has been
> turned on, but the virtual mappings for devices have not yet been
> established, and so the debug macros aren't using a valid address.

A temporary virtual mapping should be there -- look for addruart in
head.S.

> I'm using printk to get output into the ring buffer in my patch to
> rework lookup_machine_type() in C, and that does indeed output to the
> ring buffer, but the kernel cannot spit stuff out the serial port.
>
> It looks like I'd need to get past paging_init() in order to get
> ll_debug working between turning on the mmu and paging_init(), but
> paging_init() needs the mdesc pointer, and the whole point of the
> error message is that the mdesc pointer is unknown! I don't see any
> code that sets up a debug mapping of the uart before paging_init time.

See above.

> I could try to implement something like that, but it is looking to be
> more complicated than it is worth when the current code works just
> fine.

My bet is that there is a bug with the current code that you are
exposing.

> Let me know if I've missed something, but I think I should drop the
> removal of __lookup_machine_type from head.S from my patch.

It's not the location of that code which is a problem. Even if you
leave that code in place, you want to call it later and I bet that the
display would be broken even if __lookup_machine_type doesn't move.


Nicolas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/