[parisc-linux] Dino PCI and I/O spaces

Matthew Wilcox Matthew.Wilcox@genedata.com
Mon, 14 Jun 1999 17:37:57 +0200


On Mon, Jun 14, 1999 at 04:21:29PM +0100, Alan Cox wrote:
> > On Mon, Jun 14, 1999 at 04:15:08PM +0100, Alan Cox wrote:
> > > Also as a btw: PCI I/O port access will suck rocks on HP because we have
> > > to grab a lock since it is a two stage operation. That may mean we want
> > > to write smart copy/csum/io and ins* functions for PCI block I/O.
> > 
> > Do we only have to grab a lock on SMP machines, or can we sleep between
> > the two accesses?
> 
> On a uniprocessor we might take an interrupt between the two cycles. So we
> have to suffer anyway

Then we ought to disable interrupts, surely?  Otherwise we can have:

Grab lock
interrupt taken
driver attempts to perform IO, tries to take lock, machine hangs solid.

Or what sort of locking scheme did you have in mind?

-- 
Matthew Wilcox <willy@bofh.ai>
"Windows and MacOS are products, contrived by engineers in the service of
specific companies. Unix, by contrast, is not so much a product as it is a
painstakingly compiled oral history of the hacker subculture." - N Stephenson