tech-kern archive

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

Re: Am I using bus_dma right?



Okay, I've tried some experiments.

Nothing seems to help. :(  In the latest version, I (a) made all the
PRE calls to bus_dmamap_sync use both PREREAD and PREWRITE, and all the
POST calls use both POSTREAD and POSTWRITE (by my reading of the amd64
implementation, this should not make any difference) and (b) added a
clflush of every written location after writing it, plus an mfence (one
mfence after each store or series of stores).

Still doesn't work.

I've made the latest version of the driver available in case anyone
wants to look at it.  It's on ftp.rodents-montreal.org, as before, in
/mouse/misc/7300/2020-04-28-1/7300a.c, 7300a.h, and 7300a-reg.h (the
other version I've moved into .../misc/7300/2020-04-23-1/).

Priorities have changed at work and I'm now on a different subtask of
this job.  I expect to be back on this one before long, though; I'm
going to be trying to rewrite the driver to use bus-dma more the way
most drivers do, in the hope that that works better (I _think_ I can
compensate for the differences in userland).  What I'm trying to do
here is admittedly an unusual sort of thing; the only thing like it I
can think of in a stock system is the way some audio devices support an
mmap()ped ring buffer, and the audio system is Byzantine enough I'm
having trouble finding where it deals with these issues - I don't find
any BUS_DMASYNC_ references at all, so I'm probably missing something.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index