Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

s390/kernel/smp.c File Reference

#include <asm/sigp.h>
#include <asm/timex.h>
#include <asm/init.h>
#include <asm/spinlock.h>
#include <linux/module.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/kernel_stat.h>
#include <linux/smp.h>
#include <linux/mm.h>
#include <asm/pgtable.h>
#include <asm/string.h>
#include <asm/s390_ext.h>
#include "cpcmd.h"
#include <asm/irq.h>

Include dependency graph for s390/kernel/smp.c:

Go to the source code of this file.

Functions

void update_one_process (struct task_struct *p, unsigned long ticks, unsigned long user, unsigned long system, int cpu)
int cpu_idle (void *unused)
void __init smp_setup (char *str, int *ints)
void reipl (int ipl_device)
void do_machine_restart (void)
void machine_restart (char *__unused)
void do_machine_halt (void)
void machine_halt (void)
void do_machine_power_off (void)
void machine_power_off (void)
void do_ext_call_interrupt (struct pt_regs *regs, __u16 source_cpu_addr)
sigp_ccode smp_ext_call_sync (int cpu, ec_cmd_sig cmd, void *parms)
sigp_ccode smp_ext_call_async (int cpu, ec_bit_sig sig)
void smp_ext_call_sync_others (ec_cmd_sig cmd, void *parms)
void smp_ext_call_async_others (ec_bit_sig sig)
int smp_signal_others (sigp_order_code order_code, u32 parameter, int spin, sigp_info *info)
void smp_send_stop (void)
void smp_send_reschedule (int cpu)
void smp_ctl_set_bit (int cr, int bit)
void smp_ctl_clear_bit (int cr, int bit)
void smp_do_callback_all (void(*callback)(void *), void *data)
void smp_count_cpus (void)
void init_100hz_timer (void)
void cpu_init (void)
int __init start_secondary (void *cpuvoid)
void __init initialize_secondary (void)
static void __init do_boot_cpu (int cpu)
void __init smp_commence (void)
void __init smp_boot_cpus (void)
int setup_profiling_timer (unsigned int multiplier)
void smp_local_timer_interrupt (struct pt_regs *regs)
 EXPORT_SYMBOL (kernel_flag)
 EXPORT_SYMBOL (smp_ctl_set_bit)
 EXPORT_SYMBOL (smp_ctl_clear_bit)
 EXPORT_SYMBOL (smp_do_callback_all)

Variables

__u16 boot_cpu_addr
volatile int __cpu_logical_map []
static int max_cpus = NR_CPUS
int smp_num_cpus
_lowcorelowcore_ptr [NR_CPUS]
unsigned int prof_multiplier [NR_CPUS]
unsigned int prof_counter [NR_CPUS]
volatile int cpu_number_map [NR_CPUS]
cycles_t cacheflush_time = 0
int smp_threads_ready = 0
unsigned long ipi_count = 0
static atomic_t smp_commenced = ATOMIC_INIT(0)
spinlock_t kernel_flag = SPIN_LOCK_UNLOCKED
char vmhalt_cmd []
char vmpoff_cmd []


Function Documentation

int cpu_idle void *  unused  ) 
 

Definition at line 1296 of file init/main.c.

void cpu_init void   ) 
 

Definition at line 79 of file s390/kernel/setup.c.

References __sti, addr, cpu_initialized, cpus_initialized, current, hard_smp_processor_id, nr, printk, S390_lowcore, smp_processor_id, and test_and_set_bit.

Referenced by __initfunc(), and start_secondary().

static void __init do_boot_cpu int  cpu  )  [static]
 

Definition at line 570 of file s390/kernel/smp.c.

References __asm__(), _lowcore::access_regs_save_area, CLONE_PID, cpu_number_map, _lowcore::cregs_save_area, eieio, get_cpu_lowcore, idle, _lowcore::kernel_stack, kernel_thread(), panic(), signal_processor(), sigp_restart, start_secondary(), and task.

Here is the call graph for this function:

void do_ext_call_interrupt struct pt_regs regs,
__u16  source_cpu_addr
 

Definition at line 145 of file s390/kernel/smp.c.

References __flush_tlb, ec_creg_mask_parms::andvals, atomic_compare_and_swap(), atomic_read, atomic_set, ec_callback_parms::callback, ec_creg_parms::cregs, ec_callback_parms::data, do_machine_halt(), do_machine_power_off(), do_machine_restart(), ec, ec_callback, ec_done, ec_executing, ec_get_ctl, ec_halt, ec_power_off, ec_ptlb, ec_restart, ec_set_ctl, ec_set_ctl_masked, ec_creg_mask_parms::end_ctl, ec_creg_parms::end_ctl, i, ec_ext_call::next, next, NULL, ec_creg_mask_parms::orvals, pp, S390_lowcore, ec_creg_mask_parms::start_ctl, ec_creg_parms::start_ctl, test_bit, tmp, and u32.

Referenced by smp_boot_cpus().

Here is the call graph for this function:

void do_machine_halt void   ) 
 

Definition at line 106 of file s390/kernel/smp.c.

References cpcmd(), MACHINE_IS_VM, NULL, signal_processor(), sigp_stop_and_store_status, smp_processor_id, smp_send_stop(), strlen, and vmhalt_cmd.

Referenced by do_ext_call_interrupt(), and machine_halt().

Here is the call graph for this function:

void do_machine_power_off void   ) 
 

Definition at line 123 of file s390/kernel/smp.c.

References cpcmd(), MACHINE_IS_VM, NULL, signal_processor(), sigp_stop_and_store_status, smp_processor_id, smp_send_stop(), strlen, and vmpoff_cmd.

Referenced by do_ext_call_interrupt(), and machine_power_off().

Here is the call graph for this function:

void do_machine_restart void   ) 
 

Definition at line 91 of file s390/kernel/smp.c.

References reipl(), S390_lowcore, and smp_send_stop().

Referenced by do_ext_call_interrupt(), and machine_restart().

Here is the call graph for this function:

EXPORT_SYMBOL smp_do_callback_all   ) 
 

EXPORT_SYMBOL smp_ctl_clear_bit   ) 
 

EXPORT_SYMBOL smp_ctl_set_bit   ) 
 

EXPORT_SYMBOL kernel_flag   ) 
 

void init_100hz_timer void   ) 
 

Definition at line 207 of file arch/s390/kernel/time.c.

References CLK_TICKS_PER_JIFFY, cr0, and S390_lowcore.

Referenced by __initfunc(), and start_secondary().

void __init initialize_secondary void   ) 
 

Definition at line 566 of file s390/kernel/smp.c.

void machine_halt void   ) 
 

Definition at line 114 of file s390/kernel/smp.c.

References do_machine_halt(), ec_halt, smp_ext_call_async(), and smp_processor_id.

Here is the call graph for this function:

void machine_power_off void   ) 
 

Definition at line 131 of file s390/kernel/smp.c.

References do_machine_power_off(), ec_power_off, smp_ext_call_async(), and smp_processor_id.

Here is the call graph for this function:

void machine_restart char *  __unused  ) 
 

Definition at line 97 of file s390/kernel/smp.c.

References do_machine_restart(), ec_restart, smp_ext_call_async(), and smp_processor_id.

Here is the call graph for this function:

void reipl int  ipl_device  ) 
 

Definition at line 5580 of file s390io.c.

References do_reipl, free_irq(), highest_subchannel, i, REIPL_DEVID_MAGIC, and x10000.

Referenced by do_machine_restart(), and machine_restart().

Here is the call graph for this function:

int setup_profiling_timer unsigned int  multiplier  ) 
 

Definition at line 683 of file s390/kernel/smp.c.

void __init smp_boot_cpus void   ) 
 

Definition at line 618 of file s390/kernel/smp.c.

References cpu_data, cpu_number_map, do_boot_cpu(), do_ext_call_interrupt(), i, memcpy, memset, NR_CPUS, NULL, panic(), print_cpu_info(), printk, prof_counter, prof_multiplier, register_external_interrupt(), S390_lowcore, safe_get_cpu_lowcore, set_prefix(), signal_processor_p(), sigp_set_prefix, smp_count_cpus(), smp_num_cpus, smp_processor_id, and u32.

Here is the call graph for this function:

void __init smp_commence void   ) 
 

Definition at line 606 of file s390/kernel/smp.c.

References atomic_set.

void smp_count_cpus void   ) 
 

Definition at line 519 of file s390/kernel/smp.c.

References __cpu_logical_map, boot_cpu_addr, current, max_cpus, printk, signal_processor(), sigp_not_operational, sigp_sense, and smp_num_cpus.

Referenced by smp_boot_cpus().

Here is the call graph for this function:

void smp_ctl_clear_bit int  cr,
int  bit
 

Definition at line 488 of file s390/kernel/smp.c.

References __ctl_clear_bit, ec_creg_mask_parms::andvals, atomic_read, ec_set_ctl_masked, ec_creg_mask_parms::end_ctl, ec_creg_mask_parms::orvals, parms, smp_ext_call_sync_others(), and ec_creg_mask_parms::start_ctl.

Here is the call graph for this function:

void smp_ctl_set_bit int  cr,
int  bit
 

Definition at line 472 of file s390/kernel/smp.c.

References __ctl_set_bit, ec_creg_mask_parms::andvals, atomic_read, ec_set_ctl_masked, ec_creg_mask_parms::end_ctl, ec_creg_mask_parms::orvals, parms, smp_ext_call_sync_others(), and ec_creg_mask_parms::start_ctl.

Here is the call graph for this function:

void smp_do_callback_all void(*)(void *)  callback,
void *  data
 

Definition at line 504 of file s390/kernel/smp.c.

References atomic_read, ec_callback_parms::callback, ec_callback_parms::data, ec_callback, parms, and smp_ext_call_sync_others().

Here is the call graph for this function:

sigp_ccode smp_ext_call_async int  cpu,
ec_bit_sig  sig
 

Definition at line 307 of file s390/kernel/smp.c.

References atomic_set_mask, _lowcore::ext_call_fast, get_cpu_lowcore, signal_processor(), and sigp_external_call.

Referenced by machine_halt(), machine_power_off(), machine_restart(), and smp_send_reschedule().

Here is the call graph for this function:

void smp_ext_call_async_others ec_bit_sig  sig  ) 
 

Definition at line 359 of file s390/kernel/smp.c.

References atomic_set_mask, _lowcore::ext_call_fast, get_cpu_lowcore, i, signal_processor(), sigp_external_call, smp_num_cpus, and smp_processor_id.

Here is the call graph for this function:

sigp_ccode smp_ext_call_sync int  cpu,
ec_cmd_sig  cmd,
void *  parms
 

Definition at line 269 of file s390/kernel/smp.c.

References atomic_compare_and_swap(), atomic_read, atomic_set, ec_ext_call::cmd, ec, ec_done, ec_pending, _lowcore::ext_call_queue, get_cpu_lowcore, ec_ext_call::next, ec_ext_call::parms, signal_processor(), sigp_external_call, sigp_not_operational, and ec_ext_call::status.

Here is the call graph for this function:

void smp_ext_call_sync_others ec_cmd_sig  cmd,
void *  parms
 

Definition at line 324 of file s390/kernel/smp.c.

References atomic_compare_and_swap(), atomic_read, atomic_set, ec_ext_call::cmd, ec, ec_done, ec_pending, _lowcore::ext_call_queue, get_cpu_lowcore, i, next, ec_ext_call::next, NR_CPUS, ec_ext_call::parms, signal_processor(), sigp_external_call, smp_num_cpus, smp_processor_id, and status.

Referenced by smp_ctl_clear_bit(), smp_ctl_set_bit(), and smp_do_callback_all().

Here is the call graph for this function:

void smp_local_timer_interrupt struct pt_regs regs  ) 
 

Definition at line 698 of file s390/kernel/smp.c.

References cpu, kernel_stat::cpu_nice, kernel_stat::cpu_system, kernel_stat::cpu_user, current, pt_regs::eip, irq_enter, irq_exit, kstat, p, kernel_stat::per_cpu_nice, kernel_stat::per_cpu_system, kernel_stat::per_cpu_user, prof_counter, prof_multiplier, smp_processor_id, system, update_one_process(), user_mode, and x86_do_profile().

Here is the call graph for this function:

void smp_send_reschedule int  cpu  ) 
 

Definition at line 464 of file s390/kernel/smp.c.

References ec_schedule, and smp_ext_call_async().

Here is the call graph for this function:

void smp_send_stop void   ) 
 

Definition at line 427 of file s390/kernel/smp.c.

References __PANIC_MAGIC, dummy, get_cpu_lowcore, i, long, NULL, signal_processor_ps(), sigp_busy, sigp_stop, sigp_store_status_at_address, smp_num_cpus, smp_processor_id, smp_signal_others(), TRUE, and u32.

Here is the call graph for this function:

void __init smp_setup char *  str,
int *  ints
 

Definition at line 76 of file s390/kernel/smp.c.

References max_cpus.

int smp_signal_others sigp_order_code  order_code,
u32  parameter,
int  spin,
sigp_info *  info
 

Definition at line 394 of file s390/kernel/smp.c.

References dummy, FALSE, i, signal_processor_ps(), sigp_busy, sigp_order_code_accepted, smp_num_cpus, smp_processor_id, TRUE, u16, and u32.

Referenced by smp_send_stop().

Here is the call graph for this function:

int __init start_secondary void *  cpuvoid  ) 
 

Definition at line 546 of file s390/kernel/smp.c.

References atomic_read, cpu_data, cpu_idle(), cpu_init(), init_100hz_timer(), NULL, print_cpu_info(), safe_get_cpu_lowcore, and smp_processor_id.

Here is the call graph for this function:

void update_one_process struct task_struct *  p,
unsigned long  ticks,
unsigned long  user,
unsigned long  system,
int  cpu
 

Definition at line 1459 of file kernel/sched.c.


Variable Documentation

volatile int __cpu_logical_map[]
 

Definition at line 110 of file i386/kernel/smp.c.

__u16 boot_cpu_addr
 

Definition at line 46 of file s390/kernel/setup.c.

Referenced by __initfunc(), do_timer_interrupt(), and smp_count_cpus().

cycles_t cacheflush_time = 0
 

Definition at line 58 of file s390/kernel/smp.c.

volatile int cpu_number_map[NR_CPUS]
 

Definition at line 57 of file s390/kernel/smp.c.

unsigned long ipi_count = 0
 

Definition at line 60 of file s390/kernel/smp.c.

spinlock_t kernel_flag = SPIN_LOCK_UNLOCKED
 

Definition at line 63 of file s390/kernel/smp.c.

struct _lowcore* lowcore_ptr[NR_CPUS]
 

Definition at line 54 of file s390/kernel/smp.c.

int max_cpus = NR_CPUS [static]
 

Definition at line 52 of file s390/kernel/smp.c.

unsigned int prof_counter[NR_CPUS]
 

Definition at line 56 of file s390/kernel/smp.c.

unsigned int prof_multiplier[NR_CPUS]
 

Definition at line 55 of file s390/kernel/smp.c.

atomic_t smp_commenced = ATOMIC_INIT(0) [static]
 

Definition at line 61 of file s390/kernel/smp.c.

int smp_num_cpus
 

Definition at line 53 of file s390/kernel/smp.c.

int smp_threads_ready = 0
 

Definition at line 59 of file s390/kernel/smp.c.

char vmhalt_cmd[]
 

Definition at line 107 of file s390/kernel/setup.c.

Referenced by __initfunc(), do_machine_halt(), and machine_halt().

char vmpoff_cmd[]
 

Definition at line 108 of file s390/kernel/setup.c.

Referenced by do_machine_power_off(), and machine_power_off().