文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>start_kernel()之smp_prepare_boot_cpu(void)

start_kernel()之smp_prepare_boot_cpu(void)

时间:2010-10-15  来源:letmego163

 

static inline void smp_prepare_boot_cpu(void)
{
    smp_ops.smp_prepare_boot_cpu();
}


smp_ops is a global variable defined in smp.c

struct smp_ops smp_ops = {
    .smp_prepare_boot_cpu    = native_smp_prepare_boot_cpu,
    .smp_prepare_cpus    = native_smp_prepare_cpus,
    .smp_cpus_done        = native_smp_cpus_done,

    .smp_send_stop        = native_smp_send_stop,
    .smp_send_reschedule    = native_smp_send_reschedule,

    .cpu_up            = native_cpu_up,
    .cpu_die        = native_cpu_die,
    .cpu_disable        = native_cpu_disable,
    .play_dead        = native_play_dead,

    .send_call_func_ipi    = native_send_call_func_ipi,
    .send_call_func_single_ipi = native_send_call_func_single_ipi,
};
EXPORT_SYMBOL_GPL(smp_ops);




/*
 * Early setup to make printk work.
 */
void __init native_smp_prepare_boot_cpu(void)
{
    int me = smp_processor_id();
    switch_to_new_gdt(me);
    /* already set me in cpu_online_mask in boot_cpu_init() */
    cpumask_set_cpu(me, cpu_callout_mask);
    per_cpu(cpu_state, me) = CPU_ONLINE;
}


相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载