Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/coretemp/coretemp.c
Show First 20 Lines • Show All 160 Lines • ▼ Show 20 Lines | coretemp_attach(device_t dev) | ||||
int cpu_model, cpu_stepping; | int cpu_model, cpu_stepping; | ||||
int ret, tjtarget; | int ret, tjtarget; | ||||
struct sysctl_oid *oid; | struct sysctl_oid *oid; | ||||
struct sysctl_ctx_list *ctx; | struct sysctl_ctx_list *ctx; | ||||
sc->sc_dev = dev; | sc->sc_dev = dev; | ||||
pdev = device_get_parent(dev); | pdev = device_get_parent(dev); | ||||
cpu_model = CPUID_TO_MODEL(cpu_id); | cpu_model = CPUID_TO_MODEL(cpu_id); | ||||
cpu_stepping = cpu_id & CPUID_STEPPING; | cpu_stepping = CPUID_TO_STEPPING(cpu_id); | ||||
/* | /* | ||||
* Some CPUs, namely the PIII, don't have thermal sensors, but | * Some CPUs, namely the PIII, don't have thermal sensors, but | ||||
* report them when the CPUID check is performed in | * report them when the CPUID check is performed in | ||||
* coretemp_identify(). This leads to a later GPF when the sensor | * coretemp_identify(). This leads to a later GPF when the sensor | ||||
* is queried via a MSR, so we stop here. | * is queried via a MSR, so we stop here. | ||||
*/ | */ | ||||
if (cpu_model < 0xe) | if (cpu_model < 0xe) | ||||
▲ Show 20 Lines • Show All 276 Lines • Show Last 20 Lines |