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.
This commit is contained in:
parent
9f2c5c4e24
commit
502b27f3ce
|
@ -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 @@ struct cpu_mp_softc {
|
|||
ci = SIMPLEQ_NEXT(ci, ci_next)
|
||||
|
||||
extern SIMPLEQ_HEAD(cpu_info_qh, cpu_info) cpus;
|
||||
extern char tramp;
|
||||
extern char vax_mp_tramp;
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -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 @@ do { \
|
|||
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 @@ __cpu_simple_unlock(__cpu_simple_lock_t *alp)
|
|||
#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 */
|
||||
|
|
|
@ -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 @@ kdbrint(tkn)
|
|||
#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;
|
||||
|
|
|
@ -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 int ka6400_mchk(caddr_t);
|
|||
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_startslave(struct device *dev, struct cpu_info *ci)
|
|||
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 @@ ka6400_startslave(struct device *dev, struct cpu_info *ci)
|
|||
}
|
||||
|
||||
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 @@ ka6400_txrx(int id, char *fmt, int arg)
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
|
@ -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 @@ static void vaxbierr(void *);
|
|||
#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_startslave(struct device *dev, struct cpu_info *ci)
|
|||
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 @@ ka820_startslave(struct device *dev, struct cpu_info *ci)
|
|||
}
|
||||
|
||||
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 @@ ka820_sendchr(int chr)
|
|||
}
|
||||
|
||||
void
|
||||
ka820_sendstr(int id, char *buf)
|
||||
ka820_sendstr(int id, const char *buf)
|
||||
{
|
||||
u_int utchr;
|
||||
int ch, i;
|
||||
|
|
|
@ -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_clkwrite(void);
|
|||
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_startslave(struct device *dev, struct cpu_info *ci)
|
|||
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 @@ ka88_startslave(struct device *dev, struct cpu_info *ci)
|
|||
}
|
||||
|
||||
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 @@ ka88_txrx(int id, char *fmt, int arg)
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
|
@ -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 @@ lp: ffs $0,$32,_C_LABEL(sched_whichqs),%r3 # Search for bit set
|
|||
|
||||
#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
|
||||
|
|
Loading…
Reference in New Issue