Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/mips Make this compile with options DEBUG and ...
details: https://anonhg.NetBSD.org/src/rev/b80fe3cb942a
branches: trunk
changeset: 763385:b80fe3cb942a
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Fri Mar 18 15:19:43 2011 +0000
description:
Make this compile with options DEBUG and MIPS1 only config.
diffstat:
sys/arch/mips/mips/mips_fixup.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (43 lines):
diff -r 250f32991667 -r b80fe3cb942a sys/arch/mips/mips/mips_fixup.c
--- a/sys/arch/mips/mips/mips_fixup.c Fri Mar 18 15:18:16 2011 +0000
+++ b/sys/arch/mips/mips/mips_fixup.c Fri Mar 18 15:19:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_fixup.c,v 1.4 2011/02/22 08:18:47 matt Exp $ */
+/* $NetBSD: mips_fixup.c,v 1.5 2011/03/18 15:19:43 tsutsui Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mips_fixup.c,v 1.4 2011/02/22 08:18:47 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_fixup.c,v 1.5 2011/03/18 15:19:43 tsutsui Exp $");
#include "opt_multiprocessor.h"
#include "opt_mips3_wired.h"
@@ -233,7 +233,12 @@
{
#ifdef DEBUG
size_t fixups_done = 0;
- uint32_t cycles = (CPUISMIPS3 ? mips3_cp0_count_read() : 0);
+ uint32_t cycles =
+#if (MIPS3 + MIPS4 + MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2) > 0
+ (CPUISMIPS3 ? mips3_cp0_count_read() : 0);
+#else
+ 0;
+#endif
#endif
extern uint32_t __stub_start[], __stub_end[];
@@ -330,8 +335,10 @@
sizeof(uint32_t [end - start]));
#ifdef DEBUG
+#if (MIPS3 + MIPS4 + MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2) > 0
if (CPUISMIPS3)
cycles = mips3_cp0_count_read() - cycles;
+#endif
printf("%s: %zu fixup%s done in %u cycles\n", __func__,
fixups_done, fixups_done == 1 ? "" : "s",
cycles);
Home |
Main Index |
Thread Index |
Old Index