summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2005-11-04 06:55:37 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2005-11-04 06:55:37 +0000
commit7e28db5e49a7a6bc415d4c3f964ca65101529142 (patch)
treebae4ece7faf09cda3ff19a28a97e43e031cea4a1 /sys
parentadde59ea69215cb0620534dbafc2ec9fef20a3cb (diff)
only build powernow pieces as appropriate for config'd cpu types
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/conf/files.i3868
-rw-r--r--sys/arch/i386/i386/machdep.c4
-rw-r--r--sys/arch/i386/include/cpu.h6
3 files changed, 10 insertions, 8 deletions
diff --git a/sys/arch/i386/conf/files.i386 b/sys/arch/i386/conf/files.i386
index f1259e5fd41..4b4164f2374 100644
--- a/sys/arch/i386/conf/files.i386
+++ b/sys/arch/i386/conf/files.i386
@@ -1,4 +1,4 @@
-# $OpenBSD: files.i386,v 1.139 2005/10/28 07:03:41 tedu Exp $
+# $OpenBSD: files.i386,v 1.140 2005/11/04 06:55:35 tedu Exp $
#
# new style config file for i386 architecture
#
@@ -32,9 +32,9 @@ file arch/i386/i386/k6_mem.c mtrr
file arch/i386/i386/microtime.s
file arch/i386/i386/p4tcc.c !small_kernel & i686_cpu
file arch/i386/i386/pmap.c
-file arch/i386/i386/powernow.c !small_kernel
-file arch/i386/i386/powernow-k7.c !small_kernel
-file arch/i386/i386/powernow-k8.c !small_kernel
+file arch/i386/i386/powernow.c !small_kernel & i586_cpu
+file arch/i386/i386/powernow-k7.c !small_kernel & i686_cpu
+file arch/i386/i386/powernow-k8.c !small_kernel & i686_cpu
file arch/i386/i386/process_machdep.c
file arch/i386/i386/procfs_machdep.c procfs
file arch/i386/i386/random.s
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 37a7e1a8f56..7bd95a3ca44 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.327 2005/10/28 07:03:41 tedu Exp $ */
+/* $OpenBSD: machdep.c,v 1.328 2005/11/04 06:55:35 tedu Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -1372,7 +1372,7 @@ amd_family5_setup(struct cpu_info *ci)
break;
case 12:
case 13:
-#ifndef SMALL_KERNEL
+#if !defined(SMALL_KERNEL) && defined(I586_CPU)
k6_powernow_init();
#endif
break;
diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h
index 46080abc651..70a827b0846 100644
--- a/sys/arch/i386/include/cpu.h
+++ b/sys/arch/i386/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.72 2005/10/28 07:03:41 tedu Exp $ */
+/* $OpenBSD: cpu.h,v 1.73 2005/11/04 06:55:36 tedu Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
@@ -369,10 +369,12 @@ void p4tcc_init(int, int);
int p4tcc_setperf(int);
#endif
-#if !defined(SMALL_KERNEL) && defined(I686_CPU)
+#if !defined(SMALL_KERNEL) && defined(I586_CPU)
/* powernow.c */
void k6_powernow_init(void);
int k6_powernow_setperf(int);
+#endif
+#if !defined(SMALL_KERNEL) && defined(I686_CPU)
/* powernow-k7.c */
void k7_powernow_init(void);
int k7_powernow_setperf(int);