git: 03b3d7bbec99 - main - x86: remove unused T_USER flag
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 05 Dec 2021 15:13:23 UTC
The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=03b3d7bbec99742910e2d0d5e7c23754eca9b2c4 commit 03b3d7bbec99742910e2d0d5e7c23754eca9b2c4 Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2021-12-05 15:11:55 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2021-12-05 15:12:40 +0000 x86: remove unused T_USER flag It stopped being used in 3c256f5395aa, when trap() was reorganized to have separate switch statements for user and kernel traps. Remove the two leftover references and the flag itself. Reviewed by: kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D33253 --- sys/amd64/amd64/gdb_machdep.c | 2 +- sys/i386/i386/gdb_machdep.c | 2 +- sys/x86/include/trap.h | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/amd64/amd64/gdb_machdep.c b/sys/amd64/amd64/gdb_machdep.c index b5acce216fe6..02b76a35d7ae 100644 --- a/sys/amd64/amd64/gdb_machdep.c +++ b/sys/amd64/amd64/gdb_machdep.c @@ -136,7 +136,7 @@ int gdb_cpu_signal(int type, int code) { - switch (type & ~T_USER) { + switch (type) { case T_BPTFLT: return (SIGTRAP); case T_ARITHTRAP: return (SIGFPE); case T_PROTFLT: return (SIGSEGV); diff --git a/sys/i386/i386/gdb_machdep.c b/sys/i386/i386/gdb_machdep.c index 766f38f181f8..7523787da536 100644 --- a/sys/i386/i386/gdb_machdep.c +++ b/sys/i386/i386/gdb_machdep.c @@ -100,7 +100,7 @@ int gdb_cpu_signal(int type, int code) { - switch (type & ~T_USER) { + switch (type) { case T_BPTFLT: return (SIGTRAP); case T_ARITHTRAP: return (SIGFPE); case T_PROTFLT: return (SIGSEGV); diff --git a/sys/x86/include/trap.h b/sys/x86/include/trap.h index 74c4522c02a8..c31e454cd05f 100644 --- a/sys/x86/include/trap.h +++ b/sys/x86/include/trap.h @@ -66,7 +66,4 @@ #define T_RESERVED 30 /* reserved (unknown) */ #define T_DTRACE_RET 32 /* DTrace pid return */ -/* Trap's coming from user mode */ -#define T_USER 0x100 - #endif /* !_MACHINE_TRAP_H_ */