diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-07-28 15:00:28 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-07-28 15:00:28 +0000 |
commit | 283d87d043c9cb54946cba43c7de5380099efbae (patch) | |
tree | 71e127af9aea9b9fbb04f9a14e925789c7b6ce71 | |
parent | 60d95225248225647acfbf1ab5e6b4084b90bf1a (diff) |
Limit the "aperture needed" printf to ramdisks via RAMDISK_HOOKS.
Originally with SMALL_KERNEL until sebastia@ pointed out that not
all ramdisks are built with SMALL_KERNEL.
ok deraadt@ kettenis@
-rw-r--r-- | sys/arch/macppc/pci/vgafb.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/machfb.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/vgafb.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/vga_pci.c | 5 | ||||
-rw-r--r-- | sys/dev/pci/vga_pci_common.c | 2 |
5 files changed, 13 insertions, 6 deletions
diff --git a/sys/arch/macppc/pci/vgafb.c b/sys/arch/macppc/pci/vgafb.c index 5bb859ea457..1e9def6fcca 100644 --- a/sys/arch/macppc/pci/vgafb.c +++ b/sys/arch/macppc/pci/vgafb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vgafb.c,v 1.59 2014/07/22 04:42:51 jsg Exp $ */ +/* $OpenBSD: vgafb.c,v 1.60 2014/07/28 15:00:27 jsg Exp $ */ /* $NetBSD: vga.c,v 1.3 1996/12/02 22:24:54 cgd Exp $ */ /* @@ -167,8 +167,10 @@ vgafb_attach(struct device *parent, struct device *self, void *aux) vgafb_burn(sc, WSDISPLAYIO_VIDEO_ON, 0); /* paranoia */ } +#ifdef RAMDISK_HOOKS if (vga_aperture_needed(pa)) printf("%s: aperture needed\n", sc->sc_dev.dv_xname); +#endif config_found(self, &waa, wsemuldisplaydevprint); } diff --git a/sys/arch/sparc64/dev/machfb.c b/sys/arch/sparc64/dev/machfb.c index 1c55ddf8ba4..967c634fc2f 100644 --- a/sys/arch/sparc64/dev/machfb.c +++ b/sys/arch/sparc64/dev/machfb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machfb.c,v 1.9 2014/07/28 06:21:29 kettenis Exp $ */ +/* $OpenBSD: machfb.c,v 1.10 2014/07/28 15:00:27 jsg Exp $ */ /* * Copyright (c) 2009 Mark Kettenis. @@ -295,7 +295,7 @@ machfb_attach(struct device *parent, struct device *self, void *aux) printf(", %dx%d\n", sc->sc_sunfb.sf_width, sc->sc_sunfb.sf_height); -#ifdef SMALL_KERNEL +#ifdef RAMDISK_HOOKS printf("%s: aperture needed\n", self->dv_xname); #endif diff --git a/sys/arch/sparc64/dev/vgafb.c b/sys/arch/sparc64/dev/vgafb.c index a187bc30033..9518210c573 100644 --- a/sys/arch/sparc64/dev/vgafb.c +++ b/sys/arch/sparc64/dev/vgafb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vgafb.c,v 1.63 2014/07/22 04:53:59 deraadt Exp $ */ +/* $OpenBSD: vgafb.c,v 1.64 2014/07/28 15:00:27 jsg Exp $ */ /* * Copyright (c) 2001 Jason L. Wright (jason@thought.net) @@ -184,8 +184,10 @@ vgafbattach(parent, self, aux) /* sc->sc_ofhandle = PCITAG_NODE(sc->sc_pcitag); */ } +#ifdef RAMDISK_HOOKS if (vga_aperture_needed(pa)) printf("%s: aperture needed\n", sc->sc_sunfb.sf_dev.dv_xname); +#endif fbwscons_attach(&sc->sc_sunfb, &vgafb_accessops, sc->sc_console); } diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index 87ceca83a96..dd5b33ef814 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vga_pci.c,v 1.80 2014/07/22 04:42:51 jsg Exp $ */ +/* $OpenBSD: vga_pci.c,v 1.81 2014/07/28 15:00:27 jsg Exp $ */ /* $NetBSD: vga_pci.c,v 1.3 1998/06/08 06:55:58 thorpej Exp $ */ /* @@ -121,7 +121,6 @@ int vesafb_getcmap(struct vga_pci_softc *, struct wsdisplay_cmap *); void vga_save_state(struct vga_pci_softc *); void vga_restore_state(struct vga_pci_softc *); #endif -int vga_aperture_needed(struct pci_attach_args *); /* * Function pointers for wsconsctl parameter handling. @@ -254,8 +253,10 @@ vga_pci_attach(struct device *parent, struct device *self, void *aux) } #endif +#ifdef RAMDISK_HOOKS if (vga_aperture_needed(pa)) printf("%s: aperture needed\n", sc->sc_dev.dv_xname); +#endif #if NINTAGP > 0 /* diff --git a/sys/dev/pci/vga_pci_common.c b/sys/dev/pci/vga_pci_common.c index b8a9b4e3401..e785709ce04 100644 --- a/sys/dev/pci/vga_pci_common.c +++ b/sys/dev/pci/vga_pci_common.c @@ -154,6 +154,7 @@ vga_pci_bar_unmap(struct vga_pci_bar *bar) } } +#ifdef RAMDISK_HOOKS static const struct pci_matchid aperture_blacklist[] = { /* server adapters found in mga200 drm driver */ { PCI_VENDOR_MATROX, PCI_PRODUCT_MATROX_G200E_SE }, @@ -188,3 +189,4 @@ vga_aperture_needed(struct pci_attach_args *pa) #endif return (1); } +#endif /* RAMDISK_HOOKS */ |