git: 8e0b69973086 - stable/13 - x86: remove unused T_USER flag
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 10 Dec 2021 18:31:41 UTC
The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=8e0b69973086aab8d1009b67c57d141300bfd39e commit 8e0b69973086aab8d1009b67c57d141300bfd39e Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2021-12-05 15:11:55 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2021-12-10 18:31:20 +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 (cherry picked from commit 03b3d7bbec99742910e2d0d5e7c23754eca9b2c4) --- 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 176c770a3731..eb5ab525aa9c 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 549c6de7ba1b..7cb83d839fec 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_ */