Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
cpu.h File Reference
#include <linux/node.h>
#include <linux/compiler.h>
#include <linux/cpumask.h>

Go to the source code of this file.

Data Structures

struct  cpu
 

Macros

#define CPU_ONLINE   0x0002 /* CPU (unsigned)v is up */
 
#define CPU_UP_PREPARE   0x0003 /* CPU (unsigned)v coming up */
 
#define CPU_UP_CANCELED   0x0004 /* CPU (unsigned)v NOT coming up */
 
#define CPU_DOWN_PREPARE   0x0005 /* CPU (unsigned)v going down */
 
#define CPU_DOWN_FAILED   0x0006 /* CPU (unsigned)v NOT going down */
 
#define CPU_DEAD   0x0007 /* CPU (unsigned)v dead */
 
#define CPU_DYING
 
#define CPU_POST_DEAD
 
#define CPU_STARTING
 
#define CPU_TASKS_FROZEN   0x0010
 
#define CPU_ONLINE_FROZEN   (CPU_ONLINE | CPU_TASKS_FROZEN)
 
#define CPU_UP_PREPARE_FROZEN   (CPU_UP_PREPARE | CPU_TASKS_FROZEN)
 
#define CPU_UP_CANCELED_FROZEN   (CPU_UP_CANCELED | CPU_TASKS_FROZEN)
 
#define CPU_DOWN_PREPARE_FROZEN   (CPU_DOWN_PREPARE | CPU_TASKS_FROZEN)
 
#define CPU_DOWN_FAILED_FROZEN   (CPU_DOWN_FAILED | CPU_TASKS_FROZEN)
 
#define CPU_DEAD_FROZEN   (CPU_DEAD | CPU_TASKS_FROZEN)
 
#define CPU_DYING_FROZEN   (CPU_DYING | CPU_TASKS_FROZEN)
 
#define CPU_STARTING_FROZEN   (CPU_STARTING | CPU_TASKS_FROZEN)
 
#define cpu_notifier(fn, pri)   do { (void)(fn); } while (0)
 
#define get_online_cpus()   do { } while (0)
 
#define put_online_cpus()   do { } while (0)
 
#define hotcpu_notifier(fn, pri)   do { (void)(fn); } while (0)
 
#define register_hotcpu_notifier(nb)   ({ (void)(nb); 0; })
 
#define unregister_hotcpu_notifier(nb)   ({ (void)(nb); })
 

Enumerations

enum  {
  CPU_PRI_SCHED_ACTIVE = INT_MAX, CPU_PRI_CPUSET_ACTIVE = INT_MAX - 1, CPU_PRI_SCHED_INACTIVE = INT_MIN + 1, CPU_PRI_CPUSET_INACTIVE = INT_MIN,
  CPU_PRI_PERF = 20, CPU_PRI_MIGRATION = 10, CPU_PRI_WORKQUEUE_UP = 5, CPU_PRI_WORKQUEUE_DOWN = -5
}
 

Functions

int register_cpu (struct cpu *cpu, int num)
 
struct deviceget_cpu_device (unsigned cpu)
 
bool cpu_is_hotpluggable (unsigned cpu)
 
int cpu_add_dev_attr (struct device_attribute *attr)
 
void cpu_remove_dev_attr (struct device_attribute *attr)
 
int cpu_add_dev_attr_group (struct attribute_group *attrs)
 
void cpu_remove_dev_attr_group (struct attribute_group *attrs)
 

Variables

struct bus_type cpu_subsys
 

Macro Definition Documentation

#define CPU_DEAD   0x0007 /* CPU (unsigned)v dead */

Definition at line 86 of file cpu.h.

#define CPU_DEAD_FROZEN   (CPU_DEAD | CPU_TASKS_FROZEN)

Definition at line 101 of file cpu.h.

#define CPU_DOWN_FAILED   0x0006 /* CPU (unsigned)v NOT going down */

Definition at line 85 of file cpu.h.

#define CPU_DOWN_FAILED_FROZEN   (CPU_DOWN_FAILED | CPU_TASKS_FROZEN)

Definition at line 100 of file cpu.h.

#define CPU_DOWN_PREPARE   0x0005 /* CPU (unsigned)v going down */

Definition at line 84 of file cpu.h.

#define CPU_DOWN_PREPARE_FROZEN   (CPU_DOWN_PREPARE | CPU_TASKS_FROZEN)

Definition at line 99 of file cpu.h.

#define CPU_DYING
Value:
0x0008 /* CPU (unsigned)v not running any task,
* not handling interrupts, soon dead.
* Called on the dying cpu, interrupts
* are already disabled. Must not
* sleep, must not fail */

Definition at line 87 of file cpu.h.

#define CPU_DYING_FROZEN   (CPU_DYING | CPU_TASKS_FROZEN)

Definition at line 102 of file cpu.h.

#define cpu_notifier (   fn,
  pri 
)    do { (void)(fn); } while (0)

Definition at line 143 of file cpu.h.

#define CPU_ONLINE   0x0002 /* CPU (unsigned)v is up */

Definition at line 81 of file cpu.h.

#define CPU_ONLINE_FROZEN   (CPU_ONLINE | CPU_TASKS_FROZEN)

Definition at line 96 of file cpu.h.

#define CPU_POST_DEAD
Value:
0x0009 /* CPU (unsigned)v dead, cpu_hotplug
* lock is dropped */

Definition at line 88 of file cpu.h.

#define CPU_STARTING
Value:
0x000A /* CPU (unsigned)v soon running.
* Called on the new cpu, just before
* enabling interrupts. Must not sleep,
* must not fail */

Definition at line 89 of file cpu.h.

#define CPU_STARTING_FROZEN   (CPU_STARTING | CPU_TASKS_FROZEN)

Definition at line 103 of file cpu.h.

#define CPU_TASKS_FROZEN   0x0010

Definition at line 94 of file cpu.h.

#define CPU_UP_CANCELED   0x0004 /* CPU (unsigned)v NOT coming up */

Definition at line 83 of file cpu.h.

#define CPU_UP_CANCELED_FROZEN   (CPU_UP_CANCELED | CPU_TASKS_FROZEN)

Definition at line 98 of file cpu.h.

#define CPU_UP_PREPARE   0x0003 /* CPU (unsigned)v coming up */

Definition at line 82 of file cpu.h.

#define CPU_UP_PREPARE_FROZEN   (CPU_UP_PREPARE | CPU_TASKS_FROZEN)

Definition at line 97 of file cpu.h.

#define get_online_cpus ( )    do { } while (0)

Definition at line 191 of file cpu.h.

#define hotcpu_notifier (   fn,
  pri 
)    do { (void)(fn); } while (0)

Definition at line 193 of file cpu.h.

#define put_online_cpus ( )    do { } while (0)

Definition at line 192 of file cpu.h.

#define register_hotcpu_notifier (   nb)    ({ (void)(nb); 0; })

Definition at line 195 of file cpu.h.

#define unregister_hotcpu_notifier (   nb)    ({ (void)(nb); })

Definition at line 196 of file cpu.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
CPU_PRI_SCHED_ACTIVE 
CPU_PRI_CPUSET_ACTIVE 
CPU_PRI_SCHED_INACTIVE 
CPU_PRI_CPUSET_INACTIVE 
CPU_PRI_PERF 
CPU_PRI_MIGRATION 
CPU_PRI_WORKQUEUE_UP 
CPU_PRI_WORKQUEUE_DOWN 

Definition at line 56 of file cpu.h.

Function Documentation

int cpu_add_dev_attr ( struct device_attribute attr)

Definition at line 531 of file sysfs.c.

int cpu_add_dev_attr_group ( struct attribute_group attrs)

Definition at line 546 of file sysfs.c.

bool cpu_is_hotpluggable ( unsigned  cpu)

Definition at line 304 of file cpu.c.

void cpu_remove_dev_attr ( struct device_attribute attr)

Definition at line 566 of file sysfs.c.

void cpu_remove_dev_attr_group ( struct attribute_group attrs)

Definition at line 580 of file sysfs.c.

struct device* get_cpu_device ( unsigned  cpu)
read

Definition at line 266 of file cpu.c.

int register_cpu ( struct cpu cpu,
int  num 
)

Definition at line 239 of file cpu.c.

Variable Documentation

struct bus_type cpu_subsys

Definition at line 19 of file cpu.c.