Subject: Re: mc* performance patch
To: Tim Kelly <hockey@dialectronics.com>
From: Dave Huang <khym@azeotrope.org>
List: port-macppc
Date: 01/14/2005 00:15:05
On Thu, Jan 13, 2005 at 09:38:54PM -0500, Tim Kelly wrote:
> I added the code from the arch/mac68k/dev/if_mc_obio.c file that tested
> this, but there's a problem with the physaccess call. I couldn't find a
> replacement function, and I couldn't tell if this function played a
> role in mapping the memory.

The physaccess() call does the "mark it non-cacheable" part of the
comment. I don't know how to do that for macppc--perhaps it's already
done? The check for contiguousness is done as you say: kvtop() gets
the physical address of the page, and if it's not at the expected
place relative to the physical address of the start of the buffer, it
complains.

Perhaps the driver should be bus_dma-ified, and the call to malloc(9)
replaced with bus_dmamem_alloc(9)?

(I suppose that since mac68k has implemented bus_dma for a couple of
years now, it's about time I fix the "XXX" and do the right thing
there too :)
-- 
Name: Dave Huang         |  Mammal, mammal / their names are called /
INet: khym@azeotrope.org |  they raise a paw / the bat, the cat /
FurryMUCK: Dahan         |  dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 29 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++