Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: evbppc reserved-tlb cleanup



Jachym Holecek wrote:

> # Jachym Holecek 2006-10-31:
> > The patch below changes evbppc to map just 0 upto endkernel to make sure
> > the trap code has everything it could possibly need. Looks OK to commit?
> 
> As Simon noted, this is wrong, we must map console/devices after
> (vaddr_t)roundup(physmem, 16MB) so that pmap_tlbmiss() continues
> to work. Updated patch below, does it look OK this time?

You patch wedged my Walnut pretty much straight away.  I've tracked this
down to:

+       if (ctx != KERNEL_PID || (va < ctob((vaddr_t)physmem))) {

The "va < ctob(...)" should be "va >= ctob(...)".  That said, I think
I'd prefer to commit something like:

        if (ctx != KERNEL_PID || (va >= VM_MIN_KERNEL_ADDRESS)) {

My reasoning is: 

 - There will be never be a kernel VA less than VM_MIN_KERNEL_ADDRESS.

 - This saves a load of the physmem variable and an instruction or two
   of arithmetic in a critical path.

Sound good?  With this change, the rest of your patch (all the evbppc parts)
works.

Cheers,
Simon.



Home | Main Index | Thread Index | Old Index