Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sun2 - remove unused
details: https://anonhg.NetBSD.org/src/rev/56f0117737a1
branches: trunk
changeset: 328036:56f0117737a1
user: christos <christos%NetBSD.org@localhost>
date: Mon Mar 24 18:50:31 2014 +0000
description:
- remove unused
- use cpu_{g,s}etmodel
diffstat:
sys/arch/sun2/dev/if_ie_obio.c | 9 ++++-----
sys/arch/sun2/sun2/machdep.c | 12 ++++++------
sys/arch/sun2/sun2/pmap.c | 20 +++++++++-----------
sys/arch/sun2/sun2/promlib.c | 6 ++++--
4 files changed, 23 insertions(+), 24 deletions(-)
diffs (203 lines):
diff -r 5865fed94b5a -r 56f0117737a1 sys/arch/sun2/dev/if_ie_obio.c
--- a/sys/arch/sun2/dev/if_ie_obio.c Mon Mar 24 18:50:08 2014 +0000
+++ b/sys/arch/sun2/dev/if_ie_obio.c Mon Mar 24 18:50:31 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ie_obio.c,v 1.15 2011/06/03 16:28:40 tsutsui Exp $ */
+/* $NetBSD: if_ie_obio.c,v 1.16 2014/03/24 18:50:31 christos Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ie_obio.c,v 1.15 2011/06/03 16:28:40 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ie_obio.c,v 1.16 2014/03/24 18:50:31 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -260,7 +260,6 @@
int rseg;
int error;
paddr_t pa;
- struct intrhand *ih;
bus_size_t memsize;
u_long iebase;
uint8_t myaddr[ETHER_ADDR_LEN];
@@ -393,6 +392,6 @@
i82586_attach(sc, "onboard", myaddr, media, NMEDIA, media[0]);
/* Establish interrupt channel */
- ih = bus_intr_establish(oba->oba_bustag, oba->oba_pri, IPL_NET, 0,
- i82586_intr, sc);
+ bus_intr_establish(oba->oba_bustag, oba->oba_pri, IPL_NET, 0,
+ i82586_intr, sc);
}
diff -r 5865fed94b5a -r 56f0117737a1 sys/arch/sun2/sun2/machdep.c
--- a/sys/arch/sun2/sun2/machdep.c Mon Mar 24 18:50:08 2014 +0000
+++ b/sys/arch/sun2/sun2/machdep.c Mon Mar 24 18:50:31 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.76 2012/08/10 14:52:26 tsutsui Exp $ */
+/* $NetBSD: machdep.c,v 1.77 2014/03/24 18:50:31 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@@ -149,7 +149,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.76 2012/08/10 14:52:26 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.77 2014/03/24 18:50:31 christos Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -179,6 +179,7 @@
#include <sys/vnode.h>
#include <sys/syscallargs.h>
#include <sys/ksyms.h>
+#include <sys/cpu.h>
#ifdef KGDB
#include <sys/kgdb.h>
#endif
@@ -366,7 +367,6 @@
*/
char machine[16] = MACHINE; /* from <machine/param.h> */
char kernel_arch[16] = "sun2"; /* XXX needs a sysctl node */
-char cpu_model[120];
/*
* Determine which Sun2 model we are running on.
@@ -378,9 +378,9 @@
/* Other stuff? (VAC, mc6888x version, etc.) */
/* Note: miniroot cares about the kernel_arch part. */
- sprintf(cpu_model, "%s %s", kernel_arch, cpu_string);
+ cpu_setmodel("%s %s", kernel_arch, cpu_string);
- printf("Model: %s\n", cpu_model);
+ printf("Model: %s\n", cpu_getmodel());
}
/*
@@ -879,7 +879,7 @@
int pagesz = PAGE_SIZE;
bus_addr_t dva;
pmap_t pmap;
- int rv;
+ int rv __diagused;
/*
* Make sure that on error condition we return "no valid mappings".
diff -r 5865fed94b5a -r 56f0117737a1 sys/arch/sun2/sun2/pmap.c
--- a/sys/arch/sun2/sun2/pmap.c Mon Mar 24 18:50:08 2014 +0000
+++ b/sys/arch/sun2/sun2/pmap.c Mon Mar 24 18:50:31 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.46 2013/01/07 16:58:09 chs Exp $ */
+/* $NetBSD: pmap.c,v 1.47 2014/03/24 18:50:31 christos Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.46 2013/01/07 16:58:09 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.47 2014/03/24 18:50:31 christos Exp $");
#include "opt_ddb.h"
#include "opt_pmap_debug.h"
@@ -1324,15 +1324,12 @@
paddr_t pa;
pv_entry_t *head, pv;
u_char *pv_flags;
- int flags;
if (!pv_initialized)
return 0;
CHECK_SPL();
- /* Only the non-cached bit is of interest here. */
- flags = (pte & PG_NC) ? PV_NC : 0;
pa = PG_PA(pte);
#ifdef PMAP_DEBUG
@@ -1357,6 +1354,8 @@
/*
* Does this new mapping cause VAC alias problems?
*/
+ /* Only the non-cached bit is of interest here. */
+ int flags = (pte & PG_NC) ? PV_NC : 0;
*pv_flags |= flags;
if ((*pv_flags & PV_NC) == 0) {
@@ -3070,9 +3069,8 @@
void
pmap_protect_mmu(pmap_t pmap, vaddr_t sva, vaddr_t eva)
{
- pmeg_t pmegp;
- vaddr_t pgva, segva;
- int pte, sme;
+ vaddr_t pgva, segva __diagused;
+ int pte;
#ifdef HAVECACHE
int flush_by_page = 0;
#endif
@@ -3085,9 +3083,9 @@
#endif
segva = sun2_trunc_seg(sva);
- sme = get_segmap(segva);
#ifdef DIAGNOSTIC
+ int sme = get_segmap(segva);
/* Make sure it is valid and known. */
if (sme == SEGINV)
panic("pmap_protect_mmu: SEGINV");
@@ -3095,10 +3093,10 @@
panic("pmap_protect_mmu: incorrect sme, va=0x%lx", segva);
#endif
- pmegp = pmeg_p(sme);
- /* have pmeg, will travel */
#ifdef DIAGNOSTIC
+ /* have pmeg, will travel */
+ pmeg_t pmegp = pmeg_p(sme);
/* Make sure we own the pmeg, right va, etc. */
if ((pmegp->pmeg_va != segva) ||
(pmegp->pmeg_owner != pmap) ||
diff -r 5865fed94b5a -r 56f0117737a1 sys/arch/sun2/sun2/promlib.c
--- a/sys/arch/sun2/sun2/promlib.c Mon Mar 24 18:50:08 2014 +0000
+++ b/sys/arch/sun2/sun2/promlib.c Mon Mar 24 18:50:31 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: promlib.c,v 1.17 2011/07/17 20:54:48 joerg Exp $ */
+/* $NetBSD: promlib.c,v 1.18 2014/03/24 18:50:31 christos Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: promlib.c,v 1.17 2011/07/17 20:54:48 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: promlib.c,v 1.18 2014/03/24 18:50:31 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -152,6 +152,7 @@
int rc; \
_mode_monitor(&state, 0); \
rc = (*(romVectorPtr->old)) args; \
+ __USE(rc); \
_mode_kernel(&state, 0); \
ret ; \
}
@@ -221,6 +222,7 @@
/* the PROM printf vector: */
(romVectorPtr->printf))
)(fmt, varargs);
+ __USE(rc);
_mode_kernel(&state, 0);
}
Home |
Main Index |
Thread Index |
Old Index