Module Name: src Committed By: dsl Date: Thu May 17 19:38:54 UTC 2012
Modified Files: src/sys/arch/amd64/include: frameasm.h Log Message: Let the user of INTRENTRY_L() place a label on the 'swapgs' used when faulting from user space. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/amd64/include/frameasm.h 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/include/frameasm.h diff -u src/sys/arch/amd64/include/frameasm.h:1.18 src/sys/arch/amd64/include/frameasm.h:1.19 --- src/sys/arch/amd64/include/frameasm.h:1.18 Mon May 7 21:04:09 2012 +++ src/sys/arch/amd64/include/frameasm.h Thu May 17 19:38:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: frameasm.h,v 1.18 2012/05/07 21:04:09 dsl Exp $ */ +/* $NetBSD: frameasm.h,v 1.19 2012/05/17 19:38:53 dsl Exp $ */ #ifndef _AMD64_MACHINE_FRAMEASM_H #define _AMD64_MACHINE_FRAMEASM_H @@ -73,11 +73,12 @@ movq TF_RBX(%rsp),%rbx ; \ movq TF_RAX(%rsp),%rax -#define INTRENTRY_L(kernel_trap) \ +#define INTRENTRY_L(kernel_trap, usertrap) \ subq $TF_REGSIZE,%rsp ; \ INTR_SAVE_GPRS ; \ testb $SEL_UPL,TF_CS(%rsp) ; \ je kernel_trap ; \ +usertrap ; \ swapgs ; \ movw %gs,TF_GS(%rsp) ; \ movw %fs,TF_FS(%rsp) ; \ @@ -85,7 +86,7 @@ movw %ds,TF_DS(%rsp) #define INTRENTRY \ - INTRENTRY_L(98f) ; \ + INTRENTRY_L(98f,) ; \ 98: #define INTRFASTEXIT \