Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/arm Make sure AFLT_ENABLE in the cpuctrl mask f...



details:   https://anonhg.NetBSD.org/src/rev/332767f52633
branches:  trunk
changeset: 793589:332767f52633
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Feb 20 14:48:11 2014 +0000

description:
Make sure AFLT_ENABLE in the cpuctrl mask for armv7_setup.

diffstat:

 sys/arch/arm/arm/cpufunc.c |  23 ++++++++---------------
 1 files changed, 8 insertions(+), 15 deletions(-)

diffs (53 lines):

diff -r 53252c14f383 -r 332767f52633 sys/arch/arm/arm/cpufunc.c
--- a/sys/arch/arm/arm/cpufunc.c        Thu Feb 20 14:30:23 2014 +0000
+++ b/sys/arch/arm/arm/cpufunc.c        Thu Feb 20 14:48:11 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpufunc.c,v 1.136 2014/01/23 19:28:47 matt Exp $       */
+/*     $NetBSD: cpufunc.c,v 1.137 2014/02/20 14:48:11 matt Exp $       */
 
 /*
  * arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -49,7 +49,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.136 2014/01/23 19:28:47 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.137 2014/02/20 14:48:11 matt Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_cpuoptions.h"
@@ -3055,20 +3055,13 @@
 #ifdef __ARMEB__
            | CPU_CONTROL_EX_BEND
 #endif
+#ifndef ARM32_DISABLE_ALIGNMENT_FAULTS
+           | CPU_CONTROL_AFLT_ENABLE;
+#endif
            | CPU_CONTROL_UNAL_ENABLE;
 
-#if 0
-       int cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_SYST_ENABLE
-           | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE
-           | CPU_CONTROL_ROM_ENABLE | CPU_CONTROL_BPRD_ENABLE
-           | CPU_CONTROL_BEND_ENABLE | CPU_CONTROL_AFLT_ENABLE
-           | CPU_CONTROL_ROUNDROBIN | CPU_CONTROL_CPCLK;
-#endif
-
-#ifdef ARM32_DISABLE_ALIGNMENT_FAULTS
-#else
-       cpuctrl |= CPU_CONTROL_AFLT_ENABLE;
-#endif
+       int cpuctrlmask = cpuctrl | CPU_CONTROL_AFLT_ENABLE;
+
 
        cpuctrl = parse_cpu_options(args, armv7_options, cpuctrl);
 
@@ -3082,7 +3075,7 @@
 
        /* Set the control register */
        curcpu()->ci_ctrl = cpuctrl;
-       cpu_control(cpuctrl, cpuctrl);
+       cpu_control(cpuctrlmask, cpuctrl);
 }
 #endif /* CPU_CORTEX */
 



Home | Main Index | Thread Index | Old Index