Deleted Added
full compact
amdtemp.c (298270) amdtemp.c (300421)
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 298270 2016-04-19 15:07:04Z loos $");
35__FBSDID("$FreeBSD: head/sys/dev/amdtemp/amdtemp.c 300421 2016-05-22 13:58:32Z loos $");
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>

--- 456 unchanged lines hidden (view full) ---

500 temp = sc->sc_gettemp(dev, sensor);
501 break;
502 }
503 error = sysctl_handle_int(oidp, &temp, 0, req);
504
505 return (error);
506}
507
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>

--- 456 unchanged lines hidden (view full) ---

500 temp = sc->sc_gettemp(dev, sensor);
501 break;
502 }
503 error = sysctl_handle_int(oidp, &temp, 0, req);
504
505 return (error);
506}
507
508#define AMDTEMP_ZERO_C_TO_K 2732
508#define AMDTEMP_ZERO_C_TO_K 2731
509
510static int32_t
511amdtemp_gettemp0f(device_t dev, amdsensor_t sensor)
512{
513 struct amdtemp_softc *sc = device_get_softc(dev);
514 uint32_t mask, offset, temp;
515
516 /* Set Sensor/Core selector. */

--- 43 unchanged lines hidden ---
509
510static int32_t
511amdtemp_gettemp0f(device_t dev, amdsensor_t sensor)
512{
513 struct amdtemp_softc *sc = device_get_softc(dev);
514 uint32_t mask, offset, temp;
515
516 /* Set Sensor/Core selector. */

--- 43 unchanged lines hidden ---