PERFORCE change 115417 for review
Paolo Pisati
piso at FreeBSD.org
Tue Mar 6 15:15:24 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=115417
Change 115417 by piso at piso_newluxor on 2007/03/06 15:14:24
Reduce diff against HEAD.
Affected files ...
.. //depot/projects/soc2006/intr_filter/sparc64/fhc/fhc.c#7 edit
.. //depot/projects/soc2006/intr_filter/sparc64/pci/psycho.c#13 edit
.. //depot/projects/soc2006/intr_filter/sparc64/sbus/sbus.c#11 edit
Differences ...
==== //depot/projects/soc2006/intr_filter/sparc64/fhc/fhc.c#7 (text+ko) ====
@@ -208,7 +208,7 @@
int
fhc_setup_intr(device_t bus, device_t child, struct resource *r, int flags,
- driver_filter_t *filter, driver_intr_t *func, void *arg, void **cookiep)
+ driver_filter_t *filt, driver_intr_t *func, void *arg, void **cookiep)
{
struct fhc_softc *sc;
struct fhc_clr *fc;
@@ -219,7 +219,7 @@
long vec;
uint32_t inr;
- if (filter != NULL && func != NULL)
+ if (filt != NULL && func != NULL)
return (EINVAL);
sc = device_get_softc(bus);
@@ -243,7 +243,7 @@
fc = malloc(sizeof(*fc), M_DEVBUF, M_WAITOK | M_ZERO);
if (fc == NULL)
return (0);
- fc->fc_filter = filter;
+ fc->fc_filter = filt;
fc->fc_func = func;
fc->fc_arg = arg;
fc->fc_bt = bt;
==== //depot/projects/soc2006/intr_filter/sparc64/pci/psycho.c#13 (text+ko) ====
@@ -92,9 +92,7 @@
static int psycho_ue(void *);
static int psycho_ce(void *);
static int psycho_pci_bus(void *);
-static
-int
-psycho_powerfail(void *);
+static int psycho_powerfail(void *);
static int psycho_overtemp(void *);
#ifdef PSYCHO_MAP_WAKEUP
static int psycho_wakeup(void *);
@@ -220,6 +218,7 @@
* On UltraII machines, there can be any number of "Psycho+" ICs, each
* providing two PCI buses.
*/
+
/* XXX let's hope no one ever create a flag with this value... */
#define FAST 0x66600000
@@ -231,7 +230,6 @@
#define OFW_PCI_TYPE "pci"
-
struct psycho_desc {
const char *pd_string;
int pd_mode;
@@ -534,7 +532,7 @@
psycho_set_intr(sc, 1, PSR_UE_INT_MAP, FAST, psycho_ue);
psycho_set_intr(sc, 2, PSR_CE_INT_MAP, 0, psycho_ce);
psycho_set_intr(sc, 3, PSR_POWER_INT_MAP,
- PSYCHO_PWRFAIL_INT_FLAGS, psycho_powerfail);
+ PSYCHO_PWRFAIL_INT_FLAGS, psycho_powerfail);
/* Psycho-specific initialization */
if (sc->sc_mode == PSYCHO_MODE_PSYCHO) {
/*
@@ -546,7 +544,7 @@
* The spare hardware interrupt is used for the
* over-temperature interrupt.
*/
- psycho_set_intr(sc, 4, PSR_SPARE_INT_MAP, FAST,
+ psycho_set_intr(sc, 4, PSR_SPARE_INT_MAP, FAST,
psycho_overtemp);
#ifdef PSYCHO_MAP_WAKEUP
/*
@@ -695,7 +693,7 @@
rid = index;
mr = PSYCHO_READ8(sc, map);
vec = INTVEC(mr);
- sc->sc_irq_res[index] = bus_alloc_resource(sc->sc_dev, SYS_RES_IRQ,
+ sc->sc_irq_res[index] = bus_alloc_resource(sc->sc_dev, SYS_RES_IRQ,
&rid, vec, vec, 1, RF_ACTIVE);
if (sc->sc_irq_res[index] == NULL)
panic("%s: failed to get interrupt", __func__);
@@ -817,8 +815,7 @@
return (FILTER_HANDLED);
}
-static
-int
+static int
psycho_powerfail(void *arg)
{
@@ -827,12 +824,11 @@
kdb_enter("powerfail");
PSYCHO_WRITE8(sc, PSR_POWER_INT_CLR, 0);
- return (FILTER_HANDLED);
#else
printf("Power Failure Detected: Shutting down NOW.\n");
shutdown_nice(0);
+#endif
return (FILTER_HANDLED);
-#endif
}
static int
@@ -1012,6 +1008,7 @@
return (ENOENT);
}
+/* Write to the correct clr register, and call the actual handler. */
static int
psycho_filter_stub(void *arg)
{
@@ -1026,7 +1023,6 @@
return (res);
}
-/* Write to the correct clr register, and call the actual handler. */
static void
psycho_intr_stub(void *arg)
{
@@ -1042,7 +1038,7 @@
static int
psycho_setup_intr(device_t dev, device_t child, struct resource *ires,
- int flags, driver_filter_t *filter, driver_intr_t *intr, void *arg,
+ int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg,
void **cookiep)
{
struct {
@@ -1058,7 +1054,7 @@
uint64_t mr;
int error, ino;
- if (filter != NULL && intr != NULL)
+ if (filt != NULL && intr != NULL)
return (EINVAL);
sc = device_get_softc(dev);
@@ -1090,7 +1086,7 @@
pc->pci_sc = sc;
pc->pci_arg = arg;
- pc->pci_filter = filter;
+ pc->pci_filter = filt;
pc->pci_handler = intr;
pc->pci_clr = intrclrptr;
==== //depot/projects/soc2006/intr_filter/sparc64/sbus/sbus.c#11 (text+ko) ====
@@ -638,6 +638,7 @@
return (&sdi->sdi_rl);
}
+/* Write to the correct clr register, and call the actual handler. */
static int
sbus_filter_stub(void *arg)
{
@@ -653,7 +654,6 @@
return (res);
}
-/* Write to the correct clr register, and call the actual handler. */
static void
sbus_intr_stub(void *arg)
{
More information about the p4-projects
mailing list