Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
coretemp.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/hwmon.h>
#include <linux/sysfs.h>
#include <linux/hwmon-sysfs.h>
#include <linux/err.h>
#include <linux/mutex.h>
#include <linux/list.h>
#include <linux/platform_device.h>
#include <linux/cpu.h>
#include <linux/pci.h>
#include <linux/smp.h>
#include <linux/moduleparam.h>
#include <asm/msr.h>
#include <asm/processor.h>
#include <asm/cpu_device_id.h>

Go to the source code of this file.

Data Structures

struct  temp_data
 
struct  platform_data
 
struct  pdev_entry
 
struct  tjmax
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define DRVNAME   "coretemp"
 
#define BASE_SYSFS_ATTR_NO   2 /* Sysfs Base attr no for coretemp */
 
#define NUM_REAL_CORES   32 /* Number of Real cores per cpu */
 
#define CORETEMP_NAME_LENGTH   17 /* String Length of attrs */
 
#define MAX_CORE_ATTRS   4 /* Maximum no of basic attrs */
 
#define TOTAL_ATTRS   (MAX_CORE_ATTRS + 1)
 
#define MAX_CORE_DATA   (NUM_REAL_CORES + BASE_SYSFS_ATTR_NO)
 
#define TO_PHYS_ID(cpu)   (cpu_data(cpu).phys_proc_id)
 
#define TO_CORE_ID(cpu)   (cpu_data(cpu).cpu_core_id)
 
#define TO_ATTR_NO(cpu)   (TO_CORE_ID(cpu) + BASE_SYSFS_ATTR_NO)
 
#define for_each_sibling(i, cpu)   for (i = 0; false; )
 

Functions

 module_param_named (tjmax, force_tjmax, int, 0444)
 
 MODULE_PARM_DESC (tjmax,"TjMax value in degrees Celsius")
 
 MODULE_DEVICE_TABLE (x86cpu, coretemp_ids)
 
 MODULE_AUTHOR ("Rudolf Marek <[email protected]>")
 
 MODULE_DESCRIPTION ("Intel Core temperature monitor")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define BASE_SYSFS_ATTR_NO   2 /* Sysfs Base attr no for coretemp */

Definition at line 54 of file coretemp.c.

#define CORETEMP_NAME_LENGTH   17 /* String Length of attrs */

Definition at line 56 of file coretemp.c.

#define DRVNAME   "coretemp"

Definition at line 44 of file coretemp.c.

#define for_each_sibling (   i,
  cpu 
)    for (i = 0; false; )

Definition at line 68 of file coretemp.c.

#define MAX_CORE_ATTRS   4 /* Maximum no of basic attrs */

Definition at line 57 of file coretemp.c.

#define MAX_CORE_DATA   (NUM_REAL_CORES + BASE_SYSFS_ATTR_NO)

Definition at line 59 of file coretemp.c.

#define NUM_REAL_CORES   32 /* Number of Real cores per cpu */

Definition at line 55 of file coretemp.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 23 of file coretemp.c.

#define TO_ATTR_NO (   cpu)    (TO_CORE_ID(cpu) + BASE_SYSFS_ATTR_NO)

Definition at line 63 of file coretemp.c.

#define TO_CORE_ID (   cpu)    (cpu_data(cpu).cpu_core_id)

Definition at line 62 of file coretemp.c.

#define TO_PHYS_ID (   cpu)    (cpu_data(cpu).phys_proc_id)

Definition at line 61 of file coretemp.c.

#define TOTAL_ATTRS   (MAX_CORE_ATTRS + 1)

Definition at line 58 of file coretemp.c.

Function Documentation

MODULE_AUTHOR ( "Rudolf Marek <[email protected]>"  )
MODULE_DESCRIPTION ( "Intel Core temperature monitor"  )
MODULE_DEVICE_TABLE ( x86cpu  ,
coretemp_ids   
)
MODULE_LICENSE ( "GPL"  )
module_param_named ( tjmax  ,
force_tjmax  ,
int  ,
0444   
)
MODULE_PARM_DESC ( tjmax  ,
"TjMax value in degrees Celsius"   
)