diff options
author | Todd T. Fries <todd@cvs.openbsd.org> | 2007-05-29 22:17:51 +0000 |
---|---|---|
committer | Todd T. Fries <todd@cvs.openbsd.org> | 2007-05-29 22:17:51 +0000 |
commit | 83c440ccaffd186a8da77c6fe846aa59632879f0 (patch) | |
tree | 1d4d99ba984f52daaba5cfe3431dfe1607259981 /sys | |
parent | 84e64175f40a4f363b2a0ab44b2b6658829529c4 (diff) |
sprinkle some SMALL_KERNEL to permit bio/softraid to run on boot media
ok marco@ then suggested deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/ami.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/ciss.c | 10 | ||||
-rw-r--r-- | sys/dev/ic/mfi.c | 8 | ||||
-rw-r--r-- | sys/dev/pci/arc.c | 8 |
4 files changed, 29 insertions, 5 deletions
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c index 612dbb74917..4cb9650e03c 100644 --- a/sys/dev/ic/ami.c +++ b/sys/dev/ic/ami.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami.c,v 1.180 2007/05/29 20:41:41 marco Exp $ */ +/* $OpenBSD: ami.c,v 1.181 2007/05/29 22:17:50 todd Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -170,8 +170,10 @@ int ami_ioctl_disk(struct ami_softc *, struct bioc_disk *); int ami_ioctl_alarm(struct ami_softc *, struct bioc_alarm *); int ami_ioctl_setstate(struct ami_softc *, struct bioc_setstate *); +#ifndef SMALL_KERNEL int ami_create_sensors(struct ami_softc *); void ami_refresh_sensors(void *); +#endif #endif /* NBIO > 0 */ #define DEVNAME(_s) ((_s)->sc_dev.dv_xname) @@ -556,9 +558,11 @@ ami_attach(struct ami_softc *sc) else sc->sc_ioctl = ami_ioctl; +#ifndef SMALL_KERNEL if (ami_create_sensors(sc) != 0) printf("%s: unable to create sensors\n", DEVNAME(sc)); #endif +#endif rsc = malloc(sizeof(struct ami_rawsoftc) * sc->sc_channels, M_DEVBUF, M_NOWAIT); @@ -2427,6 +2431,7 @@ ami_ioctl_setstate(struct ami_softc *sc, struct bioc_setstate *bs) return (0); } +#ifndef SMALL_KERNEL int ami_create_sensors(struct ami_softc *sc) { @@ -2523,6 +2528,7 @@ ami_refresh_sensors(void *arg) } } } +#endif /* SMALL_KERNEL */ #endif /* NBIO > 0 */ #ifdef AMI_DEBUG diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c index e1447c5136d..bb229a41e76 100644 --- a/sys/dev/ic/ciss.c +++ b/sys/dev/ic/ciss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ciss.c,v 1.25 2007/03/22 16:55:31 deraadt Exp $ */ +/* $OpenBSD: ciss.c,v 1.26 2007/05/29 22:17:50 todd Exp $ */ /* * Copyright (c) 2005,2006 Michael Shalayeff @@ -99,7 +99,9 @@ int ciss_sync(struct ciss_softc *sc); void ciss_heartbeat(void *v); void ciss_shutdown(void *v); void ciss_kthread(void *v); +#ifndef SMALL_KERNEL void ciss_sensors(void *); +#endif struct ciss_ccb *ciss_get_ccb(struct ciss_softc *sc); void ciss_put_ccb(struct ciss_ccb *ccb); @@ -418,6 +420,7 @@ ciss_attach(struct ciss_softc *sc) sc->sc_dev.dv_xname); sc->sc_flags |= CISS_BIO; +#ifndef SMALL_KERNEL sc->sensors = malloc(sizeof(struct ksensor) * sc->maxunits, M_DEVBUF, M_NOWAIT); if (sc->sensors) { @@ -440,7 +443,8 @@ ciss_attach(struct ciss_softc *sc) else sensordev_install(&sc->sensordev); } -#endif +#endif /* SMALL_KERNEL */ +#endif /* BIO > 0 */ return 0; } @@ -1172,6 +1176,7 @@ ciss_ioctl(struct device *dev, u_long cmd, caddr_t addr) return error; } +#ifndef SMALL_KERNEL void ciss_sensors(void *v) { @@ -1221,6 +1226,7 @@ ciss_sensors(void *v) } } } +#endif /* SMALL_KERNEL */ int ciss_ldid(struct ciss_softc *sc, int target, struct ciss_ldid *id) diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c index af9498e6202..0ed0ee857b9 100644 --- a/sys/dev/ic/mfi.c +++ b/sys/dev/ic/mfi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfi.c,v 1.71 2007/03/22 16:55:31 deraadt Exp $ */ +/* $OpenBSD: mfi.c,v 1.72 2007/05/29 22:17:50 todd Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * @@ -104,8 +104,10 @@ int mfi_ioctl_alarm(struct mfi_softc *, struct bioc_alarm *); int mfi_ioctl_blink(struct mfi_softc *sc, struct bioc_blink *); int mfi_ioctl_setstate(struct mfi_softc *, struct bioc_setstate *); int mfi_bio_hs(struct mfi_softc *, int, int, void *); +#ifndef SMALL_KERNEL int mfi_create_sensors(struct mfi_softc *); void mfi_refresh_sensors(void *); +#endif /* SMALL_KERNEL */ #endif /* NBIO > 0 */ struct mfi_ccb * @@ -682,8 +684,10 @@ mfi_attach(struct mfi_softc *sc) else sc->sc_ioctl = mfi_ioctl; +#ifndef SMALL_KERNEL if (mfi_create_sensors(sc) != 0) printf("%s: unable to create sensors\n", DEVNAME(sc)); +#endif #endif /* NBIO > 0 */ return (0); @@ -1768,6 +1772,7 @@ freeme: return (rv); } +#ifndef SMALL_KERNEL int mfi_create_sensors(struct mfi_softc *sc) { @@ -1865,4 +1870,5 @@ mfi_refresh_sensors(void *arg) } } +#endif /* SMALL_KERNEL */ #endif /* NBIO > 0 */ diff --git a/sys/dev/pci/arc.c b/sys/dev/pci/arc.c index 84788386bba..a651bc44365 100644 --- a/sys/dev/pci/arc.c +++ b/sys/dev/pci/arc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arc.c,v 1.62 2007/05/20 04:39:35 ray Exp $ */ +/* $OpenBSD: arc.c,v 1.63 2007/05/29 22:17:50 todd Exp $ */ /* * Copyright (c) 2006 David Gwynne <dlg@openbsd.org> @@ -492,9 +492,11 @@ int arc_bio_alarm_state(struct arc_softc *, int arc_bio_getvol(struct arc_softc *, int, struct arc_fw_volinfo *); +#ifndef SMALL_KERNEL /* sensors */ void arc_create_sensors(void *, void *); void arc_refresh_sensors(void *); +#endif /* SMALL_KERNEL */ #endif int @@ -555,6 +557,7 @@ arc_attach(struct device *parent, struct device *self, void *aux) if (bio_register(self, arc_bioctl) != 0) panic("%s: bioctl registration failed\n", DEVNAME(sc)); +#ifndef SMALL_KERNEL /* * you need to talk to the firmware to get volume info. our firmware * interface relies on being able to sleep, so we need to use a thread @@ -564,6 +567,7 @@ arc_attach(struct device *parent, struct device *self, void *aux) printf("%s: unable to schedule arc_create_sensors as a " "scsi task", DEVNAME(sc)); #endif +#endif return; } @@ -1515,6 +1519,7 @@ arc_wait(struct arc_softc *sc) splx(s); } +#ifndef SMALL_KERNEL void arc_create_sensors(void *xsc, void *arg) { @@ -1611,6 +1616,7 @@ arc_refresh_sensors(void *arg) } } +#endif /* SMALL_KERNEL */ #endif /* NBIO > 0 */ u_int32_t |