Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc Build with -Wall -Wetc.
details: https://anonhg.NetBSD.org/src/rev/b5da1034f598
branches: trunk
changeset: 503286:b5da1034f598
user: briggs <briggs%NetBSD.org@localhost>
date: Sun Feb 04 17:38:10 2001 +0000
description:
Build with -Wall -Wetc.
diffstat:
sys/arch/powerpc/include/fpu.h | 7 +++++-
sys/arch/powerpc/include/openpic.h | 3 +-
sys/arch/powerpc/include/pmap.h | 3 +-
sys/arch/powerpc/powerpc/db_interface.c | 7 +++--
sys/arch/powerpc/powerpc/db_trace.c | 3 +-
sys/arch/powerpc/powerpc/mem.c | 12 ++++++++--
sys/arch/powerpc/powerpc/pmap.c | 31 +++++++++++++++++++++--------
sys/arch/powerpc/powerpc/process_machdep.c | 3 +-
sys/arch/powerpc/powerpc/trap.c | 19 ++++++++++++++---
sys/arch/powerpc/powerpc/vm_machdep.c | 12 ++++++----
10 files changed, 71 insertions(+), 29 deletions(-)
diffs (truncated from 352 to 300 lines):
diff -r 843b58f7dca6 -r b5da1034f598 sys/arch/powerpc/include/fpu.h
--- a/sys/arch/powerpc/include/fpu.h Sun Feb 04 17:36:08 2001 +0000
+++ b/sys/arch/powerpc/include/fpu.h Sun Feb 04 17:38:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu.h,v 1.2 1999/12/07 15:14:56 danw Exp $ */
+/* $NetBSD: fpu.h,v 1.3 2001/02/04 17:38:10 briggs Exp $ */
/*-
* Copyright (C) 1996 Wolfgang Solfrank.
@@ -66,4 +66,9 @@
#define FPSCR_NI 0x00000004
#define FPSCR_RN 0x00000003
+#ifdef _KERNEL
+void enable_fpu __P((struct proc *p));
+void save_fpu __P((struct proc *p));
+#endif
+
#endif /* _MACHINE_FPU_H_ */
diff -r 843b58f7dca6 -r b5da1034f598 sys/arch/powerpc/include/openpic.h
--- a/sys/arch/powerpc/include/openpic.h Sun Feb 04 17:36:08 2001 +0000
+++ b/sys/arch/powerpc/include/openpic.h Sun Feb 04 17:38:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: openpic.h,v 1.1 2001/02/02 06:11:52 briggs Exp $ */
+/* $NetBSD: openpic.h,v 1.2 2001/02/04 17:38:10 briggs Exp $ */
/*-
* Copyright (c) 2000 Tsubai Masanari. All rights reserved.
@@ -30,6 +30,7 @@
#include <machine/openpicreg.h>
+void openpic_init __P((unsigned char *, int));
void openpic_enable_irq __P((int, int));
void openpic_disable_irq __P((int));
void openpic_set_priority __P((int, int));
diff -r 843b58f7dca6 -r b5da1034f598 sys/arch/powerpc/include/pmap.h
--- a/sys/arch/powerpc/include/pmap.h Sun Feb 04 17:36:08 2001 +0000
+++ b/sys/arch/powerpc/include/pmap.h Sun Feb 04 17:38:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.17 2000/03/30 16:18:24 jdolecek Exp $ */
+/* $NetBSD: pmap.h,v 1.18 2001/02/04 17:38:10 briggs Exp $ */
/*-
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -77,6 +77,7 @@
boolean_t pmap_extract __P((struct pmap *, vaddr_t, paddr_t *));
boolean_t ptemodify __P((struct vm_page *, u_int, u_int));
int ptebits __P((struct vm_page *, int));
+void pmap_real_memory __P((paddr_t *, psize_t *));
#define PMAP_NEED_PROCWR
void pmap_procwr __P((struct proc *, vaddr_t, size_t));
diff -r 843b58f7dca6 -r b5da1034f598 sys/arch/powerpc/powerpc/db_interface.c
--- a/sys/arch/powerpc/powerpc/db_interface.c Sun Feb 04 17:36:08 2001 +0000
+++ b/sys/arch/powerpc/powerpc/db_interface.c Sun Feb 04 17:38:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.8 2000/11/24 21:49:06 tsubai Exp $ */
+/* $NetBSD: db_interface.c,v 1.9 2001/02/04 17:38:11 briggs Exp $ */
/* $OpenBSD: db_interface.c,v 1.2 1996/12/28 06:21:50 rahnds Exp $ */
#include "opt_ddb.h"
@@ -19,6 +19,9 @@
extern label_t *db_recover;
+void ddb_trap __P((void)); /* Call into trap_subr.S */
+int ddb_trap_glue __P((struct trapframe *)); /* Called from trap_subr.S */
+
void
cpu_Debugger()
{
@@ -29,8 +32,6 @@
ddb_trap_glue(frame)
struct trapframe *frame;
{
- int msr;
-
if (!(frame->srr1 & PSL_PR)
&& (frame->exc == EXC_TRC
|| (frame->exc == EXC_PGM
diff -r 843b58f7dca6 -r b5da1034f598 sys/arch/powerpc/powerpc/db_trace.c
--- a/sys/arch/powerpc/powerpc/db_trace.c Sun Feb 04 17:36:08 2001 +0000
+++ b/sys/arch/powerpc/powerpc/db_trace.c Sun Feb 04 17:38:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trace.c,v 1.6 2001/01/18 10:54:28 jdolecek Exp $ */
+/* $NetBSD: db_trace.c,v 1.7 2001/02/04 17:38:11 briggs Exp $ */
/* $OpenBSD: db_trace.c,v 1.3 1997/03/21 02:10:48 niklas Exp $ */
/*
@@ -36,6 +36,7 @@
#include <machine/pmap.h>
#include <ddb/db_access.h>
+#include <ddb/db_interface.h>
#include <ddb/db_sym.h>
#include <ddb/db_variables.h>
diff -r 843b58f7dca6 -r b5da1034f598 sys/arch/powerpc/powerpc/mem.c
--- a/sys/arch/powerpc/powerpc/mem.c Sun Feb 04 17:36:08 2001 +0000
+++ b/sys/arch/powerpc/powerpc/mem.c Sun Feb 04 17:38:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mem.c,v 1.8 2000/06/29 07:48:18 mrg Exp $ */
+/* $NetBSD: mem.c,v 1.9 2001/02/04 17:38:11 briggs Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -53,6 +53,12 @@
#include <uvm/uvm_extern.h>
+/* These should be defined in a header somewhere */
+int mmopen __P((dev_t, int, int));
+int mmclose __P((dev_t, int, int));
+int mmrw __P((dev_t, struct uio *, int));
+paddr_t mmmmap __P((dev_t, off_t, int));
+
/*ARGSUSED*/
int
mmopen(dev, flag, mode)
@@ -79,7 +85,7 @@
struct uio *uio;
int flags;
{
- vaddr_t o, v;
+ vaddr_t v;
u_int c;
struct iovec *iov;
int error = 0;
@@ -101,7 +107,7 @@
v = uio->uio_offset;
c = uio->uio_resid;
/* This doesn't allow device mapping! XXX */
- pmap_real_memory(&v, &c);
+ pmap_real_memory(&v, (psize_t *) &c);
error = uiomove((caddr_t)v, c, uio);
continue;
diff -r 843b58f7dca6 -r b5da1034f598 sys/arch/powerpc/powerpc/pmap.c
--- a/sys/arch/powerpc/powerpc/pmap.c Sun Feb 04 17:36:08 2001 +0000
+++ b/sys/arch/powerpc/powerpc/pmap.c Sun Feb 04 17:38:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.33 2001/01/14 03:26:11 thorpej Exp $ */
+/* $NetBSD: pmap.c,v 1.34 2001/02/04 17:38:11 briggs Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -122,13 +122,27 @@
static int pmap_initialized;
+static inline void tlbie __P((vaddr_t));
+static inline void tlbsync __P((void));
+static inline void tlbia __P((void));
+static inline int ptesr __P((sr_t *, vaddr_t));
+static inline int pteidx __P((sr_t, vaddr_t));
+static inline int ptematch __P((pte_t *, sr_t, vaddr_t, int));
+static __inline struct pv_entry *pa_to_pv __P((paddr_t));
+static __inline char *pa_to_attr __P((paddr_t));
+static int pte_insert __P((int, pte_t *));
+int pte_spill __P((vaddr_t)); /* Called from trap_subr.S */
+static inline int pmap_enter_pv __P((int, vaddr_t, paddr_t));
+static void pmap_remove_pv __P((int, vaddr_t, paddr_t, struct pte *));
+static pte_t *pte_find __P((struct pmap *, vaddr_t));
+
/*
* These small routines may have to be replaced,
* if/when we support processors other that the 604.
*/
static inline void
tlbie(ea)
- caddr_t ea;
+ vaddr_t ea;
{
asm volatile ("tlbie %0" :: "r"(ea));
}
@@ -142,10 +156,10 @@
static void
tlbia()
{
- caddr_t i;
+ vaddr_t i;
asm volatile ("sync");
- for (i = 0; i < (caddr_t)0x00040000; i += 0x00001000)
+ for (i = 0; i < (vaddr_t)0x00040000; i += 0x00001000)
tlbie(i);
tlbsync();
}
@@ -883,7 +897,7 @@
s = splvm();
pv = pa_to_pv(pa);
- if (first = pv->pv_idx == -1) {
+ if ((first = pv->pv_idx) == -1) {
/*
* No entries yet, use header as the first entry.
*/
@@ -942,7 +956,7 @@
} else
pv->pv_idx = -1;
} else {
- for (; npv = pv->pv_next; pv = npv)
+ for (; (npv = pv->pv_next) != NULL; pv = npv)
if (pteidx == npv->pv_idx && va == npv->pv_va)
break;
if (npv) {
@@ -968,12 +982,11 @@
int flags;
{
sr_t sr;
- int idx, i, s;
+ int idx, s;
pte_t pte;
struct pte_ovfl *po;
int managed;
struct mem_region *mp;
- boolean_t wired = (flags & PMAP_WIRED) != 0;
/*
* Have to remove any existing mapping first.
@@ -1185,7 +1198,7 @@
if (prot & VM_PROT_READ) {
s = splvm();
while (sva < eva) {
- if (ptp = pte_find(pm, sva)) {
+ if ((ptp = pte_find(pm, sva)) != NULL) {
valid = ptp->pte_hi & PTE_VALID;
ptp->pte_hi &= ~PTE_VALID;
asm volatile ("sync");
diff -r 843b58f7dca6 -r b5da1034f598 sys/arch/powerpc/powerpc/process_machdep.c
--- a/sys/arch/powerpc/powerpc/process_machdep.c Sun Feb 04 17:36:08 2001 +0000
+++ b/sys/arch/powerpc/powerpc/process_machdep.c Sun Feb 04 17:38:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: process_machdep.c,v 1.4 2000/06/09 14:05:04 kleink Exp $ */
+/* $NetBSD: process_machdep.c,v 1.5 2001/02/04 17:38:11 briggs Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -37,6 +37,7 @@
#include <sys/systm.h>
#include <sys/ptrace.h>
+#include <machine/fpu.h>
#include <machine/pcb.h>
#include <machine/reg.h>
diff -r 843b58f7dca6 -r b5da1034f598 sys/arch/powerpc/powerpc/trap.c
--- a/sys/arch/powerpc/powerpc/trap.c Sun Feb 04 17:36:08 2001 +0000
+++ b/sys/arch/powerpc/powerpc/trap.c Sun Feb 04 17:38:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.35 2001/01/01 04:33:39 tsubai Exp $ */
+/* $NetBSD: trap.c,v 1.36 2001/02/04 17:38:11 briggs Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -45,7 +45,11 @@
#include <uvm/uvm_extern.h>
+#include <dev/cons.h>
+
#include <machine/cpu.h>
+#include <machine/db_machdep.h>
+#include <machine/fpu.h>
#include <machine/frame.h>
#include <machine/pcb.h>
#include <machine/pmap.h>
@@ -65,6 +69,13 @@
void *syscall = NULL; /* XXX dummy symbol for emul_netbsd */
static int fix_unaligned __P((struct proc *p, struct trapframe *frame));
+static inline void setusr __P((int));
+
+void trap __P((struct trapframe *)); /* Called from locore / trap_subr */
+int setfault __P((faultbuf)); /* defined in locore.S */
+/* Why are these not defined in a header? */
+int badaddr __P((void *, size_t));
+int badaddr_read __P((void *, size_t, int *));
void
trap(frame)
@@ -110,7 +121,7 @@
KERNEL_UNLOCK();
if (rv == KERN_SUCCESS)
return;
- if (fb = p->p_addr->u_pcb.pcb_onfault) {
+ if ((fb = p->p_addr->u_pcb.pcb_onfault) != NULL) {
frame->srr0 = (*fb)[0];
frame->fixreg[1] = (*fb)[1];
frame->fixreg[2] = (*fb)[2];
@@ -302,7 +313,7 @@
{
faultbuf *fb;
- if (fb = p->p_addr->u_pcb.pcb_onfault) {
+ if ((fb = p->p_addr->u_pcb.pcb_onfault) != NULL) {
frame->srr0 = (*fb)[0];
frame->fixreg[1] = (*fb)[1];
frame->fixreg[2] = (*fb)[2];
Home |
Main Index |
Thread Index |
Old Index