Module Name: src
Committed By: matt
Date: Thu Feb 20 14:48:11 UTC 2014
Modified Files:
src/sys/arch/arm/arm: cpufunc.c
Log Message:
Make sure AFLT_ENABLE in the cpuctrl mask for armv7_setup.
To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/sys/arch/arm/arm/cpufunc.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/arm/cpufunc.c
diff -u src/sys/arch/arm/arm/cpufunc.c:1.136 src/sys/arch/arm/arm/cpufunc.c:1.137
--- src/sys/arch/arm/arm/cpufunc.c:1.136 Thu Jan 23 19:28:47 2014
+++ src/sys/arch/arm/arm/cpufunc.c Thu Feb 20 14:48:11 2014
@@ -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 @@ armv7_setup(char *args)
#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
+ int cpuctrlmask = cpuctrl | CPU_CONTROL_AFLT_ENABLE;
-#ifdef ARM32_DISABLE_ALIGNMENT_FAULTS
-#else
- cpuctrl |= CPU_CONTROL_AFLT_ENABLE;
-#endif
cpuctrl = parse_cpu_options(args, armv7_options, cpuctrl);
@@ -3082,7 +3075,7 @@ armv7_setup(char *args)
/* Set the control register */
curcpu()->ci_ctrl = cpuctrl;
- cpu_control(cpuctrl, cpuctrl);
+ cpu_control(cpuctrlmask, cpuctrl);
}
#endif /* CPU_CORTEX */