Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/vax Fixes to make GENERIC.MP build again. Several ...



details:   https://anonhg.NetBSD.org/src/rev/6906fa8c635e
branches:  trunk
changeset: 583154:6906fa8c635e
user:      he <he%NetBSD.org@localhost>
date:      Wed Jul 20 17:48:17 2005 +0000

description:
Fixes to make GENERIC.MP build again.  Several changes:
 o Rename global variable "tramp" to "vax_mp_tramp" to avoid warning
   with -Wshadow when compiling the signal code.
 o Rename a macro-local variable _s to __s in __cpu_simple_lock()
   to avoid -Wshadow warning when MALLOC() is used (also declares _s).
 o Follow up -Wcast-qual by making a number of function arguments const char*
   where string literals are used.

diffstat:

 sys/arch/vax/include/cpu.h    |   4 ++--
 sys/arch/vax/include/lock.h   |  14 +++++++-------
 sys/arch/vax/vax/db_machdep.c |   6 +++---
 sys/arch/vax/vax/ka6400.c     |  14 +++++++-------
 sys/arch/vax/vax/ka820.c      |  14 +++++++-------
 sys/arch/vax/vax/ka88.c       |  14 +++++++-------
 sys/arch/vax/vax/subr.S       |   6 +++---
 7 files changed, 36 insertions(+), 36 deletions(-)

diffs (276 lines):

diff -r 0e8fc432e759 -r 6906fa8c635e sys/arch/vax/include/cpu.h
--- a/sys/arch/vax/include/cpu.h        Wed Jul 20 17:38:13 2005 +0000
+++ b/sys/arch/vax/include/cpu.h        Wed Jul 20 17:48:17 2005 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: cpu.h,v 1.70 2004/09/22 11:32:03 yamt Exp $      */
+/*      $NetBSD: cpu.h,v 1.71 2005/07/20 17:48:17 he Exp $      */
 
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden
@@ -183,7 +183,7 @@
                                        ci = SIMPLEQ_NEXT(ci, ci_next)
 
 extern SIMPLEQ_HEAD(cpu_info_qh, cpu_info) cpus;
-extern char tramp;
+extern char vax_mp_tramp;
 #endif
 
 /*
diff -r 0e8fc432e759 -r 6906fa8c635e sys/arch/vax/include/lock.h
--- a/sys/arch/vax/include/lock.h       Wed Jul 20 17:38:13 2005 +0000
+++ b/sys/arch/vax/include/lock.h       Wed Jul 20 17:48:17 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lock.h,v 1.16 2004/05/19 23:15:43 he Exp $     */
+/*     $NetBSD: lock.h,v 1.17 2005/07/20 17:48:17 he Exp $     */
 
 /*
  * Copyright (c) 2000 Ludd, University of Lule}, Sweden.
@@ -84,12 +84,12 @@
        struct cpu_info *__ci = curcpu();                               \
                                                                        \
        while (__cpu_simple_lock_try(alp) == 0) {                       \
-               int __s;                                                \
+               int ___s;                                               \
                                                                        \
                if (__ci->ci_ipimsgs & VAX_LOCK_CHECKS) {               \
-                       __s = splipi();                                 \
+                       ___s = splipi();                                \
                        cpu_handle_ipi();                               \
-                       splx(__s);                                      \
+                       splx(___s);                                     \
                }                                                       \
        }                                                               \
 } while (0)
@@ -163,14 +163,14 @@
 #define SPINLOCK_SPIN_HOOK                                             \
 do {                                                                   \
        struct cpu_info *__ci = curcpu();                               \
-       int __s;                                                        \
+       int ___s;                                                       \
                                                                        \
        if (__ci->ci_ipimsgs != 0) {                                    \
                /* printf("CPU %lu has IPIs pending\n",                 \
                    __ci->ci_cpuid); */                                 \
-               __s = splipi();                                         \
+               ___s = splipi();                                        \
                cpu_handle_ipi();                                       \
-               splx(__s);                                              \
+               splx(___s);                                             \
        }                                                               \
 } while (0)
 #endif /* MULTIPROCESSOR */
diff -r 0e8fc432e759 -r 6906fa8c635e sys/arch/vax/vax/db_machdep.c
--- a/sys/arch/vax/vax/db_machdep.c     Wed Jul 20 17:38:13 2005 +0000
+++ b/sys/arch/vax/vax/db_machdep.c     Wed Jul 20 17:48:17 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_machdep.c,v 1.39 2005/06/27 11:03:25 ragge Exp $    */
+/*     $NetBSD: db_machdep.c,v 1.40 2005/07/20 17:48:17 he Exp $       */
 
 /* 
  * :set tabs=4
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.39 2005/06/27 11:03:25 ragge Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.40 2005/07/20 17:48:17 he Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -630,7 +630,7 @@
 #ifdef MULTIPROCESSOR
 
 static void
-db_mach_cpu(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
+db_mach_cpu(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
 {
        struct cpu_mp_softc *sc;
        struct cpu_info *ci;
diff -r 0e8fc432e759 -r 6906fa8c635e sys/arch/vax/vax/ka6400.c
--- a/sys/arch/vax/vax/ka6400.c Wed Jul 20 17:38:13 2005 +0000
+++ b/sys/arch/vax/vax/ka6400.c Wed Jul 20 17:48:17 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ka6400.c,v 1.5 2003/07/15 02:15:04 lukem Exp $ */
+/*     $NetBSD: ka6400.c,v 1.6 2005/07/20 17:48:17 he Exp $    */
 
 /*
  * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ka6400.c,v 1.5 2003/07/15 02:15:04 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ka6400.c,v 1.6 2005/07/20 17:48:17 he Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -79,8 +79,8 @@
 static void ka6400_steal_pages(void);
 #if defined(MULTIPROCESSOR)
 static void ka6400_startslave(struct device *, struct cpu_info *);
-static void ka6400_txrx(int, char *, int);
-static void ka6400_sendstr(int, char *);
+static void ka6400_txrx(int, const char *, int);
+static void ka6400_sendstr(int, const char *);
 static void ka6400_sergeant(int);
 static int rxchar(void);
 static void ka6400_putc(int);
@@ -353,7 +353,7 @@
        ka6400_txrx(id, "D/I 10 %x\r", (int)ci->ci_pcb);        /* PCB for idle proc */
        ka6400_txrx(id, "D/I 11 %x\r", mfpr(PR_SCBB));  /* SCB */
        ka6400_txrx(id, "D/I 38 %x\r", mfpr(PR_MAPEN)); /* Enable MM */
-       ka6400_txrx(id, "S %x\r", (int)&tramp); /* Start! */
+       ka6400_txrx(id, "S %x\r", (int)&vax_mp_tramp); /* Start! */
        expect = 0;
        for (i = 0; i < 10000; i++)
                if ((volatile)ci->ci_flags & CI_RUNNING)
@@ -364,7 +364,7 @@
 }
 
 void
-ka6400_txrx(int id, char *fmt, int arg)
+ka6400_txrx(int id, const char *fmt, int arg)
 {
        char buf[20];
 
@@ -374,7 +374,7 @@
 }
 
 void
-ka6400_sendstr(int id, char *buf)
+ka6400_sendstr(int id, const char *buf)
 {
        register u_int utchr; /* Ends up in R11 with PCC */
        int ch, i;
diff -r 0e8fc432e759 -r 6906fa8c635e sys/arch/vax/vax/ka820.c
--- a/sys/arch/vax/vax/ka820.c  Wed Jul 20 17:38:13 2005 +0000
+++ b/sys/arch/vax/vax/ka820.c  Wed Jul 20 17:48:17 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ka820.c,v 1.41 2005/06/27 11:03:25 ragge Exp $ */
+/*     $NetBSD: ka820.c,v 1.42 2005/07/20 17:48:17 he Exp $    */
 /*
  * Copyright (c) 1988 Regents of the University of California.
  * All rights reserved.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ka820.c,v 1.41 2005/06/27 11:03:25 ragge Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ka820.c,v 1.42 2005/07/20 17:48:17 he Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -90,8 +90,8 @@
 #if defined(MULTIPROCESSOR)
 static void ka820_startslave(struct device *, struct cpu_info *);
 static void ka820_send_ipi(struct device *);
-static void ka820_txrx(int, char *, int);
-static void ka820_sendstr(int, char *);
+static void ka820_txrx(int, const char *, int);
+static void ka820_sendstr(int, const char *);
 static void ka820_sergeant(int);
 static int rxchar(void);
 static void ka820_putc(int);
@@ -563,7 +563,7 @@
        ka820_txrx(id, "D/I 10 %x\r", (int)ci->ci_pcb); /* PCB for idle proc */
        ka820_txrx(id, "D/I 11 %x\r", mfpr(PR_SCBB));   /* SCB */
        ka820_txrx(id, "D/I 38 %x\r", mfpr(PR_MAPEN));  /* Enable MM */
-       ka820_txrx(id, "S %x\r", (int)&tramp);  /* Start! */
+       ka820_txrx(id, "S %x\r", (int)&vax_mp_tramp);   /* Start! */
        expect = 0;
        for (i = 0; i < 10000; i++)
                if ((volatile int)ci->ci_flags & CI_RUNNING)
@@ -574,7 +574,7 @@
 }
 
 void
-ka820_txrx(int id, char *fmt, int arg)
+ka820_txrx(int id, const char *fmt, int arg)
 {
        char buf[20];
 
@@ -594,7 +594,7 @@
 }
 
 void
-ka820_sendstr(int id, char *buf)
+ka820_sendstr(int id, const char *buf)
 {
        u_int utchr;
        int ch, i;
diff -r 0e8fc432e759 -r 6906fa8c635e sys/arch/vax/vax/ka88.c
--- a/sys/arch/vax/vax/ka88.c   Wed Jul 20 17:38:13 2005 +0000
+++ b/sys/arch/vax/vax/ka88.c   Wed Jul 20 17:48:17 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ka88.c,v 1.6 2003/07/15 02:15:04 lukem Exp $   */
+/*     $NetBSD: ka88.c,v 1.7 2005/07/20 17:48:17 he Exp $      */
 
 /*
  * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ka88.c,v 1.6 2003/07/15 02:15:04 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ka88.c,v 1.7 2005/07/20 17:48:17 he Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -74,8 +74,8 @@
 static void ka88_badaddr(void);
 #if defined(MULTIPROCESSOR)
 static void ka88_startslave(struct device *, struct cpu_info *);
-static void ka88_txrx(int, char *, int);
-static void ka88_sendstr(int, char *);
+static void ka88_txrx(int, const char *, int);
+static void ka88_sendstr(int, const char *);
 static void ka88_sergeant(int);
 static int rxchar(void);
 static void ka88_putc(int);
@@ -376,7 +376,7 @@
        ka88_txrx(id, "D/I 10 %x\r", (int)ci->ci_pcb);  /* PCB for idle proc */
        ka88_txrx(id, "D/I 11 %x\r", mfpr(PR_SCBB));    /* SCB */
        ka88_txrx(id, "D/I 38 %x\r", mfpr(PR_MAPEN)); /* Enable MM */
-       ka88_txrx(id, "S %x\r", (int)&tramp); /* Start! */
+       ka88_txrx(id, "S %x\r", (int)&vax_mp_tramp); /* Start! */
        expect = 0;
        for (i = 0; i < 10000; i++)
                if ((volatile)ci->ci_flags & CI_RUNNING)
@@ -387,7 +387,7 @@
 }
 
 void
-ka88_txrx(int id, char *fmt, int arg)
+ka88_txrx(int id, const char *fmt, int arg)
 {
        char buf[20];
 
@@ -397,7 +397,7 @@
 }
 
 void
-ka88_sendstr(int id, char *buf)
+ka88_sendstr(int id, const char *buf)
 {
        register u_int utchr; /* Ends up in R11 with PCC */
        int ch, i;
diff -r 0e8fc432e759 -r 6906fa8c635e sys/arch/vax/vax/subr.S
--- a/sys/arch/vax/vax/subr.S   Wed Jul 20 17:38:13 2005 +0000
+++ b/sys/arch/vax/vax/subr.S   Wed Jul 20 17:48:17 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr.S,v 1.11 2005/04/09 20:44:56 matt Exp $      */
+/*     $NetBSD: subr.S,v 1.12 2005/07/20 17:48:17 he Exp $        */
 
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -403,8 +403,8 @@
 
 #if defined(MULTIPROCESSOR)
        .align 2
-       .globl  _C_LABEL(tramp) # used to kick off multiprocessor systems.
-_C_LABEL(tramp):
+       .globl  _C_LABEL(vax_mp_tramp)  # used to kick off multiprocessor systems.
+_C_LABEL(vax_mp_tramp):
        ldpctx
        rei
 #endif



Home | Main Index | Thread Index | Old Index