Module Name:    src
Committed By:   cherry
Date:           Tue Dec 25 09:00:26 UTC 2018

Modified Files:
        src/sys/arch/i386/i386: i386_trap.S spl.S
        src/sys/arch/xen/x86: xen_intr.c

Log Message:
fix i386 build - missed sources migration in previous commit.

allow xen_intr.c to build by bringing in static support functions for
-D INTRSTACKSIZE

This should fix the i386 build now.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/i386/i386/i386_trap.S
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/i386/i386/spl.S
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/xen/x86/xen_intr.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/i386/i386/i386_trap.S
diff -u src/sys/arch/i386/i386/i386_trap.S:1.15 src/sys/arch/i386/i386/i386_trap.S:1.16
--- src/sys/arch/i386/i386/i386_trap.S:1.15	Sat Jul 14 14:29:40 2018
+++ src/sys/arch/i386/i386/i386_trap.S	Tue Dec 25 09:00:26 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386_trap.S,v 1.15 2018/07/14 14:29:40 maxv Exp $	*/
+/*	$NetBSD: i386_trap.S,v 1.16 2018/12/25 09:00:26 cherry Exp $	*/
 
 /*
  * Copyright 2002 (c) Wasabi Systems, Inc.
@@ -66,7 +66,7 @@
 
 #if 0
 #include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: i386_trap.S,v 1.15 2018/07/14 14:29:40 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i386_trap.S,v 1.16 2018/12/25 09:00:26 cherry Exp $");
 #endif
 
 /*
@@ -447,12 +447,12 @@ _C_LABEL(trapreturn):	.globl	trapreturn
 	movl	$.Lalltraps_resume,%esi /* address to resume loop at */
 .Lalltraps_resume:
 	movl	%ebx,%eax		/* get cpl */
-	movl	CPUVAR(IUNMASK)(,%eax,4),%eax
-	andl	CPUVAR(IPENDING),%eax	/* any non-masked bits left? */
+	movl	CPUVAR(XUNMASK)(,%eax,4),%eax
+	andl	CPUVAR(XPENDING),%eax	/* any non-masked bits left? */
 	jz	7f
 	bsrl	%eax,%eax
-	btrl	%eax,CPUVAR(IPENDING)
-	movl	CPUVAR(ISOURCES)(,%eax,4),%eax
+	btrl	%eax,CPUVAR(XPENDING)
+	movl	CPUVAR(XSOURCES)(,%eax,4),%eax
 	jmp	*IS_RESUME(%eax)
 7:	movl	%ebx,CPUVAR(ILEVEL)	/* restore cpl */
 	jmp	_C_LABEL(trapreturn)

Index: src/sys/arch/i386/i386/spl.S
diff -u src/sys/arch/i386/i386/spl.S:1.44 src/sys/arch/i386/i386/spl.S:1.45
--- src/sys/arch/i386/i386/spl.S:1.44	Tue Dec 25 06:50:11 2018
+++ src/sys/arch/i386/i386/spl.S	Tue Dec 25 09:00:26 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: spl.S,v 1.44 2018/12/25 06:50:11 cherry Exp $	*/
+/*	$NetBSD: spl.S,v 1.45 2018/12/25 09:00:26 cherry Exp $	*/
 
 /*
  * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: spl.S,v 1.44 2018/12/25 06:50:11 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spl.S,v 1.45 2018/12/25 09:00:26 cherry Exp $");
 
 #include "opt_ddb.h"
 #include "opt_spldebug.h"
@@ -290,12 +290,12 @@ IDTVEC(doreti)
 2:	/* Check for ASTs on exit to user mode. */
 #if	defined(XEN)
 	movl	%ebx,%eax
-	movl	CPUVAR(IUNMASK)(,%eax,4),%eax
-	andl	CPUVAR(IPENDING),%eax
+	movl	CPUVAR(XUNMASK)(,%eax,4),%eax
+	andl	CPUVAR(XPENDING),%eax
 	jz	3f
 	bsrl	%eax,%eax		/* slow, but not worth optimizing */
-	btrl	%eax,CPUVAR(IPENDING)
-	movl	CPUVAR(ISOURCES)(,%eax, 4),%eax
+	btrl	%eax,CPUVAR(XPENDING)
+	movl	CPUVAR(XSOURCES)(,%eax, 4),%eax
 	jmp	*IS_RESUME(%eax)
 #endif
 3:

Index: src/sys/arch/xen/x86/xen_intr.c
diff -u src/sys/arch/xen/x86/xen_intr.c:1.11 src/sys/arch/xen/x86/xen_intr.c:1.12
--- src/sys/arch/xen/x86/xen_intr.c:1.11	Tue Dec 25 06:50:12 2018
+++ src/sys/arch/xen/x86/xen_intr.c	Tue Dec 25 09:00:26 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: xen_intr.c,v 1.11 2018/12/25 06:50:12 cherry Exp $	*/
+/*	$NetBSD: xen_intr.c,v 1.12 2018/12/25 09:00:26 cherry Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xen_intr.c,v 1.11 2018/12/25 06:50:12 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_intr.c,v 1.12 2018/12/25 09:00:26 cherry Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -40,6 +40,8 @@ __KERNEL_RCSID(0, "$NetBSD: xen_intr.c,v
 
 #include <xen/evtchn.h>
 
+#include <uvm/uvm.h>
+
 #include <machine/cpu.h>
 #include <machine/intr.h>
 
@@ -302,6 +304,24 @@ xen_cpu_intr_redistribute(void)
 }
 
 /* MD - called by x86/cpu.c */
+#if defined(INTRSTACKSIZE)
+static inline bool
+redzone_const_or_false(bool x)
+{
+#ifdef DIAGNOSTIC
+	return x;
+#else
+	return false;
+#endif /* !DIAGNOSTIC */
+}
+
+static inline int
+redzone_const_or_zero(int x)
+{
+	return redzone_const_or_false(true) ? x : 0;
+}
+#endif
+
 void
 cpu_intr_init(struct cpu_info *ci)
 {

Reply via email to