Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/pic Add aarch64 support (mostly remapping I32_b...



details:   https://anonhg.NetBSD.org/src/rev/3ab25afb0bf3
branches:  trunk
changeset: 807118:3ab25afb0bf3
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Mar 29 00:31:30 2015 +0000

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

diffstat:

 sys/arch/arm/pic/pic.c          |  10 ++++++++--
 sys/arch/arm/pic/pic_splfuncs.c |  12 +++++++++---
 2 files changed, 17 insertions(+), 5 deletions(-)

diffs (76 lines):

diff -r d679675c0377 -r 3ab25afb0bf3 sys/arch/arm/pic/pic.c
--- a/sys/arch/arm/pic/pic.c    Sat Mar 28 19:29:16 2015 +0000
+++ b/sys/arch/arm/pic/pic.c    Sun Mar 29 00:31:30 2015 +0000
@@ -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 @@
 #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>
diff -r d679675c0377 -r 3ab25afb0bf3 sys/arch/arm/pic/pic_splfuncs.c
--- a/sys/arch/arm/pic/pic_splfuncs.c   Sat Mar 28 19:29:16 2015 +0000
+++ b/sys/arch/arm/pic/pic_splfuncs.c   Sun Mar 29 00:31:30 2015 +0000
@@ -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 @@
 
 #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 @@
                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();
        }



Home | Main Index | Thread Index | Old Index