x86: Use enum instead of literals for trap values [PARTIAL]
commitb6d3beb65f210873ef9a64a9fd204796e122da7c
authorKees Cook <keescook@chromium.org>
Thu, 24 Jan 2013 20:14:20 +0000 (24 14:14 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Jan 2013 04:46:29 +0000 (27 20:46 -0800)
tree75110cbd48fa7be919f269ab089dc7ab5f048973
parentd87f5a89f5e2d2ce9e3c1b21bd2debe2130cbc90
x86: Use enum instead of literals for trap values [PARTIAL]

[Based on commit c94082656dac74257f63e91f78d5d458ac781fa5 upstream, only
taking the traps.h portion.]

The traps are referred to by their numbers and it can be difficult to
understand them while reading the code without context. This patch adds
enumeration of the trap numbers and replaces the numbers with the correct
enum for x86.

Signed-off-by: Kees Cook <keescook@chromium.org>
Link: http://lkml.kernel.org/r/20120310000710.GA32667@www.outflux.net
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/traps.h