public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] How drivers notice a MCA on I/O read? [1/3]
@ 2003-11-18 10:11 Hidetoshi Seto
  2003-11-18 10:12 ` [RFC] How drivers notice a MCA on I/O read? [2/3] Hidetoshi Seto
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Hidetoshi Seto @ 2003-11-18 10:11 UTC (permalink / raw)
  To: linux-ia64

Hi all, 

Assuming that Linux uses privilege level to determine action on MCA between
kill the thread and down the system, if driver encounters MCA caused by I/O
read, Linux should be down since privilege level of driver is kernel, not user.
I want to convey the error to the offending driver, and want to enable the
driver to retry failed read.

So, I think about a readb_check function that has checking ability enable
it return error value if MCA occur on read.
Drivers could use readb_check instead of usual readb, and could diagnosis
whether a retry be required or not, by the return value of readb_check.

To realize this, I consider following two plans:

 - readb_check on driver (with Notifier)
    Outline:
    - Platform specific MCA handler has a Notifier as hook point.
    - Driver may register a hook function to the Notifier.
    - Notifier calls over registered functions when MCA is signaled.
    - Called hook function checks address of error, and if the error seems
      to be concerned with the parent driver, ups internal error flag and
      stops Notifier by returning OK.
    - MCA handler regards state of Notifier, and decides the system to
      resume or not.
    - Restarted driver may refer the error flag after read, and may retry
      the read if flag is up.
    Feature:
    - Generic kernel is not changed.
    - Require a platform specific MCA handler.
    - Service is available for platform specific drivers.

 -readb_check on kernel
    Outline:
    - Kernel has readb_check function.
    - Drivers may use readb_check instead of usual readb.
    - MCA handler checks address of error, and if it occurs in readb_check,
      changes return value of readb_check and resumes interrupted context.
    - Driver may refer the return value to notice MCA in last read procedure.
    Feature:
    - Generic kernel requires new codes.
    - Require some codes in generic MCA procedure.
    - Service is available for all drivers.

Which one is better?
IMO, this is a general-purpose function that should be available on many
IA64 platforms (maybe not only IA64), and there is no need to equip
homogenous codes for each platform.
To simplify coding in driver, one on kernel looks good.


Best regards

------

H.Seto <seto.hidetoshi@jp.fujitsu.com>


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

end of thread, other threads:[~2003-11-25  9:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-18 10:11 [RFC] How drivers notice a MCA on I/O read? [1/3] Hidetoshi Seto
2003-11-18 10:12 ` [RFC] How drivers notice a MCA on I/O read? [2/3] Hidetoshi Seto
2003-11-18 10:14 ` [RFC] How drivers notice a MCA on I/O read? [3/3] Hidetoshi Seto
2003-11-18 15:06 ` [RFC] How drivers notice a MCA on I/O read? [1/3] Zoltan Menyhart
2003-11-18 17:10 ` Jesse Barnes
2003-11-18 17:47 ` Luck, Tony
2003-11-19 16:45 ` Grant Grundler
2003-11-25  9:27 ` Hidetoshi Seto

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