summaryrefslogtreecommitdiff
path: root/sys/arch/hppa
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r--sys/arch/hppa/dev/dino.c4
-rw-r--r--sys/arch/hppa/dev/power.c4
-rw-r--r--sys/arch/hppa/gsc/harmony.c6
-rw-r--r--sys/arch/hppa/hppa/autoconf.c15
-rw-r--r--sys/arch/hppa/hppa/db_disasm.c4
-rw-r--r--sys/arch/hppa/hppa/intr.c4
-rw-r--r--sys/arch/hppa/hppa/mainbus.c10
-rw-r--r--sys/arch/hppa/hppa/pmap.c22
-rw-r--r--sys/arch/hppa/hppa/trap.c7
9 files changed, 39 insertions, 37 deletions
diff --git a/sys/arch/hppa/dev/dino.c b/sys/arch/hppa/dev/dino.c
index 213c7b93ebc..0715c54d708 100644
--- a/sys/arch/hppa/dev/dino.c
+++ b/sys/arch/hppa/dev/dino.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dino.c,v 1.2 2003/10/30 19:25:12 mickey Exp $ */
+/* $OpenBSD: dino.c,v 1.3 2003/12/20 21:49:04 miod Exp $ */
/*
* Copyright (c) 2003 Michael Shalayeff
@@ -218,7 +218,7 @@ dino_intr_string(void *v, pci_intr_handle_t ih)
{
static char buf[32];
- snprintf(buf, 32, "irq %d", ih);
+ snprintf(buf, 32, "irq %ld", ih);
return (buf);
}
diff --git a/sys/arch/hppa/dev/power.c b/sys/arch/hppa/dev/power.c
index 6175fb7dce2..ff2e98481d2 100644
--- a/sys/arch/hppa/dev/power.c
+++ b/sys/arch/hppa/dev/power.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: power.c,v 1.3 2003/08/20 23:33:36 mickey Exp $ */
+/* $OpenBSD: power.c,v 1.4 2003/12/20 21:49:04 miod Exp $ */
/*
* Copyright (c) 2003 Michael Shalayeff
@@ -132,7 +132,7 @@ power_thread_create(void *v)
struct power_softc *sc = v;
if (kthread_create(sc->sc_kicker, sc, &sc->sc_thread,
- "powerbutton", 0))
+ "powerbutton"))
printf("WARNING: failed to create kernel power thread\n");
}
diff --git a/sys/arch/hppa/gsc/harmony.c b/sys/arch/hppa/gsc/harmony.c
index 0e86b5f6ea7..529c7b93ced 100644
--- a/sys/arch/hppa/gsc/harmony.c
+++ b/sys/arch/hppa/gsc/harmony.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: harmony.c,v 1.21 2003/08/15 13:25:53 mickey Exp $ */
+/* $OpenBSD: harmony.c,v 1.22 2003/12/20 21:49:06 miod Exp $ */
/*
* Copyright (c) 2003 Jason L. Wright (jason@thought.net)
@@ -1263,8 +1263,8 @@ harmony_try_more(struct harmony_softc *sc)
#ifdef DIAGNOSTIC
if (cur < d->d_map->dm_segs[0].ds_addr ||
cur >= (d->d_map->dm_segs[0].ds_addr + c->c_segsz))
- panic("%s: bad current %x < %x || %x > %x", sc->sc_dv.dv_xname,
- cur, d->d_map->dm_segs[0].ds_addr, cur,
+ panic("%s: bad current %x < %lx || %x > %lx",
+ sc->sc_dv.dv_xname, cur, d->d_map->dm_segs[0].ds_addr, cur,
d->d_map->dm_segs[0].ds_addr + c->c_segsz);
#endif /* DIAGNOSTIC */
diff --git a/sys/arch/hppa/hppa/autoconf.c b/sys/arch/hppa/hppa/autoconf.c
index 9e50642f9e6..947bd3fc873 100644
--- a/sys/arch/hppa/hppa/autoconf.c
+++ b/sys/arch/hppa/hppa/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.37 2003/12/09 14:35:03 mickey Exp $ */
+/* $OpenBSD: autoconf.c,v 1.38 2003/12/20 21:49:06 miod Exp $ */
/*
* Copyright (c) 1998-2003 Michael Shalayeff
@@ -84,10 +84,10 @@ struct device *bootdv;
*/
#ifdef USELEDS
#include <sys/dkstat.h>
+#include <sys/kernel.h>
struct timeout heartbeat_tmo;
void heartbeat(void *);
-extern int hz;
#endif
#include "cd.h"
@@ -396,7 +396,7 @@ setroot(void)
{
struct swdevt *swp;
struct device *dv;
- int len, majdev, unit, part;
+ int len, majdev, part;
dev_t nrootdev, nswapdev = NODEV;
char buf[128];
dev_t temp;
@@ -492,6 +492,7 @@ setroot(void)
}
}
gotswap:
+ majdev = major(nrootdev);
rootdev = nrootdev;
dumpdev = nswapdev;
swdevt[0].sw_dev = nswapdev;
@@ -559,7 +560,7 @@ gotswap:
temp = NODEV;
for (swp = swdevt; swp->sw_dev != NODEV; swp++) {
if (majdev == major(swp->sw_dev) &&
- unit == DISKUNIT(swp->sw_dev)) {
+ DISKUNIT(rootdev) == DISKUNIT(swp->sw_dev)) {
temp = swdevt[0].sw_dev;
swdevt[0].sw_dev = swp->sw_dev;
swp->sw_dev = temp;
@@ -691,7 +692,7 @@ pdc_scanbus(self, ca, maxmod)
pdc_addr.size << PGSHIFT;
if (autoconf_verbose)
- printf(" 0x%x[0x%x]",
+ printf(" 0x%lx[0x%x]",
nca.ca_addrs[ia].addr,
nca.ca_addrs[ia].size);
}
@@ -704,7 +705,7 @@ pdc_scanbus(self, ca, maxmod)
continue;
if (autoconf_verbose)
- printf(">> HPA 0x%x[0x%x]\n",
+ printf(">> HPA 0x%lx[0x%x]\n",
nca.ca_hpa, nca.ca_hpasz);
if ((error = pdc_call((iodcio_t)pdc, 0, PDC_IODC,
@@ -725,7 +726,7 @@ pdc_scanbus(self, ca, maxmod)
nca.ca_dp.dp_bc[0], nca.ca_dp.dp_bc[1],
nca.ca_dp.dp_bc[2], nca.ca_dp.dp_bc[3],
nca.ca_dp.dp_bc[4], nca.ca_dp.dp_bc[5]);
- printf("mod %x hpa %x type %x sv %x\n",
+ printf("mod %x hpa %lx type %x sv %x\n",
nca.ca_dp.dp_mod, nca.ca_hpa,
nca.ca_type.iodc_type, nca.ca_type.iodc_sv_model);
}
diff --git a/sys/arch/hppa/hppa/db_disasm.c b/sys/arch/hppa/hppa/db_disasm.c
index a5fd5b05519..0c3e54cd725 100644
--- a/sys/arch/hppa/hppa/db_disasm.c
+++ b/sys/arch/hppa/hppa/db_disasm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_disasm.c,v 1.14 2002/08/13 07:00:50 mickey Exp $ */
+/* $OpenBSD: db_disasm.c,v 1.15 2003/12/20 21:49:06 miod Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -2144,7 +2144,7 @@ coprDasm(i, ofs, w)
register u_int uid = Uid(w);
register int load = 0;
register char *pfx = uid > 1 ? "c" : "f";
- register int dreg;
+ register int dreg = 0;
if (Match("copr")) {
if (uid) {
diff --git a/sys/arch/hppa/hppa/intr.c b/sys/arch/hppa/hppa/intr.c
index f48b4ed617b..ea532680ffe 100644
--- a/sys/arch/hppa/hppa/intr.c
+++ b/sys/arch/hppa/hppa/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.13 2003/11/16 20:30:06 avsm Exp $ */
+/* $OpenBSD: intr.c,v 1.14 2003/12/20 21:49:06 miod Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -137,7 +137,7 @@ cpu_intr_init(void)
for (level = 0; level < NIPL - 1; level++)
imask[level + 1] |= imask[level];
- printf("biomask 0x%x netmask 0x%x ttymask 0x%x\n",
+ printf("biomask 0x%lx netmask 0x%lx ttymask 0x%lx\n",
imask[IPL_BIO], imask[IPL_NET], imask[IPL_TTY]);
/* XXX the whacky trick is to prevent hardclock from happenning */
diff --git a/sys/arch/hppa/hppa/mainbus.c b/sys/arch/hppa/hppa/mainbus.c
index 67c5dc876ee..125d3b5c32a 100644
--- a/sys/arch/hppa/hppa/mainbus.c
+++ b/sys/arch/hppa/hppa/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.53 2003/09/29 19:23:02 mickey Exp $ */
+/* $OpenBSD: mainbus.c,v 1.54 2003/12/20 21:49:06 miod Exp $ */
/*
* Copyright (c) 1998-2003 Michael Shalayeff
@@ -87,7 +87,7 @@ mbus_add_mapping(bus_addr_t bpa, bus_size_t size, int flags,
#endif
if ((bank = vm_physseg_find(atop(bpa), &off)) >= 0)
- panic("mbus_add_mapping: mapping real memory @0x%x", bpa);
+ panic("mbus_add_mapping: mapping real memory @0x%lx", bpa);
/*
* determine if we are mapping IO space, or beyond the physmem
@@ -1019,7 +1019,7 @@ mbattach(parent, self, aux)
if (pdc_call((iodcio_t)pdc, 0, PDC_HPA, PDC_HPA_DFLT, &pdc_hpa) < 0)
panic("mbattach: PDC_HPA failed");
- printf(" [flex %x]\n", pdc_hpa.hpa & HPPA_FLEX_MASK);
+ printf(" [flex %lx]\n", pdc_hpa.hpa & HPPA_FLEX_MASK);
/* map all the way till the end of the memory */
if (bus_space_map(&hppa_bustag, pdc_hpa.hpa,
@@ -1095,7 +1095,7 @@ mbprint(aux, pnp)
ca->ca_type.iodc_revision);
if (ca->ca_hpa) {
if (~ca->ca_hpamask)
- printf(" offset %x", ca->ca_hpa & ~ca->ca_hpamask);
+ printf(" offset %lx", ca->ca_hpa & ~ca->ca_hpamask);
if (!pnp && ca->ca_irq >= 0)
printf(" irq %d", ca->ca_irq);
}
@@ -1113,7 +1113,7 @@ mbsubmatch(parent, match, aux)
int ret;
if (autoconf_verbose)
- printf(">> hpa %x off %x cf_off %x\n",
+ printf(">> hpa %lx off %lx cf_off %x\n",
ca->ca_hpa, ca->ca_hpa & ~ca->ca_hpamask, cf->hppacf_off);
if (ca->ca_hpa && ~ca->ca_hpamask && cf->hppacf_off != -1 &&
diff --git a/sys/arch/hppa/hppa/pmap.c b/sys/arch/hppa/hppa/pmap.c
index 475a5d8391d..4fcbbb5742d 100644
--- a/sys/arch/hppa/hppa/pmap.c
+++ b/sys/arch/hppa/hppa/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.105 2003/12/01 23:56:30 mickey Exp $ */
+/* $OpenBSD: pmap.c,v 1.106 2003/12/20 21:49:06 miod Exp $ */
/*
* Copyright (c) 1998-2003 Michael Shalayeff
@@ -308,21 +308,21 @@ pmap_dump_table(pa_space_t space, vaddr_t sva)
!(pd = pmap_sdir_get(sp)))
continue;
- for (pdemask = 1, va = sva? sva: 0; va < VM_MAX_KERNEL_ADDRESS;
- va += PAGE_SIZE) {
+ for (pdemask = 1, va = sva ? sva : 0;
+ va < VM_MAX_KERNEL_ADDRESS; va += PAGE_SIZE) {
if (pdemask != (va & PDE_MASK)) {
pdemask = va & PDE_MASK;
if (!(pde = pmap_pde_get(pd, va))) {
va += ~PDE_MASK + 1 - PAGE_SIZE;
continue;
}
- printf("%x:0x%08x:\n", sp, pde);
+ printf("%x:%8p:\n", sp, pde);
}
if (!(pte = pmap_pte_get(pde, va)))
continue;
- printf("0x%08x-0x%08x:%b\n", va, pte & ~PAGE_MASK,
+ printf("0x%08lx-0x%08x:%b\n", va, pte & ~PAGE_MASK,
TLB_PROT(pte & PAGE_MASK), TLB_BITS);
}
}
@@ -337,7 +337,7 @@ pmap_dump_pv(paddr_t pa)
pg = PHYS_TO_VM_PAGE(pa);
simple_lock(&pg->mdpage.pvh_lock);
for(pve = pg->mdpage.pvh_list; pve; pve = pve->pv_next)
- printf("%x:%x\n", pve->pv_pmap->pm_space, pve->pv_va);
+ printf("%x:%lx\n", pve->pv_pmap->pm_space, pve->pv_va);
simple_unlock(&pg->mdpage.pvh_lock);
}
#endif
@@ -670,7 +670,7 @@ pmap_destroy(pmap)
#ifdef DIAGNOSTIC
while ((pg = TAILQ_FIRST(&pmap->pm_obj.memq))) {
- printf("pmap_destroy: unaccounted ptp 0x%x count %d\n",
+ printf("pmap_destroy: unaccounted ptp 0x%lx count %d\n",
VM_PAGE_TO_PHYS(pg), pg->wire_count);
if (pg->flags & PG_BUSY)
panic("pmap_destroy: busy page table page");
@@ -874,7 +874,7 @@ pmap_write_protect(pmap, sva, eva, prot)
simple_lock(&pmap->pm_obj.vmobjlock);
- for(pdemask = 1; sva < eva; sva += PAGE_SIZE) {
+ for (pdemask = 1; sva < eva; sva += PAGE_SIZE) {
if (pdemask != (sva & PDE_MASK)) {
pdemask = sva & PDE_MASK;
if (!(pde = pmap_pde_get(pmap->pm_pdir, sva))) {
@@ -973,7 +973,7 @@ pmap_unwire(pmap, va)
#ifdef DIAGNOSTIC
if (!pte)
- panic("pmap_unwire: invalid va 0x%x", va);
+ panic("pmap_unwire: invalid va 0x%lx", va);
#endif
}
@@ -1136,10 +1136,10 @@ pmap_kenter_pa(va, pa, prot)
if (!(pde = pmap_pde_get(pmap_kernel()->pm_pdir, va)) &&
!(pde = pmap_pde_alloc(pmap_kernel(), va, NULL)))
- panic("pmap_kenter_pa: cannot allocate pde for va=0x%x", va);
+ panic("pmap_kenter_pa: cannot allocate pde for va=0x%lx", va);
#ifdef DIAGNOSTIC
if ((pte = pmap_pte_get(pde, va)))
- panic("pmap_kenter_pa: 0x%x is already mapped %p:0x%x",
+ panic("pmap_kenter_pa: 0x%lx is already mapped %p:0x%x",
va, pde, pte);
#endif
diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c
index d1338be0036..b3eefc64b56 100644
--- a/sys/arch/hppa/hppa/trap.c
+++ b/sys/arch/hppa/hppa/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.69 2003/10/23 18:33:52 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.70 2003/12/20 21:49:06 miod Exp $ */
/*
* Copyright (c) 1998-2003 Michael Shalayeff
@@ -383,7 +383,8 @@ trap(type, frame)
* the current limit and we need to reflect that as an access
* error.
*/
- if (space != 0 && va < (vaddr_t)vm->vm_minsaddr &&
+ if (space != HPPA_SID_KERNEL &&
+ va < (vaddr_t)vm->vm_minsaddr &&
va >= (vaddr_t)vm->vm_maxsaddr + ctob(vm->vm_ssize)) {
if (ret == 0) {
vsize_t nss = btoc(va - USRSTACK + NBPG - 1);
@@ -409,7 +410,7 @@ trap(type, frame)
#endif
} else {
panic("trap: "
- "uvm_fault(%p, %x, %d, %d): %d",
+ "uvm_fault(%p, %lx, %d, %d): %d",
map, va, 0, vftype, ret);
}
}