Module Name:    src
Committed By:   matt
Date:           Sun Mar 29 00:31:30 UTC 2015

Modified Files:
        src/sys/arch/arm/pic: pic.c pic_splfuncs.c

Log Message:
Add aarch64 support (mostly remapping I32_bit and F32_bit onto aarch64 bits).


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/pic/pic.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/pic/pic_splfuncs.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/arm/pic/pic.c
diff -u src/sys/arch/arm/pic/pic.c:1.25 src/sys/arch/arm/pic/pic.c:1.26
--- src/sys/arch/arm/pic/pic.c:1.25	Sat Nov  8 17:09:38 2014
+++ src/sys/arch/arm/pic/pic.c	Sun Mar 29 00:31:30 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic.c,v 1.25 2014/11/08 17:09:38 skrll Exp $	*/
+/*	$NetBSD: pic.c,v 1.26 2015/03/29 00:31:30 matt Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -33,7 +33,7 @@
 #include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.25 2014/11/08 17:09:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.26 2015/03/29 00:31:30 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -45,8 +45,14 @@ __KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.25
 #include <sys/xcall.h>
 #include <sys/ipi.h>
 
+#if defined(__arm__)
 #include <arm/armreg.h>
 #include <arm/cpufunc.h>
+#elif defined(__aarch64__)
+#include <aarch64/locore.h>
+#define I32_bit		DAIF_I
+#define F32_bit		DAIF_F
+#endif
 
 #ifdef DDB
 #include <arm/db_machdep.h>

Index: src/sys/arch/arm/pic/pic_splfuncs.c
diff -u src/sys/arch/arm/pic/pic_splfuncs.c:1.5 src/sys/arch/arm/pic/pic_splfuncs.c:1.6
--- src/sys/arch/arm/pic/pic_splfuncs.c:1.5	Wed Apr 16 22:44:42 2014
+++ src/sys/arch/arm/pic/pic_splfuncs.c	Sun Mar 29 00:31:30 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic_splfuncs.c,v 1.5 2014/04/16 22:44:42 matt Exp $	*/
+/*	$NetBSD: pic_splfuncs.c,v 1.6 2015/03/29 00:31:30 matt Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -28,7 +28,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pic_splfuncs.c,v 1.5 2014/04/16 22:44:42 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic_splfuncs.c,v 1.6 2015/03/29 00:31:30 matt Exp $");
 
 #define _INTR_PRIVATE
 #include <sys/param.h>
@@ -38,9 +38,15 @@ __KERNEL_RCSID(0, "$NetBSD: pic_splfuncs
 
 #include <dev/cons.h>
 
+#if defined(__arm__)
 #include <arm/armreg.h>
 #include <arm/cpu.h>
 #include <arm/cpufunc.h>
+#elif defined(__aarch64__)
+#include <aarch64/locore.h>
+#define I32_bit		DAIF_I
+#define F32_bit		DAIF_F
+#endif
 
 #include <arm/pic/picvar.h>
 
@@ -67,7 +73,7 @@ _spllower(int newipl)
 		ci->ci_intr_depth++;
 		pic_do_pending_ints(psw, newipl, NULL);
 		ci->ci_intr_depth--;
-		if ((psw & I32_bit) == 0)
+		if ((psw & I32_bit) == 0 || newipl == IPL_NONE)
 			cpsie(I32_bit);
 		cpu_dosoftints();
 	}

Reply via email to