diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-08-25 19:25:32 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-08-25 19:25:32 +0000 |
commit | 59f49a090ab394972ab4063c4e260b0ee27faeb3 (patch) | |
tree | 17b9019c0e813d5f51ef6138939fd47061002570 | |
parent | 74260c3e72eb04de8da546dec39bf87e7bf994a2 (diff) |
Print a bit more information in the safari interrupt handler. Get rid of
function names starting with an underscore while I'm there.
-rw-r--r-- | sys/arch/sparc64/dev/schizo.c | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/sys/arch/sparc64/dev/schizo.c b/sys/arch/sparc64/dev/schizo.c index d73269a8bbf..28546179308 100644 --- a/sys/arch/sparc64/dev/schizo.c +++ b/sys/arch/sparc64/dev/schizo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: schizo.c,v 1.47 2007/02/23 22:15:36 kettenis Exp $ */ +/* $OpenBSD: schizo.c,v 1.48 2007/08/25 19:25:31 kettenis Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -81,17 +81,17 @@ pci_chipset_tag_t schizo_alloc_chipset(struct schizo_pbm *, int, bus_space_tag_t schizo_alloc_mem_tag(struct schizo_pbm *); bus_space_tag_t schizo_alloc_io_tag(struct schizo_pbm *); bus_space_tag_t schizo_alloc_config_tag(struct schizo_pbm *); -bus_space_tag_t _schizo_alloc_bus_tag(struct schizo_pbm *, const char *, +bus_space_tag_t schizo_alloc_bus_tag(struct schizo_pbm *, const char *, int, int, int); bus_dma_tag_t schizo_alloc_dma_tag(struct schizo_pbm *); -paddr_t schizo_bus_mmap(bus_space_tag_t, bus_addr_t, off_t, int, int); int schizo_intr_map(struct pci_attach_args *, pci_intr_handle_t *); -int _schizo_bus_map(bus_space_tag_t, bus_space_tag_t, bus_addr_t, +int schizo_bus_map(bus_space_tag_t, bus_space_tag_t, bus_addr_t, bus_size_t, int, bus_space_handle_t *); -void *_schizo_intr_establish(bus_space_tag_t, bus_space_tag_t, int, int, int, +paddr_t schizo_bus_mmap(bus_space_tag_t, bus_space_tag_t, bus_addr_t, off_t, + int, int); +void *schizo_intr_establish(bus_space_tag_t, bus_space_tag_t, int, int, int, int (*)(void *), void *, const char *); -paddr_t _schizo_bus_mmap(bus_space_tag_t, bus_space_tag_t, bus_addr_t, off_t, int, int); int schizo_dmamap_create(bus_dma_tag_t, bus_dma_tag_t, bus_size_t, int, bus_size_t, bus_size_t, int, bus_dmamap_t *); @@ -346,6 +346,10 @@ schizo_safari_error(void *vsc) printf("%s: safari error\n", sc->sc_dv.dv_xname); printf("ERRLOG=%lx\n", schizo_read(sc, SCZ_SAFARI_ERRLOG)); + printf("UE_AFSR=%lx\n", schizo_read(sc, SCZ_UE_AFSR)); + printf("UE_AFAR=%lx\n", schizo_read(sc, SCZ_UE_AFAR)); + printf("CE_AFSR=%lx\n", schizo_read(sc, SCZ_CE_AFSR)); + printf("CE_AFAR=%lx\n", schizo_read(sc, SCZ_CE_AFAR)); panic("%s: fatal", sc->sc_dv.dv_xname); return (1); @@ -501,7 +505,7 @@ schizo_set_intr(struct schizo_softc *sc, struct schizo_pbm *pbm, int ipl, bus_space_tag_t schizo_alloc_mem_tag(struct schizo_pbm *sp) { - return (_schizo_alloc_bus_tag(sp, "mem", + return (schizo_alloc_bus_tag(sp, "mem", 0x02, /* 32-bit mem space (where's the #define???) */ ASI_PRIMARY, ASI_PRIMARY_LITTLE)); } @@ -509,7 +513,7 @@ schizo_alloc_mem_tag(struct schizo_pbm *sp) bus_space_tag_t schizo_alloc_io_tag(struct schizo_pbm *sp) { - return (_schizo_alloc_bus_tag(sp, "io", + return (schizo_alloc_bus_tag(sp, "io", 0x01, /* IO space (where's the #define???) */ ASI_PHYS_NON_CACHED_LITTLE, ASI_PHYS_NON_CACHED)); } @@ -517,13 +521,13 @@ schizo_alloc_io_tag(struct schizo_pbm *sp) bus_space_tag_t schizo_alloc_config_tag(struct schizo_pbm *sp) { - return (_schizo_alloc_bus_tag(sp, "cfg", + return (schizo_alloc_bus_tag(sp, "cfg", 0x00, /* Config space (where's the #define???) */ ASI_PHYS_NON_CACHED_LITTLE, ASI_PHYS_NON_CACHED)); } bus_space_tag_t -_schizo_alloc_bus_tag(struct schizo_pbm *pbm, const char *name, int ss, +schizo_alloc_bus_tag(struct schizo_pbm *pbm, const char *name, int ss, int asi, int sasi) { struct schizo_softc *sc = pbm->sp_sc; @@ -542,9 +546,9 @@ _schizo_alloc_bus_tag(struct schizo_pbm *pbm, const char *name, int ss, bt->default_type = ss; bt->asi = asi; bt->sasi = sasi; - bt->sparc_bus_map = _schizo_bus_map; - bt->sparc_bus_mmap = _schizo_bus_mmap; - bt->sparc_intr_establish = _schizo_intr_establish; + bt->sparc_bus_map = schizo_bus_map; + bt->sparc_bus_mmap = schizo_bus_mmap; + bt->sparc_intr_establish = schizo_intr_establish; return (bt); } @@ -582,9 +586,9 @@ schizo_alloc_chipset(struct schizo_pbm *pbm, int node, pci_chipset_tag_t pc) npc = malloc(sizeof *npc, M_DEVBUF, M_NOWAIT); if (npc == NULL) - panic("could not allocate pci_chipset_tag_t"); + panic("schizo: could not allocate pci_chipset_tag_t"); memcpy(npc, pc, sizeof *pc); - npc->cookie = pbm; + npc->cookie = pbm; npc->rootnode = node; return (npc); } @@ -601,13 +605,13 @@ schizo_dmamap_create(bus_dma_tag_t t, bus_dma_tag_t t0, bus_size_t size, } int -_schizo_bus_map(bus_space_tag_t t, bus_space_tag_t t0, bus_addr_t offset, +schizo_bus_map(bus_space_tag_t t, bus_space_tag_t t0, bus_addr_t offset, bus_size_t size, int flags, bus_space_handle_t *hp) { struct schizo_pbm *pbm = t->cookie; int i, ss; - DPRINTF(SDB_BUSMAP, ("_schizo_bus_map: type %d off %qx sz %qx flags %d", + DPRINTF(SDB_BUSMAP, ("schizo_bus_map: type %d off %qx sz %qx flags %d", t->default_type, (unsigned long long)offset, (unsigned long long)size, @@ -617,7 +621,7 @@ _schizo_bus_map(bus_space_tag_t t, bus_space_tag_t t0, bus_addr_t offset, DPRINTF(SDB_BUSMAP, (" cspace %d", ss)); if (t->parent == 0 || t->parent->sparc_bus_map == 0) { - printf("\n_schizo_bus_map: invalid parent"); + printf("\nschizo_bus_map: invalid parent"); return (EINVAL); } @@ -642,7 +646,7 @@ _schizo_bus_map(bus_space_tag_t t, bus_space_tag_t t0, bus_addr_t offset, } paddr_t -_schizo_bus_mmap(bus_space_tag_t t, bus_space_tag_t t0, bus_addr_t paddr, +schizo_bus_mmap(bus_space_tag_t t, bus_space_tag_t t0, bus_addr_t paddr, off_t off, int prot, int flags) { bus_addr_t offset = paddr; @@ -651,11 +655,11 @@ _schizo_bus_mmap(bus_space_tag_t t, bus_space_tag_t t0, bus_addr_t paddr, ss = t->default_type; - DPRINTF(SDB_BUSMAP, ("_schizo_bus_mmap: prot %d flags %d pa %qx\n", + DPRINTF(SDB_BUSMAP, ("schizo_bus_mmap: prot %d flags %d pa %qx\n", prot, flags, (unsigned long long)paddr)); if (t->parent == 0 || t->parent->sparc_bus_mmap == 0) { - printf("\n_schizo_bus_mmap: invalid parent"); + printf("\nschizo_bus_mmap: invalid parent"); return (-1); } @@ -675,7 +679,7 @@ _schizo_bus_mmap(bus_space_tag_t t, bus_space_tag_t t0, bus_addr_t paddr, } void * -_schizo_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle, +schizo_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle, int level, int flags, int (*handler)(void *), void *arg, const char *what) { struct schizo_pbm *pbm = t->cookie; |