svn commit: r206188 - in stable/8/sys/sparc64: fhc pci sbus
Marius Strobl
marius at FreeBSD.org
Mon Apr 5 17:56:41 UTC 2010
Author: marius
Date: Mon Apr 5 17:56:40 2010
New Revision: 206188
URL: http://svn.freebsd.org/changeset/base/206188
Log:
MFC: r206018
- Take advantage of the INTCLR_* macros.
- Right-justify the backslashes as per style(9).
Modified:
stable/8/sys/sparc64/fhc/fhc.c
stable/8/sys/sparc64/pci/psycho.c
stable/8/sys/sparc64/pci/schizo.c
stable/8/sys/sparc64/sbus/sbus.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
Modified: stable/8/sys/sparc64/fhc/fhc.c
==============================================================================
--- stable/8/sys/sparc64/fhc/fhc.c Mon Apr 5 17:37:35 2010 (r206187)
+++ stable/8/sys/sparc64/fhc/fhc.c Mon Apr 5 17:56:40 2010 (r206188)
@@ -208,7 +208,7 @@ fhc_attach(device_t dev)
printf("model unknown\n");
for (i = FHC_FANFAIL; i <= FHC_TOD; i++) {
- bus_write_4(sc->sc_memres[i], FHC_ICLR, 0x0);
+ bus_write_4(sc->sc_memres[i], FHC_ICLR, INTCLR_IDLE);
(void)bus_read_4(sc->sc_memres[i], FHC_ICLR);
}
@@ -391,7 +391,7 @@ fhc_intr_clear(void *arg)
struct intr_vector *iv = arg;
struct fhc_icarg *fica = iv->iv_icarg;
- bus_write_4(fica->fica_memres, FHC_ICLR, 0x0);
+ bus_write_4(fica->fica_memres, FHC_ICLR, INTCLR_IDLE);
(void)bus_read_4(fica->fica_memres, FHC_ICLR);
}
Modified: stable/8/sys/sparc64/pci/psycho.c
==============================================================================
--- stable/8/sys/sparc64/pci/psycho.c Mon Apr 5 17:37:35 2010 (r206187)
+++ stable/8/sys/sparc64/pci/psycho.c Mon Apr 5 17:56:40 2010 (r206188)
@@ -188,13 +188,13 @@ struct psycho_dma_sync {
uint8_t pds_func; /* func. of farest PCI dev. */
};
-#define PSYCHO_READ8(sc, off) \
+#define PSYCHO_READ8(sc, off) \
bus_read_8((sc)->sc_mem_res, (off))
-#define PSYCHO_WRITE8(sc, off, v) \
+#define PSYCHO_WRITE8(sc, off, v) \
bus_write_8((sc)->sc_mem_res, (off), (v))
-#define PCICTL_READ8(sc, off) \
+#define PCICTL_READ8(sc, off) \
PSYCHO_READ8((sc), (sc)->sc_pcictl + (off))
-#define PCICTL_WRITE8(sc, off, v) \
+#define PCICTL_WRITE8(sc, off, v) \
PSYCHO_WRITE8((sc), (sc)->sc_pcictl + (off), (v))
/*
@@ -523,7 +523,7 @@ psycho_attach(device_t dev)
(u_long)intrmap, (u_long)PSYCHO_READ8(sc,
intrmap), (u_long)intrclr);
PSYCHO_WRITE8(sc, intrmap, INTMAP_VEC(sc->sc_ign, i));
- PSYCHO_WRITE8(sc, intrclr, 0);
+ PSYCHO_WRITE8(sc, intrclr, INTCLR_IDLE);
PSYCHO_WRITE8(sc, intrmap,
INTMAP_ENABLE(INTMAP_VEC(sc->sc_ign, i),
PCPU_GET(mid)));
@@ -1137,7 +1137,7 @@ psycho_intr_clear(void *arg)
struct intr_vector *iv = arg;
struct psycho_icarg *pica = iv->iv_icarg;
- PSYCHO_WRITE8(pica->pica_sc, pica->pica_clr, 0);
+ PSYCHO_WRITE8(pica->pica_sc, pica->pica_clr, INTCLR_IDLE);
}
static int
Modified: stable/8/sys/sparc64/pci/schizo.c
==============================================================================
--- stable/8/sys/sparc64/pci/schizo.c Mon Apr 5 17:37:35 2010 (r206187)
+++ stable/8/sys/sparc64/pci/schizo.c Mon Apr 5 17:56:40 2010 (r206188)
@@ -189,26 +189,26 @@ struct schizo_dma_sync {
#define SCHIZO_PERF_CNT_QLTY 100
-#define SCHIZO_SPC_READ_8(spc, sc, offs) \
+#define SCHIZO_SPC_READ_8(spc, sc, offs) \
bus_read_8((sc)->sc_mem_res[(spc)], (offs))
-#define SCHIZO_SPC_WRITE_8(spc, sc, offs, v) \
+#define SCHIZO_SPC_WRITE_8(spc, sc, offs, v) \
bus_write_8((sc)->sc_mem_res[(spc)], (offs), (v))
-#define SCHIZO_PCI_READ_8(sc, offs) \
+#define SCHIZO_PCI_READ_8(sc, offs) \
SCHIZO_SPC_READ_8(STX_PCI, (sc), (offs))
-#define SCHIZO_PCI_WRITE_8(sc, offs, v) \
+#define SCHIZO_PCI_WRITE_8(sc, offs, v) \
SCHIZO_SPC_WRITE_8(STX_PCI, (sc), (offs), (v))
-#define SCHIZO_CTRL_READ_8(sc, offs) \
+#define SCHIZO_CTRL_READ_8(sc, offs) \
SCHIZO_SPC_READ_8(STX_CTRL, (sc), (offs))
-#define SCHIZO_CTRL_WRITE_8(sc, offs, v) \
+#define SCHIZO_CTRL_WRITE_8(sc, offs, v) \
SCHIZO_SPC_WRITE_8(STX_CTRL, (sc), (offs), (v))
-#define SCHIZO_PCICFG_READ_8(sc, offs) \
+#define SCHIZO_PCICFG_READ_8(sc, offs) \
SCHIZO_SPC_READ_8(STX_PCICFG, (sc), (offs))
-#define SCHIZO_PCICFG_WRITE_8(sc, offs, v) \
+#define SCHIZO_PCICFG_WRITE_8(sc, offs, v) \
SCHIZO_SPC_WRITE_8(STX_PCICFG, (sc), (offs), (v))
-#define SCHIZO_ICON_READ_8(sc, offs) \
+#define SCHIZO_ICON_READ_8(sc, offs) \
SCHIZO_SPC_READ_8(STX_ICON, (sc), (offs))
-#define SCHIZO_ICON_WRITE_8(sc, offs, v) \
+#define SCHIZO_ICON_WRITE_8(sc, offs, v) \
SCHIZO_SPC_WRITE_8(STX_ICON, (sc), (offs), (v))
struct schizo_desc {
@@ -1054,7 +1054,7 @@ schizo_dma_sync_stub(void *arg)
for (; atomic_cmpset_acq_32(&sc->sc_cdma_state,
SCHIZO_CDMA_STATE_DONE, SCHIZO_CDMA_STATE_PENDING) == 0;)
;
- SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, 1);
+ SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, INTCLR_RECEIVED);
microuptime(&cur);
end.tv_sec = 1;
end.tv_usec = 0;
@@ -1139,7 +1139,7 @@ schizo_intr_clear(void *arg)
struct intr_vector *iv = arg;
struct schizo_icarg *sica = iv->iv_icarg;
- SCHIZO_PCI_WRITE_8(sica->sica_sc, sica->sica_clr, 0);
+ SCHIZO_PCI_WRITE_8(sica->sica_sc, sica->sica_clr, INTCLR_IDLE);
}
static int
Modified: stable/8/sys/sparc64/sbus/sbus.c
==============================================================================
--- stable/8/sys/sparc64/sbus/sbus.c Mon Apr 5 17:37:35 2010 (r206187)
+++ stable/8/sys/sparc64/sbus/sbus.c Mon Apr 5 17:56:40 2010 (r206188)
@@ -171,9 +171,9 @@ struct sbus_softc {
void *sc_pf_ihand;
};
-#define SYSIO_READ8(sc, off) \
+#define SYSIO_READ8(sc, off) \
bus_read_8((sc)->sc_sysio_res, (off))
-#define SYSIO_WRITE8(sc, off, v) \
+#define SYSIO_WRITE8(sc, off, v) \
bus_write_8((sc)->sc_sysio_res, (off), (v))
static device_probe_t sbus_probe;
@@ -697,7 +697,7 @@ sbus_intr_clear(void *arg)
struct intr_vector *iv = arg;
struct sbus_icarg *sica = iv->iv_icarg;
- SYSIO_WRITE8(sica->sica_sc, sica->sica_clr, 0);
+ SYSIO_WRITE8(sica->sica_sc, sica->sica_clr, INTCLR_IDLE);
}
static int
More information about the svn-src-stable-8
mailing list