public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] I/O MCA recovery
@ 2004-05-04 16:54 Jesse Barnes
  2004-05-04 17:14 ` Grant Grundler
                   ` (32 more replies)
  0 siblings, 33 replies; 34+ messages in thread
From: Jesse Barnes @ 2004-05-04 16:54 UTC (permalink / raw)
  To: linux-ia64

Background: in an effort to allow option ROM emulation on ia64 (via the X 
int10+x86 emulator), I've had to look at doing I/O error recovery since many 
option ROMs expect to do legacy I/O port reads and writes to ports that may 
or may not respond (one particular ROM that I've looked at continuously polls 
a register in legacy I/O space until it returns a value).  On sn2, when a 
device doesn't respond to an I/O (legacy space or otherwise), a PCI master 
abort is generated, which generally causes an MCA.

Recovering from such an event requires reprogramming chipset and bridge 
registers (some to just clear error state and others to re-arm error 
detection) and as such is very platform specific.  Another issue is that the 
MCA event may arrive after the processor has switched to a task completely 
unrelated to the I/O.  The approach I've taken thus far is to register the 
I/O address range that a process mmaps in /proc/bus/pci (in 
pci_mmap_page_range), along with its associated PID.  When an MCA occurs, an 
I/O error recovery routine checks the target identifier value against the 
linked list of I/O ranges and recovers appropriately (the PID is there so 
that we can send a SIGBUS or somesuch in the future).  This allows us to 
avoid calling PAL_MC_DRAIN on every interrupt to try and flush out errors 
(which I'm guessing would be very expensive), but may have other problems.

Ultimately, this involves adding a machine vector for I/O error recovery and a 
linked list of I/O regions and their PIDs.  The I/O error handler could 
optionally be extended to look for any PCI resource range and call a 
per-device error handling callback or shutdown routine.

Thoughts?  Does this approach sound reasonable?

Thanks,
Jesse

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2004-05-13 16:53 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-04 16:54 [RFC] I/O MCA recovery Jesse Barnes
2004-05-04 17:14 ` Grant Grundler
2004-05-04 17:27 ` Jesse Barnes
2004-05-04 17:43 ` David Mosberger
2004-05-04 17:51 ` Grant Grundler
2004-05-04 18:04 ` Jesse Barnes
2004-05-04 18:07 ` Jesse Barnes
2004-05-04 18:20 ` David Mosberger
2004-05-04 22:36 ` Jesse Barnes
2004-05-04 22:50 ` Chris Wedgwood
2004-05-04 22:51 ` David Mosberger
2004-05-04 22:58 ` Jesse Barnes
2004-05-04 23:11 ` Grant Grundler
2004-05-04 23:13 ` David Mosberger
2004-05-04 23:15 ` David Mosberger
2004-05-04 23:17 ` Jesse Barnes
2004-05-04 23:18 ` Grant Grundler
2004-05-04 23:23 ` Alex Williamson
2004-05-04 23:31 ` Grant Grundler
2004-05-04 23:31 ` David Mosberger
2004-05-04 23:36 ` Grant Grundler
2004-05-12 19:03 ` Jesse Barnes
2004-05-12 21:11 ` David Mosberger
2004-05-12 21:24 ` Jesse Barnes
2004-05-12 21:35 ` David Mosberger
2004-05-12 21:44 ` Jesse Barnes
2004-05-12 21:52 ` Jesse Barnes
2004-05-12 21:54 ` David Mosberger
2004-05-12 21:59 ` Jesse Barnes
2004-05-13  9:02 ` Luck, Tony
2004-05-13 15:52 ` Jesse Barnes
2004-05-13 16:07 ` Luck, Tony
2004-05-13 16:43 ` Russ Anderson
2004-05-13 16:53 ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox