linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@debian.org>
To: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Linux Kernel mailing list <linux-kernel@vger.kernel.org>,
	Linux IA64 Mailing List <linux-ia64@vger.kernel.org>,
	Hironobu Ishii <ishii.hironobu@jp.fujitsu.com>
Subject: Re: [RFC] readX_check() - Interface for PCI-X error recovery
Date: Tue, 6 Apr 2004 12:51:45 +0100	[thread overview]
Message-ID: <20040406115145.GA23258@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <0HVQ0051BXG19H@fjmail506.fjmail.jp.fujitsu.com>

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

  reply	other threads:[~2004-04-06 11:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-06 11:04 [RFC] readX_check() - Interface for PCI-X error recovery Hidetoshi Seto
2004-04-06 11:51 ` Matthew Wilcox [this message]
2004-04-06 16:15   ` Jesse Barnes
2004-04-07  9:34   ` Hidetoshi Seto
2004-04-07  2:08 ` Grant Grundler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040406115145.GA23258@parcelfarce.linux.theplanet.co.uk \
    --to=willy@debian.org \
    --cc=ishii.hironobu@jp.fujitsu.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seto.hidetoshi@jp.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).