diff options
author | Tom Cosgrove <tom@cvs.openbsd.org> | 2007-05-29 02:40:25 +0000 |
---|---|---|
committer | Tom Cosgrove <tom@cvs.openbsd.org> | 2007-05-29 02:40:25 +0000 |
commit | 3784b6946d809f75adfc6c692faa81b303c73d8e (patch) | |
tree | 3084b3520e5abd204d1027d197f37224da177a7d /sys/arch | |
parent | 5788dfeb47f35e7620e48c3114aa1d2cc31e651c (diff) |
Fix compilation of kernels without I686_CPU: piixpcib is always
needed (not just for I686_CPU), but it and ichpcib only call the
update_cpuspeed functions for I686_CPU.
ok tedu@ deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/conf/files.i386 | 4 | ||||
-rw-r--r-- | sys/arch/i386/pci/ichpcib.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/pci/piixpcib.c | 7 |
3 files changed, 10 insertions, 5 deletions
diff --git a/sys/arch/i386/conf/files.i386 b/sys/arch/i386/conf/files.i386 index 82b75d17566..ca6fbd99593 100644 --- a/sys/arch/i386/conf/files.i386 +++ b/sys/arch/i386/conf/files.i386 @@ -1,4 +1,4 @@ -# $OpenBSD: files.i386,v 1.161 2007/05/28 02:13:44 krw Exp $ +# $OpenBSD: files.i386,v 1.162 2007/05/29 02:40:24 tom Exp $ # # new style config file for i386 architecture # @@ -146,7 +146,7 @@ file arch/i386/pci/ichpcib.c ichpcib # Intel PIIX4 PCI-ISA bridge device piixpcib: isabus attach piixpcib at pci -file arch/i386/pci/piixpcib.c piixpcib & i686_cpu +file arch/i386/pci/piixpcib.c piixpcib # National Semiconductor Geode SC1100 PCI-ISA bridge device gscpcib: isabus, gpiobus diff --git a/sys/arch/i386/pci/ichpcib.c b/sys/arch/i386/pci/ichpcib.c index fca3d7e2521..3acba09b973 100644 --- a/sys/arch/i386/pci/ichpcib.c +++ b/sys/arch/i386/pci/ichpcib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ichpcib.c,v 1.17 2007/03/26 00:27:43 gwk Exp $ */ +/* $OpenBSD: ichpcib.c,v 1.18 2007/05/29 02:40:24 tom Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org> * @@ -274,8 +274,10 @@ ichss_setperf(int level) bus_space_write_1(sc->sc_pm_iot, sc->sc_pm_ioh, ICH_PM_CNTL, cntl); +#ifdef I686_CPU if (update_cpuspeed != NULL) update_cpuspeed(); +#endif } splx(s); } diff --git a/sys/arch/i386/pci/piixpcib.c b/sys/arch/i386/pci/piixpcib.c index 34f570be520..20d63e8052a 100644 --- a/sys/arch/i386/pci/piixpcib.c +++ b/sys/arch/i386/pci/piixpcib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: piixpcib.c,v 1.1 2007/04/26 01:43:13 gwk Exp $ */ +/* $OpenBSD: piixpcib.c,v 1.2 2007/05/29 02:40:24 tom Exp $ */ /* * Copyright (c) 2007 Stefan Sperling <stsp@stsp.in-berlin.de> @@ -116,7 +116,9 @@ void piixpcib_int15_gsic_call(struct piixpcib_softc *); extern void pcibattach(struct device *, struct device *, void *); /* arch/i386/i386/machdep.c */ +#if !defined(SMALL_KERNEL) && defined(I686_CPU) extern void p3_update_cpuspeed(void); +#endif struct cfattach piixpcib_ca = { sizeof(struct piixpcib_softc), @@ -363,6 +365,7 @@ piixpcib_setperf(int level) * There seems to be no reliable fix for this. */ delay(200); +#if !defined(SMALL_KERNEL) && defined(I686_CPU) p3_update_cpuspeed(); +#endif } - |