[kdb] [PATCH, RFC] merge i386 and x86_64 kdb arch code
Christoph Hellwig
hch at infradead.org
Mon Jan 5 16:54:16 CST 2009
On Tue, Jan 06, 2009 at 09:44:35AM +1100, Keith Owens wrote:
> AFAICR when Andi Kleen was adding AMD64 support to Linux, he defined
> some die notifiers for AMD64. At the time those die notifiers were not
> in i386. I took advantage of the notifier to simplify kdb for AMD64.
>
> There is no reason not to use the i386 die notifiers now, as long as
> the semantics are the same. At one stage i386 and x86_64 used the same
> notifier names but with slightly different meanings.
The die notifier implementation now lives in kernel/notifier.c and
is shared by all platforms. The actual notifier values used by kdb
are:
- DIE_NMI_IPI: implemented by x86
- DIE_OOPS: implemented by most (all?) architectures
- DIE_CALL: not implemented by any architecture, define by a few
- DIE_DEBUG: implemented by x86
- DIE_NMIWATCHDOG: implemented by x86, defined but not implemented by
s390
- DIE_INT3: implemented by x86 only if CONFIG_KPROBES is set
all the x86 implementations are in code shared by 32bit and 64bit mode.
Note that some code is rather weird now, e.g. the x86 do_debug directly
calling into kdb and in the next line calling into it through DIE_DEBUG
with both of them happening for 32 and 64 bits.
More information about the kdb
mailing list