Re: [RFC] readX_check() - Interface for PCI-X error recovery

From: Jesse Barnes <>
Date: 2004-04-07 02:15:48
> >     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.

	for_each_pci_resource(dev, res) {


unsigned char readb(unsigned long addr)
	unsigned char val = *(volatile unsigned char *)addr;
	/* try to flush out the MCA by doing something with val */
	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 

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Tue Apr 6 12:23:04 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:25 EST