Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/allwinner Adjust the VERBOSE_ARM_INIT printfs t...



details:   https://anonhg.NetBSD.org/src/rev/06c3141b3678
branches:  trunk
changeset: 794186:06c3141b3678
user:      matt <matt%NetBSD.org@localhost>
date:      Fri Mar 07 16:38:28 2014 +0000

description:
Adjust the VERBOSE_ARM_INIT printfs to always the status of both cpus and
the number of cpus, regardless of MULTIPROCESSOR.

diffstat:

 sys/arch/arm/allwinner/awin_board.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (44 lines):

diff -r b8e9b0551abd -r 06c3141b3678 sys/arch/arm/allwinner/awin_board.c
--- a/sys/arch/arm/allwinner/awin_board.c       Fri Mar 07 16:36:32 2014 +0000
+++ b/sys/arch/arm/allwinner/awin_board.c       Fri Mar 07 16:38:28 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: awin_board.c,v 1.10 2014/02/26 00:30:56 matt Exp $     */
+/*     $NetBSD: awin_board.c,v 1.11 2014/03/07 16:38:28 matt Exp $     */
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: awin_board.c,v 1.10 2014/02/26 00:30:56 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_board.c,v 1.11 2014/03/07 16:38:28 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -183,7 +183,6 @@
        printf("\n");
 #endif
 
-#ifdef MULTIPROCESSOR
 #ifdef VERBOSE_INIT_ARM
        uint32_t s0 = bus_space_read_4(&awin_bs_tag, awin_core_bsh,
            AWIN_CPUCFG_OFFSET + AWIN_CPUCFG_CPU0_STATUS_REG);
@@ -191,11 +190,16 @@
            AWIN_CPUCFG_OFFSET + AWIN_CPUCFG_CPU1_STATUS_REG);
        printf("%s: cpu status: 0=%#x 1=%#x\n", __func__, s0, s1);
 #endif
+
+#if !defined(MULTIPROCESSOR) && defined(VERBOSE_ARM_INIT)
+       u_int arm_cpu_max;
+#endif
+#if defined(MULTIPROCESSOR) || defined(VERBOSE_ARM_INIT)
        arm_cpu_max = 1 + __SHIFTOUT(armreg_l2ctrl_read(), L2CTRL_NUMCPU);
+#endif
 #ifdef VERBOSE_INIT_ARM
        printf("%s: %d cpus present\n", __func__, arm_cpu_max);
 #endif
-#endif
 }
 
 void



Home | Main Index | Thread Index | Old Index