Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm apply some #if (ARM_MMU_V6 + ARM_MMU_V7) != 0.
details: https://anonhg.NetBSD.org/src/rev/3feb2e766335
branches: trunk
changeset: 346508:3feb2e766335
user: mrg <mrg%NetBSD.org@localhost>
date: Sat Jul 16 01:49:42 2016 +0000
description:
apply some #if (ARM_MMU_V6 + ARM_MMU_V7) != 0.
now this builds on pre v6-only.
diffstat:
sys/arch/arm/arm32/arm32_machdep.c | 10 ++++++++--
sys/arch/arm/include/cpufunc.h | 2 ++
2 files changed, 10 insertions(+), 2 deletions(-)
diffs (45 lines):
diff -r 90f4ae5fa910 -r 3feb2e766335 sys/arch/arm/arm32/arm32_machdep.c
--- a/sys/arch/arm/arm32/arm32_machdep.c Fri Jul 15 22:10:47 2016 +0000
+++ b/sys/arch/arm/arm32/arm32_machdep.c Sat Jul 16 01:49:42 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arm32_machdep.c,v 1.111 2016/07/15 05:59:46 skrll Exp $ */
+/* $NetBSD: arm32_machdep.c,v 1.112 2016/07/16 01:49:42 mrg Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.111 2016/07/15 05:59:46 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.112 2016/07/16 01:49:42 mrg Exp $");
#include "opt_modular.h"
#include "opt_md.h"
@@ -750,7 +750,13 @@
bool
mm_md_page_color(paddr_t pa, int *colorp)
{
+#if (ARM_MMU_V6 + ARM_MMU_V7) != 0
*colorp = atop(pa & arm_cache_prefer_mask);
return arm_cache_prefer_mask ? false : true;
+#else
+ *colorp = 0;
+
+ return true;
+#endif
}
diff -r 90f4ae5fa910 -r 3feb2e766335 sys/arch/arm/include/cpufunc.h
--- a/sys/arch/arm/include/cpufunc.h Fri Jul 15 22:10:47 2016 +0000
+++ b/sys/arch/arm/include/cpufunc.h Sat Jul 16 01:49:42 2016 +0000
@@ -419,7 +419,9 @@
uint8_t dcache_type;
};
+#if (ARM_MMU_V6 + ARM_MMU_V7) != 0
extern u_int arm_cache_prefer_mask;
+#endif
extern u_int arm_dcache_align;
extern u_int arm_dcache_align_mask;
Home |
Main Index |
Thread Index |
Old Index