Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
smp.c File Reference
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/init.h>
#include <linux/jiffies.h>
#include <linux/cpumask.h>
#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/profile.h>
#include <linux/smp.h>
#include <linux/cpu.h>
#include <asm/tlbflush.h>
#include <asm/bitops.h>
#include <asm/processor.h>
#include <asm/bug.h>
#include <asm/exceptions.h>
#include <asm/hardirq.h>
#include <asm/fpu.h>
#include <asm/mmu_context.h>
#include <asm/thread_info.h>
#include <asm/cpu-regs.h>
#include <asm/intctl-regs.h>
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  nmi_call_data_struct
 

Macros

#define Dprintk(fmt,...)   no_printk(KERN_DEBUG fmt, ##__VA_ARGS__)
 
#define CALL_FUNCTION_NMI_IPI_TIMEOUT   0
 

Functions

struct nmi_call_data_struct __attribute__ ((__aligned__(SMP_CACHE_BYTES)))
 
void send_IPI_self (int irq)
 
void send_IPI_allbutself (int irq)
 
void arch_send_call_function_ipi_mask (const struct cpumask *mask)
 
void arch_send_call_function_single_ipi (int cpu)
 
void smp_send_reschedule (int cpu)
 
int smp_nmi_call_function (smp_call_func_t func, void *info, int wait)
 
void smp_jump_to_debugger (void)
 
void stop_this_cpu (void *unused)
 
void smp_send_stop (void)
 
void smp_nmi_call_function_interrupt (void)
 
void __init smp_init_cpus (void)
 
void smp_prepare_cpu_init (void)
 
int __init start_secondary (void *unused)
 
void __init smp_prepare_cpus (unsigned int max_cpus)
 
void __init smp_cpus_done (unsigned int max_cpus)
 
void __devinit smp_prepare_boot_cpu (void)
 
void initialize_secondary (void)
 
int __devinit __cpu_up (unsigned int cpu, struct task_struct *tidle)
 
int setup_profiling_timer (unsigned int multiplier)
 

Variables

smp_call_func_t func
 
voidinfo
 
cpumask_t started
 
cpumask_t finished
 
int wait
 
cpumask_t cpu_boot_map
 
unsigned long start_stack [NR_CPUS-1]
 
struct mn10300_cpuinfo
cpu_data[NR_CPUS
__cacheline_aligned
 
cpumask_t cpu_initialized __initdata = CPU_MASK_NONE
 

Macro Definition Documentation

#define CALL_FUNCTION_NMI_IPI_TIMEOUT   0

Definition at line 62 of file smp.c.

#define Dprintk (   fmt,
  ... 
)    no_printk(KERN_DEBUG fmt, ##__VA_ARGS__)

Definition at line 58 of file smp.c.

Function Documentation

int __devinit __cpu_up ( unsigned int  cpu,
struct task_struct tidle 
)

__cpu_up - Set smp_commenced_mask for the nominated CPU : The target CPU.

Definition at line 925 of file smp.c.

void arch_send_call_function_ipi_mask ( const struct cpumask mask)

Definition at line 349 of file smp.c.

void arch_send_call_function_single_ipi ( int  cpu)

Definition at line 355 of file smp.c.

void initialize_secondary ( void  )

Definition at line 912 of file smp.c.

void send_IPI_allbutself ( int  irq)

send_IPI_allbutself - Send IPIs to all the other CPUs. : The IPI request to be sent.

Send the specified IPI to all CPUs in the system barring the current one, not waiting for them to finish before returning. The caller is responsible for synchronisation if that is needed.

Definition at line 340 of file smp.c.

void send_IPI_self ( int  irq)

send_IPI_self - Send an IPI to this CPU. : The IPI request to be sent.

Send the specified IPI to the current CPU.

Definition at line 327 of file smp.c.

int setup_profiling_timer ( unsigned int  multiplier)

setup_profiling_timer - Set up the profiling timer - The frequency multiplier to use

The frequency of the profiling timer can be changed by writing a multiplier value into /proc/profile.

Definition at line 956 of file smp.c.

void __init smp_cpus_done ( unsigned int  max_cpus)

smp_cpus_done - : Maximum CPU count.

Do nothing.

Definition at line 890 of file smp.c.

void __init smp_init_cpus ( void  )

Definition at line 556 of file smp.c.

void smp_jump_to_debugger ( void  )

smp_jump_to_debugger - Make other CPUs enter the debugger by sending an IPI

Send a non-maskable request to all other CPUs in the system, instructing them to jump into the debugger. The caller is responsible for checking that the other CPUs responded to the instruction.

The caller should make sure that this CPU's debugger IPI is disabled.

Definition at line 450 of file smp.c.

int smp_nmi_call_function ( smp_call_func_t  func,
void info,
int  wait 
)

smp_nmi_call_function - Send a call function NMI IPI to all CPUs : The function to ask to be run. : The context data to pass to that function. : If true, wait (atomically) until function is run on all CPUs.

Send a non-maskable request to all CPUs in the system, requesting them to run the specified function with the given context data, and, potentially, to wait for completion of that function on all CPUs.

Returns 0 if successful, -ETIMEDOUT if we were asked to wait, but hit the timeout.

Definition at line 382 of file smp.c.

void smp_nmi_call_function_interrupt ( void  )

smp_nmi_call_function_interrupt - Non-maskable call function IPI handler

Definition at line 521 of file smp.c.

void __devinit smp_prepare_boot_cpu ( void  )

Definition at line 900 of file smp.c.

void smp_prepare_cpu_init ( void  )

smp_prepare_cpu_init - Initialise CPU in startup_secondary

Set interrupt level 0-6 setting and init ICR of the kernel debugger.

Definition at line 621 of file smp.c.

void __init smp_prepare_cpus ( unsigned int  max_cpus)

smp_prepare_cpus - Boot up secondary CPUs (APs) : Maximum number of CPUs to boot.

Call do_boot_cpu, and boot up APs.

Definition at line 680 of file smp.c.

void smp_send_reschedule ( int  cpu)

smp_send_reschedule - Send reschedule IPI to a CPU : The CPU to target.

Definition at line 364 of file smp.c.

void smp_send_stop ( void  )

smp_send_stop - Send a stop request to all CPUs.

Definition at line 486 of file smp.c.

int __init start_secondary ( void unused)

start_secondary - Activate a secondary CPU (AP) : Thread parameter (ignored).

Definition at line 656 of file smp.c.

void stop_this_cpu ( void unused)

stop_this_cpu - Callback to stop a CPU. : Callback context (ignored).

Definition at line 461 of file smp.c.

Variable Documentation

struct mn10300_cpuinfo cpu_data [NR_CPUS] __cacheline_aligned

Definition at line 91 of file smp.c.

Definition at line 95 of file smp.c.

cpumask_t cpu_boot_map

Definition at line 85 of file smp.c.

cpumask_t finished

Definition at line 79 of file smp.c.

Definition at line 76 of file smp.c.

void* info

Definition at line 77 of file smp.c.

unsigned long start_stack[NR_CPUS-1]

Definition at line 86 of file smp.c.

cpumask_t started

Definition at line 78 of file smp.c.

to wait

for all cpus to start executing it.

CONTEXT: Might sleep.

RETURNS: -ENOENT if

Definition at line 80 of file smp.c.