* [RFC] Machine check handling
@ 2004-08-18 13:16 Adrian Cox
0 siblings, 0 replies; only message in thread
From: Adrian Cox @ 2004-08-18 13:16 UTC (permalink / raw)
To: linuxppc-dev
The current handling of machine check in Linux 2.6 on the PowerPC has
some problems. If the processor was in user_mode, the handler returns a
SIGBUS even if the machine check cause was a hardware fault such as an
internal cache parity error or ECC memory failure. This is quite
different to the handling of machine checks from hardware faults on
i386.
I propose restructuring the machine check handling as follows:
1) On entry to the machine handler, call a CPU specific handler to tell
us whether the cause was internal or external.
1a) If internal, log the fault and either panic or return.
2) If the cause was external, call a platform specific handler to tell
us whether the cause can be associated with a process.
2a) If yes (such as the I/O code for PowerMac), handle as current
(SIGBUS, drop to debugger, etc.).
2b) If no, log the fault and either panic or return.
In the absence of specific handlers, the code would assume that the
machine check was external to the processor and the result of process
actions. This should leave the current behaviour intact on machines
which use it for PCI probing, while on machines with genuine hardware
faults the mysterious SIGBUS arrivals will be replaced with clear log
messages.
For part 1 I'm thinking of an extra function pointer in struct cpu_spec,
and for part 2 an extra function pointer in ppc_md. I'd like to know if
anyone has any strong opinions on this before I update my old Linux 2.4
patch:
http://www.humboldt.co.uk/Downloads/PowerPC/mcheck-1.156.html
- Adrian Cox
Humboldt Solutions Ltd.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-08-18 13:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-18 13:16 [RFC] Machine check handling Adrian Cox
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).