linux-mips-fnet
[Top] [All Lists]

Re: GNU libc sources

To: linux-mips@fnet.fr
Subject: Re: GNU libc sources
From: Dom Sweetman <dom@algor.co.uk>
Date: Tue, 27 May 1997 07:58:44 +0100 (BST)
In-reply-to: <199705270220.TAA21364@scruz.net>
References: <199705270220.TAA21364@scruz.net>
Elias,

> As far as the SCSI driver it seems that you need both the uncached access 
> space and the cacheflush commands in a few key spots. 

Uncached accesses and correct cache management (writeback and/or
invalidation) are equivalent.  If they act differently there are bugs
in the driver code.

I can guess where one of these might be, so check out the following.

The 53C810 SCSI controller used on your P-4032 board is a very
enthusiastic user of shared memory.  As well as its buffers and buffer
control structures, it uses shared memory to fetch "script" microcode
and to maintain status words.

It's the status word which is most commonly the problem.  Some of the
53Cxx0 drivers in common circulation use a field in a per-controller
software structure to maintain device status.  But the structure also
contains other software-only fields.  If one cache line contains both
the device status word (being updated by the SCSI controller) and
commonly-used software variables then the system will be unreliable,
because the CPU will often see a 'stale' copy of the status word which
got brought into cache as a side-effect of a reference to another
variable.

You'll need to change the driver to make sure that any location
read/written by the SCSI controller is safely fenced away from
software-only fields.

Dominic Sweetman
Algorithmics Ltd
dom@algor.co.uk

<Prev in Thread] Current Thread [Next in Thread>