Wrong looking statement in cpm_common.c

Scott Wood scottwood at freescale.com
Wed May 27 08:38:56 EST 2009


Benjamin Herrenschmidt wrote:
> On Tue, 2009-05-26 at 17:15 -0500, Scott Wood wrote:
>> Benjamin Herrenschmidt wrote:
>>> On Tue, 2009-05-26 at 12:56 -0500, Scott Wood wrote:
>>>> Any suggestions for how to do it properly?
>>> ioremap ? :-)
>> Does ioremap work that early?
> 
> It works very early on ppc32 but maybe not -that- early... It works from
> start_kernel on. You might be able to do the ioremaps in machine_init
> (provided LMBs are up) but they won't be "effective" until MMU_init
> returns, but then, neither will setbat anyway.

Before the setbat takes effect, there is a BAT established by 
setup_cpm_bat in head_32.S.

How about something similar to btext_unmap to tell cpm2 udbg that the 
mapping is gone, and to do ioremap at that point (or perhaps it would be 
better to wait until the next print after unmap is called, which should 
be after load_up_mmu assuming nothing crashes in the assembly code)?

-Scott



More information about the Linuxppc-dev mailing list