Module Name:    src
Committed By:   cherry
Date:           Thu Oct 18 04:14:07 UTC 2018

Modified Files:
        src/sys/arch/x86/x86: idt.c

Log Message:
Make compile-time type differentiation more explicit.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/x86/idt.c

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/x86/x86/idt.c
diff -u src/sys/arch/x86/x86/idt.c:1.8 src/sys/arch/x86/x86/idt.c:1.9
--- src/sys/arch/x86/x86/idt.c:1.8	Sun Sep 23 15:28:49 2018
+++ src/sys/arch/x86/x86/idt.c	Thu Oct 18 04:14:07 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: idt.c,v 1.8 2018/09/23 15:28:49 cherry Exp $	*/
+/*	$NetBSD: idt.c,v 1.9 2018/10/18 04:14:07 cherry Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2009 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: idt.c,v 1.8 2018/09/23 15:28:49 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: idt.c,v 1.9 2018/10/18 04:14:07 cherry Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -89,7 +89,7 @@ static char idt_allocmap[NIDT];
 #if defined(XEN)
 
 void
-set_idtgate(idt_descriptor_t *xen_idd, void *function, int ist,
+set_idtgate(struct trap_info *xen_idd, void *function, int ist,
 	    int type, int dpl, int sel)
 {
 	/* 
@@ -120,7 +120,7 @@ set_idtgate(idt_descriptor_t *xen_idd, v
 	 * implicitly part of an idt, which we infer as
 	 * xen_idt_vaddr. (See above).
 	 */
-	xen_idd->vector = xen_idd - (idt_descriptor_t *)xen_idt_vaddr;
+	xen_idd->vector = xen_idd - (struct trap_info *)xen_idt_vaddr;
 
 	/* Back to read-only, as it should be. */
 #if defined(__x86_64__)
@@ -129,7 +129,7 @@ set_idtgate(idt_descriptor_t *xen_idd, v
 	//kpreempt_enable();
 }
 void
-unset_idtgate(idt_descriptor_t *xen_idd)
+unset_idtgate(struct trap_info *xen_idd)
 {
 #if defined(__x86_64__)
 	vaddr_t xen_idt_vaddr = ((vaddr_t) xen_idd) & PAGE_MASK;
@@ -148,12 +148,12 @@ unset_idtgate(idt_descriptor_t *xen_idd)
 }
 #else /* XEN */
 void
-set_idtgate(idt_descriptor_t *idd, void *function, int ist, int type, int dpl, int sel)
+set_idtgate(struct gate_descriptor *idd, void *function, int ist, int type, int dpl, int sel)
 {
 	setgate(idd, function, ist, type, dpl,	sel);
 }
 void
-unset_idtgate(idt_descriptor_t *idd)
+unset_idtgate(struct gate_descriptor *idd)
 {
 	unsetgate(idd);
 }

Reply via email to