summaryrefslogtreecommitdiff
path: root/sys/arch/i386/pci
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2004-02-27 21:15:46 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2004-02-27 21:15:46 +0000
commitff57b30819373fd7e2135484db1c3b0cd874fcd3 (patch)
tree8a7894b15573209222d27febbcf31bb6af2a8626 /sys/arch/i386/pci
parent7e8c2ed9cc5ceb5d64086482a297efa79f805523 (diff)
Introduce simple priorities mechanism so that concurrent
hw.setperf handlers don't override each other. Problem reported and tested by danh@. ok tedu@ deraadt@
Diffstat (limited to 'sys/arch/i386/pci')
-rw-r--r--sys/arch/i386/pci/pcib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/i386/pci/pcib.c b/sys/arch/i386/pci/pcib.c
index 39994a6558e..2dc4c12138f 100644
--- a/sys/arch/i386/pci/pcib.c
+++ b/sys/arch/i386/pci/pcib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcib.c,v 1.12 2004/02/19 21:38:44 grange Exp $ */
+/* $OpenBSD: pcib.c,v 1.13 2004/02/27 21:15:45 grange Exp $ */
/* $NetBSD: pcib.c,v 1.6 1997/06/06 23:29:16 thorpej Exp $ */
/*-
@@ -125,7 +125,8 @@ pcibattach(parent, self, aux)
/*
* Detect and activate SpeedStep on ICHx-M chipsets.
*/
- if (ichss_match(aux) && ichss_attach(self, aux) == 0)
+ if (setperf_prio < 2 && ichss_match(aux) &&
+ ichss_attach(self, aux) == 0)
printf(": SpeedStep");
#endif
@@ -226,6 +227,7 @@ ichss_attach(struct device *self, void *aux)
/* Hook into hw.setperf sysctl */
ichss_cookie = sc;
cpu_setperf = ichss_setperf;
+ setperf_prio = 2;
return (0);
}