lkml.org 
[lkml]   [2004]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] readX_check() - Interface for PCI-X error recovery
Date
> >     readX_check(dev,vaddr)
> > Read a register of the device mapped to vaddr, and check errors
> > if possible(This is depending on its architecture. In the case of
> > ia64, we can generate a MCA from an error by simple operation to
> > test the read data.)
> > If any error happen on the recoverable region, set the error flag.
>
> I really don't think we want another readX variant. Do we then also
> add readX_check_relaxed()? Can't we just pretend the MCA is asynchronous
> on ia64? I'm sure we'd get better performance.

Hmm.. I wonder if we could get away with not having a new readX interface by
registering each PCI resource either at driver init time or in arch code with
the MCA hander. Then we could just make the read routines use the variable
that was just read to try to flush out the MCA (there may be better ways to
do this). E.g.

arch_pci_scan()
{
...
for_each_pci_resource(dev, res) {
check_region(res);
}
...
}
...

unsigned char readb(unsigned long addr)
{
unsigned char val = *(volatile unsigned char *)addr;
#ifdef CONFIG_PCI_CHECK
/* try to flush out the MCA by doing something with val */
#endif
return val;
}
...

Then presumably the MCA error handler would see that an MCA occurred in a
region registered during PCI initialization and return an error for
pci_read_errors(dev);

Jesse
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean