From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Date: Tue, 06 Apr 2004 11:51:45 +0000 Subject: Re: [RFC] readX_check() - Interface for PCI-X error recovery Message-Id: <20040406115145.GA23258@parcelfarce.linux.theplanet.co.uk> List-Id: References: <0HVQ0051BXG19H@fjmail506.fjmail.jp.fujitsu.com> In-Reply-To: <0HVQ0051BXG19H@fjmail506.fjmail.jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Hidetoshi Seto Cc: Linux Kernel mailing list , Linux IA64 Mailing List , Hironobu Ishii On Tue, Apr 06, 2004 at 08:04:49PM +0900, Hidetoshi Seto wrote: > - Resources newly required: > > on struct device: > error flag > list of recoverable physical address regions Can't you just use the pci_dev->resource regions for this? > pointer to host bridge of the device Again, there's already ways of getting to this from the pci_dev. Simply wander up through pdev->bus->self until you get to a self that is NULL and you've found a root bus. Alternatively, you might just look at PCI_CONTROLLER() on ia64. > on per_cpu: > list of currently checking devices > > > - Interfaces newly required: > > clear_pcix_errors(dev) > Clear the error flag of the dev, and start to check the device. > This also clears the status register of its host bridge. For consistency, how about naming these functions pci_clear_errors() and pci_check_errors()? PCI-Express has similar error-checking abilities and I'd hate to see two extremely similar capabilities at war with each other over unacceoptable names ;-) > 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. -- "Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain