Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
smp.c File Reference
#include <linux/rcupdate.h>
#include <linux/rculist.h>
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/percpu.h>
#include <linux/init.h>
#include <linux/gfp.h>
#include <linux/smp.h>
#include <linux/cpu.h>
#include "smpboot.h"

Go to the source code of this file.

Functions

 EXPORT_SYMBOL (setup_max_cpus)
 
void __weak arch_disable_smp_support (void)
 
 early_param ("nosmp", nosmp)
 
 early_param ("nr_cpus", nrcpus)
 
 early_param ("maxcpus", maxcpus)
 
 EXPORT_SYMBOL (nr_cpu_ids)
 
void __init setup_nr_cpu_ids (void)
 
void __init smp_init (void)
 
int on_each_cpu (void(*func)(void *info), void *info, int wait)
 
 EXPORT_SYMBOL (on_each_cpu)
 
void on_each_cpu_mask (const struct cpumask *mask, smp_call_func_t func, void *info, bool wait)
 
 EXPORT_SYMBOL (on_each_cpu_mask)
 
void on_each_cpu_cond (bool(*cond_func)(int cpu, void *info), smp_call_func_t func, void *info, bool wait, gfp_t gfp_flags)
 
 EXPORT_SYMBOL (on_each_cpu_cond)
 
void kick_all_cpus_sync (void)
 
 EXPORT_SYMBOL_GPL (kick_all_cpus_sync)
 

Variables

unsigned int setup_max_cpus = NR_CPUS
 
int nr_cpu_ids __read_mostly = NR_CPUS
 

Function Documentation

void __weak arch_disable_smp_support ( void  )

arch_disable_smp_support() - disables SMP support for x86 at runtime

Definition at line 602 of file smp.c.

early_param ( "nosmp"  ,
nosmp   
)
early_param ( "nr_cpus"  ,
nrcpus   
)
early_param ( "maxcpus"  ,
maxcpus   
)
EXPORT_SYMBOL ( setup_max_cpus  )
EXPORT_SYMBOL ( nr_cpu_ids  )
EXPORT_SYMBOL ( on_each_cpu  )
EXPORT_SYMBOL ( on_each_cpu_mask  )
EXPORT_SYMBOL ( on_each_cpu_cond  )
EXPORT_SYMBOL_GPL ( kick_all_cpus_sync  )
void kick_all_cpus_sync ( void  )

kick_all_cpus_sync - Force all cpus out of idle

Used to synchronize the update of pm_idle function pointer. It's called after the pointer is updated and returns after the dummy callback function has been executed on all cpus. The execution of the function can only happen on the remote cpus after they have left the idle function which had been called via pm_idle function pointer. So it's guaranteed that nothing uses the previous pointer anymore.

Definition at line 794 of file smp.c.

int on_each_cpu ( void(*)(void *info func,
void info,
int  wait 
)

Definition at line 674 of file smp.c.

void on_each_cpu_cond ( bool(*)(int cpu, void *info cond_func,
smp_call_func_t  func,
void info,
bool  wait,
gfp_t  gfp_flags 
)

Definition at line 745 of file smp.c.

void on_each_cpu_mask ( const struct cpumask mask,
smp_call_func_t  func,
void info,
bool  wait 
)

on_each_cpu_mask(): Run a function on processors specified by cpumask, which may include the local processor. : The set of cpus to run on (only runs on online subset). : The function to run. This must be fast and non-blocking. : An arbitrary pointer to pass to the function. : If true, wait (atomically) until function has completed on other CPUs.

If is true, then returns once has returned.

You must not call this function with disabled interrupts or from a hardware interrupt handler or from a bottom half handler.

Definition at line 703 of file smp.c.

void __init setup_nr_cpu_ids ( void  )

Definition at line 644 of file smp.c.

void __init smp_init ( void  )

Definition at line 650 of file smp.c.

Variable Documentation

int nr_cpu_ids __read_mostly = NR_CPUS

Definition at line 640 of file smp.c.

unsigned int setup_max_cpus = NR_CPUS

Definition at line 587 of file smp.c.