Module Name: src
Committed By: maxv
Date: Sun Feb 18 14:32:31 UTC 2018
Modified Files:
src/sys/arch/amd64/amd64: amd64_trap.S
Log Message:
Pass the name of the function as argument in SWAPGS_HANDLER.
To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/amd64/amd64/amd64_trap.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/amd64/amd64/amd64_trap.S
diff -u src/sys/arch/amd64/amd64/amd64_trap.S:1.31 src/sys/arch/amd64/amd64/amd64_trap.S:1.32
--- src/sys/arch/amd64/amd64/amd64_trap.S:1.31 Sat Feb 17 21:05:58 2018
+++ src/sys/arch/amd64/amd64/amd64_trap.S Sun Feb 18 14:32:31 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: amd64_trap.S,v 1.31 2018/02/17 21:05:58 maxv Exp $ */
+/* $NetBSD: amd64_trap.S,v 1.32 2018/02/18 14:32:31 maxv Exp $ */
/*
* Copyright (c) 1998, 2007, 2008, 2017 The NetBSD Foundation, Inc.
@@ -312,8 +312,8 @@ IDTVEC_END(\name)
* When such traps happen, we have CPL=0 and %gs=userland, and we must perform
* an additional swapgs to get %gs=kernel.
*/
-.macro SWAPGS_HANDLER
-NENTRY(check_swapgs)
+.macro SWAPGS_HANDLER name
+NENTRY(\name)
INTRENTRY_L(3f,1:)
2:
sti
@@ -345,7 +345,7 @@ NENTRY(check_swapgs)
cmpw $0x8e+050*256,%ax /* Any move to %gs (reg 5) */
jne 2b /* No - normal kernel fault */
jmp 1b /* Yes - restore %gs */
-END(check_swapgs)
+END(\name)
.endm
#endif
@@ -389,7 +389,7 @@ TRAP_ENTRY_POINT trap31,T_RESERVED,1
TRAP_ENTRY_POINT_SPUR intrspurious,T_ASTFLT,1
#ifndef check_swapgs
-SWAPGS_HANDLER
+SWAPGS_HANDLER check_swapgs
#endif
TEXT_USER_END