summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2009-09-20 21:58:32 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2009-09-20 21:58:32 +0000
commit413aaf060c5f67546d0718264a4bb6f7979af755 (patch)
tree0e363a04d3d31ec5ff8c3356af8247cdf52f1df8 /sys/arch/i386
parent40b437a7428b5e32f0abb7f3b5d59dc0e15ebda1 (diff)
Back out via nano temperature sensor changes.
They break ramdisks as noticed by jasper, and have not been adequately discussed.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/machdep.c31
-rw-r--r--sys/arch/i386/include/specialreg.h5
2 files changed, 2 insertions, 34 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index b30bca12551..8fdd9528f0c 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.460 2009/09/20 15:37:23 kevlo Exp $ */
+/* $OpenBSD: machdep.c,v 1.461 2009/09/20 21:58:31 jsg Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -309,7 +309,6 @@ void amd_family6_setperf_setup(struct cpu_info *);
void amd_family6_setup(struct cpu_info *);
void cyrix3_setperf_setup(struct cpu_info *);
void cyrix3_cpu_setup(struct cpu_info *);
-void via_update_sensor(void *args);
void cyrix6x86_cpu_setup(struct cpu_info *);
void natsem6x86_cpu_setup(struct cpu_info *);
void intel586_cpu_setup(struct cpu_info *);
@@ -1165,39 +1164,11 @@ cyrix3_cpu_setup(struct cpu_info *ci)
}
printf("\n");
-
- /* Setup the sensors structures */
- strlcpy(ci->ci_sensordev.xname, ci->ci_dev.dv_xname,
- sizeof(ci->ci_sensordev.xname));
- ci->ci_sensor.type = SENSOR_TEMP;
- sensor_task_register(ci, via_update_sensor, 5);
- sensor_attach(&ci->ci_sensordev, &ci->ci_sensor);
- sensordev_install(&ci->ci_sensordev);
-
break;
}
}
void
-via_update_sensor(void *args)
-{
- struct cpu_info *ci = (struct cpu_info *) args;
- u_int64_t msr;
-
- if (ci->ci_model == 0xf) {
- msr = rdmsr(MSR_CENT_TMTEMPERATURE);
- ci->ci_sensor.value = (msr & 0xffffff);
- /* micro degrees */
- ci->ci_sensor.value *= 1000000;
- ci->ci_sensor.value += 273150000;
- ci->ci_sensor.flags &= ~SENSOR_FINVALID;
- } else {
- ci->ci_sensor.value = 0;
- ci->ci_sensor.flags |= SENSOR_FINVALID;
- }
-}
-
-void
cyrix6x86_cpu_setup(struct cpu_info *ci)
{
extern int clock_broken_latch;
diff --git a/sys/arch/i386/include/specialreg.h b/sys/arch/i386/include/specialreg.h
index 9ecfa024a50..c9d96b85368 100644
--- a/sys/arch/i386/include/specialreg.h
+++ b/sys/arch/i386/include/specialreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: specialreg.h,v 1.35 2009/09/20 15:37:24 kevlo Exp $ */
+/* $OpenBSD: specialreg.h,v 1.36 2009/09/20 21:58:31 jsg Exp $ */
/* $NetBSD: specialreg.h,v 1.7 1994/10/27 04:16:26 cgd Exp $ */
/*-
@@ -244,9 +244,6 @@
#define MSR_MC3_ADDR 0x412
#define MSR_MC3_MISC 0x413
-/* VIA MSR */
-#define MSR_CENT_TMTEMPERATURE 0x1423 /* Thermal monitor temperature */
-
/* AMD MSRs */
#define MSR_K6_EPMR 0xc0000086
#define MSR_K7_EVNTSEL0 0xc0010000