amdtemp.c (241856) | amdtemp.c (241885) |
---|---|
1/*- 2 * Copyright (c) 2008, 2009 Rui Paulo <rpaulo@FreeBSD.org> 3 * Copyright (c) 2009 Norikatsu Shigemura <nork@FreeBSD.org> 4 * Copyright (c) 2009-2012 Jung-uk Kim <jkim@FreeBSD.org> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 18 unchanged lines hidden (view full) --- 27 */ 28 29/* 30 * Driver for the AMD CPU on-die thermal sensors. 31 * Initially based on the k8temp Linux driver. 32 */ 33 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2008, 2009 Rui Paulo <rpaulo@FreeBSD.org> 3 * Copyright (c) 2009 Norikatsu Shigemura <nork@FreeBSD.org> 4 * Copyright (c) 2009-2012 Jung-uk Kim <jkim@FreeBSD.org> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 18 unchanged lines hidden (view full) --- 27 */ 28 29/* 30 * Driver for the AMD CPU on-die thermal sensors. 31 * Initially based on the k8temp Linux driver. 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/dev/amdtemp/amdtemp.c 241856 2012-10-22 03:41:14Z eadler $"); | 35__FBSDID("$FreeBSD: head/sys/dev/amdtemp/amdtemp.c 241885 2012-10-22 13:06:09Z eadler $"); |
36 37#include <sys/param.h> 38#include <sys/bus.h> 39#include <sys/conf.h> 40#include <sys/kernel.h> 41#include <sys/module.h> 42#include <sys/sysctl.h> 43#include <sys/systm.h> --- 136 unchanged lines hidden (view full) --- 180 } 181} 182 183static int 184amdtemp_probe(device_t dev) 185{ 186 uint32_t family, model; 187 | 36 37#include <sys/param.h> 38#include <sys/bus.h> 39#include <sys/conf.h> 40#include <sys/kernel.h> 41#include <sys/module.h> 42#include <sys/sysctl.h> 43#include <sys/systm.h> --- 136 unchanged lines hidden (view full) --- 180 } 181} 182 183static int 184amdtemp_probe(device_t dev) 185{ 186 uint32_t family, model; 187 |
188 if (resource_disabled("amdtemp", 0)) 189 return (ENXIO); 190 |
|
188 family = CPUID_TO_FAMILY(cpu_id); 189 model = CPUID_TO_MODEL(cpu_id); 190 191 switch (family) { 192 case 0x0f: 193 if ((model == 0x04 && (cpu_id & CPUID_STEPPING) == 0) || 194 (model == 0x05 && (cpu_id & CPUID_STEPPING) <= 1)) 195 return (ENXIO); --- 351 unchanged lines hidden --- | 191 family = CPUID_TO_FAMILY(cpu_id); 192 model = CPUID_TO_MODEL(cpu_id); 193 194 switch (family) { 195 case 0x0f: 196 if ((model == 0x04 && (cpu_id & CPUID_STEPPING) == 0) || 197 (model == 0x05 && (cpu_id & CPUID_STEPPING) <= 1)) 198 return (ENXIO); --- 351 unchanged lines hidden --- |